You can update permissions of a content item with the updateContentItemPermissions method.
Permission to run the request: Account Owner, Administrator, Organization Administrator, Publisher.
Parameter | Type | Description |
---|---|---|
credentials (required) | credentials | Read the description of the Credentials object. |
contentItemId(required) | string | ID of the content item which permissions you want to update. |
privacy (required) | string | Public or private. |
users (optional) | string[] | An array of user IDs who are allowed to view the given private content item. |
groups (optional) | string[] | An array of group IDs which members are allowed to view the given private content item. |
organizations (optional) | string[] | An array of organizations IDs which members are allowed to view the given private content item. |
useParentPermissions (optional) | boolean | 0 or 1 - inherit permissions from the parent folder. |
After the request has been completed, the system returns an object with the following properties:
Parameter | Type | Description |
---|---|---|
success | bool | 'True' if permissions of the given content item have been updated. |
Text | Description |
---|---|
Wrong Parameters | The system failed to process the request because it did not contain all necessary parameters. |
<?xml version="1.0" encoding="utf-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns="http://ispringlearn.com/go/services/api/soap"> <SOAP-ENV:Body> <UpdateContentItemPermissionsRequest> <credentials> <accountUrl>http://myaccount.ispringlearn.com</accountUrl> <email>email@email.com</email> <password>password</password> </credentials> <contentItemId>1234</contentItemId> <privacy>private</privacy> <useParentPermissions>true</useParentPermissions> <users> <id>1</id> <id>2</id> </users> <groups> <id>1</id> <id>2</id> </groups> <organizations> <id>1</id> <id>2</id> </organizations> </UpdateContentItemPermissionsRequest> </SOAP-ENV:Body> </SOAP-ENV:Envelope> |
<?xml version="1.0" encoding="utf-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns="http://ispringlearn.com/go/services/api/soap"> <SOAP-ENV:Body> <UpdateContentItemPermissionsResult> <success>true</success> </UpdateContentItemPermissionsResult> </SOAP-ENV:Body> </SOAP-ENV:Envelope> |