Permissions
Data Schema
Describes the structure of permission linkages between objects.
Field | Type | Description |
---|---|---|
userId |
integer |
User identifier for linkage (Required) |
deviceId |
integer |
Device identifier to link |
groupId |
integer |
Group identifier to link |
geofenceId |
integer |
Geofence identifier to link |
notificationId |
integer |
Notification identifier to link |
calendarId |
integer |
Calendar identifier to link |
attributeId |
integer |
Computed attribute identifier to link |
driverId |
integer |
Driver identifier to link |
managedUserId |
integer |
Managed user identifier to link |
commandId |
integer |
Saved command identifier to link |
Link Objects
Creates permission linkages between objects.
Endpoint:
POST /permissions
Authorization:
- Requires Basic Authentication (
basicAuth
)
cURL Request:
curl -u username:password -X POST "https://itsochvts.com/api/permissions" \
-H "Content-Type: application/json" \
-d '{
"userId": 1,
"deviceId": 2,
"groupId": 3
}'
Request Body:
{
"userId": 0,
"deviceId": 0,
"groupId": 0,
"geofenceId": 0,
"notificationId": 0,
"calendarId": 0,
"attributeId": 0,
"driverId": 0,
"managedUserId": 0,
"commandId": 0
}
Response:
204 No Content
400 No Permission
Unlink Objects
Removes permission linkages between objects.
Endpoint:
DELETE /permissions
Authorization:
- Requires Basic Authentication (
basicAuth
)
cURL Request:
curl -u username:password -X DELETE "https://itsochvts.com/api/permissions" \
-H "Content-Type: application/json" \
-d '{
"userId": 1,
"deviceId": 2
}'
Request Body:
{
"userId": 1,
"deviceId": 2
}
Response: