Accesscontrols
Manage folder and file permissions
4 tools
Get Item Access Controls
POST /v1/tools/sharefile/getItemAccessControls
Get access control list (permissions) for a file or folder
Get the access control list for a file or folder. Returns all users/groups with their permission levels.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
item_id | string | required | ID of the item to get permissions for |
Request
curl -X POST https://api.syncello.io/v1/tools/sharefile/getItemAccessControls \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"
-d '{
"item_id": "example"
}'Response
{
"item_id": "fo1a2b3c-4d5e-6f70-8192-a3b4c5d6e7f8",
"total_count": 2,
"access_controls": [
{
"Principal": {
"odata.type": "ShareFile.Api.Models.User",
"Id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"url": "https://acmefiles.sf-api.com/sf/v3/Users(a1b2c3d4-e5f6-7890-abcd-ef1234567890)"
},
"CanUpload": true,
"CanDownload": true,
"CanView": true,
"CanDelete": true,
"CanManagePermissions": true,
"NotifyOnUpload": false,
"NotifyOnDownload": false,
"IsOwner": true,
"odata.type": "ShareFile.Api.Models.AccessControl",
"Id": "principalid=a1b2c3d4-e5f6-7890-abcd-ef1234567890,itemid=fo1a2b3c-4d5e-6f70-8192-a3b4c5d6e7f8"
},
{
"Principal": {
"odata.type": "ShareFile.Api.Models.Group",
"Id": "g1a2b3c4-d5e6-7f80-9a1b-2c3d4e5f6a7b",
"url": "https://acmefiles.sf-api.com/sf/v3/Groups(g1a2b3c4-d5e6-7f80-9a1b-2c3d4e5f6a7b)"
},
"CanUpload": true,
"CanDownload": true,
"CanView": true,
"CanDelete": false,
"CanManagePermissions": false,
"NotifyOnUpload": false,
"NotifyOnDownload": false,
"IsOwner": false,
"odata.type": "ShareFile.Api.Models.AccessControl",
"Id": "principalid=g1a2b3c4-d5e6-7f80-9a1b-2c3d4e5f6a7b,itemid=fo1a2b3c-4d5e-6f70-8192-a3b4c5d6e7f8"
}
]
} Try It
Try it
Sign in to execute this tool
Sign InCreate Access Control
POST /v1/tools/sharefile/createAccessControl
Grant access to a file or folder for a user or group
Grant access to a user or group for a file/folder. Permission levels: • can_view: Required for accessing the item • can_download: Download files • can_upload: Upload files (folders only) • can_delete: Delete items • can_manage_permissions: Manage other users' access
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
item_id | string | required | ID of the item to grant access to |
principal_id | string | required | User or Group ID to grant access to |
can_view | boolean | optional | Can view/list the item (default true) |
can_download | boolean | optional | Can download files (default true) |
can_upload | boolean | optional | Can upload files (for folders) |
can_delete | boolean | optional | Can delete items |
can_manage_permissions | boolean | optional | Can manage permissions for the item |
notify_on_download | boolean | optional | Notify principal when files are downloaded |
notify_on_upload | boolean | optional | Notify principal when files are uploaded |
send_notification | boolean | optional | Send email notification about the access grant |
message | string | optional | Message to include in the notification email |
Request
curl -X POST https://api.syncello.io/v1/tools/sharefile/createAccessControl \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"
-d '{
"item_id": "example",
"principal_id": "example"
}'Response
{
"Principal": {
"odata.type": "ShareFile.Api.Models.User",
"Id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
"url": "https://acmefiles.sf-api.com/sf/v3/Users(b2c3d4e5-f6a7-8901-bcde-f12345678901)"
},
"CanUpload": true,
"CanDownload": true,
"CanView": true,
"CanDelete": false,
"CanManagePermissions": false,
"NotifyOnUpload": false,
"NotifyOnDownload": false,
"IsOwner": false,
"odata.type": "ShareFile.Api.Models.AccessControl",
"Id": "principalid=b2c3d4e5-f6a7-8901-bcde-f12345678901,itemid=fo1a2b3c-4d5e-6f70-8192-a3b4c5d6e7f8",
"url": "https://acmefiles.sf-api.com/sf/v3/AccessControls(principalid=b2c3d4e5-f6a7-8901-bcde-f12345678901,itemid=fo1a2b3c-4d5e-6f70-8192-a3b4c5d6e7f8)"
} Try It
Try it
Sign in to execute this tool
Sign InUpdate Access Control
POST /v1/tools/sharefile/updateAccessControl
Update access permissions for a user or group on an item
Update existing access permissions for a user or group.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
item_id | string | required | ID of the item |
principal_id | string | required | User or Group ID to update permissions for |
can_view | boolean | optional | Can view/list the item |
can_download | boolean | optional | Can download files |
can_upload | boolean | optional | Can upload files |
can_delete | boolean | optional | Can delete items |
can_manage_permissions | boolean | optional | Can manage permissions |
notify_on_download | boolean | optional | Notify on download |
notify_on_upload | boolean | optional | Notify on upload |
Request
curl -X POST https://api.syncello.io/v1/tools/sharefile/updateAccessControl \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"
-d '{
"item_id": "example",
"principal_id": "example"
}'Response
{
"Principal": {
"odata.type": "ShareFile.Api.Models.User",
"Id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
"url": "https://acmefiles.sf-api.com/sf/v3/Users(b2c3d4e5-f6a7-8901-bcde-f12345678901)"
},
"CanUpload": true,
"CanDownload": true,
"CanView": true,
"CanDelete": true,
"CanManagePermissions": false,
"NotifyOnUpload": true,
"NotifyOnDownload": false,
"IsOwner": false,
"odata.type": "ShareFile.Api.Models.AccessControl",
"Id": "principalid=b2c3d4e5-f6a7-8901-bcde-f12345678901,itemid=fo1a2b3c-4d5e-6f70-8192-a3b4c5d6e7f8"
} Try It
Try it
Sign in to execute this tool
Sign InDelete Access Control
POST /v1/tools/sharefile/deleteAccessControl
Remove access for a user or group from an item
Remove access for a user or group from a file or folder. This revokes all permissions for the specified principal.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
item_id | string | required | ID of the item |
principal_id | string | required | User or Group ID to remove access from |
Request
curl -X POST https://api.syncello.io/v1/tools/sharefile/deleteAccessControl \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"
-d '{
"item_id": "example",
"principal_id": "example"
}'Response
{
"message": "Removed access for b2c3d4e5-f6a7-8901-bcde-f12345678901 from item fo1a2b3c-4d5e-6f70-8192-a3b4c5d6e7f8"
} Try It
Try it
Sign in to execute this tool
Sign In