{ "info": { "_postman_id": "03dc96a6-e646-47fa-95a7-0f3302fd6159", "name": "ThingsBoard Admin admin-controller entity-relation-controller API", "description": "ThingsBoard Admin API \u2014 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.\n\nContact Support:\n Name: ThingsBoard team\n Email: info@thingsboard.io", "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", "createdAt": "2026-07-28T03:12:39.000Z", "updatedAt": "2026-07-28T03:12:40.000Z", "lastUpdatedBy": "35240", "uid": "35240-03dc96a6-e646-47fa-95a7-0f3302fd6159" }, "item": [ { "name": "api", "item": [ { "name": "v2", "item": [ { "name": "relation", "item": [ { "name": "Create Relation (saveRelationV2)", "id": "efce611f-c26d-457f-9420-dc1a482becc4", "protocolProfileBehavior": { "disableBodyPruning": true }, "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Accept", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"from\": {\n \"entityType\": \"NOTIFICATION\",\n \"id\": \"\"\n },\n \"to\": {\n \"entityType\": \"ALARM\",\n \"id\": \"\"\n },\n \"type\": \"\",\n \"typeGroup\": \"RULE_CHAIN\",\n \"version\": \"\",\n \"additionalInfo\": {\n \"description\": \"A value representing the any type (object or primitive)\",\n \"examples\": [\n {}\n ]\n }\n}", "options": { "raw": { "headerFamily": "json", "language": "json" } } }, "url": { "raw": "{{baseUrl}}/api/v2/relation", "host": [ "{{baseUrl}}" ], "path": [ "api", "v2", "relation" ] }, "description": "Creates or updates a relation between two entities in the platform. Relations unique key is a combination of from/to entity id and relation type group and relation type. \n\nIf the user has the authority of 'System Administrator', the server checks that 'from' and 'to' entities are owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that 'from' and 'to' entities are owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the 'from' and 'to' entities are assigned to the same customer." }, "response": [ { "id": "3e3ff1f5-bc59-4f4a-8bdc-9a8fbad5668d", "name": "OK", "originalRequest": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Accept", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"from\": {\n \"entityType\": \"NOTIFICATION\",\n \"id\": \"\"\n },\n \"to\": {\n \"entityType\": \"ALARM\",\n \"id\": \"\"\n },\n \"type\": \"\",\n \"typeGroup\": \"RULE_CHAIN\",\n \"version\": \"\",\n \"additionalInfo\": {\n \"description\": \"A value representing the any type (object or primitive)\",\n \"examples\": [\n {}\n ]\n }\n}", "options": { "raw": { "headerFamily": "json", "language": "json" } } }, "url": { "raw": "{{baseUrl}}/api/v2/relation", "host": [ "{{baseUrl}}" ], "path": [ "api", "v2", "relation" ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Content-Type", "value": "application/json" } ], "cookie": [], "responseTime": null, "body": "{\n \"from\": {\n \"entityType\": \"NOTIFICATION\",\n \"id\": \"\"\n },\n \"to\": {\n \"entityType\": \"ALARM\",\n \"id\": \"\"\n },\n \"type\": \"\",\n \"typeGroup\": \"RULE_CHAIN\",\n \"version\": \"\",\n \"additionalInfo\": {\n \"description\": \"A value representing the any type (object or primitive)\",\n \"examples\": [\n {}\n ]\n }\n}", "createdAt": "2026-07-28T03:12:40.000Z", "updatedAt": "2026-07-28T03:12:40.000Z", "uid": "35240-3e3ff1f5-bc59-4f4a-8bdc-9a8fbad5668d" } ], "createdAt": "2026-07-28T03:12:40.000Z", "updatedAt": "2026-07-28T03:12:40.000Z", "uid": "35240-efce611f-c26d-457f-9420-dc1a482becc4" }, { "name": "Delete Relation (deleteRelationV2)", "id": "79c380ec-36e6-49c0-85ae-48a63fdd7277", "protocolProfileBehavior": { "disableBodyPruning": true }, "request": { "method": "DELETE", "header": [ { "key": "Accept", "value": "application/json" } ], "url": { "raw": "{{baseUrl}}/api/v2/relation?fromId=&fromType=&relationType=&relationTypeGroup=&toId=&toType=", "host": [ "{{baseUrl}}" ], "path": [ "api", "v2", "relation" ], "query": [ { "description": "(Required) A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "key": "fromId", "value": "" }, { "description": "(Required) A string value representing the entity type. For example, 'DEVICE'", "key": "fromType", "value": "" }, { "description": "(Required) A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value.", "key": "relationType", "value": "" }, { "description": "A string value representing relation type group. For example, 'COMMON'", "key": "relationTypeGroup", "value": "" }, { "description": "(Required) A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "key": "toId", "value": "" }, { "description": "(Required) A string value representing the entity type. For example, 'DEVICE'", "key": "toType", "value": "" } ] }, "description": "Deletes a relation between two entities in the platform. \n\nIf the user has the authority of 'System Administrator', the server checks that 'from' and 'to' entities are owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that 'from' and 'to' entities are owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the 'from' and 'to' entities are assigned to the same customer." }, "response": [ { "id": "4f9bd27b-3de1-44d2-806c-3ba0c1299ad4", "name": "OK", "originalRequest": { "method": "DELETE", "header": [ { "key": "Accept", "value": "application/json" } ], "url": { "raw": "{{baseUrl}}/api/v2/relation?fromId=&fromType=&relationType=&relationTypeGroup=&toId=&toType=", "host": [ "{{baseUrl}}" ], "path": [ "api", "v2", "relation" ], "query": [ { "description": "(Required) A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "key": "fromId", "value": "" }, { "description": "(Required) A string value representing the entity type. For example, 'DEVICE'", "key": "fromType", "value": "" }, { "description": "(Required) A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value.", "key": "relationType", "value": "" }, { "description": "A string value representing relation type group. For example, 'COMMON'", "key": "relationTypeGroup", "value": "" }, { "description": "(Required) A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "key": "toId", "value": "" }, { "description": "(Required) A string value representing the entity type. For example, 'DEVICE'", "key": "toType", "value": "" } ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Content-Type", "value": "application/json" } ], "cookie": [], "responseTime": null, "body": "{\n \"from\": {\n \"entityType\": \"NOTIFICATION\",\n \"id\": \"\"\n },\n \"to\": {\n \"entityType\": \"ALARM\",\n \"id\": \"\"\n },\n \"type\": \"\",\n \"typeGroup\": \"RULE_CHAIN\",\n \"version\": \"\",\n \"additionalInfo\": {\n \"description\": \"A value representing the any type (object or primitive)\",\n \"examples\": [\n {}\n ]\n }\n}", "createdAt": "2026-07-28T03:12:40.000Z", "updatedAt": "2026-07-28T03:12:40.000Z", "uid": "35240-4f9bd27b-3de1-44d2-806c-3ba0c1299ad4" } ], "createdAt": "2026-07-28T03:12:40.000Z", "updatedAt": "2026-07-28T03:12:40.000Z", "uid": "35240-79c380ec-36e6-49c0-85ae-48a63fdd7277" } ], "id": "b14c54a7-f7d3-4382-b2f3-bb86e2a3d9e0", "createdAt": "2026-07-28T03:12:40.000Z", "updatedAt": "2026-07-28T03:12:40.000Z", "uid": "35240-b14c54a7-f7d3-4382-b2f3-bb86e2a3d9e0" } ], "id": "6e1e7b99-cc0b-4e87-953f-bcec0b9dcfbc", "createdAt": "2026-07-28T03:12:40.000Z", "updatedAt": "2026-07-28T03:12:40.000Z", "uid": "35240-6e1e7b99-cc0b-4e87-953f-bcec0b9dcfbc" }, { "name": "relations", "item": [ { "name": "info", "item": [ { "name": "Get List of Relation Infos (findInfoByFrom)", "id": "3d75e988-70a7-4948-8b96-ce08f4d98d9f", "protocolProfileBehavior": { "disableBodyPruning": true }, "request": { "method": "GET", "header": [ { "key": "Accept", "value": "application/json" } ], "url": { "raw": "{{baseUrl}}/api/relations/info?toId=&toType=&relationTypeGroup=&fromId=&fromType=", "host": [ "{{baseUrl}}" ], "path": [ "api", "relations", "info" ], "query": [ { "description": "(Required) A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "key": "toId", "value": "" }, { "description": "(Required) A string value representing the entity type. For example, 'DEVICE'", "key": "toType", "value": "" }, { "description": "A string value representing relation type group. For example, 'COMMON'", "key": "relationTypeGroup", "value": "" }, { "description": "(Required) A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "key": "fromId", "value": "" }, { "description": "(Required) A string value representing the entity type. For example, 'DEVICE'", "key": "fromType", "value": "" } ] }, "description": "Returns list of relation info objects for the specified entity by the 'from' direction. \n\nIf the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. " }, "response": [ { "id": "f65cd892-b0b2-48e1-beb5-1493d4b488ef", "name": "OK", "originalRequest": { "method": "GET", "header": [ { "key": "Accept", "value": "application/json" } ], "url": { "raw": "{{baseUrl}}/api/relations/info?toId=&toType=&relationTypeGroup=&fromId=&fromType=", "host": [ "{{baseUrl}}" ], "path": [ "api", "relations", "info" ], "query": [ { "description": "(Required) A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "key": "toId", "value": "" }, { "description": "(Required) A string value representing the entity type. For example, 'DEVICE'", "key": "toType", "value": "" }, { "description": "A string value representing relation type group. For example, 'COMMON'", "key": "relationTypeGroup", "value": "" }, { "description": "(Required) A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "key": "fromId", "value": "" }, { "description": "(Required) A string value representing the entity type. For example, 'DEVICE'", "key": "fromType", "value": "" } ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Content-Type", "value": "application/json" } ], "cookie": [], "responseTime": null, "body": "[\n {\n \"from\": {\n \"entityType\": \"NOTIFICATION\",\n \"id\": \"\"\n },\n \"to\": {\n \"entityType\": \"RULE_NODE\",\n \"id\": \"\"\n },\n \"type\": \"\",\n \"typeGroup\": \"RULE_CHAIN\",\n \"version\": \"\",\n \"fromName\": \"\",\n \"toName\": \"\",\n \"additionalInfo\": {\n \"description\": \"A value representing the any type (object or primitive)\",\n \"examples\": [\n {}\n ]\n }\n },\n {\n \"from\": {\n \"entityType\": \"DASHBOARD\",\n \"id\": \"\"\n },\n \"to\": {\n \"entityType\": \"RULE_NODE\",\n \"id\": \"\"\n },\n \"type\": \"\",\n \"typeGroup\": \"RULE_CHAIN\",\n \"version\": \"\",\n \"fromName\": \"\",\n \"toName\": \"\",\n \"additionalInfo\": {\n \"description\": \"A value representing the any type (object or primitive)\",\n \"examples\": [\n {}\n ]\n }\n }\n]", "createdAt": "2026-07-28T03:12:40.000Z", "updatedAt": "2026-07-28T03:12:40.000Z", "uid": "35240-f65cd892-b0b2-48e1-beb5-1493d4b488ef" } ], "createdAt": "2026-07-28T03:12:40.000Z", "updatedAt": "2026-07-28T03:12:40.000Z", "uid": "35240-3d75e988-70a7-4948-8b96-ce08f4d98d9f" }, { "name": "Find Related Entity Infos (findInfoByQuery)", "id": "418ae544-d59a-40a8-b4e3-66407cac7e0d", "protocolProfileBehavior": { "disableBodyPruning": true }, "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Accept", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"parameters\": {\n \"rootId\": \"\",\n \"rootType\": \"NOTIFICATION_TEMPLATE\",\n \"direction\": \"FROM\",\n \"relationTypeGroup\": \"EDGE_AUTO_ASSIGN_RULE_CHAIN\",\n \"maxLevel\": \"\",\n \"fetchLastLevelOnly\": \"\"\n },\n \"filters\": [\n {\n \"relationType\": \"\",\n \"entityTypes\": [\n \"ASSET\",\n \"JOB\"\n ],\n \"negate\": \"\"\n },\n {\n \"relationType\": \"\",\n \"entityTypes\": [\n \"ADMIN_SETTINGS\",\n \"ASSET_PROFILE\"\n ],\n \"negate\": \"\"\n }\n ]\n}", "options": { "raw": { "headerFamily": "json", "language": "json" } } }, "url": { "raw": "{{baseUrl}}/api/relations/info", "host": [ "{{baseUrl}}" ], "path": [ "api", "relations", "info" ] }, "description": "Returns all entity infos that are related to the specific entity. The entity id, relation type, entity types, depth of the search, and other query parameters defined using complex 'EntityRelationsQuery' object. See 'Model' tab of the Parameters for more info. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. " }, "response": [ { "id": "d2b6e20f-654e-40a8-8c47-eb207679f5fe", "name": "OK", "originalRequest": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Accept", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"parameters\": {\n \"rootId\": \"\",\n \"rootType\": \"NOTIFICATION_TEMPLATE\",\n \"direction\": \"FROM\",\n \"relationTypeGroup\": \"EDGE_AUTO_ASSIGN_RULE_CHAIN\",\n \"maxLevel\": \"\",\n \"fetchLastLevelOnly\": \"\"\n },\n \"filters\": [\n {\n \"relationType\": \"\",\n \"entityTypes\": [\n \"ASSET\",\n \"JOB\"\n ],\n \"negate\": \"\"\n },\n {\n \"relationType\": \"\",\n \"entityTypes\": [\n \"ADMIN_SETTINGS\",\n \"ASSET_PROFILE\"\n ],\n \"negate\": \"\"\n }\n ]\n}", "options": { "raw": { "headerFamily": "json", "language": "json" } } }, "url": { "raw": "{{baseUrl}}/api/relations/info", "host": [ "{{baseUrl}}" ], "path": [ "api", "relations", "info" ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Content-Type", "value": "application/json" } ], "cookie": [], "responseTime": null, "body": "[\n {\n \"from\": {\n \"entityType\": \"NOTIFICATION\",\n \"id\": \"\"\n },\n \"to\": {\n \"entityType\": \"RULE_NODE\",\n \"id\": \"\"\n },\n \"type\": \"\",\n \"typeGroup\": \"RULE_CHAIN\",\n \"version\": \"\",\n \"fromName\": \"\",\n \"toName\": \"\",\n \"additionalInfo\": {\n \"description\": \"A value representing the any type (object or primitive)\",\n \"examples\": [\n {}\n ]\n }\n },\n {\n \"from\": {\n \"entityType\": \"DASHBOARD\",\n \"id\": \"\"\n },\n \"to\": {\n \"entityType\": \"RULE_NODE\",\n \"id\": \"\"\n },\n \"type\": \"\",\n \"typeGroup\": \"RULE_CHAIN\",\n \"version\": \"\",\n \"fromName\": \"\",\n \"toName\": \"\",\n \"additionalInfo\": {\n \"description\": \"A value representing the any type (object or primitive)\",\n \"examples\": [\n {}\n ]\n }\n }\n]", "createdAt": "2026-07-28T03:12:40.000Z", "updatedAt": "2026-07-28T03:12:40.000Z", "uid": "35240-d2b6e20f-654e-40a8-8c47-eb207679f5fe" } ], "createdAt": "2026-07-28T03:12:40.000Z", "updatedAt": "2026-07-28T03:12:40.000Z", "uid": "35240-418ae544-d59a-40a8-b4e3-66407cac7e0d" } ], "id": "7ea54be1-94f2-48c9-aad7-ec6fd0cb133c", "createdAt": "2026-07-28T03:12:40.000Z", "updatedAt": "2026-07-28T03:12:40.000Z", "uid": "35240-7ea54be1-94f2-48c9-aad7-ec6fd0cb133c" }, { "name": "Get List of Relations (findByFrom)", "id": "8f21fba1-36b2-4983-bf8f-8d99900f4efa", "protocolProfileBehavior": { "disableBodyPruning": true }, "request": { "method": "GET", "header": [ { "key": "Accept", "value": "application/json" } ], "url": { "raw": "{{baseUrl}}/api/relations?toId=&toType=&relationTypeGroup=&relationType=&fromId=&fromType=", "host": [ "{{baseUrl}}" ], "path": [ "api", "relations" ], "query": [ { "description": "(Required) A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "key": "toId", "value": "" }, { "description": "(Required) A string value representing the entity type. For example, 'DEVICE'", "key": "toType", "value": "" }, { "description": "A string value representing relation type group. For example, 'COMMON'", "key": "relationTypeGroup", "value": "" }, { "description": "(Required) A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value.", "key": "relationType", "value": "" }, { "description": "(Required) A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "key": "fromId", "value": "" }, { "description": "(Required) A string value representing the entity type. For example, 'DEVICE'", "key": "fromType", "value": "" } ] }, "description": "Returns list of relation objects for the specified entity by the 'from' direction and relation type. \n\nIf the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer." }, "response": [ { "id": "a40ce5e2-bd7b-4e9c-b123-772a978c19f0", "name": "OK", "originalRequest": { "method": "GET", "header": [ { "key": "Accept", "value": "application/json" } ], "url": { "raw": "{{baseUrl}}/api/relations?toId=&toType=&relationTypeGroup=&relationType=&fromId=&fromType=", "host": [ "{{baseUrl}}" ], "path": [ "api", "relations" ], "query": [ { "description": "(Required) A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "key": "toId", "value": "" }, { "description": "(Required) A string value representing the entity type. For example, 'DEVICE'", "key": "toType", "value": "" }, { "description": "A string value representing relation type group. For example, 'COMMON'", "key": "relationTypeGroup", "value": "" }, { "description": "(Required) A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value.", "key": "relationType", "value": "" }, { "description": "(Required) A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "key": "fromId", "value": "" }, { "description": "(Required) A string value representing the entity type. For example, 'DEVICE'", "key": "fromType", "value": "" } ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Content-Type", "value": "application/json" } ], "cookie": [], "responseTime": null, "body": "[\n {\n \"from\": {\n \"entityType\": \"NOTIFICATION_REQUEST\",\n \"id\": \"\"\n },\n \"to\": {\n \"entityType\": \"TB_RESOURCE\",\n \"id\": \"\"\n },\n \"type\": \"\",\n \"typeGroup\": \"EDGE\",\n \"version\": \"\",\n \"additionalInfo\": {\n \"description\": \"A value representing the any type (object or primitive)\",\n \"examples\": [\n {}\n ]\n }\n },\n {\n \"from\": {\n \"entityType\": \"DEVICE_PROFILE\",\n \"id\": \"\"\n },\n \"to\": {\n \"entityType\": \"ALARM\",\n \"id\": \"\"\n },\n \"type\": \"\",\n \"typeGroup\": \"DASHBOARD\",\n \"version\": \"\",\n \"additionalInfo\": {\n \"description\": \"A value representing the any type (object or primitive)\",\n \"examples\": [\n {}\n ]\n }\n }\n]", "createdAt": "2026-07-28T03:12:40.000Z", "updatedAt": "2026-07-28T03:12:40.000Z", "uid": "35240-a40ce5e2-bd7b-4e9c-b123-772a978c19f0" } ], "createdAt": "2026-07-28T03:12:40.000Z", "updatedAt": "2026-07-28T03:12:40.000Z", "uid": "35240-8f21fba1-36b2-4983-bf8f-8d99900f4efa" }, { "name": "Find Related Entities (findByQuery)", "id": "8c056a80-7f3f-4a0b-b639-875af0ae6354", "protocolProfileBehavior": { "disableBodyPruning": true }, "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Accept", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"parameters\": {\n \"rootId\": \"\",\n \"rootType\": \"NOTIFICATION_TEMPLATE\",\n \"direction\": \"FROM\",\n \"relationTypeGroup\": \"EDGE_AUTO_ASSIGN_RULE_CHAIN\",\n \"maxLevel\": \"\",\n \"fetchLastLevelOnly\": \"\"\n },\n \"filters\": [\n {\n \"relationType\": \"\",\n \"entityTypes\": [\n \"ASSET\",\n \"JOB\"\n ],\n \"negate\": \"\"\n },\n {\n \"relationType\": \"\",\n \"entityTypes\": [\n \"ADMIN_SETTINGS\",\n \"ASSET_PROFILE\"\n ],\n \"negate\": \"\"\n }\n ]\n}", "options": { "raw": { "headerFamily": "json", "language": "json" } } }, "url": { "raw": "{{baseUrl}}/api/relations", "host": [ "{{baseUrl}}" ], "path": [ "api", "relations" ] }, "description": "Returns all entities that are related to the specific entity. The entity id, relation type, entity types, depth of the search, and other query parameters defined using complex 'EntityRelationsQuery' object. See 'Model' tab of the Parameters for more info." }, "response": [ { "id": "942631cd-6c03-4c1b-b8de-1f0e93b3f02b", "name": "OK", "originalRequest": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Accept", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"parameters\": {\n \"rootId\": \"\",\n \"rootType\": \"NOTIFICATION_TEMPLATE\",\n \"direction\": \"FROM\",\n \"relationTypeGroup\": \"EDGE_AUTO_ASSIGN_RULE_CHAIN\",\n \"maxLevel\": \"\",\n \"fetchLastLevelOnly\": \"\"\n },\n \"filters\": [\n {\n \"relationType\": \"\",\n \"entityTypes\": [\n \"ASSET\",\n \"JOB\"\n ],\n \"negate\": \"\"\n },\n {\n \"relationType\": \"\",\n \"entityTypes\": [\n \"ADMIN_SETTINGS\",\n \"ASSET_PROFILE\"\n ],\n \"negate\": \"\"\n }\n ]\n}", "options": { "raw": { "headerFamily": "json", "language": "json" } } }, "url": { "raw": "{{baseUrl}}/api/relations", "host": [ "{{baseUrl}}" ], "path": [ "api", "relations" ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Content-Type", "value": "application/json" } ], "cookie": [], "responseTime": null, "body": "[\n {\n \"from\": {\n \"entityType\": \"NOTIFICATION_REQUEST\",\n \"id\": \"\"\n },\n \"to\": {\n \"entityType\": \"TB_RESOURCE\",\n \"id\": \"\"\n },\n \"type\": \"\",\n \"typeGroup\": \"EDGE\",\n \"version\": \"\",\n \"additionalInfo\": {\n \"description\": \"A value representing the any type (object or primitive)\",\n \"examples\": [\n {}\n ]\n }\n },\n {\n \"from\": {\n \"entityType\": \"DEVICE_PROFILE\",\n \"id\": \"\"\n },\n \"to\": {\n \"entityType\": \"ALARM\",\n \"id\": \"\"\n },\n \"type\": \"\",\n \"typeGroup\": \"DASHBOARD\",\n \"version\": \"\",\n \"additionalInfo\": {\n \"description\": \"A value representing the any type (object or primitive)\",\n \"examples\": [\n {}\n ]\n }\n }\n]", "createdAt": "2026-07-28T03:12:40.000Z", "updatedAt": "2026-07-28T03:12:40.000Z", "uid": "35240-942631cd-6c03-4c1b-b8de-1f0e93b3f02b" } ], "createdAt": "2026-07-28T03:12:40.000Z", "updatedAt": "2026-07-28T03:12:40.000Z", "uid": "35240-8c056a80-7f3f-4a0b-b639-875af0ae6354" }, { "name": "Delete Common Relations (deleteCommonRelations)", "id": "1260c070-fb34-403b-925f-c226875d6cc1", "protocolProfileBehavior": { "disableBodyPruning": true }, "request": { "method": "DELETE", "header": [], "url": { "raw": "{{baseUrl}}/api/relations?entityId=&entityType=", "host": [ "{{baseUrl}}" ], "path": [ "api", "relations" ], "query": [ { "description": "(Required) A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "key": "entityId", "value": "" }, { "description": "(Required) A string value representing the entity type. For example, 'DEVICE'", "key": "entityType", "value": "" } ] }, "description": "Deletes all the relations ('from' and 'to' direction) for the specified entity and relation type group: 'COMMON'. \n\nIf the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer." }, "response": [ { "id": "4e92e42a-0eb4-48a4-8715-31442e23b210", "name": "OK", "originalRequest": { "method": "DELETE", "header": [], "url": { "raw": "{{baseUrl}}/api/relations?entityId=&entityType=", "host": [ "{{baseUrl}}" ], "path": [ "api", "relations" ], "query": [ { "description": "(Required) A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "key": "entityId", "value": "" }, { "description": "(Required) A string value representing the entity type. For example, 'DEVICE'", "key": "entityType", "value": "" } ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "text", "header": [], "cookie": [], "responseTime": null, "body": null, "createdAt": "2026-07-28T03:12:40.000Z", "updatedAt": "2026-07-28T03:12:40.000Z", "uid": "35240-4e92e42a-0eb4-48a4-8715-31442e23b210" } ], "createdAt": "2026-07-28T03:12:40.000Z", "updatedAt": "2026-07-28T03:12:40.000Z", "uid": "35240-1260c070-fb34-403b-925f-c226875d6cc1" } ], "id": "8196234a-3e29-449d-8ce7-2454d9ade2f9", "createdAt": "2026-07-28T03:12:40.000Z", "updatedAt": "2026-07-28T03:12:40.000Z", "uid": "35240-8196234a-3e29-449d-8ce7-2454d9ade2f9" }, { "name": "relation", "item": [ { "name": "Get Relation (getRelation)", "id": "4e4e169c-2d42-442f-af86-e9b95d57b9f7", "protocolProfileBehavior": { "disableBodyPruning": true }, "request": { "method": "GET", "header": [ { "key": "Accept", "value": "application/json" } ], "url": { "raw": "{{baseUrl}}/api/relation?fromId=&fromType=&relationType=&relationTypeGroup=&toId=&toType=", "host": [ "{{baseUrl}}" ], "path": [ "api", "relation" ], "query": [ { "description": "(Required) A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "key": "fromId", "value": "" }, { "description": "(Required) A string value representing the entity type. For example, 'DEVICE'", "key": "fromType", "value": "" }, { "description": "(Required) A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value.", "key": "relationType", "value": "" }, { "description": "A string value representing relation type group. For example, 'COMMON'", "key": "relationTypeGroup", "value": "" }, { "description": "(Required) A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "key": "toId", "value": "" }, { "description": "(Required) A string value representing the entity type. For example, 'DEVICE'", "key": "toType", "value": "" } ] }, "description": "Returns relation object between two specified entities if present. Otherwise throws exception. \n\nIf the user has the authority of 'System Administrator', the server checks that 'from' and 'to' entities are owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that 'from' and 'to' entities are owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the 'from' and 'to' entities are assigned to the same customer." }, "response": [ { "id": "14ec2e45-2eec-425b-bf60-6ab0cc071078", "name": "OK", "originalRequest": { "method": "GET", "header": [ { "key": "Accept", "value": "application/json" } ], "url": { "raw": "{{baseUrl}}/api/relation?fromId=&fromType=&relationType=&relationTypeGroup=&toId=&toType=", "host": [ "{{baseUrl}}" ], "path": [ "api", "relation" ], "query": [ { "description": "(Required) A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "key": "fromId", "value": "" }, { "description": "(Required) A string value representing the entity type. For example, 'DEVICE'", "key": "fromType", "value": "" }, { "description": "(Required) A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value.", "key": "relationType", "value": "" }, { "description": "A string value representing relation type group. For example, 'COMMON'", "key": "relationTypeGroup", "value": "" }, { "description": "(Required) A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "key": "toId", "value": "" }, { "description": "(Required) A string value representing the entity type. For example, 'DEVICE'", "key": "toType", "value": "" } ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Content-Type", "value": "application/json" } ], "cookie": [], "responseTime": null, "body": "{\n \"from\": {\n \"entityType\": \"NOTIFICATION\",\n \"id\": \"\"\n },\n \"to\": {\n \"entityType\": \"ALARM\",\n \"id\": \"\"\n },\n \"type\": \"\",\n \"typeGroup\": \"RULE_CHAIN\",\n \"version\": \"\",\n \"additionalInfo\": {\n \"description\": \"A value representing the any type (object or primitive)\",\n \"examples\": [\n {}\n ]\n }\n}", "createdAt": "2026-07-28T03:12:40.000Z", "updatedAt": "2026-07-28T03:12:40.000Z", "uid": "35240-14ec2e45-2eec-425b-bf60-6ab0cc071078" } ], "createdAt": "2026-07-28T03:12:40.000Z", "updatedAt": "2026-07-28T03:12:40.000Z", "uid": "35240-4e4e169c-2d42-442f-af86-e9b95d57b9f7" }, { "name": "Create Relation (saveRelation)", "id": "34f467ad-a542-4beb-aa42-aa7972e13370", "protocolProfileBehavior": { "disableBodyPruning": true }, "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"from\": {\n \"entityType\": \"NOTIFICATION\",\n \"id\": \"\"\n },\n \"to\": {\n \"entityType\": \"ALARM\",\n \"id\": \"\"\n },\n \"type\": \"\",\n \"typeGroup\": \"RULE_CHAIN\",\n \"version\": \"\",\n \"additionalInfo\": {\n \"description\": \"A value representing the any type (object or primitive)\",\n \"examples\": [\n {}\n ]\n }\n}", "options": { "raw": { "headerFamily": "json", "language": "json" } } }, "url": { "raw": "{{baseUrl}}/api/relation", "host": [ "{{baseUrl}}" ], "path": [ "api", "relation" ] }, "description": "Creates or updates a relation between two entities in the platform. Relations unique key is a combination of from/to entity id and relation type group and relation type. \n\nIf the user has the authority of 'System Administrator', the server checks that 'from' and 'to' entities are owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that 'from' and 'to' entities are owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the 'from' and 'to' entities are assigned to the same customer." }, "response": [ { "id": "264cf974-22e9-41c2-8a1b-fe0203a777ba", "name": "OK", "originalRequest": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"from\": {\n \"entityType\": \"NOTIFICATION\",\n \"id\": \"\"\n },\n \"to\": {\n \"entityType\": \"ALARM\",\n \"id\": \"\"\n },\n \"type\": \"\",\n \"typeGroup\": \"RULE_CHAIN\",\n \"version\": \"\",\n \"additionalInfo\": {\n \"description\": \"A value representing the any type (object or primitive)\",\n \"examples\": [\n {}\n ]\n }\n}", "options": { "raw": { "headerFamily": "json", "language": "json" } } }, "url": { "raw": "{{baseUrl}}/api/relation", "host": [ "{{baseUrl}}" ], "path": [ "api", "relation" ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "text", "header": [], "cookie": [], "responseTime": null, "body": null, "createdAt": "2026-07-28T03:12:40.000Z", "updatedAt": "2026-07-28T03:12:40.000Z", "uid": "35240-264cf974-22e9-41c2-8a1b-fe0203a777ba" } ], "createdAt": "2026-07-28T03:12:40.000Z", "updatedAt": "2026-07-28T03:12:40.000Z", "uid": "35240-34f467ad-a542-4beb-aa42-aa7972e13370" }, { "name": "Delete Relation (deleteRelation)", "id": "185e86b5-5c17-45b5-aa2b-1fed484847ab", "protocolProfileBehavior": { "disableBodyPruning": true }, "request": { "method": "DELETE", "header": [], "url": { "raw": "{{baseUrl}}/api/relation?fromId=&fromType=&relationType=&relationTypeGroup=&toId=&toType=", "host": [ "{{baseUrl}}" ], "path": [ "api", "relation" ], "query": [ { "description": "(Required) A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "key": "fromId", "value": "" }, { "description": "(Required) A string value representing the entity type. For example, 'DEVICE'", "key": "fromType", "value": "" }, { "description": "(Required) A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value.", "key": "relationType", "value": "" }, { "description": "A string value representing relation type group. For example, 'COMMON'", "key": "relationTypeGroup", "value": "" }, { "description": "(Required) A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "key": "toId", "value": "" }, { "description": "(Required) A string value representing the entity type. For example, 'DEVICE'", "key": "toType", "value": "" } ] }, "description": "Deletes a relation between two entities in the platform. \n\nIf the user has the authority of 'System Administrator', the server checks that 'from' and 'to' entities are owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that 'from' and 'to' entities are owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the 'from' and 'to' entities are assigned to the same customer." }, "response": [ { "id": "9aea799d-8b88-43c9-8f5c-7be31c05a9b1", "name": "OK", "originalRequest": { "method": "DELETE", "header": [], "url": { "raw": "{{baseUrl}}/api/relation?fromId=&fromType=&relationType=&relationTypeGroup=&toId=&toType=", "host": [ "{{baseUrl}}" ], "path": [ "api", "relation" ], "query": [ { "description": "(Required) A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "key": "fromId", "value": "" }, { "description": "(Required) A string value representing the entity type. For example, 'DEVICE'", "key": "fromType", "value": "" }, { "description": "(Required) A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value.", "key": "relationType", "value": "" }, { "description": "A string value representing relation type group. For example, 'COMMON'", "key": "relationTypeGroup", "value": "" }, { "description": "(Required) A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "key": "toId", "value": "" }, { "description": "(Required) A string value representing the entity type. For example, 'DEVICE'", "key": "toType", "value": "" } ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "text", "header": [], "cookie": [], "responseTime": null, "body": null, "createdAt": "2026-07-28T03:12:40.000Z", "updatedAt": "2026-07-28T03:12:40.000Z", "uid": "35240-9aea799d-8b88-43c9-8f5c-7be31c05a9b1" } ], "createdAt": "2026-07-28T03:12:40.000Z", "updatedAt": "2026-07-28T03:12:40.000Z", "uid": "35240-185e86b5-5c17-45b5-aa2b-1fed484847ab" } ], "id": "7bb35114-79fc-48cb-b0c6-6d6e0a35d272", "createdAt": "2026-07-28T03:12:40.000Z", "updatedAt": "2026-07-28T03:12:40.000Z", "uid": "35240-7bb35114-79fc-48cb-b0c6-6d6e0a35d272" } ], "id": "28d82edc-e89d-41ee-a9e4-8c9b846060d8", "createdAt": "2026-07-28T03:12:40.000Z", "updatedAt": "2026-07-28T03:12:40.000Z", "uid": "35240-28d82edc-e89d-41ee-a9e4-8c9b846060d8" } ], "variable": [ { "key": "baseUrl", "value": "https://demo.thingsboard.io" } ] }