Device Category Management
Device categories label kinds of physical devices (readers, switches, IoT actuators) and list the actions those devices may perform (for example ON, OFF, TOGGLE).
Available from cidaas 4.1.0.
APIs are served by access-control-srv under:
/access-control-srv/device-categories/access-control-srv/graph/device-categories(list / search)
Admin group roles (CIDAAS_ADMINS Admin or Secondary Admin) are required. There is no separate public OAuth scope for these routes.
See also the Device Categories OpenAPI reference.
Model
| Field | Required | Description |
|---|---|---|
id | Yes (create) | Category identifier (for example SONOFF). |
allowedActions | Yes | Non-empty list of action names the category supports. |
createdTime / updatedTime | No | Server-managed. |
Devices reference a category via their own deviceCategory field when you manage devices in Access Control — there is no separate “map resources onto category” endpoint under device-categories.
API usage
Create
curl -X POST "https://your-tenant.cidaas.de/access-control-srv/device-categories" \
-H "Authorization: Bearer YOUR_ADMIN_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"id": "SONOFF",
"allowedActions": ["ON", "OFF", "TOGGLE"]
}'
Duplicate id → 409.
Get by id
curl -X GET "https://your-tenant.cidaas.de/access-control-srv/device-categories/SONOFF" \
-H "Authorization: Bearer YOUR_ADMIN_ACCESS_TOKEN"
Update
PUT body includes the category (including id). Path has no id segment.
curl -X PUT "https://your-tenant.cidaas.de/access-control-srv/device-categories" \
-H "Authorization: Bearer YOUR_ADMIN_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"id": "SONOFF",
"allowedActions": ["ON", "OFF", "TOGGLE", "STATUS"]
}'
List / search (graph)
curl -X POST "https://your-tenant.cidaas.de/access-control-srv/graph/device-categories" \
-H "Authorization: Bearer YOUR_ADMIN_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"filters": [],
"sort": [],
"pagination": { "from": 0, "size": 20 }
}'
Delete
curl -X DELETE "https://your-tenant.cidaas.de/access-control-srv/device-categories/SONOFF" \
-H "Authorization: Bearer YOUR_ADMIN_ACCESS_TOKEN"
Troubleshooting
| Issue | HTTP | Remediation |
|---|---|---|
| Category already exists | 409 | Choose another id or update the existing category |
| Category not found | 404 | Check id spelling / URL encoding |
| Parse / validation error | 400 | Send JSON with id and allowedActions |
Explore related topics
Need Support?
Contact cidaas support or [email protected].