You can update privacy permissions of a content item by sending the POST request to the following URL: /content/<content_item_id>/permissions.
Permission to run the request: Account Owner, Administrator, Organization Administrator, Publisher.
Parameter | Description |
---|
X-Auth-Account-Url(required) | Base URL of the account, e.g. http://myaccount.ispringlearn.com |
X-Auth-Email (required) | Administrator/Publisher e-mail address. |
X-Auth-Password(required) | Administrator/Publisher password. |
X-Privacy (required) | a content item can be either public or private. |
X-Use-Parent-Permissions (optional) | 0 or 1 - if a content item inherits parent folder permissions. |
X-Users (optional) | a comma-separated list of user IDs, who are allowed to view a given private content item. |
X-Groups (optional) | a comma-separated list of group IDs, which members are allowed to view a given private content item. |
After the request has been completed, the system returns the response with Code 200.
Possible Response Codes
Code | Text | Description |
---|
400 | Bad Request | The system failed to process the request, because it did not contain all necessary parameters. |
200 | Ok | Permissions of the specified content item have been updated. |
Sample Request
POST /content/1/permissions HTTP/1.1
Host: api.ispringonline.com
X-Auth-Account-Url: http://myaccount.ispringlearn.com
X-Auth-Email: email@email.com
X-Auth-Password: password
X-Privacy: private
X-Use-Parent-Permissions: 1
X-Users: 1,2,3
X-Groups: 2,1
XML
Sample Response
HTTP/1.1 200 OK
Connection: close
XML