Page tree
Skip to end of metadata
Go to start of metadata

You can update security settings of a content item by sending the POST request to the following URL:/content/<content_item_id>/permissions.

Request Headers

ParameterDescription
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-Is-Viewed-Once(optional)0 – a private content item can be viewed several times.

1 – a private content item can be viewed only once.

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

CodeTextDescription
400Bad RequestThe system failed to process the request, because it did not contain all necessary parameters.
200OkSecurity settings 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.ispringonline.com
X
-Auth-Email: email@email.com
X
-Auth-Password: password
X
-Privacy: private
X
-Is-Viewed-Once: 1
X
-Users: 1,2,3
X
-Groups: 2,1

Sample Response

HTTP/1.1 200 OK
Server: nginx
Connection: close
  •