{
"principal": Recipient Resource,
"sharing": SharingPermission Resource
}
{
"mode": string ("none", "whitelist" or "blacklist"),
"email_list": [ string ],
"domain_list": [ string ]
}
{
"type": string ("user" or "group")
"id": long,
"href": string
}
{
"allow_sharing_with_ldap_groups": boolean,
"sharing_permissions": [
AssignedSharingPermission Resource
],
"external_restrictions": ExternalSharingRestrictions Resource
}
[Request]
> curl -k -u admin:novell https://amethyst.provo.novell.com:8443/rest/admin/share_settings
[Response]
{
"href":"/admin/share_settings",
"links":[{
"rel":"permissions",
"href":"/admin/share_settings/permissions"
},{
"rel":"external_restrictions",
"href":"/admin/share_settings/external_restrictions"
}],
"allow_sharing_with_ldap_groups":true,
"sharing_permissions":[{
"principal":{
"id":1,
"type":"user",
"href":"/users/1"
},
"sharing":{
"internal":true,
"external":true,
"public":true,
"all_internal":true,
"all_external":false,
"public_link":true,
"grant_reshare":true
}
},{
"principal":{
"id":2,
"type":"group",
"href":"/groups/2"
},
"sharing":{
"internal":true,
"external":true,
"public":true,
"all_internal":true,
"all_external":false,
"public_link":true,
"grant_reshare":true
}
}],
"external_restrictions":{
"mode":"none",
"email_list":[],
"domain_list":[]
}
}
To modify the share settings, PUT a ShareSettings object to the share_settings related link (href: "/admin/share_settings"). Only the attributes that are included in the request body are updated.
[Request]
> curl -k -u admin:novell https://amethyst.provo.novell.com:8443/rest/admin/share_settings \
-X PUT -H "Content-Type: application/json" -d '{"allow_sharing_with_ldap_groups":false}'
[Response]
{
...(ShareSettings Resource)
}
The permissions related link (href: "/admin/sharing/permissions") allows you to deal with just the permissions portion of Share Settings.
[Request]
> curl -k -u admin:novell https://amethyst.provo.novell.com:8443/rest/admin/share_settings/permissions
[Response]
[{
"principal":{
"id":1,
"type":"user",
"href":"/users/1"
},
"sharing":{
"internal":true,
"external":true,
"public":true,
"all_internal":true,
"all_external":false,
"public_link":true,
"grant_reshare":true
}
},{
"principal":{
"id":2,
"type":"group",
"href":"/groups/2"
},
"sharing":{
"internal":true,
"external":true,
"public":true,
"all_internal":true,
"all_external":false,
"public_link":true,
"grant_reshare":true
}
}]
To add a new permission, POST an AssignedSharingPermission to the permissions related link:
[Request]
> curl -k -u admin:novell https://amethyst.provo.novell.com:8443/rest/admin/share_settings/permissions \
-X POST -H "Content-Type: application/json" -d '{"principal":{"id":20,"type":"user"},"sharing":{"internal":true}}'
[Response]
[
...(full list of AssigneSharingPermission objects)
]
To replace the whole list of permissions, PUT a list of AssignedSharingPermission objects to the permissions related link:
[Request]
> curl -k -u admin:novell https://amethyst.provo.novell.com:8443/rest/admin/share_settings/permissions \
-X PUT -H "Content-Type: application/json" \
-d '[{"principal":{"id":20,"type":"user"},"sharing":{"internal":true}},
{"principal":{"id":21,"type":"user"},"sharing":{"internal":true}}]'
[Response]
[
...(full list of AssignedSharingPermission objects)
]
To delete all permissions, make a DELETE request to the permissions related link:
[Request]
> curl -k -u admin:novell https://amethyst.provo.novell.com:8443/rest/admin/share_settings/permissions -X DELETE
[Empty Response]
The external_restrictions related link (href: "/admin/sharing/external_restrictions") allows you to deal with just the external sharing restrictions of the Share Settings.
[Request]
> curl -k -u admin:novell https://amethyst.provo.novell.com:8443/rest/admin/share_settings/external_restrictions
[Response]
{"mode":"none","email_list":[],"domain_list":[]}
To update the external sharing restrictions settings, PUT an ExternalSharingRestrictions object to the external_restrictions related link.
[Request]
> curl -k -u admin:novell https://amethyst.provo.novell.com:8443/rest/admin/share_settings/external_restrictions \
-X PUT -H "Content-Type: application/json" \
-d '{"mode":"whitelist", "domain_list":["novell.com","microfocus.com"]}'
[Response]
{"mode":"whitelist","email_list":[],"domain_list":["microfocus.com","novell.com"]}