Execute Query By Name

This call executes a TQL query by the name it was already saved with.

URL

/topology

Method

POST

Headers

Required:

Authorization: Bearer <token>

Note <token> is the token that is returned by the Authentication call.

Example:

Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE0Njc5ODQ5MTcsImN1c3RvbWVyIjoxLCJ1c2VybmFtZSI6InN5c2FkbWluIn0.Ph8WHtzvpvfuH1j0CtwHqyBhX1uLlfhr0eQQ7m0_gT0

Request type

JSON

Response type

JSON

URL Parameters

Required: None

Optional:

chunkSize=<chunkSize>

<chunkSize> - integer value that represents the chunk size of the result.

Payload

<tql_name>: string

The payload contains only the name of the TQL to be executed.

Success Response

Response: 200

Content:

  • Case 1: Result size <= chunk size

    {
      cis: [
        {
          ucmdbId: [ucmdb_id],
          type: [ucmdb_cit],
          properties: {
            <ucmdb_cit_prop>: [ucmdb_cit_prop_value],
            …
          }
        },
        …
      ],
      relations: [
        {
          ucmdbId: [ucmdb_id],
          type: [ucmdb_cit],
          end1Id: [ucmdb_id],
          end2Id: [ucmdb_id],
          properties: {
            <ucmdb_cit_prop>: [ucmdb_cit_prop_value],
            …
          }
        },
        …
      ]
    }
  • Case 2: resultSize > chunkSize

    {
      "queryResultId": [resultIdToken],
      "numberOfChunks": [integer],
      "cis": null,
      "relations": null
    }

Note The (three dots) denotes that there can be 0 or more values.

Data Types:

[ucmdb_id]

The string that represents the ID of an object.

[ucmdb_cit]

The string that represents the name of a valid CI Type from the UCMDB. The name of the CI Type can be found inside the CI Type Manager.

[ucmdb_cit_prop_value]

The property value, which can be integer, string, Boolean, long, double, ISO8601 date, or a list of values depending on the CIT property data type.

[resultIdToken]

The string that represents a token that identifies this resultId, used to retrieve individual chunks.

Custom fields:

<ucmdb_cit_prop>

The valid property name of the CI Type. You can get the name and the list of all properties of a CI Type from the CI Type Manager.

Note The (three dots) denotes that there can be 0 or more values.

Error Response

Code: 500

Content:

{
  error: [string]
}

Notes

The user that the token belongs to must have the required permissions for executing the TQL query.