Here is new documentation version.
You are reading outdated documentation, which will be shutdown soon!

REST API

REST API documentation API documentation version v1

Base URL: https://cloud.kaaiot.com/am

Asset types

Operations on asset types.

/api/v1/asset-types post get

post /api/v1/asset-types

Creates a new item.

Secured by oauth_2_0 with scopes:
  • tenant:asset-type:create

AM supports OAuth 2.0 for authenticating all API requests.

Body

Media type: application/json

Type: object

Properties

  • type: required(string - pattern: ^[A-Z0-9_]{2,50}+$)

    Type.

  • displayName: required(string)

    Display name.

  • description: optional (string)

    Description.

  • definitionJsonSchema: required(string)

    Asset validation JSON schema.

  • uiJsonSchema: optional (string)

    UI JSON schema.

  • poolIds: optional (array of )

    An array of the unique identifiers of the pools to which the asset-type will be attached.

Example:

{
  "type": "BUILDING",
  "displayName": "building",
  "description": "Asset type that represents building",
  "definitionJsonSchema": "{\"$id\":\"https://example.com/employee.schema.json\",\"$schema\":\"https://json-schema.org/draft/2020-12/schema\",\"title\":\"Vehicleassettype\",\"description\":\"Vehicleassettype\",\"type\":\"object\",\"properties\":{\"make\":{\"description\":\"Make\",\"type\":\"string\"},\"model\":{\"description\":\"Model\",\"type\":\"string\"},\"license_plate_number\":{\"description\":\"Licenseplatenumber\",\"type\":\"string\"}}}",
  "uiJsonSchema": "{\"$id\":\"https://example.com/employee.schema.json\",\"$schema\":\"https://json-schema.org/draft/2020-12/schema\",\"title\":\"Vehicleassettype\",\"description\":\"Vehicleassettype\",\"type\":\"object\",\"properties\":{\"make\":{\"description\":\"Make\",\"type\":\"string\"},\"model\":{\"description\":\"Model\",\"type\":\"string\"},\"license_plate_number\":{\"description\":\"Licenseplatenumber\",\"type\":\"string\"}}}",
  "poolIds": [
    "aXJuOnJjNzNkYmg3cTA6aWFtY29yZTo0YXRjaWNuaXNnOjpwb29sL2Rldg=="
  ]
}

HTTP status code 201

Item is successfully created.

Headers

  • Location: required(string)

    URI in format {schema}://{host}/am/api/v1/asset-types/{assetTypeId}

    Example:

    https://cloud.kaaiot.com/am/api/v1/asset-types/47e17fc5-060c-4923-b315-d17f6a1bf8d6

HTTP status code 400

Invalid request.

Body

Media type: application/json

Type: object

Properties

  • message: required(string)

    Detailed error description.

HTTP status code 401

Request is not authenticated.

HTTP status code 403

Principal does not have sufficient permissions to perform this operation.

Secured by oauth_2_0

Headers

  • Authorization: optional (string)

    Used to send a valid OAuth 2 access token. Example: "Authorization: Bearer 'access_token'" where 'access_token' must be replaced by a valid OAuth access token. This header is needed only if API authentication is enabled for the service.

get /api/v1/asset-types

Retrieves list.

Secured by oauth_2_0 with scopes:
  • asset-type:read

AM supports OAuth 2.0 for authenticating all API requests.

Query Parameters

  • type: optional (string)

    Type. Supports partial match.

    Example:

    BUILDING
  • description: optional (string)

    Description. Supports partial match.

    Example:

    myDescription
  • page: optional (number - default: 0)

    Page number.

    Example:

    0
  • size: optional (number - default: 100)

    Page size.

    Example:

    10
  • sort: optional (one of createdAt, updatedAt - default: createdAt)

    Field to sort by.

    Example:

    updatedAt
  • sortOrder: optional (one of asc, desc - default: desc)

    Sort direction.

    Example:

    asc

HTTP status code 200

List is successfully retrieved.

Body

Media type: application/json

Type: object

