Skip to main content
Version: 4.1.0

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​

FieldRequiredDescription
idYes (create)Category identifier (for example SONOFF).
allowedActionsYesNon-empty list of action names the category supports.
createdTime / updatedTimeNoServer-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​

IssueHTTPRemediation
Category already exists409Choose another id or update the existing category
Category not found404Check id spelling / URL encoding
Parse / validation error400Send JSON with id and allowedActions

Need Support?