The API supports GET, POST, and DELETE calls.
All the endpoints take the “id” parameter, which takes the form of a string.
For example: 5dba1525-44a6-45ed-a42e-4a155a3f0539
Read Permissions (ACLs)
Request:
GET /api/repo/(connectorid)/acls?id=(id)
Description:
Retrieves a list of in the format of [“principalID:permission1,permissions2”,….. ]
Path Parameters:
connectorid:The connector id of your content service connector
Query Parameters:
id:The repository id of the item.
GET /api/repo/cmis/acls?id=5dba1525-44a6-45ed-a42e-4a155a3f0539
Returns:
{
"results": [
"user@alfresco.com:cmis:all"
],
"success": true
}
Example With CURL
curl -u admin:admin
"localhost:8081/3sixty-admin/api/repo/cmis/acls?id=5dba1525-44a6-45ed-a42e-4a155a3f0539" |
json_pp
Write Permissions (ACLs)
Request:
POST /repo/(connectorid)/acls?id=(id)&acls=(acls)
Description:
Adds a principal to an object with the specified permissions. If the object exists, replace its permissions with those supplied.
Path Parameters:
connectorid:The connector id of your content service connector
Query Parameters:
id:The repository id of the item. acls: A JSON String in the format of {“principalID”:”permission1,permission2”,….}
POST
/api/repo/cmis/acls?id=5dba1525-44a6-45ed-a42e-4a155a3f0539&acls={"newuser@alfresco.com":"cmis:read,cmis:write"}
Returns:
{
"results": [
"user@alfresco.com:cmis:all",
"newuser@alfresco.com:cmis:read,cmis:write"
],
"success": true
}
Delete Permissions (ACLs)
Request:
DELETE /repo/(connectorid)/acls?id=(id)&acls=(acls)
Description:
Remove a principle from an object.
Path Parameters: connectorid: The connector id of your content service connector
Query Parameters: id:The repository id of the item. aclId:a comma delimited link of principal Ids to remove from the target document.
DELETE
/api/repo/cmis/acls?id=5dba1525-44a6-45ed-a42e-4a155a3f0539&aclId=newuser@alfresco.com
Returns:
{
"success": true
}
And the following GET call should return:
{
"results": [
"user@alfresco.com:cmis:all"
],
"success": true
}
Example With CURL
curl -u admin:admin -X DELETE
"localhost:8081/3sixty-admin/repo/fn/acls?id=5dba1525-44a6-45ed-a42e-4a155a3f0539&aclId=newuser@alfresco.com|
json_pp