Properties

  • totalElements: required(integer)

    Total number of elements available for retrieval.

  • content: required(array of ItemResponse)

    Items: ItemResponse

    • id: required(string)

      ID.

    • type: required(string - pattern: ^[A-Z0-9_]{2,50}+$)

      Type.

    • displayName: required(string)

      Display name.

    • description: optional (string)

      Description.

    • definitionJsonSchema: optional (string)

      Asset validation JSON schema.

    • uiJsonSchema: optional (string)

      UI JSON schema.

    • tenantId: required(object)

      Tenant ID.

      • createdAt: required(datetime)

        Timestamp in ISO 8601 format (UTC timezone) showing when the record was created.

        Example:

        2023-06-30T12:30:54.540Z
      • updatedAt: required(datetime)

        Timestamp in ISO 8601 format (UTC timezone) showing when the record was last updated.

        Example:

        2023-06-30T12:30:54.540Z

    Example:

    {
      "content": [
        {
          "id": "47e17fc5-060c-4923-b315-d17f6a1bf8d6",
          "type": "BUILDING",
          "displayName": "building",
          "description": "Asset type that represents building",
          "tenantId": "f59a5f45-875d-4dcb-95eb-b017ef9a0638",
          "definitionJsonSchema": "{\"$id\":\"https://example.com/employee.schema.json\",\"$schema\":\"https://json-schema.org/draft/2020-12/schema\",\"title\":\"Vehicleassettype\",\"description\":\"Vehicleassettype\",\"type\":\"object\",\"properties\":{\"make\":{\"description\":\"Make\",\"type\":\"string\"},\"model\":{\"description\":\"Model\",\"type\":\"string\"},\"license_plate_number\":{\"description\":\"Licenseplatenumber\",\"type\":\"string\"}}}",
          "uiJsonSchema": "{\"$id\":\"https://example.com/employee.schema.json\",\"$schema\":\"https://json-schema.org/draft/2020-12/schema\",\"title\":\"Vehicleassettype\",\"description\":\"Vehicleassettype\",\"type\":\"object\",\"properties\":{\"make\":{\"description\":\"Make\",\"type\":\"string\"},\"model\":{\"description\":\"Model\",\"type\":\"string\"},\"license_plate_number\":{\"description\":\"Licenseplatenumber\",\"type\":\"string\"}}}",
          "createdAt": "2023-06-30T12:30:54.540Z",
          "updatedAt": "2023-06-30T12:30:54.541Z"
        }
      ],
      "totalElements": 1
    }
    

    HTTP status code 401

    Request is not authenticated.

    Secured by oauth_2_0

    Headers

    • Authorization: optional (string)

      Used to send a valid OAuth 2 access token. Example: "Authorization: Bearer 'access_token'" where 'access_token' must be replaced by a valid OAuth access token. This header is needed only if API authentication is enabled for the service.

    /api/v1/asset-types/{assetTypeId} get put delete

    get /api/v1/asset-types/{assetTypeId}

    Retrieves item.

    Secured by oauth_2_0 with scopes:
    • asset-type:read

    AM supports OAuth 2.0 for authenticating all API requests.

    URI Parameters

    • assetTypeId: required(string)

      ID

    HTTP status code 200

    Item is successfully retrieved.

    Body

    Media type: application/json

    Type: object

    Properties

    • id: required(string)

      ID.

    • type: required(string - pattern: ^[A-Z0-9_]{2,50}+$)

      Type.

    • displayName: required(string)

      Display name.

    • description: optional (string)

      Description.

    • definitionJsonSchema: optional (string)

      Asset validation JSON schema.

    • uiJsonSchema: optional (string)

      UI JSON schema.

    • tenantId: required(object)

      Tenant ID.

      • createdAt: required(datetime)

        Timestamp in ISO 8601 format (UTC timezone) showing when the record was created.

        Example:

        2023-06-30T12:30:54.540Z
      • updatedAt: required(datetime)

        Timestamp in ISO 8601 format (UTC timezone) showing when the record was last updated.

        Example:

        2023-06-30T12:30:54.540Z

      Example:

      {
        "id": "47e17fc5-060c-4923-b315-d17f6a1bf8d6",
        "type": "BUILDING",
        "displayName": "building",
        "description": "Asset type that represents building",
        "tenantId": "f59a5f45-875d-4dcb-95eb-b017ef9a0638",
        "definitionJsonSchema": "{\"$id\":\"https://example.com/employee.schema.json\",\"$schema\":\"https://json-schema.org/draft/2020-12/schema\",\"title\":\"Vehicleassettype\",\"description\":\"Vehicleassettype\",\"type\":\"object\",\"properties\":{\"make\":{\"description\":\"Make\",\"type\":\"string\"},\"model\":{\"description\":\"Model\",\"type\":\"string\"},\"license_plate_number\":{\"description\":\"Licenseplatenumber\",\"type\":\"string\"}}}",
        "uiJsonSchema": "{\"$id\":\"https://example.com/employee.schema.json\",\"$schema\":\"https://json-schema.org/draft/2020-12/schema\",\"title\":\"Vehicleassettype\",\"description\":\"Vehicleassettype\",\"type\":\"object\",\"properties\":{\"make\":{\"description\":\"Make\",\"type\":\"string\"},\"model\":{\"description\":\"Model\",\"type\":\"string\"},\"license_plate_number\":{\"description\":\"Licenseplatenumber\",\"type\":\"string\"}}}",
        "createdAt": "2023-06-30T12:30:54.540Z",
        "updatedAt": "2023-06-30T12:30:54.541Z"
      }

      HTTP status code 401

      Request is not authenticated.

      HTTP status code 404

      Resource not found or querying user is not authorized for it.

      Secured by oauth_2_0

      Headers

      • Authorization: optional (string)

        Used to send a valid OAuth 2 access token. Example: "Authorization: Bearer 'access_token'" where 'access_token' must be replaced by a valid OAuth access token. This header is needed only if API authentication is enabled for the service.

      put /api/v1/asset-types/{assetTypeId}

      Updates item.

      Secured by oauth_2_0 with scopes:
      • asset-type:update

      AM supports OAuth 2.0 for authenticating all API requests.

      URI Parameters

      • assetTypeId: required(string)

        ID

      Body

      Media type: application/json

      Type: object

      Properties

      • type: required(string - pattern: ^[A-Z0-9_]{2,50}+$)

        Type.

      • displayName: required(string)

        Display name.

      • description: optional (string)

        Description.

      • definitionJsonSchema: required(string)

        Asset validation JSON schema.

      • uiJsonSchema: optional (string)

        UI JSON schema.

      Example:

      {
        "type": "BUILDING",
        "displayName": "building",
        "description": "Asset type that represents building",
        "definitionJsonSchema": "{\"$id\":\"https://example.com/employee.schema.json\",\"$schema\":\"https://json-schema.org/draft/2020-12/schema\",\"title\":\"Vehicleassettype\",\"description\":\"Vehicleassettype\",\"type\":\"object\",\"properties\":{\"make\":{\"description\":\"Make\",\"type\":\"string\"},\"model\":{\"description\":\"Model\",\"type\":\"string\"},\"license_plate_number\":{\"description\":\"Licenseplatenumber\",\"type\":\"string\"}}}",
        "uiJsonSchema": "{\"$id\":\"https://example.com/employee.schema.json\",\"$schema\":\"https://json-schema.org/draft/2020-12/schema\",\"title\":\"Vehicleassettype\",\"description\":\"Vehicleassettype\",\"type\":\"object\",\"properties\":{\"make\":{\"description\":\"Make\",\"type\":\"string\"},\"model\":{\"description\":\"Model\",\"type\":\"string\"},\"license_plate_number\":{\"description\":\"Licenseplatenumber\",\"type\":\"string\"}}}"
      }
      

      HTTP status code 204

      Item is successfully updated.

      HTTP status code 400

      Invalid request.

      Body

      Media type: application/json

      Type: object

      Properties

      • message: required(string)

        Detailed error description.

      HTTP status code 401

      Request is not authenticated.

      HTTP status code 404

      Resource not found or querying user is not authorized for it.

      Secured by oauth_2_0

      Headers

      • Authorization: optional (string)

        Used to send a valid OAuth 2 access token. Example: "Authorization: Bearer 'access_token'" where 'access_token' must be replaced by a valid OAuth access token. This header is needed only if API authentication is enabled for the service.

      delete /api/v1/asset-types/{assetTypeId}

      Deletes.

      Secured by oauth_2_0 with scopes:
      • asset-type:delete

      AM supports OAuth 2.0 for authenticating all API requests.

      URI Parameters

      • assetTypeId: required(string)

        ID

      HTTP status code 204

      Item is successfully deleted.

      HTTP status code 401

      Request is not authenticated.

      HTTP status code 404

      Resource not found or querying user is not authorized for it.

      Secured by oauth_2_0

      Headers

      • Authorization: optional (string)

        Used to send a valid OAuth 2 access token. Example: "Authorization: Bearer 'access_token'" where 'access_token' must be replaced by a valid OAuth access token. This header is needed only if API authentication is enabled for the service.

      Assets

      Operations on assets.

      /api/v1/assets post

      post /api/v1/assets

      Creates a new item.

      Secured by oauth_2_0 with scopes:
      • asset-type:asset:create

      AM supports OAuth 2.0 for authenticating all API requests.

      Body

      Media type: application/json

      Type: object

      Properties

      • assetTypeId: required(string)

        Asset type ID.

      • definition: required(string)

        Definition according to the asset type's JSON schema.

      • uiJsonSchema: optional (string)

        UI JSON schema.

      • poolIds: optional (array of )

        An array of the unique identifiers of the pools to which the asset is attached.

      Example:

      {
        "assetTypeId": "d42e0139-b065-4965-8768-04da733f132c",
        "definition": "{\"city\":\"Kyiv\",\"street\":\"Khreshchatyk St\"}",
        "uiJsonSchema": "{\"$id\":\"https://example.com/employee.schema.json\",\"$schema\":\"https://json-schema.org/draft/2020-12/schema\",\"title\":\"Vehicleassettype\",\"description\":\"Vehicleassettype\",\"type\":\"object\",\"properties\":{\"make\":{\"description\":\"Make\",\"type\":\"string\"},\"model\":{\"description\":\"Model\",\"type\":\"string\"},\"license_plate_number\":{\"description\":\"Licenseplatenumber\",\"type\":\"string\"}}}",
        "poolIds": [
          "aXJuOnJjNzNkYmg3cTA6aWFtY29yZTo0YXRjaWNuaXNnOjpwb29sL2Rldg=="
        ]
      }

      HTTP status code 201

      Item is successfully created.

      Headers

      • Location: required(string)

        URI in format {schema}://{host}/am/api/v1/assets/{assetId}

        Example:

        https://cloud.kaaiot.com/am/api/v1/assets/47e17fc5-060c-4923-b315-d17f6a1bf8d6

      HTTP status code 400

      Invalid request.

      Body

      Media type: application/json

      Type: object

      Properties

      • message: required(string)

        Detailed error description.

      HTTP status code 401

      Request is not authenticated.

      HTTP status code 403

      Principal does not have sufficient permissions to perform this operation.

      Secured by oauth_2_0

      Headers

      • Authorization: optional (string)

        Used to send a valid OAuth 2 access token. Example: "Authorization: Bearer 'access_token'" where 'access_token' must be replaced by a valid OAuth access token. This header is needed only if API authentication is enabled for the service.

      /api/v1/assets/list post

      post /api/v1/assets/list

      Retrieves list with optional filtering by asset definition.

      Secured by oauth_2_0 with scopes:
      • asset:read

      AM supports OAuth 2.0 for authenticating all API requests.

      Query Parameters

      • page: optional (number - default: 0)

        Page number.

        Example:

        0
      • size: optional (number - default: 100)

        Page size.

        Example:

        10
      • sort: optional (one of createdAt, updatedAt - default: createdAt)

        Field to sort by.

        Example:

        updatedAt
      • sortOrder: optional (one of asc, desc - default: desc)

        Sort direction.

        Example:

        asc

      Body

      Media type: application/json

      Type: object

      Properties

      • assetIds: optional (array of )

        Asset IDs.

      • assetTypeIds: optional (array of )

        Asset type IDs

      • and: optional (array of KeyValueFilter)

        And.

        Items: KeyValueFilter

        • key: required(string)

          Key.

        • in: required(array of )

          Values that the key must be in.

        • matchMode: optional (one of EQUAL, NOT_EQUAL, LIKE, GT_EQ, LT_EQ - default: EQUAL)
          • EQUAL - matches asset only if its key equal to one of the value in the in.
          • NOT_EQUAL - matches asset only if its key is not equal to any of the values in the in.
          • LIKE - matches asset if its key like one of the value in the in.
          • GT_EQ - matches asset if its key is greater than or equal to one of the value in the in.
          • LT_EQ - matches asset if its key is less than or equal to one of the value in the in.
        • and: required(array of )

          And.

        • or: required(array of )

          Or.

      • or: optional (array of KeyValueFilter)

        Or.

        Items: KeyValueFilter

        • key: required(string)

          Key.

        • in: required(array of )

          Values that the key must be in.

        • matchMode: optional (one of EQUAL, NOT_EQUAL, LIKE, GT_EQ, LT_EQ - default: EQUAL)
          • EQUAL - matches asset only if its key equal to one of the value in the in.
          • NOT_EQUAL - matches asset only if its key is not equal to any of the values in the in.
          • LIKE - matches asset if its key like one of the value in the in.
          • GT_EQ - matches asset if its key is greater than or equal to one of the value in the in.
          • LT_EQ - matches asset if its key is less than or equal to one of the value in the in.
        • and: required(array of )

          And.

        • or: required(array of )

          Or.

      • sort: optional (object)

        Sorting definition.

        • key: required(string)

          Sorting key inside asset definition.

          Example:

          location.city
        • direction: required(one of ASC, DESC)

          Sort direction.

          Example:

          DESC
      • relationType: optional (one of CONTAINS, IS_CONTAINED_BY, SUPPORTS, IS_SUPPORTED_BY, MANAGES, IS_MANAGED_BY, CONTROLS, IS_CONTROLLED_BY)

        Directed relation type. When specified, each asset in the response will include a relations field containing related assets grouped by relation type. Uses directed types to indicate the direction of the relation (e.g., CONTAINS returns assets that this asset contains, IS_CONTAINED_BY returns assets that contain this asset).

      Example:

      {
        "assetIds": [
          "asset_39379d45-661c-4b66-98aa-5cc97303c177",
          "asset_39379d45-661c-4b66-98aa-5cc97303c178"
        ],
        "assetTypeIds": [
          "asset_tp_d626bba5-d316-41eb-afcc-76f2980233c2",
          "asset_tp_d626bba5-d316-41eb-afcc-76f2980233c3"
        ],
        "and": [
          {
            "key": "location.city",
            "in": [
              "Kyiv"
            ],
            "matchMode": "EQUAL"
          },
          {
            "or": [
              {
                "key": "location.street",
                "in": [
                  "Khresh",
                  "Shev"
                ],
                "matchMode": "LIKE"
              }
            ]
          }
        ],
        "sort": {
          "key": "location.city",
          "direction": "DESC"
        }
      }
      

      HTTP status code 200

      List is successfully retrieved.

      Body

      Media type: application/json

      Type: object

      Properties

      • totalElements: required(integer)

        Total number of elements available for retrieval.

      • content: required(array of ItemResponse)

        Items: ItemResponse

        • id: required(string)

          ID.

        • assetTypeId: required(string)

          Asset type ID.

        • definition: required(string)

          Definition according to the asset type's JSON schema.

        • uiJsonSchema: optional (string)

          UI JSON schema.

        • tenantId: required(string)

          Tenant ID.

        • poolIds: optional (array of )

          Pool IDs the asset attached to.

        • createdAt: required(datetime)

          Timestamp in ISO 8601 format (UTC timezone) showing when the record was created.

          Example:

          2023-06-30T12:30:54.540Z
        • updatedAt: required(datetime)

          Timestamp in ISO 8601 format (UTC timezone) showing when the record was last updated.

          Example:

          2023-06-30T12:30:54.540Z
        • relations: optional (object)

          Map of relation type to array of related entity references. Only present when relationType is specified in the request filter. Key is the relation type string (e.g., "CONTAINS"), value is an array of RelatedEntity objects.

        Example:

        {
          "content": [
            {
              "id": "47e17fc5-060c-4923-b315-d17f6a1bf8d6",
              "assetTypeId": "d42e0139-b065-4965-8768-04da733f132c",
              "definition": "{\"city\":\"Kyiv\",\"street\":\"Khreshchatyk St\"}",
              "uiJsonSchema": "{\"$schema\":\"https://json-schema.org/draft/2020-12/schema\",\"title\":\"Vehicleassettype\",\"description\":\"Vehicleassettype\",\"type\":\"object\",\"properties\":{\"make\":{\"description\":\"Make\",\"type\":\"string\"},\"model\":{\"description\":\"Model\",\"type\":\"string\"},\"license_plate_number\":{\"description\":\"Licenseplatenumber\",\"type\":\"string\"}}}",
              "tenantId": "f59a5f45-875d-4dcb-95eb-b017ef9a0638",
              "createdAt": "2023-06-30T12:30:54.540Z",
              "updatedAt": "2023-06-30T12:30:54.541Z"
            }
          ],
          "totalElements": 1
        }
        

        HTTP status code 401

        Request is not authenticated.

        Secured by oauth_2_0

        Headers

        • Authorization: optional (string)

          Used to send a valid OAuth 2 access token. Example: "Authorization: Bearer 'access_token'" where 'access_token' must be replaced by a valid OAuth access token. This header is needed only if API authentication is enabled for the service.

        /api/v1/assets/{assetId} get put patch delete

        get /api/v1/assets/{assetId}

        Retrieves item.

        Secured by oauth_2_0 with scopes:
        • asset:read

        AM supports OAuth 2.0 for authenticating all API requests.

        URI Parameters

        • assetId: required(string)

          ID

        HTTP status code 200

        Item is successfully retrieved.

        Body

        Media type: application/json

        Type: object

        Properties

        • id: required(string)

          ID.

        • assetTypeId: required(string)

          Asset type ID.

        • definition: required(string)

          Definition according to the asset type's JSON schema.

        • uiJsonSchema: optional (string)

          UI JSON schema.

        • tenantId: required(string)

          Tenant ID.

        • poolIds: optional (array of )

          Pool IDs the asset attached to.

        • createdAt: required(datetime)

          Timestamp in ISO 8601 format (UTC timezone) showing when the record was created.

          Example:

          2023-06-30T12:30:54.540Z
        • updatedAt: required(datetime)

          Timestamp in ISO 8601 format (UTC timezone) showing when the record was last updated.

          Example:

          2023-06-30T12:30:54.540Z
        • relations: optional (object)

          Map of relation type to array of related entity references. Only present when relationType is specified in the request filter. Key is the relation type string (e.g., "CONTAINS"), value is an array of RelatedEntity objects.

          Example:

          {
            "id": "47e17fc5-060c-4923-b315-d17f6a1bf8d6",
            "assetTypeId": "d42e0139-b065-4965-8768-04da733f132c",
            "definition": "{\"city\":\"Kyiv\",\"street\":\"Khreshchatyk St\"}",
            "uiJsonSchema": "{\"$id\":\"https://example.com/employee.schema.json\",\"$schema\":\"https://json-schema.org/draft/2020-12/schema\",\"title\":\"Vehicleassettype\",\"description\":\"Vehicleassettype\",\"type\":\"object\",\"properties\":{\"make\":{\"description\":\"Make\",\"type\":\"string\"},\"model\":{\"description\":\"Model\",\"type\":\"string\"},\"license_plate_number\":{\"description\":\"Licenseplatenumber\",\"type\":\"string\"}}}",
            "tenantId": "f59a5f45-875d-4dcb-95eb-b017ef9a0638",
            "poolIds": [
              "aXJuOnJjNzNkYmg3cTA6aWFtY29yZTo0YXRjaWNuaXNnOjpwb29sL2Rldg=="
            ],
            "createdAt": "2023-06-30T12:30:54.540Z",
            "updatedAt": "2023-06-30T12:30:54.541Z"
          }

          HTTP status code 401

          Request is not authenticated.

          HTTP status code 404

          Resource not found or querying user is not authorized for it.

          Secured by oauth_2_0

          Headers

          • Authorization: optional (string)

            Used to send a valid OAuth 2 access token. Example: "Authorization: Bearer 'access_token'" where 'access_token' must be replaced by a valid OAuth access token. This header is needed only if API authentication is enabled for the service.

          put /api/v1/assets/{assetId}

          Updates item.

          Secured by oauth_2_0 with scopes:
          • asset:update

          AM supports OAuth 2.0 for authenticating all API requests.

          URI Parameters

          • assetId: required(string)

            ID

          Body

          Media type: application/json

          Type: object

          Properties

          • assetTypeId: required(string)

            Asset type ID.

          • definition: required(string)

            Definition according to the asset type's JSON schema.

          • uiJsonSchema: optional (string)

            UI JSON schema.

          Example:

          {
            "assetTypeId": "d42e0139-b065-4965-8768-04da733f132c",
            "definition": "{\"city\":\"Kyiv\",\"street\":\"Khreshchatyk St\"}",
            "uiJsonSchema": "{\"$id\":\"https://example.com/employee.schema.json\",\"$schema\":\"https://json-schema.org/draft/2020-12/schema\",\"title\":\"Vehicleassettype\",\"description\":\"Vehicleassettype\",\"type\":\"object\",\"properties\":{\"make\":{\"description\":\"Make\",\"type\":\"string\"},\"model\":{\"description\":\"Model\",\"type\":\"string\"},\"license_plate_number\":{\"description\":\"Licenseplatenumber\",\"type\":\"string\"}}}"
          }

          HTTP status code 204

          Item is successfully updated.

          HTTP status code 400

          Invalid request.

          Body

          Media type: application/json

          Type: object

          Properties

          • message: required(string)

            Detailed error description.

          HTTP status code 401

          Request is not authenticated.

          HTTP status code 404

          Resource not found or querying user is not authorized for it.

          Secured by oauth_2_0

          Headers

          • Authorization: optional (string)

            Used to send a valid OAuth 2 access token. Example: "Authorization: Bearer 'access_token'" where 'access_token' must be replaced by a valid OAuth access token. This header is needed only if API authentication is enabled for the service.

          patch /api/v1/assets/{assetId}

          Patches item.

          Secured by oauth_2_0 with scopes:
          • asset:update

          AM supports OAuth 2.0 for authenticating all API requests.

          URI Parameters

          • assetId: required(string)

            ID

          Body

          Media type: application/json

          Type: object

          Properties

          • operations: required(array of )

            Array of HTTP patches according to RFC 6902.

          Example:

          {
            "operations": [
              {
                "op": "add",
                "path": "/address",
                "value": {
                  "street": "Shevchenka",
                  "apt": 43
                }
              },
              {
                "op": "copy",
                "from": "/city",
                "path": "/town"
              }
            ]
          }
          

          HTTP status code 204

          Item is successfully patched.

          HTTP status code 400

          Invalid request.

          Body

          Media type: application/json

          Type: object

          Properties

          • message: required(string)

            Detailed error description.

          HTTP status code 401

          Request is not authenticated.

          HTTP status code 404

          Resource not found or querying user is not authorized for it.

          Secured by oauth_2_0

          Headers

          • Authorization: optional (string)

            Used to send a valid OAuth 2 access token. Example: "Authorization: Bearer 'access_token'" where 'access_token' must be replaced by a valid OAuth access token. This header is needed only if API authentication is enabled for the service.

          delete /api/v1/assets/{assetId}

          Deletes.

          Secured by oauth_2_0 with scopes:
          • asset:delete

          AM supports OAuth 2.0 for authenticating all API requests.

          URI Parameters

          • assetId: required(string)

            ID

          HTTP status code 204

          Item is successfully deleted.

          HTTP status code 401

          Request is not authenticated.

          HTTP status code 404

          Resource not found or querying user is not authorized for it.

          Secured by oauth_2_0

          Headers

          • Authorization: optional (string)

            Used to send a valid OAuth 2 access token. Example: "Authorization: Bearer 'access_token'" where 'access_token' must be replaced by a valid OAuth access token. This header is needed only if API authentication is enabled for the service.

          Relations

          Operations on relations.

          /api/v2/relations get

          get /api/v2/relations

          Retrieves relations.

          Secured by oauth_2_0 with scopes:
          • asset:read
          • endpoint:read
          • asset-type:read
          • application:read

          AM supports OAuth 2.0 for authenticating all API requests.

          Query Parameters

          • entityIds: required(string)

            Entity IDs.

          • entityType: required(one of ENDPOINT, ASSET, ASSET_TYPE, APPLICATION)

            Entity type.

          • relationType: optional (one of CONTAINS, IS_CONTAINED_BY, SUPPORTS, IS_SUPPORTED_BY, MANAGES, IS_MANAGED_BY, CONTROLS, IS_CONTROLLED_BY)

            Relation type.

          • page: optional (number - default: 0)

            Page number.

            Example:

            0
          • size: optional (number - default: 100)

            Page size.

            Example:

            10

          HTTP status code 200

          Relations are successfully retrieved.

          Body

          Media type: application/json

          Type: object

          Properties

          • totalElements: required(integer)

            Total number of elements available for retrieval.

          • content: required(array of ItemResponse)

            Items: ItemResponse

            • fromEntityId: required(string)

              From entity ID.

            • fromEntityType: required(one of ENDPOINT, ASSET, ASSET_TYPE, APPLICATION)

              From entity type.

            • toEntityId: required(string)

              To entity ID.

            • toEntityType: required(one of ENDPOINT, ASSET, ASSET_TYPE, APPLICATION)

              To entity type.

            • relationType: required(one of CONTAINS, SUPPORTS, MANAGES, CONTROLS)

              Relation type.

            • createdAt: required(datetime)

              Timestamp in ISO 8601 format (UTC timezone) showing when the record was created.

              Example:

              2023-06-30T12:30:54.540Z
            • updatedAt: required(datetime)

              Timestamp in ISO 8601 format (UTC timezone) showing when the record was last updated.

              Example:

              2023-06-30T12:30:54.540Z

          Example:

          {
            "content": [
              {
                "fromEntityId": "68f3c94d-c713-471a-ba71-51cc2d0f285f",
                "fromEntityType": "ASSET",
                "toEntityId": "716036b6-090f-4155-8ee9-6063b4a98a9c",
                "toEntityType": "ENDPOINT",
                "relationType": "CONTAINS",
                "createdAt": "2024-02-02T01:23:29.841Z",
                "updatedAt": "2024-02-02T01:23:29.841Z"
              }
            ],
            "totalElements": 1
          }
          

          HTTP status code 401

          Request is not authenticated.

          HTTP status code 404

          Resource not found or querying user is not authorized for it.

          Secured by oauth_2_0

          Headers

          • Authorization: optional (string)

            Used to send a valid OAuth 2 access token. Example: "Authorization: Bearer 'access_token'" where 'access_token' must be replaced by a valid OAuth access token. This header is needed only if API authentication is enabled for the service.

          /api/v1/relations/link post

          post /api/v1/relations/link

          Creates relation

          Secured by oauth_2_0 with scopes:
          • endpoint:update
          • asset:update

          AM supports OAuth 2.0 for authenticating all API requests.

          Body

          Media type: application/json

          Type: object

          Properties

          • fromEntityId: required(string)

            From entity ID.

          • fromEntityType: required(one of ENDPOINT, ASSET, ASSET_TYPE, APPLICATION)

            From entity type.

          • toEntityId: required(string)

            To entity ID.

          • toEntityType: required(one of ENDPOINT, ASSET, ASSET_TYPE, APPLICATION)

            To entity type.

          • relationType: required(one of CONTAINS, SUPPORTS, MANAGES, CONTROLS)

            Relation type.

          Example:

          {
            "fromEntityId": "68f3c94d-c713-471a-ba71-51cc2d0f285f",
            "fromEntityType": "ASSET",
            "toEntityId": "716036b6-090f-4155-8ee9-6063b4a98a9c",
            "toEntityType": "ENDPOINT",
            "relationType": "CONTAINS"
          }
          

          HTTP status code 200

          Relation is successfully created.

          HTTP status code 400

          Invalid request.

          Body

          Media type: application/json

          Type: object

          Properties

          • message: required(string)

            Detailed error description.

          HTTP status code 401

          Request is not authenticated.

          HTTP status code 403

          Principal does not have sufficient permissions to perform this operation.

          Secured by oauth_2_0

          Headers

          • Authorization: optional (string)

            Used to send a valid OAuth 2 access token. Example: "Authorization: Bearer 'access_token'" where 'access_token' must be replaced by a valid OAuth access token. This header is needed only if API authentication is enabled for the service.

          /api/v1/relations/unlink post

          post /api/v1/relations/unlink

          Deletes relation

          Secured by oauth_2_0 with scopes:
          • endpoint:update
          • asset:update

          AM supports OAuth 2.0 for authenticating all API requests.

          Body

          Media type: application/json

          Type: object

          Properties

          • fromEntityId: required(string)

            From entity ID.

          • fromEntityType: required(one of ENDPOINT, ASSET, ASSET_TYPE, APPLICATION)

            From entity type.

          • toEntityId: required(string)

            To entity ID.

          • toEntityType: required(one of ENDPOINT, ASSET, ASSET_TYPE, APPLICATION)

            To entity type.

          • relationType: required(one of CONTAINS, SUPPORTS, MANAGES, CONTROLS)

            Relation type.

          Example:

          {
            "fromEntityId": "68f3c94d-c713-471a-ba71-51cc2d0f285f",
            "fromEntityType": "ASSET",
            "toEntityId": "716036b6-090f-4155-8ee9-6063b4a98a9c",
            "toEntityType": "ENDPOINT",
            "relationType": "CONTAINS"
          }
          

          HTTP status code 200

          Relation is successfully deleted.

          HTTP status code 400

          Invalid request.

          Body

          Media type: application/json

          Type: object

          Properties

          • message: required(string)

            Detailed error description.

          HTTP status code 401

          Request is not authenticated.

          HTTP status code 403

          Principal does not have sufficient permissions to perform this operation.

          Secured by oauth_2_0

          Headers

          • Authorization: optional (string)

            Used to send a valid OAuth 2 access token. Example: "Authorization: Bearer 'access_token'" where 'access_token' must be replaced by a valid OAuth access token. This header is needed only if API authentication is enabled for the service.

          Relation sessions

          Operations on relation sessions.

          /api/v1/relation-sessions get

          get /api/v1/relation-sessions

          Retrieves relation sessions.

          Secured by oauth_2_0 with scopes:
          • asset:read
          • endpoint:read
          • asset-type:read
          • application:read

          AM supports OAuth 2.0 for authenticating all API requests.

          Query Parameters

          • entityId: required(string)

            Entity ID.

          • page: optional (number - default: 0)

            Page number.

            Example:

            0
          • size: optional (number - default: 100)

            Page size.

            Example:

            10
          • entityType: required(one of ENDPOINT, ASSET, ASSET_TYPE, APPLICATION)

            Entity type.

          • relationType: optional (one of CONTAINS, IS_CONTAINED_BY, SUPPORTS, IS_SUPPORTED_BY, MANAGES, IS_MANAGED_BY, CONTROLS, IS_CONTROLLED_BY)

            Relation type.

          HTTP status code 200

          Relation sessions are successfully retrieved.

          Body

          Media type: application/json

          Type: array of ItemResponse

          Items: ItemResponse

          • fromEntityId: required(string)

            From entity ID.

          • fromEntityType: required(one of ENDPOINT, ASSET, ASSET_TYPE, APPLICATION)

            From entity type.

          • toEntityId: required(string)

            To entity ID.

          • toEntityType: required(one of ENDPOINT, ASSET, ASSET_TYPE, APPLICATION)

            To entity type.

          • relationType: required(one of CONTAINS, SUPPORTS, MANAGES, CONTROLS)

            Relation type.

          • createdAt: required(datetime)

            Timestamp in ISO 8601 format (UTC timezone) showing when the record was created.

            Example:

            2023-06-30T12:30:54.540Z
          • updatedAt: required(datetime)

            Timestamp in ISO 8601 format (UTC timezone) showing when the record was last updated.

            Example:

            2023-06-30T12:30:54.540Z

          Example:

          [
            {
              "fromEntityId": "68f3c94d-c713-471a-ba71-51cc2d0f285f",
              "fromEntityType": "ASSET",
              "toEntityId": "716036b6-090f-4155-8ee9-6063b4a98a9c",
              "toEntityType": "ENDPOINT",
              "relationType": "CONTAINS",
              "linkedAt": "2024-02-01T01:23:29.841Z",
              "unlinkedAt": "2024-02-02T01:23:29.903Z",
              "createdAt": "2024-02-02T01:23:29.841Z",
              "updatedAt": "2024-02-02T01:23:29.903Z"
            }
          ]
          

          HTTP status code 401

          Request is not authenticated.

          HTTP status code 404

          Resource not found or querying user is not authorized for it.

          Secured by oauth_2_0

          Headers

          • Authorization: optional (string)

            Used to send a valid OAuth 2 access token. Example: "Authorization: Bearer 'access_token'" where 'access_token' must be replaced by a valid OAuth access token. This header is needed only if API authentication is enabled for the service.

          Relation trees

          Operations on relation trees.

          /api/v1/relation-trees get

          get /api/v1/relation-trees

          Retrieves relation tree.

          Secured by oauth_2_0 with scopes:
          • asset:read
          • endpoint:read
          • asset-type:read
          • application:read

          AM supports OAuth 2.0 for authenticating all API requests.

          Query Parameters

          • entityType: required(one of ENDPOINT, ASSET, ASSET_TYPE, APPLICATION)

            Entity type.

          • entityId: required(string)

            Entity ID.

          HTTP status code 200

          Relation tree is successfully retrieved.

          Body

          Media type: application/json

          Type: object

          Example:

          {
            "IS_CONTAINED_BY": [
              {
                "entityType": "ASSET",
                "entityId": "asset_3532943a-0a47-412c-a0c3-0b15da17e16b"
              }
            ],
            "CONTAINS": [
              {
                "entityType": "ENDPOINT",
                "entityId": "43e15dfb-9307-4399-b0b0-538d4e6be419"
              },
              {
                "entityType": "ENDPOINT",
                "entityId": "30f3a9f7-a7b4-4a95-887c-0d83f3c21055"
              }
            ]
          }
          

          HTTP status code 401

          Request is not authenticated.

          HTTP status code 404

          Resource not found or querying user is not authorized for it.

          Secured by oauth_2_0

          Headers

          • Authorization: optional (string)

            Used to send a valid OAuth 2 access token. Example: "Authorization: Bearer 'access_token'" where 'access_token' must be replaced by a valid OAuth access token. This header is needed only if API authentication is enabled for the service.