Files
Patch Roles for a File
Changed onThis endpoint is used to manage the direct roles of a specific file, identified by its assetId. It allows clients to perform multiple types of role changes in a single request, including:
- Addition of new users or groups to the access control list.
- Update of roles for existing users or groups.
- Removal of users or groups from the access control list.
NOTE:
- The request body supports three arrays: additions, updates, and deletions.
- Multiple principals can be included across each action type.
- Each principal must be mentioned only once across the entire request body.
- Role changes apply directly to the file.
Validation Rules
Action Behavior additions Must include users/groups that do not already exist in the current ACL. updates Must target users/groups that already exist in the current ACL. deletions Must target users/groups that already exist in the current ACL.
patch/files/{assetId}/roles
Request
- Base URL: https://cloudstorage.adobe.io/v1
- URL: https://cloudstorage.adobe.io/v1/files/{assetId}/roles
- Auth: HTTP bearer
Path parameters
assetIdstring required
A globally unique identifier for the asset
Example:urn:aaid:sc:US:4f2fc15c-c062-4951-b37b-1f65ed62a174
The ID of the asset to get.
Headers
x-request-idstring
Example:1234567890
The X-Request-Id header is used to identify a request.
It can be used to correlate logs and other resources and is intended to be a non-persistent identifier.
Request body
Example request
{
"direct": {
"additions": [
{
"role": "edit"
}
],
"updates": [
{
"id": "08D81E3B665BE5640A495C2C@AdobeOrg",
"role": "edit"
}
],
"deletions": [
{
"id": "08D81E3B665BE5640A495C2C@AdobeOrg"
}
]
}
}Response
Success/Partial Success
Patching the roles was tried and from the response body result of each request can be
determined based on the status.
Example response
{
"direct": {
"additions": [
{
"id": "08D81E3B665BE5640A495C2C@AdobeOrg",
"role": "edit"
}
],
"updates": [
{
"id": "08D81E3B665BE5640A495C2C@AdobeOrg",
"role": "edit"
}
],
"deletions": [
{
"id": "08D81E3B665BE5640A495C2C@AdobeOrg",
"role": "edit"
}
]
}
}Changes
- info
endpoint added
- info