Environment API v2 - Entity selector

The entity selector is a powerful instrument for specifying which entities you want to include to the scope of your Environment v2 API calls. It is used in several APIs, so you only have to learn the syntax once and then reuse it for multiple use cases.

You must specify one of following criteria:

Additionally you can provide the following criteria in any combination:

If you provide several criteria, only results matching all criteria are included in the response.

Limitations

The total length of the entitySelector string is limited to 10,000 characters.

You can select only one type of entity per query.

Entity type

The type of the entity you want to query.

You can fetch the list of available entity types with the GET all entity types call.

Syntax type("value")
Multiple values No
Value operator EQUALS
Case-sensitive value No

Dynatrace entity ID

The Dynatrace entity ID of the requested entity.

To specify several IDs, separate them by a comma (,). All requested entities must be of the same type.

You can fetch the list of available entities with the GET entities list call.

Syntax entityId("id-1","id-2")
Multiple values Yes
Value operator EQUALS
Case-sensitive value No

Entity name

The name of the requested entity.

To specify several names, separate them by a comma (,). All requested entities must be of the same type.

You can fetch the list of available entities with the GET entities list call.

Syntax entityName("name-1","name-2")
Multiple values Yes
Value operator CONTAINS
Case-sensitive value No

Starts with modification

Changes the value operator of the entity name criterion to BEGINS WITH.

Syntax entityName.startsWith("name-1","name-2")
Multiple values Yes
Value operator BEGINS WITH
Case-sensitive value No

Equals modification

Changes the value operator of the entity name criterion to EQUALS.

Syntax entityName.equals("name-1","name-2")
Multiple values Yes
Value operator EQUALS
Case-sensitive value No

Case sensitive modification

By default entity names evaluation disregards the case. You can make the criterion stricter by using the caseSensitive modification. It takes any entity name criterion as an argument (including those already modified with .startsWith or .equals modifiers) and evaluates values as case-sensitive.

Syntax caseSensitive(<entity name criterion>)
Multiple arguments No

Tag

The tag of the requested entities. Tags in [context]key:value, key:value, and value formats are detected and parsed automatically. If a value-only tag has a colon (:) in it, you must escape the colon with a backslash(\). Otherwise, the tag will be parsed as a key:value tag.

To specify several tags, separate them by a comma (,). An entity with any of the specified tags is included to the response.

You can fetch the list of available tags with the GET custom tags and the GET auto-tags calls.

Syntax tag("[context]key1:value-1","key2:value-2","value-3")
Multiple values Yes
Value operator EQUALS
Case-sensitive value Yes

Management zone ID

The ID of the management zone to which the requested entities belong.

To specify several IDs, separate them by a comma (,).

You can fetch the list of available management zones with the GET all management zones call.

Syntax mzId("ID-1","ID-2")
Multiple values Yes
Value operator EQUALS
Case-sensitive value n/a

Management zone name

The name of the management zone to which the requested entities belong.

To specify several names, separate them by a comma (,).

You can fetch the list of available management zones with the GET all management zones call.

Syntax mzName("name-1","name-2")
Multiple values Yes
Value operator EQUALS
Case-sensitive value Yes

Health state

The health state of the requested entities. Possible values are HEALTHY and UNHEALTHY.

Syntax healthState("HEALTHY")
Multiple values No
Value operator EQUALS
Case-sensitive value Yes

Negate criterion

You can use the not modification to invert any criterion except for type. It takes a criterion as an argument and inverts the condition. For example, the not(tag("Infrastructure:Linux")) criterion selects entities that do not have the Infrastructure:Linux tag.

You can use the negated criteria as part of complicated selectors, just like any other criteria.

Syntax not (<criterion>)
Multiple arguments No
Note Doesn't support type criteria.