Query Entities

post

/serviceapi/entityModel/uds/entities/query

Query Entities using a JSON payload containing tag criteria.

The query parameters given are optional. All entities are returned with an empty object in the body. This allows to query by entity type, by tag criteria, or both.

Refer to the example section for some complex criteria.

Request

Supported Media Types
Query Parameters
Body ()
The query criteria
Root Schema : UdsQueryEntitiesCriteria
Type: object

This model describes the criteria used to query Entities. The criteria consists of an entity type (optional) and a tag criteria (optional).

Show Source
Nested Schema : entityTypes
Type: array
The list of entity types
Show Source
Back to Top

Response

Supported Media Types

Default Response

successful operation
Back to Top

Examples

Query all entities which are of type myHostEntity and are located in Boston:

Payload:

{
  "entityType":"myHostEntity",
  "tagCriteria":"loc=bos"
}
curl -u ${OMC_USERNAME}:${PASSWORD} -X POST -H "Content-Type:application/json" -d "@example.json" "https://serverurl/serviceapi/serviceapi/entityModel/uds/entities/query"

The output is the same format as in the GET API.

Example criteria

Back to Top