openapi: 3.1.0 info: title: ThingsBoard Admin admin-controller device-controller API description: 'ThingsBoard Admin API — subset of the ThingsBoard REST API (open-source IoT platform). Covers: Admin, Audit Log, Event, Usage Info, Queue, Queue Stats, Mail Config Template, Qr Code Settings, Job.' version: 4.3.0.3DEMO contact: name: ThingsBoard team url: https://thingsboard.io email: info@thingsboard.io license: name: Apache 2.0 url: https://www.apache.org/licenses/LICENSE-2.0 servers: - url: https://demo.thingsboard.io description: ThingsBoard Live Demo - url: http://localhost:8080 description: Local ThingsBoard server tags: - name: device-controller description: Device paths: /api/tenant/{tenantId}/device/{deviceId}: post: tags: - device-controller summary: Assign Device to Tenant (assignDeviceToTenant) description: 'Creates assignment of the device to tenant. Thereafter tenant will be able to reassign the device to a customer. Available for users with ''TENANT_ADMIN'' authority.' operationId: assignDeviceToTenant parameters: - name: tenantId in: path description: A string value representing the tenant id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' required: true schema: type: string - name: deviceId in: path description: A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' required: true schema: type: string responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/Device' /api/edge/{edgeId}/device/{deviceId}: post: tags: - device-controller summary: Assign Device to Edge (assignDeviceToEdge) description: 'Creates assignment of an existing device to an instance of The Edge. Assignment works in async way - first, notification event pushed to edge service queue on platform. Second, remote edge service will receive a copy of assignment device (Edge will receive this instantly, if it''s currently connected, or once it''s going to be connected to platform). Third, once device will be delivered to edge service, it''s going to be available for usage on remote edge instance. Available for users with ''TENANT_ADMIN'' authority.' operationId: assignDeviceToEdge parameters: - name: edgeId in: path description: A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' required: true schema: type: string - name: deviceId in: path description: A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' required: true schema: type: string responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/Device' delete: tags: - device-controller summary: Unassign Device from Edge (unassignDeviceFromEdge) description: 'Clears assignment of the device to the edge. Unassignment works in async way - first, ''unassign'' notification event pushed to edge queue on platform. Second, remote edge service will receive an ''unassign'' command to remove device (Edge will receive this instantly, if it''s currently connected, or once it''s going to be connected to platform). Third, once ''unassign'' command will be delivered to edge service, it''s going to remove device locally. Available for users with ''TENANT_ADMIN'' authority.' operationId: unassignDeviceFromEdge parameters: - name: edgeId in: path description: A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' required: true schema: type: string - name: deviceId in: path description: A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' required: true schema: type: string responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/Device' /api/devices: get: tags: - device-controller summary: Get Devices by Ids (getDevicesByIds) description: "Requested devices must be owned by tenant or assigned to customer which user is performing the request. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority." operationId: getDevicesByIds parameters: - name: deviceIds in: query description: A list of devices ids, separated by comma ',' required: true schema: type: array items: type: string responses: '200': description: OK content: application/json: schema: type: array items: $ref: '#/components/schemas/Device' post: tags: - device-controller summary: Find Related Devices (findByQuery) description: 'Returns all devices that are related to the specific entity. The entity id, relation type, device types, depth of the search, and other query parameters defined using complex ''DeviceSearchQuery'' object. See ''Model'' tab of the Parameters for more info. Available for users with ''TENANT_ADMIN'' or ''CUSTOMER_USER'' authority.' operationId: findByQuery_3 requestBody: content: application/json: schema: $ref: '#/components/schemas/DeviceSearchQuery' required: true responses: '200': description: OK content: application/json: schema: type: array items: $ref: '#/components/schemas/Device' /api/device: post: tags: - device-controller summary: Create or Update Device (saveDevice) description: "Create or update the Device. When creating device, platform generates Device Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). Device credentials are also generated if not provided in the 'accessToken' request parameter. The newly created device id will be present in the response. Specify existing Device id to update the device. Referencing non-existing device Id will cause 'Not Found' error.\n\nDevice name is unique in the scope of tenant. Use unique identifiers like MAC or IMEI for the device names and non-unique 'label' field for user-friendly visualization purposes.Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Device entity. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority." operationId: saveDevice parameters: - name: accessToken in: query description: Optional value of the device credentials to be used during device creation. If omitted, access token will be auto-generated. required: false schema: type: string - name: nameConflictPolicy in: query description: 'Optional value of name conflict policy. Possible values: FAIL or UNIQUIFY. If omitted, FAIL policy is applied. FAIL policy implies exception will be thrown if an entity with the same name already exists. UNIQUIFY policy appends a suffix to the entity name, if a name conflict occurs.' required: false schema: type: string default: FAIL enum: - FAIL - UNIQUIFY - name: uniquifySeparator in: query description: Optional value of name suffix separator used by UNIQUIFY policy. By default, underscore separator is used. For example, strategy is UNIQUIFY, separator is '-'; if a name conflict occurs for entity name 'test-name', created entity will have name like 'test-name-7fsh4f'. required: false schema: type: string default: _ - name: uniquifyStrategy in: query description: 'Optional value of uniquify strategy used by UNIQUIFY policy. Possible values: RANDOM or INCREMENTAL. By default, RANDOM strategy is used, which means random alphanumeric string will be added as a suffix to entity name. INCREMENTAL implies the first possible number starting from 1 will be added as a name suffix. For example, strategy is UNIQUIFY, uniquify strategy is INCREMENTAL; if a name conflict occurs for entity name ''test-name'', created entity will have name like ''test-name-1.' required: false schema: type: string default: RANDOM enum: - RANDOM - INCREMENTAL requestBody: description: A JSON value representing the device. content: application/json: schema: $ref: '#/components/schemas/Device' required: true responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/Device' /api/device/credentials: post: tags: - device-controller summary: Update Device Credentials (updateDeviceCredentials) description: "During device creation, platform generates random 'ACCESS_TOKEN' credentials. \" +\nUse this method to update the device credentials. First use 'getDeviceCredentialsByDeviceId' to get the credentials id and value.\nThen use current method to update the credentials type and value. It is not possible to create multiple device credentials for the same device.\nThe structure of device credentials id and value is simple for the 'ACCESS_TOKEN' but is much more complex for the 'MQTT_BASIC' or 'LWM2M_CREDENTIALS'.\nYou may find the example of device with different type of credentials below: \n\n- Credentials type: \"Access token\" with device ID and with device ID below: \n\n```json\n{\n \"id\": {\n \"id\":\"c886a090-168d-11ee-87c9-6f157dbc816a\"\n },\n \"deviceId\": {\n \"id\":\"c5fb3ac0-168d-11ee-87c9-6f157dbc816a\",\n \"entityType\":\"DEVICE\"\n },\n \"credentialsType\": \"ACCESS_TOKEN\",\n \"credentialsId\": \"6hmxew8pmmzng4e3une4\"\n}\n```\n\n- Credentials type: \"X509\" with device profile ID below: \n\nNote: credentialsId - format Sha3Hash, certificateValue - format PEM (with \"--BEGIN CERTIFICATE----\" and -\"----END CERTIFICATE-\").\n\n```json\n{\n \"id\": {\n \"id\":\"309bd9c0-14f4-11ee-9fc9-d9b7463abb63\"\n },\n \"deviceId\": {\n \"id\":\"3092b200-14f4-11ee-9fc9-d9b7463abb63\",\n \"entityType\":\"DEVICE\"\n },\n \"credentialsType\": \"X509_CERTIFICATE\",\n \"credentialsId\": \"6b8adb49015500e51a527acd332b51684ab9b49b4ade03a9582a44c455e2e9b6\",\n \"credentialsValue\": \"-----BEGIN CERTIFICATE----- MIICMTCCAdegAwIBAgIUUEKxS9hTz4l+oLUMF0LV6TC/gCIwCgYIKoZIzj0EAwIwbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlUHJvZmlsZUNlcnRAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MB4XDTIzMDMyOTE0NTczNloXDTI0MDMyODE0NTczNlowbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlUHJvZmlsZUNlcnRAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAECMlWO72krDoUL9FQjUmSCetkhaEGJUfQkdSfkLSNa0GyAEIMbfmzI4zITeapunu4rGet3EMyLydQzuQanBicp6NTMFEwHQYDVR0OBBYEFHpZ78tPnztNii4Da/yCw6mhEIL3MB8GA1UdIwQYMBaAFHpZ78tPnztNii4Da/yCw6mhEIL3MA8GA1UdEwEB/wQFMAMBAf8wCgYIKoZIzj0EAwIDSAAwRQIgJ7qyMFqNcwSYkH6o+UlQXzLWfwZbNjVk+aR7foAZNGsCIQDsd7v3WQIGHiArfZeDs1DLEDuV/2h6L+ZNoGNhEKL+1A== -----END CERTIFICATE-----\"\n}\n```\n\n- Credentials type: \"MQTT_BASIC\" with device profile ID below: \n\n```json\n{\n \"id\": {\n \"id\":\"d877ffb0-14f5-11ee-9fc9-d9b7463abb63\"\n },\n \"deviceId\": {\n \"id\":\"d875dcd0-14f5-11ee-9fc9-d9b7463abb63\",\n \"entityType\":\"DEVICE\"\n },\n \"credentialsType\": \"MQTT_BASIC\",\n \"credentialsValue\": \"{\\\"clientId\\\":\\\"juy03yv4owqxcmqhqtvk\\\",\\\"userName\\\":\\\"ov19fxca0cyjn7lm7w7u\\\",\\\"password\\\":\\\"twy94he114dfi9usyk1o\\\"}\"\n}\n```\n\n- You may find the example of LwM2M device and RPK credentials below: \n\nNote: LwM2M device - only existing device profile ID (Transport configuration -> Transport type: \"LWM2M\".\n\n```json\n{\n \"id\": {\n \"id\":\"e238d4d0-1689-11ee-98c6-1713c1be5a8e\"\n },\n \"deviceId\": {\n \"id\":\"e232e160-1689-11ee-98c6-1713c1be5a8e\",\n \"entityType\":\"DEVICE\"\n },\n \"credentialsType\": \"LWM2M_CREDENTIALS\",\n \"credentialsId\": \"LwRpk00000000\",\n \"credentialsValue\":\n \"{\\\"client\\\":{ \\\"endpoint\\\":\\\"LwRpk00000000\\\", \\\"securityConfigClientMode\\\":\\\"RPK\\\", \\\"key\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEdvBZZ2vQRK9wgDhctj6B1c7bxR3Z0wYg1+YdoYFnVUKWb+rIfTTyYK9tmQJx5Vlb5fxdLnVv1RJOPiwsLIQbAA==\\\" }, \\\"bootstrap\\\":{ \\\"bootstrapServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}, \\\"lwm2mServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}} }\"\n}\n```\n\nUpdate to real value:\n - 'id' (this is id of Device Credentials -> \"Get Device Credentials (getDeviceCredentialsByDeviceId)\",\n - 'deviceId.id' (this is id of Device).\nRemove 'tenantId' and optionally 'customerId' from the request body example (below) to create new Device entity.\n\nAvailable for users with 'TENANT_ADMIN' authority." operationId: updateDeviceCredentials requestBody: content: application/json: schema: $ref: '#/components/schemas/DeviceCredentials' required: true responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/DeviceCredentials' /api/device/bulk_import: post: tags: - device-controller summary: Import the Bulk of Devices (processDevicesBulkImport) description: 'There''s an ability to import the bulk of devices using the only .csv file. Available for users with ''TENANT_ADMIN'' authority.' operationId: processDevicesBulkImport requestBody: content: application/json: schema: $ref: '#/components/schemas/BulkImportRequest' required: true responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/BulkImportResultDevice' /api/device-with-credentials: post: tags: - device-controller summary: Create Device (saveDevice) with Credentials description: "Create or update the Device. When creating device, platform generates Device Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). Requires to provide the Device Credentials object as well as an existing device profile ID or use \"default\".\nYou may find the example of device with different type of credentials below: \n\n- Credentials type: \"Access token\" with device profile ID below: \n\n```json\n{\n \"device\": {\n \"name\":\"Name_DeviceWithCredantial_AccessToken\",\n \"label\":\"Label_DeviceWithCredantial_AccessToken\",\n \"deviceProfileId\":{\n \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\",\n \"entityType\":\"DEVICE_PROFILE\"\n }\n },\n \"credentials\": {\n \"credentialsType\": \"ACCESS_TOKEN\",\n \"credentialsId\": \"6hmxew8pmmzng4e3une2\"\n }\n}\n```\n\n- Credentials type: \"Access token\" with device profile default below: \n\n```json\n{\n \"device\": {\n \"name\":\"Name_DeviceWithCredantial_AccessToken_Default\",\n \"label\":\"Label_DeviceWithCredantial_AccessToken_Default\",\n \"type\": \"default\"\n },\n \"credentials\": {\n \"credentialsType\": \"ACCESS_TOKEN\",\n \"credentialsId\": \"6hmxew8pmmzng4e3une3\"\n }\n}\n```\n\n- Credentials type: \"X509\" with device profile ID below: \n\nNote: credentialsId - format Sha3Hash, certificateValue - format PEM (with \"--BEGIN CERTIFICATE----\" and -\"----END CERTIFICATE-\").\n\n```json\n{\n \"device\": {\n \"name\":\"Name_DeviceWithCredantial_X509_Certificate\",\n \"label\":\"Label_DeviceWithCredantial_X509_Certificate\",\n \"deviceProfileId\":{\n \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\",\n \"entityType\":\"DEVICE_PROFILE\"\n }\n },\n \"credentials\": {\n \"credentialsType\": \"X509_CERTIFICATE\",\n \"credentialsId\": \"84f5911765abba1f96bf4165604e9e90338fc6214081a8e623b6ff9669aedb27\",\n \"credentialsValue\": \"-----BEGIN CERTIFICATE----- MIICMTCCAdegAwIBAgIUI9dBuwN6pTtK6uZ03rkiCwV4wEYwCgYIKoZIzj0EAwIwbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlQ2VydGlmaWNhdGVAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MB4XDTIzMDMyOTE0NTYxN1oXDTI0MDMyODE0NTYxN1owbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlQ2VydGlmaWNhdGVAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE9Zo791qKQiGNBm11r4ZGxh+w+ossZL3xc46ufq5QckQHP7zkD2XDAcmP5GvdkM1sBFN9AWaCkQfNnWmfERsOOKNTMFEwHQYDVR0OBBYEFFFc5uyCyglQoZiKhzXzMcQ3BKORMB8GA1UdIwQYMBaAFFFc5uyCyglQoZiKhzXzMcQ3BKORMA8GA1UdEwEB/wQFMAMBAf8wCgYIKoZIzj0EAwIDSAAwRQIhANbA9CuhoOifZMMmqkpuld+65CR+ItKdXeRAhLMZuccuAiB0FSQB34zMutXrZj1g8Gl5OkE7YryFHbei1z0SveHR8g== -----END CERTIFICATE-----\"\n }\n}\n```\n\n- Credentials type: \"MQTT_BASIC\" with device profile ID below: \n\n```json\n{\n \"device\": {\n \"name\":\"Name_DeviceWithCredantial_MQTT_Basic\",\n \"label\":\"Label_DeviceWithCredantial_MQTT_Basic\",\n \"deviceProfileId\":{\n \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\",\n \"entityType\":\"DEVICE_PROFILE\"\n }\n },\n \"credentials\": {\n \"credentialsType\": \"MQTT_BASIC\",\n \"credentialsValue\": \"{\\\"clientId\\\":\\\"5euh5nzm34bjjh1efmlt\\\",\\\"userName\\\":\\\"onasd1lgwasmjl7v2v7h\\\",\\\"password\\\":\\\"b9xtm4ny8kt9zewaga5o\\\"}\"\n }\n}\n```\n\n- You may find the example of LwM2M device and RPK credentials below: \n\nNote: LwM2M device - only existing device profile ID (Transport configuration -> Transport type: \"LWM2M\".\n\n```json\n{\n \"device\": {\n \"name\":\"Name_LwRpk00000000\",\n \"label\":\"Label_LwRpk00000000\",\n \"deviceProfileId\":{\n \"id\":\"a660bd50-10ef-11ee-8737-b5634e73c779\",\n \"entityType\":\"DEVICE_PROFILE\"\n }\n },\n \"credentials\": {\n \"credentialsType\": \"LWM2M_CREDENTIALS\",\n \"credentialsId\": \"LwRpk00000000\",\n \"credentialsValue\":\n \"{\\\"client\\\":{ \\\"endpoint\\\":\\\"LwRpk00000000\\\", \\\"securityConfigClientMode\\\":\\\"RPK\\\", \\\"key\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\" }, \\\"bootstrap\\\":{ \\\"bootstrapServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}, \\\"lwm2mServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}} }\"\n }\n}\n```\n\nRemove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Device entity. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority." operationId: saveDeviceWithCredentials_1 parameters: - name: nameConflictPolicy in: query description: 'Optional value of name conflict policy. Possible values: FAIL or UNIQUIFY. If omitted, FAIL policy is applied. FAIL policy implies exception will be thrown if an entity with the same name already exists. UNIQUIFY policy appends a suffix to the entity name, if a name conflict occurs.' required: false schema: type: string default: FAIL enum: - FAIL - UNIQUIFY - name: uniquifySeparator in: query description: Optional value of name suffix separator used by UNIQUIFY policy. By default, underscore separator is used. For example, strategy is UNIQUIFY, separator is '-'; if a name conflict occurs for entity name 'test-name', created entity will have name like 'test-name-7fsh4f'. required: false schema: type: string default: _ - name: uniquifyStrategy in: query description: 'Optional value of uniquify strategy used by UNIQUIFY policy. Possible values: RANDOM or INCREMENTAL. By default, RANDOM strategy is used, which means random alphanumeric string will be added as a suffix to entity name. INCREMENTAL implies the first possible number starting from 1 will be added as a name suffix. For example, strategy is UNIQUIFY, uniquify strategy is INCREMENTAL; if a name conflict occurs for entity name ''test-name'', created entity will have name like ''test-name-1.' required: false schema: type: string default: RANDOM enum: - RANDOM - INCREMENTAL requestBody: content: application/json: schema: $ref: '#/components/schemas/SaveDeviceWithCredentialsRequest' required: true responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/Device' /api/customer/{customerId}/device/{deviceId}: post: tags: - device-controller summary: Assign Device to Customer (assignDeviceToCustomer) description: 'Creates assignment of the device to customer. Customer will be able to query device afterwards. Available for users with ''TENANT_ADMIN'' authority.' operationId: assignDeviceToCustomer parameters: - name: customerId in: path description: A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' required: true schema: type: string - name: deviceId in: path description: A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' required: true schema: type: string responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/Device' /api/customer/public/device/{deviceId}: post: tags: - device-controller summary: Make Device Publicly Available (assignDeviceToPublicCustomer) description: 'Device will be available for non-authorized (not logged-in) users. This is useful to create dashboards that you plan to share/embed on a publicly available website. However, users that are logged-in and belong to different tenant will not be able to access the device. Available for users with ''TENANT_ADMIN'' authority.' operationId: assignDeviceToPublicCustomer parameters: - name: deviceId in: path description: A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' required: true schema: type: string responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/Device' /api/customer/device/{deviceName}/claim: post: tags: - device-controller summary: Claim Device (claimDevice) description: "Claiming makes it possible to assign a device to the specific customer using device/server side claiming data (in the form of secret key).To make this happen you have to provide unique device name and optional claiming data (it is needed only for device-side claiming).Once device is claimed, the customer becomes its owner and customer users may access device data as well as control the device. \nIn order to enable claiming devices feature a system parameter security.claim.allowClaimingByDefault should be set to true, otherwise a server-side claimingAllowed attribute with the value true is obligatory for provisioned devices. \nSee official documentation for more details regarding claiming.\n\nAvailable for users with 'CUSTOMER_USER' authority." operationId: claimDevice parameters: - name: deviceName in: path description: Unique name of the device which is going to be claimed required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/ClaimRequest' responses: '200': description: OK content: application/json: schema: type: string delete: tags: - device-controller summary: Reclaim Device (reClaimDevice) description: 'Reclaiming means the device will be unassigned from the customer and the device will be available for claiming again. Available for users with ''TENANT_ADMIN'' or ''CUSTOMER_USER'' authority.' operationId: reClaimDevice parameters: - name: deviceName in: path description: Unique name of the device which is going to be reclaimed required: true schema: type: string responses: '200': description: OK content: application/json: schema: type: string /api/tenant/devices: get: tags: - device-controller summary: Get Tenant Device (getTenantDevice) description: 'Requested device must be owned by tenant that the user belongs to. Device name is an unique property of device. So it can be used to identify the device. Available for users with ''TENANT_ADMIN'' authority.' operationId: getTenantDevices parameters: - name: pageSize in: query description: Maximum amount of entities in a one page required: true schema: type: integer format: int32 - name: page in: query description: Sequence number of page starting from 0 required: true schema: type: integer format: int32 - name: type in: query description: Device type as the name of the device profile required: false schema: type: string - name: textSearch in: query description: The case insensitive 'substring' filter based on the device name. required: false schema: type: string - name: sortProperty in: query description: Property of entity to sort by required: false schema: type: string enum: - createdTime - name - deviceProfileName - label - customerTitle - name: sortOrder in: query description: Sort order. ASC (ASCENDING) or DESC (DESCENDING) required: false schema: type: string enum: - ASC - DESC - name: deviceName in: query description: A string value representing the Device name. required: true schema: type: string responses: '200': description: OK content: application/json: schema: oneOf: - $ref: '#/components/schemas/Device' - $ref: '#/components/schemas/PageDataDevice' /api/tenant/deviceInfos: get: tags: - device-controller summary: Get Tenant Device Infos (getTenantDeviceInfos) description: "Returns a page of devices info objects owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Device Info is an extension of the default Device object that contains information about the assigned customer name and device profile name. \n\nAvailable for users with 'TENANT_ADMIN' authority." operationId: getTenantDeviceInfos parameters: - name: pageSize in: query description: Maximum amount of entities in a one page required: true schema: type: integer format: int32 - name: page in: query description: Sequence number of page starting from 0 required: true schema: type: integer format: int32 - name: type in: query description: Device type as the name of the device profile required: false schema: type: string - name: deviceProfileId in: query description: A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' required: false schema: type: string - name: active in: query description: A boolean value representing the device active flag. required: false schema: type: boolean - name: textSearch in: query description: The case insensitive 'substring' filter based on the device name. required: false schema: type: string - name: sortProperty in: query description: Property of entity to sort by required: false schema: type: string enum: - createdTime - name - deviceProfileName - label - customerTitle - name: sortOrder in: query description: Sort order. ASC (ASCENDING) or DESC (DESCENDING) required: false schema: type: string enum: - ASC - DESC responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/PageDataDeviceInfo' /api/edge/{edgeId}/devices: get: tags: - device-controller summary: Get Devices Assigned to Edge (getEdgeDevices) description: "Returns a page of devices assigned to edge. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority." operationId: getEdgeDevices parameters: - name: edgeId in: path description: A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' required: true schema: type: string - name: pageSize in: query description: Maximum amount of entities in a one page required: true schema: type: integer format: int32 - name: page in: query description: Sequence number of page starting from 0 required: true schema: type: integer format: int32 - name: type in: query description: Device type as the name of the device profile required: false schema: type: string - name: deviceProfileId in: query description: A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' required: false schema: type: string - name: active in: query description: A boolean value representing the device active flag. required: false schema: type: boolean - name: textSearch in: query description: The case insensitive 'substring' filter based on the device name. required: false schema: type: string - name: sortProperty in: query description: Property of entity to sort by required: false schema: type: string enum: - createdTime - name - deviceProfileName - label - customerTitle - name: sortOrder in: query description: Sort order. ASC (ASCENDING) or DESC (DESCENDING) required: false schema: type: string enum: - ASC - DESC - name: startTime in: query description: Timestamp. Devices with creation time before it won't be queried required: false schema: type: integer format: int64 - name: endTime in: query description: Timestamp. Devices with creation time after it won't be queried required: false schema: type: integer format: int64 responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/PageDataDeviceInfo' /api/devices/count/{otaPackageType}/{deviceProfileId}: get: tags: - device-controller summary: Count Devices by Device Profile (countByDeviceProfileAndEmptyOtaPackage) description: 'The platform gives an ability to load OTA (over-the-air) packages to devices. It can be done in two different ways: device scope or device profile scope.In the response you will find the number of devices with specified device profile, but without previously defined device scope OTA package. It can be useful when you want to define number of devices that will be affected with future OTA package Available for users with ''TENANT_ADMIN'' or ''CUSTOMER_USER'' authority.' operationId: countByDeviceProfileAndEmptyOtaPackage parameters: - name: otaPackageType in: path description: OTA package type required: true schema: type: string enum: - FIRMWARE - SOFTWARE - name: deviceProfileId in: path description: Device Profile Id. I.g. '784f394c-42b6-435a-983c-b7beff2784f9' required: true schema: type: string responses: '200': description: OK content: application/json: schema: type: integer format: int64 /api/device/{deviceId}: get: tags: - device-controller summary: Get Device (getDeviceById) description: 'Fetch the Device object based on the provided Device Id. If the user has the authority of ''TENANT_ADMIN'', the server checks that the device is owned by the same tenant. If the user has the authority of ''CUSTOMER_USER'', the server checks that the device is assigned to the same customer. Available for users with ''TENANT_ADMIN'' or ''CUSTOMER_USER'' authority.' operationId: getDeviceById parameters: - name: deviceId in: path description: A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' required: true schema: type: string responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/Device' delete: tags: - device-controller summary: Delete Device (deleteDevice) description: 'Deletes the device, it''s credentials and all the relations (from and to the device). Referencing non-existing device Id will cause an error. Available for users with ''TENANT_ADMIN'' authority.' operationId: deleteDevice parameters: - name: deviceId in: path description: A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' required: true schema: type: string responses: '200': description: OK /api/device/{deviceId}/credentials: get: tags: - device-controller summary: Get Device Credentials (getDeviceCredentialsByDeviceId) description: 'If during device creation there wasn''t specified any credentials, platform generates random ''ACCESS_TOKEN'' credentials. Available for users with ''TENANT_ADMIN'' or ''CUSTOMER_USER'' authority.' operationId: getDeviceCredentialsByDeviceId parameters: - name: deviceId in: path description: A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' required: true schema: type: string responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/DeviceCredentials' /api/device/types: get: tags: - device-controller summary: Get Device Types (getDeviceTypes) description: 'Deprecated. See ''getDeviceProfileNames'' API from Device Profile Controller instead. Available for users with ''TENANT_ADMIN'' or ''CUSTOMER_USER'' authority.' operationId: getDeviceTypes responses: '200': description: OK content: application/json: schema: type: array items: $ref: '#/components/schemas/EntitySubtype' deprecated: true /api/device/info/{deviceId}: get: tags: - device-controller summary: Get Device Info (getDeviceInfoById) description: "Fetch the Device Info object based on the provided Device Id. If the user has the authority of 'Tenant Administrator', the server checks that the device is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the device is assigned to the same customer. Device Info is an extension of the default Device object that contains information about the assigned customer name and device profile name. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority." operationId: getDeviceInfoById parameters: - name: deviceId in: path description: A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' required: true schema: type: string responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/DeviceInfo' /api/customer/{customerId}/devices: get: tags: - device-controller summary: Get Customer Devices (getCustomerDevices) description: "Returns a page of devices objects assigned to customer. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority." operationId: getCustomerDevices parameters: - name: customerId in: path description: A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' required: true schema: type: string - name: pageSize in: query description: Maximum amount of entities in a one page required: true schema: type: integer format: int32 - name: page in: query description: Sequence number of page starting from 0 required: true schema: type: integer format: int32 - name: type in: query description: Device type as the name of the device profile required: false schema: type: string - name: textSearch in: query description: The case insensitive 'substring' filter based on the device name. required: false schema: type: string - name: sortProperty in: query description: Property of entity to sort by required: false schema: type: string enum: - createdTime - name - deviceProfileName - label - customerTitle - name: sortOrder in: query description: Sort order. ASC (ASCENDING) or DESC (DESCENDING) required: false schema: type: string enum: - ASC - DESC responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/PageDataDevice' /api/customer/{customerId}/deviceInfos: get: tags: - device-controller summary: Get Customer Device Infos (getCustomerDeviceInfos) description: "Returns a page of devices info objects assigned to customer. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Device Info is an extension of the default Device object that contains information about the assigned customer name and device profile name. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority." operationId: getCustomerDeviceInfos parameters: - name: customerId in: path description: A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' required: true schema: type: string - name: pageSize in: query description: Maximum amount of entities in a one page required: true schema: type: integer format: int32 - name: page in: query description: Sequence number of page starting from 0 required: true schema: type: integer format: int32 - name: type in: query description: Device type as the name of the device profile required: false schema: type: string - name: deviceProfileId in: query description: A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' required: false schema: type: string - name: active in: query description: A boolean value representing the device active flag. required: false schema: type: boolean - name: textSearch in: query description: The case insensitive 'substring' filter based on the device name. required: false schema: type: string - name: sortProperty in: query description: Property of entity to sort by required: false schema: type: string enum: - createdTime - name - deviceProfileName - label - customerTitle - name: sortOrder in: query description: Sort order. ASC (ASCENDING) or DESC (DESCENDING) required: false schema: type: string enum: - ASC - DESC responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/PageDataDeviceInfo' /api/customer/device/{deviceId}: delete: tags: - device-controller summary: Unassign Device from Customer (unassignDeviceFromCustomer) description: 'Clears assignment of the device to customer. Customer will not be able to query device afterwards. Available for users with ''TENANT_ADMIN'' authority.' operationId: unassignDeviceFromCustomer parameters: - name: deviceId in: path description: A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' required: true schema: type: string responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/Device' components: schemas: DeviceTransportConfiguration: discriminator: propertyName: type properties: type: type: string required: - type MqttDeviceTransportConfiguration: allOf: - $ref: '#/components/schemas/DeviceTransportConfiguration' ColumnMapping: type: object properties: type: type: string enum: - NAME - TYPE - LABEL - SHARED_ATTRIBUTE - SERVER_ATTRIBUTE - TIMESERIES - ACCESS_TOKEN - X509 - MQTT_CLIENT_ID - MQTT_USER_NAME - MQTT_PASSWORD - LWM2M_CLIENT_ENDPOINT - LWM2M_CLIENT_SECURITY_CONFIG_MODE - LWM2M_CLIENT_IDENTITY - LWM2M_CLIENT_KEY - LWM2M_CLIENT_CERT - LWM2M_BOOTSTRAP_SERVER_SECURITY_MODE - LWM2M_BOOTSTRAP_SERVER_PUBLIC_KEY_OR_ID - LWM2M_BOOTSTRAP_SERVER_SECRET_KEY - LWM2M_SERVER_SECURITY_MODE - LWM2M_SERVER_CLIENT_PUBLIC_KEY_OR_ID - LWM2M_SERVER_CLIENT_SECRET_KEY - SNMP_HOST - SNMP_PORT - SNMP_VERSION - SNMP_COMMUNITY_STRING - IS_GATEWAY - DESCRIPTION - ROUTING_KEY - SECRET key: type: string DeviceData: type: object properties: configuration: description: Device configuration for device profile type. DEFAULT is only supported value for now oneOf: - $ref: '#/components/schemas/DefaultDeviceConfiguration' transportConfiguration: description: Device transport configuration used to connect the device oneOf: - $ref: '#/components/schemas/CoapDeviceTransportConfiguration' - $ref: '#/components/schemas/DefaultDeviceTransportConfiguration' - $ref: '#/components/schemas/Lwm2mDeviceTransportConfiguration' - $ref: '#/components/schemas/MqttDeviceTransportConfiguration' - $ref: '#/components/schemas/SnmpDeviceTransportConfiguration' CustomerId: type: object properties: id: type: string format: uuid description: ID of the entity, time-based UUID v1 example: 784f394c-42b6-435a-983c-b7beff2784f9 entityType: type: string description: string enum: - CUSTOMER example: CUSTOMER required: - entityType - id PageDataDeviceInfo: type: object properties: data: type: array description: Array of the entities items: $ref: '#/components/schemas/DeviceInfo' readOnly: true totalPages: type: integer format: int32 description: Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria readOnly: true totalElements: type: integer format: int64 description: Total number of elements in all available pages readOnly: true hasNext: type: boolean description: '''false'' value indicates the end of the result set' readOnly: true ClaimRequest: type: object description: Claiming request which can optionally contain secret key properties: secretKey: type: string DeviceCredentialsId: type: object properties: id: type: string format: uuid description: string example: 784f394c-42b6-435a-983c-b7beff2784f9 required: - id BulkImportResultDevice: type: object properties: created: type: object properties: opaque: type: integer format: int32 acquire: type: integer format: int32 release: type: integer format: int32 writeOnly: true andIncrement: type: integer format: int32 andDecrement: type: integer format: int32 plain: type: integer format: int32 updated: type: object properties: opaque: type: integer format: int32 acquire: type: integer format: int32 release: type: integer format: int32 writeOnly: true andIncrement: type: integer format: int32 andDecrement: type: integer format: int32 plain: type: integer format: int32 errors: type: object properties: opaque: type: integer format: int32 acquire: type: integer format: int32 release: type: integer format: int32 writeOnly: true andIncrement: type: integer format: int32 andDecrement: type: integer format: int32 plain: type: integer format: int32 errorsList: type: array items: type: string BulkImportRequest: type: object properties: file: type: string mapping: $ref: '#/components/schemas/Mapping' DeviceProfileId: type: object properties: id: type: string format: uuid description: ID of the entity, time-based UUID v1 example: 784f394c-42b6-435a-983c-b7beff2784f9 entityType: type: string description: string enum: - DEVICE_PROFILE example: DEVICE_PROFILE required: - entityType - id SnmpDeviceTransportConfiguration: allOf: - $ref: '#/components/schemas/DeviceTransportConfiguration' - type: object properties: host: type: string port: type: integer format: int32 protocolVersion: type: string enum: - V1 - V2C - V3 community: type: string username: type: string securityName: type: string contextName: type: string authenticationProtocol: type: string enum: - SHA_1 - SHA_224 - SHA_256 - SHA_384 - SHA_512 - MD5 authenticationPassphrase: type: string privacyProtocol: type: string enum: - DES - AES_128 - AES_192 - AES_256 privacyPassphrase: type: string engineId: type: string DefaultDeviceConfiguration: allOf: - $ref: '#/components/schemas/DeviceConfiguration' OtaPackageId: type: object properties: id: type: string format: uuid description: ID of the entity, time-based UUID v1 example: 784f394c-42b6-435a-983c-b7beff2784f9 entityType: type: string description: string enum: - OTA_PACKAGE example: OTA_PACKAGE required: - entityType - id DeviceConfiguration: discriminator: propertyName: type properties: type: type: string required: - type DeviceId: type: object properties: id: type: string format: uuid description: ID of the entity, time-based UUID v1 example: 784f394c-42b6-435a-983c-b7beff2784f9 entityType: type: string description: string enum: - DEVICE example: DEVICE required: - entityType - id PageDataDevice: type: object properties: data: type: array description: Array of the entities items: $ref: '#/components/schemas/Device' readOnly: true totalPages: type: integer format: int32 description: Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria readOnly: true totalElements: type: integer format: int64 description: Total number of elements in all available pages readOnly: true hasNext: type: boolean description: '''false'' value indicates the end of the result set' readOnly: true CoapDeviceTransportConfiguration: allOf: - $ref: '#/components/schemas/DeviceTransportConfiguration' - type: object properties: powerMode: type: string enum: - PSM - DRX - E_DRX psmActivityTimer: type: integer format: int64 edrxCycle: type: integer format: int64 pagingTransmissionWindow: type: integer format: int64 DefaultDeviceTransportConfiguration: allOf: - $ref: '#/components/schemas/DeviceTransportConfiguration' Mapping: type: object properties: columns: type: array items: $ref: '#/components/schemas/ColumnMapping' delimiter: type: string update: type: boolean header: type: boolean EntitySubtype: type: object properties: tenantId: $ref: '#/components/schemas/TenantId' entityType: type: string enum: - TENANT - CUSTOMER - USER - DASHBOARD - ASSET - DEVICE - ALARM - RULE_CHAIN - RULE_NODE - ENTITY_VIEW - WIDGETS_BUNDLE - WIDGET_TYPE - TENANT_PROFILE - DEVICE_PROFILE - ASSET_PROFILE - API_USAGE_STATE - TB_RESOURCE - OTA_PACKAGE - EDGE - RPC - QUEUE - NOTIFICATION_TARGET - NOTIFICATION_TEMPLATE - NOTIFICATION_REQUEST - NOTIFICATION - NOTIFICATION_RULE - QUEUE_STATS - OAUTH2_CLIENT - DOMAIN - MOBILE_APP - MOBILE_APP_BUNDLE - CALCULATED_FIELD - JOB - ADMIN_SETTINGS - AI_MODEL - API_KEY type: type: string RelationsSearchParameters: type: object properties: rootId: type: string format: uuid description: Root entity id to start search from. example: 784f394c-42b6-435a-983c-b7beff2784f9 rootType: type: string description: Type of the root entity. enum: - TENANT - CUSTOMER - USER - DASHBOARD - ASSET - DEVICE - ALARM - RULE_CHAIN - RULE_NODE - ENTITY_VIEW - WIDGETS_BUNDLE - WIDGET_TYPE - TENANT_PROFILE - DEVICE_PROFILE - ASSET_PROFILE - API_USAGE_STATE - TB_RESOURCE - OTA_PACKAGE - EDGE - RPC - QUEUE - NOTIFICATION_TARGET - NOTIFICATION_TEMPLATE - NOTIFICATION_REQUEST - NOTIFICATION - NOTIFICATION_RULE - QUEUE_STATS - OAUTH2_CLIENT - DOMAIN - MOBILE_APP - MOBILE_APP_BUNDLE - CALCULATED_FIELD - JOB - ADMIN_SETTINGS - AI_MODEL - API_KEY direction: type: string description: Type of the root entity. enum: - FROM - TO relationTypeGroup: type: string description: Type of the relation. enum: - COMMON - DASHBOARD - RULE_CHAIN - RULE_NODE - EDGE - EDGE_AUTO_ASSIGN_RULE_CHAIN maxLevel: type: integer format: int32 description: Maximum level of the search depth. fetchLastLevelOnly: type: boolean description: Fetch entities that match the last level of search. Useful to find Devices that are strictly 'maxLevel' relations away from the root entity. JsonNode: description: A value representing the any type (object or primitive) examples: - {} SaveDeviceWithCredentialsRequest: type: object description: The JSON object with device and credentials. See method description above for example. properties: device: $ref: '#/components/schemas/Device' description: The JSON with device entity. credentials: $ref: '#/components/schemas/DeviceCredentials' description: The JSON with credentials entity. required: - credentials - device Lwm2mDeviceTransportConfiguration: allOf: - $ref: '#/components/schemas/DeviceTransportConfiguration' - type: object properties: powerMode: type: string enum: - PSM - DRX - E_DRX psmActivityTimer: type: integer format: int64 edrxCycle: type: integer format: int64 pagingTransmissionWindow: type: integer format: int64 DeviceSearchQuery: type: object description: The device search query JSON properties: parameters: $ref: '#/components/schemas/RelationsSearchParameters' description: Main search parameters. relationType: type: string description: Type of the relation between root entity and device (e.g. 'Contains' or 'Manages'). deviceTypes: type: array description: Array of device types to filter the related entities (e.g. 'Temperature Sensor', 'Smoke Sensor'). items: type: string DeviceInfo: type: object properties: id: $ref: '#/components/schemas/DeviceId' description: JSON object with the Device Id. Specify this field to update the Device. Referencing non-existing Device Id will cause error. Omit this field to create new Device. createdTime: type: integer format: int64 description: Timestamp of the device creation, in milliseconds example: 1609459200000 readOnly: true tenantId: $ref: '#/components/schemas/TenantId' description: JSON object with Tenant Id. Use 'assignDeviceToTenant' to change the Tenant Id. readOnly: true customerId: $ref: '#/components/schemas/CustomerId' description: JSON object with Customer Id. Use 'assignDeviceToCustomer' to change the Customer Id. readOnly: true name: type: string description: Unique Device Name in scope of Tenant example: A4B72CCDFF33 type: type: string description: Device Profile Name example: Temperature Sensor label: type: string description: Label that may be used in widgets example: Room 234 Sensor deviceProfileId: $ref: '#/components/schemas/DeviceProfileId' description: JSON object with Device Profile Id. firmwareId: $ref: '#/components/schemas/OtaPackageId' description: JSON object with Ota Package Id. softwareId: $ref: '#/components/schemas/OtaPackageId' description: JSON object with Ota Package Id. version: type: integer format: int64 customerTitle: type: string description: Title of the Customer that owns the device. readOnly: true customerIsPublic: type: boolean description: Indicates special 'Public' Customer that is auto-generated to use the devices on public dashboards. readOnly: true deviceProfileName: type: string description: Name of the corresponding Device Profile. readOnly: true active: type: boolean description: Device active flag. readOnly: true additionalInfo: $ref: '#/components/schemas/JsonNode' description: Additional parameters of the device deviceData: $ref: '#/components/schemas/DeviceData' description: JSON object with content specific to type of transport in the device profile. required: - deviceProfileId - name TenantId: type: object properties: id: type: string format: uuid description: ID of the entity, time-based UUID v1 example: 784f394c-42b6-435a-983c-b7beff2784f9 entityType: type: string description: string enum: - TENANT example: TENANT required: - entityType - id DeviceCredentials: type: object description: A JSON value representing the device credentials. properties: id: $ref: '#/components/schemas/DeviceCredentialsId' description: 'The Id is automatically generated during device creation. Use ''getDeviceCredentialsByDeviceId'' to obtain the id based on device id. Use ''updateDeviceCredentials'' to update device credentials. ' example: 784f394c-42b6-435a-983c-b7beff2784f9 readOnly: true createdTime: type: integer format: int64 description: Timestamp of the device credentials creation, in milliseconds example: 1609459200000 deviceId: $ref: '#/components/schemas/DeviceId' description: JSON object with the device Id. credentialsType: type: string description: Type of the credentials enum: - ACCESS_TOKEN - X509_CERTIFICATE - MQTT_BASIC - LWM2M_CREDENTIALS credentialsId: type: string description: Unique Credentials Id per platform instance. Used to lookup credentials from the database. By default, new access token for your device. Depends on the type of the credentials. example: Access token or other value that depends on the credentials type credentialsValue: type: string description: Value of the credentials. Null in case of ACCESS_TOKEN credentials type. Base64 value in case of X509_CERTIFICATE. Complex object in case of MQTT_BASIC and LWM2M_CREDENTIALS example: Null in case of ACCESS_TOKEN. See model definition. version: type: integer format: int64 required: - credentialsId - deviceId - id Device: type: object properties: id: $ref: '#/components/schemas/DeviceId' description: JSON object with the Device Id. Specify this field to update the Device. Referencing non-existing Device Id will cause error. Omit this field to create new Device. createdTime: type: integer format: int64 description: Timestamp of the device creation, in milliseconds example: 1609459200000 readOnly: true tenantId: $ref: '#/components/schemas/TenantId' description: JSON object with Tenant Id. Use 'assignDeviceToTenant' to change the Tenant Id. readOnly: true customerId: $ref: '#/components/schemas/CustomerId' description: JSON object with Customer Id. Use 'assignDeviceToCustomer' to change the Customer Id. readOnly: true name: type: string description: Unique Device Name in scope of Tenant example: A4B72CCDFF33 type: type: string description: Device Profile Name example: Temperature Sensor label: type: string description: Label that may be used in widgets example: Room 234 Sensor deviceProfileId: $ref: '#/components/schemas/DeviceProfileId' description: JSON object with Device Profile Id. firmwareId: $ref: '#/components/schemas/OtaPackageId' description: JSON object with Ota Package Id. softwareId: $ref: '#/components/schemas/OtaPackageId' description: JSON object with Ota Package Id. version: type: integer format: int64 additionalInfo: $ref: '#/components/schemas/JsonNode' description: Additional parameters of the device deviceData: $ref: '#/components/schemas/DeviceData' description: JSON object with content specific to type of transport in the device profile. required: - deviceProfileId - name securitySchemes: HTTP login form: type: http description: Enter Username / Password scheme: loginPassword bearerFormat: /api/auth/login|X-Authorization API key form: type: apiKey description: 'Enter the API key value with ''ApiKey'' prefix in format: **ApiKey ** Example: **ApiKey tb_5te51SkLRYpjGrujUGwqkjFvooWBlQpVe2An2Dr3w13wjfxDW**
**NOTE**: Use only ONE authentication method at a time. If both are authorized, JWT auth takes the priority.
' name: X-Authorization in: header