Relations

Read

GET https://interay.io/api/v1/entities/relations/get

Read entity relations

type

object

properties

  • entity

The unique identifier.

type

string (UUID)

Response

type

object

properties

  • parents

Entity parents

type

array

items

type

object

properties

  • uid

Unique ID

type

string (UUID)

  • enabled

Enabled

type

boolean

  • name

Name

type

string

  • key

External key

type

string

  • children

Entity children

type

array

items

type

object

properties

  • uid

Unique ID

type

string (UUID)

  • enabled

Enabled

type

boolean

  • name

Name

type

string

  • key

External key

type

string

Example request

GET https://interay.io/api/v1/entities/relations/get?entity=00000000-0000-0000-0000-000000000000
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...

Example response

200 OK
Content-Type: application/json
{
        "parents": [
                {
                        "displayName": "Docs (docs)",
                        "key": "docs",
                        "uid": "00000000-0000-0000-0000-000000000000",
                        "enabled": true,
                        "link": "https://interay.io/admin/devices/00000000-0000-0000-0000-000000000000",
                        "name": "Docs"
                }
        ],
        "children": []
}

Insert

POST https://interay.io/api/v1/entities/relations/insert

Insert entity relation into the entity tree

type

object

properties

  • entity

The unique identifier.

type

string (UUID)

  • parentEntity

The destination parent unique identifier.

type

string (UUID)

Example request

POST https://interay.io/api/v1/entities/relations/insert
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
Content-Type: application/json
{
        "entity": "00000000-0000-0000-0000-000000000000",
        "parentEntity": "99999999-9999-9999-9999-999999999999"
}

Example response

200 OK

Delete

POST https://interay.io/api/v1/entities/relations/delete

Delete entity relation from the entity tree

type

object

properties

  • entity

The unique identifier.

type

string (UUID)

  • parentEntity

The source parent unique identifier.

type

string (UUID)

Example request

POST https://interay.io/api/v1/entities/relations/delete
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
Content-Type: application/json
{
        "entity": "00000000-0000-0000-0000-000000000000",
        "parentEntity": "99999999-9999-9999-9999-999999999999"
}

Example response

200 OK

Update

POST https://interay.io/api/v1/entities/relations/update

Move entity relation in the entity tree

type

object

properties

  • entity

The unique identifier.

type

string (UUID)

  • fromParentEntity

The source parent unique identifier.

type

string (UUID)

  • toParentEntity

The destination parent unique identifier.

type

string (UUID)

Example request

POST https://interay.io/api/v1/entities/relations/update
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
Content-Type: application/json
{
        "entity": "00000000-0000-0000-0000-000000000000",
        "fromParentEntity": "88888888-8888-8888-8888-888888888888",
        "toParentEntity": "99999999-9999-9999-9999-999999999999"
}

Example response

200 OK