Appearance
Devices Module
Overview
Swagger-driven developer documentation for device management endpoints and contracts.
- Device management
Key APIs
| Method | Path | Summary |
|---|---|---|
| GET | /api/devices | List devices |
| POST | /api/devices | Create device |
| GET | /api/devices/{deviceId}/keys | DevicesController_getDeviceTelemetryKeys |
| DELETE | /api/devices/{id} | Delete device |
| GET | /api/devices/{id} | Get device details |
| PATCH | /api/devices/{id} | Update device |
| GET | /api/devices/{id}/attributes | Get device attributes |
| POST | /api/devices/{id}/attributes | Save device attributes |
| POST | /api/devices/{id}/commands | Send command to device |
| POST | /api/devices/{id}/test-telemetry | Send test telemetry |
| GET | /api/devices/keys | Get all telemetry keys |
| GET | /api/devices/type-defaults/{deviceType} | Get default dashboard for device type |
| GET | /api/devices/types | Get device types |
Frontend Usage Flow
- Frontend list pages call collection
GETendpoints to load tables or summary views. - Detail pages call parameterized
GETendpoints to load a single resource before rendering tabs, forms, or detail sections. - Create forms submit payloads to
POSTendpoints and then refresh the list or navigate to the created resource. - Edit flows load existing values, submit to
PUTorPATCHendpoints, and then refresh the visible state. - Delete actions call
DELETEendpoints and then refresh collection state.
GET /api/devices
Summary: List devices
Operation ID: DevicesController_findAll
Tags: Devices
Security:
bearer
Responses
200
Content-Type: application/json
Schema:
json
{
"type": "array",
"items": {
"$ref": "#/components/schemas/DeviceResponseDto"
}
}Example:
json
[
{
"deviceId": "string",
"name": "string",
"deviceType": "string",
"assetId": "string"
}
]401
Unauthorized
No response body.
Notes / Constraints
- Swagger declares security requirements for this operation.
POST /api/devices
Summary: Create device
Operation ID: DevicesController_create
Tags: Devices
Security:
bearer
Request
Content-Type: application/json
Schema:
json
{
"type": "object",
"required": [
"name",
"deviceType"
],
"properties": {
"name": {
"type": "string"
},
"deviceType": {
"type": "string"
},
"assetId": {
"type": "string"
},
"profileId": {
"type": "string",
"description": "Device profile id"
},
"role": {
"type": "string",
"description": "Logical device role",
"enum": [
"DEVICE",
"GATEWAY"
]
},
"type": {
"type": "string",
"description": "Backward-compatible alias for role",
"enum": [
"DEVICE",
"GATEWAY"
]
},
"inactivityTimeoutMs": {
"type": "number",
"description": "Inactivity timeout in milliseconds"
},
"targetDashboardId": {
"type": "string",
"description": "Target dashboard id"
},
"targetStateId": {
"type": "string",
"description": "Target dashboard state id"
},
"applyToAllOfType": {
"type": "boolean",
"description": "Apply dashboard/state defaults to all devices of the same type"
},
"commandTransport": {
"type": "string",
"enum": [
"WS",
"MQTT"
]
}
}
}Example:
json
{
"name": "Boiler Sensor",
"deviceType": "temperature-sensor",
"assetId": "asset-123",
"profileId": "default",
"role": "DEVICE",
"type": "DEVICE",
"inactivityTimeoutMs": 300000,
"targetDashboardId": "dashboard-123",
"targetStateId": "default",
"applyToAllOfType": false,
"commandTransport": "WS"
}Responses (2)
201
Content-Type: application/json
Schema:
json
{
"type": "object",
"required": [
"deviceId",
"name",
"deviceType"
],
"properties": {
"deviceId": {
"type": "string"
},
"name": {
"type": "string"
},
"deviceType": {
"type": "string"
},
"assetId": {
"type": "string"
}
}
}Example:
json
{
"deviceId": "string",
"name": "string",
"deviceType": "string",
"assetId": "string"
}401 (2)
Unauthorized
No response body.
Notes / Constraints (2)
- Supported request content types:
application/json. - Swagger declares security requirements for this operation.
GET /api/devices/{deviceId}/keys
Operation ID: DevicesController_getDeviceTelemetryKeys
Tags: Devices
Security:
bearer
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| deviceId | path | yes | string | - |
Responses (3)
200 (2)
No response body.
401 (3)
Unauthorized
No response body.
Notes / Constraints (3)
- This endpoint depends on one or more path parameters.
- Swagger declares security requirements for this operation.
DELETE /api/devices/{id}
Summary: Delete device
Operation ID: DevicesController_delete
Tags: Devices
Security:
bearer
Parameters (2)
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| id | path | yes | string | - |
Responses (4)
200 (3)
No response body.
401 (4)
Unauthorized
No response body.
Notes / Constraints (4)
- This endpoint depends on one or more path parameters.
- Swagger declares security requirements for this operation.
GET /api/devices/{id}
Summary: Get device details
Operation ID: DevicesController_findOne
Tags: Devices
Security:
bearer
Parameters (3)
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| id | path | yes | string | - |
Responses (5)
200 (4)
No response body.
401 (5)
Unauthorized
No response body.
Notes / Constraints (5)
- This endpoint depends on one or more path parameters.
- Swagger declares security requirements for this operation.
PATCH /api/devices/{id}
Summary: Update device
Operation ID: DevicesController_update
Tags: Devices
Security:
bearer
Parameters (4)
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| id | path | yes | string | - |
Request (2)
Content-Type: application/json
Schema:
json
{
"type": "object",
"properties": {
"name": {
"type": "string"
},
"deviceType": {
"type": "string"
},
"assetId": {
"type": "string"
},
"profileId": {
"type": "string",
"description": "Device profile id"
},
"role": {
"type": "string",
"description": "Logical device role",
"enum": [
"DEVICE",
"GATEWAY"
]
},
"type": {
"type": "string",
"description": "Backward-compatible alias for role",
"enum": [
"DEVICE",
"GATEWAY"
]
},
"inactivityTimeoutMs": {
"type": "number",
"description": "Inactivity timeout in milliseconds"
},
"targetDashboardId": {
"type": "string",
"description": "Target dashboard id"
},
"targetStateId": {
"type": "string",
"description": "Target dashboard state id"
},
"applyToAllOfType": {
"type": "boolean",
"description": "Apply dashboard/state defaults to all devices of the same type"
}
}
}Example:
json
{
"name": "Updated Device Name",
"deviceType": "temperature-sensor",
"assetId": "asset-123",
"profileId": "default",
"role": "DEVICE",
"type": "DEVICE",
"inactivityTimeoutMs": 300000,
"targetDashboardId": "dashboard-123",
"targetStateId": "default",
"applyToAllOfType": false
}Responses (6)
200 (5)
No response body.
401 (6)
Unauthorized
No response body.
Notes / Constraints (6)
- This endpoint depends on one or more path parameters.
- Supported request content types:
application/json. - Swagger declares security requirements for this operation.
GET /api/devices/{id}/attributes
Summary: Get device attributes
Operation ID: DevicesController_getAttributes
Tags: Devices
Security:
bearer
Parameters (5)
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| id | path | yes | string | - |
Responses (7)
200 (6)
No response body.
401 (7)
Unauthorized
No response body.
Notes / Constraints (7)
- This endpoint depends on one or more path parameters.
- Swagger declares security requirements for this operation.
POST /api/devices/{id}/attributes
Summary: Save device attributes
Operation ID: DevicesController_saveAttributes
Tags: Devices
Security:
bearer
Parameters (6)
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| id | path | yes | string | - |
Request (3)
Content-Type: application/json
Schema:
json
{
"type": "object",
"required": [
"scope",
"attributes"
],
"properties": {
"scope": {
"type": "string",
"enum": [
"SERVER",
"SHARED",
"CLIENT"
]
},
"attributes": {
"type": "object"
}
}
}Example:
json
{
"scope": "SERVER",
"attributes": {
"temperature": 25
}
}Responses (8)
201 (2)
No response body.
401 (8)
Unauthorized
No response body.
Notes / Constraints (8)
- This endpoint depends on one or more path parameters.
- Supported request content types:
application/json. - Swagger declares security requirements for this operation.
POST /api/devices/{id}/commands
Summary: Send command to device
Operation ID: DevicesController_sendCommand
Tags: Devices
Security:
bearer
Parameters (7)
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| id | path | yes | string | - |
Request (4)
Content-Type: application/json
Schema:
json
{
"type": "object",
"properties": {
"type": {
"type": "string"
},
"channel": {
"type": "number"
},
"state": {
"type": "number"
},
"key": {
"type": "string"
},
"value": {
"type": "number"
},
"retries": {
"type": "number"
},
"retryIntervalMs": {
"type": "number"
}
}
}Example:
json
{
"type": "set_numeric_value",
"channel": 1,
"state": 1,
"key": "volume",
"value": 50,
"retries": 2,
"retryIntervalMs": 1000
}Responses (9)
201 (3)
No response body.
401 (9)
Unauthorized
No response body.
Notes / Constraints (9)
- This endpoint depends on one or more path parameters.
- Supported request content types:
application/json. - Swagger declares security requirements for this operation.
POST /api/devices/{id}/test-telemetry
Summary: Send test telemetry
Operation ID: DevicesController_sendTestTelemetry
Tags: Devices
Security:
bearer
Parameters (8)
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| id | path | yes | string | - |
Request (5)
Content-Type: application/json
Schema:
json
{
"type": "object",
"properties": {
"protocol": {
"type": "string",
"enum": [
"HTTP",
"MQTT"
]
}
}
}Example:
json
{
"protocol": "HTTP"
}Responses (10)
201 (4)
No response body.
401 (10)
Unauthorized
No response body.
Notes / Constraints (10)
- This endpoint depends on one or more path parameters.
- Supported request content types:
application/json. - Swagger declares security requirements for this operation.
GET /api/devices/keys
Summary: Get all telemetry keys
Operation ID: DevicesController_getAllTelemetryKeys
Tags: Devices
Security:
bearer
Responses (11)
200 (7)
No response body.
401 (11)
Unauthorized
No response body.
Notes / Constraints (11)
- Swagger declares security requirements for this operation.
GET /api/devices/type-defaults/{deviceType}
Summary: Get default dashboard for device type
Operation ID: DevicesController_getTypeDashboardDefault
Tags: Devices
Security:
bearer
Parameters (9)
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| deviceType | path | yes | string | - |
Responses (12)
200 (8)
No response body.
401 (12)
Unauthorized
No response body.
Notes / Constraints (12)
- This endpoint depends on one or more path parameters.
- Swagger declares security requirements for this operation.
GET /api/devices/types
Summary: Get device types
Operation ID: DevicesController_getDeviceTypes
Tags: Devices
Security:
bearer
Responses (13)
200 (9)
No response body.
401 (13)
Unauthorized
No response body.
Notes / Constraints (13)
- Swagger declares security requirements for this operation.
Module Notes / Constraints
- Generated from OpenAPI version metadata:
1.0. - 13 operation(s) in this module declare explicit Swagger security requirements.
- HTTP methods present in this module: GET, POST, DELETE, PATCH.
- This file is generated from Swagger/OpenAPI and should be regenerated when controller, DTO, or Swagger decorator changes affect the spec.
