latestOpenAPI 3.1.0Apache License Version 2.02026-08-17498525913.3 KB

40169ccdec5c

entity-relation-controller

Get List of Relations (findByFrom)

Returns list of relation objects for the specified entity by the 'from' direction and relation type.

If 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.

get/api/relations

Query parameters

toIdstring required

A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'

toTypestring required

A string value representing the entity type. For example, 'DEVICE'

relationTypeGroupstring

A string value representing relation type group. For example, 'COMMON'

relationTypestring required

A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value.

fromIdstring required

A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'

fromTypestring required

A string value representing the entity type. For example, 'DEVICE'

Response

OK

typestring required

String value of relation type.

typeGroup'COMMON' | 'DASHBOARD' | 'RULE_CHAIN' | 'RULE_NODE' | 'EDGE' | 'EDGE_AUTO_ASSIGN_RULE_CHAIN' required

Represents the type group of the relation.

versioninteger
{"stackTrail":"components:schemas:JsonNode","oasType":"schema","type":"unknown","description":"A value representing the any type (object or primitive)","example":{}}

Example response

[
  {
    "from": {
      "id": "784f394c-42b6-435a-983c-b7beff2784f9",
      "entityType": "DEVICE"
    },
    "to": {
      "id": "784f394c-42b6-435a-983c-b7beff2784f9",
      "entityType": "DEVICE"
    },
    "type": "Contains",
    "typeGroup": "COMMON",
    "additionalInfo": {}
  }
]