{
"id": long,
"comment": string,
"sharer": LongIdLinkPair Resource,
"sharing_date": dateTime,
"days_to_expire": integer,
"expiration": dateTime,
"recipient": ShareRecipient Resource,
"shared_entity": EntityId Resource,
"role": string ("VIEWER", "CONTRIBUTOR" or "EDITOR"),
"access": Access Resource
}
{
"type": string ("user", "group", "external_user", "public", or "public_link")
"id": long,
"email": string
}
To list all shares in the system, use the shares related link (href: "/admin/shares") from the root admin resource (href: "/admin"):
[Request]
> curl -k -u admin:novell https://amethyst.provo.novell.com:8443/rest/admin/shares
[Response]
{
"first":0,
"count":1,
"total":1,
"items":[{
"id":1,
"comment":"",
"sharer":{
"id":20,
"href":"/users/20"
},
"recipient":{
"id":140,
"type":"external_user",
"href":"/users/140",
"email":"siguat@gmail.com"
},
"role":"VIEWER",
"access":{
"role":"VIEWER",
"sharing":{
"internal":false,
"external":false,
"public":false,
"public_link":false,
"grant_reshare":false
}
},
"href":"/admin/shares/1",
"sharing_date":"2015-12-22T17:31:12Z",
"shared_entity":{
"id":10,
"type":"folderEntry",
"href":"/folder_entries/10"
},
"can_share":false
}]
}
Use the shared_by query parameter to list the shares by sharer:
[Request]
> curl -k -u admin:novell https://amethyst.provo.novell.com:8443/rest/admin/shares?shared_by=20
[Response]
Similar to above
Use the shared_with query parameter to list the shares by recipient:
[Request]
> curl -k -u admin:novell https://amethyst.provo.novell.com:8443/rest/admin/shares?shared_with=140
[Response]
Similar to above
To list all public shares in the system, use the public_shares related link (href: "/admin/shares/public") from the root admin resource (href: "/admin"):
[Request]
> curl -k -u admin:novell https://amethyst.provo.novell.com:8443/rest/admin/shares/public
[Response]
Similar to above
To delete a share, send a DELETE request to the individual share resource:
[Request]
> curl -k -u admin:novell https://amethyst.wal.novell.com:8443/rest/admin/shares/24 -X DELETE
[Empty Response]