Copy permissions
Copies existing device access to other users or user groups. This endpoint can be used by owner or administrator of the device.
POST https://api.tedee.com/api/v37/my/device/{deviceId}/access/{accessId}/copy-to
Path Parameters
Name |
Type |
Description |
|---|---|---|
accessId |
UUID |
ID of the access to be copied |
deviceId |
integer |
ID of the device |
Body Parameters
Name |
Type |
Description |
|---|---|---|
principals |
array |
list of principals to copy the access to |
Principal details
Name |
Type |
Description |
|---|---|---|
principalId |
UUID |
principal UID (required for principalType: 1) |
principalType |
number |
0 = User, 1 = UserGroup |
userEmail |
string |
user email (required for principalType: 0) |
Responses
Name |
Type |
Description |
|---|---|---|
201 Created |
successful operation |
Scopes
Name |
Description |
|---|---|
DeviceShare.ReadWrite |
Grants user possibility to read and write data connected with device access |
Examples
Copy access to another user
Sample request
curl -X POST "https://api.tedee.com/api/v37/my/device/{deviceId}/access/{accessId}/copy-to" -H "accept: application/json" -H "Content-Type: application/json" -H "Authorization: Bearer <<access token>>" -d "<<body>>"
Body:
{
"principals": [
{
"principalType": 0,
"userEmail": "john.doe@email.com"
}
]
}
Sample response
HTTP status code: 201
{
"principals": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"principalType": 0,
"principalId": "bcc1fdc9-13ee-43b3-a13e-eaba8eaf7996",
"userEmail": "john.doe@email.com",
"displayName": "John Doe",
"success": true,
"error": null
}
]
}