In this article
Add a New Permission to an Already Existing Access Control List
Where principal is one of sub:user:USERID, sub:dev:DEVICEID, sub:app:APPID, org:ORGID, group:ORGID:GROUPID and permission is one of owner, admin, readwrite, readonly.
URL
https://{{HOST}}/timeseries/timeseries/{timeseries_id}/permissions/{principal}::{permission}
Method
POST
Required IMS Scopes
- Read
- Write
Required ACL Permissions
- owner
- admin
Versions Supported
- 2.0
- 2.1
URL Path Parameters
| Name | Description | Example | Type |
|---|---|---|---|
| timeseries_id required |
Timeseries ID on which to grant permission | GUID | string |
| principal required |
Principal ID to which you must grant permission | sub:user:{username} | string |
| permission required |
Permission that you must grant | admin,readwrite,readonly | string |
URL Query Parameters
| Name | Description | Example | Type |
|---|---|---|---|
| v optional |
Version of the API to use | v=2.0 | string |
Request Header Parameters
| Type | Value | Description |
|---|---|---|
| Authentication | Bearer {access_token} required |
Retrieve access token |
| Content-Type | application/json required |
Description |
Example
Request
curl -X POST
'https://{{HOST}}/timeseries/timeseries/cbd573df-a2ee-4de5-83e1-56127beb4702/permissions/sub:user:bob::admin'
-H 'Authorization: Bearer {access_token}'
-H 'Cache-Control: no-cache'
-H 'Content-Type: application/json'
Response
{
"id": "cbd573df-a2ee-4de5-83e1-56127beb4702",
"objectid": "cbd573df-a2ee-4de5-83e1-56127beb4702",
"accesscontrolitems": {
"sub:user:timeseries_owner": "owner",
"sub:user:bob": "admin"
},
"accesscontrolType": 0
}
Errors
| Error | Description |
|---|---|
| Error Name | Description of Error |
Response Body Parameters
| Name | Description | Schema |
|---|---|---|
| objectId | Description | object definition |
| accesscontrolitems | Description | object definition |