Monitored entities API - GET an entity

Gets the full list of properties of the specified entity. The actual list depends on the entity type.

The request produces an application/json payload.

Early Adopter

This request is an Early Adopter release and may be changed in non-compatible way.

GET
  • Managed https://{your-domain}/e/{your-environment-id}/api/v2/entities/{entityId}
  • SaaS https://{your-environment-id}.live.dynatrace.com/api/v2/entities/{entityId}

Authentication

To execute this request, you need the Read entities using API V2 (entities.read) permission assigned to your API token. To learn how to obtain and use it, see Authentication.

Parameters

Parameter Type Description In Required
entityId string

The ID of the required entity.

path required
fields string

Defines the list of entity properties included in the response. The ID and the name of an entity are always included to the response.

To add properties, list them with leading plus +. You can specify several properties, separated by a comma (for example fields=+lastSeenTms,+properties.BITNESS).

Use the GET /entityTypes/{type} request to fetch the list of properties available for your entity type. Fields from the properties object must be specified in the properties.FIELD format (for example, properties.BITNESS).

query optional

Response format

The Entity object

The properties of a monitored entity.

Element Type Description
managementZones ManagementZone[]

A list of management zones to which the entity belongs.

fromRelationships object

A list of relationships where the entity occupies the FROM position.

toRelationships object

A list of relationships where the entity occupies the TO position.

entityId string

The ID of the entity.

firstSeenTms integer

The timestamp at which the entity was first seen, in UTC milliseconds.

lastSeenTms integer

The timestamp at which the entity was last seen, in UTC milliseconds.

properties object

A list of additional properties of the entity.

displayName string

The name of the entity, displayed in the UI.

tags METag[]

A list of tags assigned to the entity.

The METag object

The tag of a monitored entity.

Element Type Description
stringRepresentation string

The string representation of the tag.

value string

The value of the tag.

Not applicable to custom tags.

key string

The key of the tag.

Custom tags have the tag value here.

context string

The origin of the tag, such as AWS or Cloud Foundry.

Custom tags use the CONTEXTLESS value.

The EntityId object

A short representation of a monitored entity.

Element Type Description
id string

The ID of the entity.

type string

The type of the entity.

The ManagementZone object

A short representation of a management zone.

Element Type Description
name string

The name of the management zone.

id string

The ID of the management zone.

Example

In this example, the request lists the properties of the dotNetBackend_easyTravel_x64 service, which has the ID of SERVICE-1125C375A187D27A.

The API token is passed in the Authorization header.

Curl

curl -L -X GET 'https://mySampleEnv.live.dynatrace.com/api/v2/entities/SERVICE-1125C375A187D27A' \
-H 'Authorization: Api-Token abcdefjhij1234567890'

Request URL

https://mySampleEnv.live.dynatrace.com/api/v2/entities/SERVICE-1125C375A187D27A

Request body

{
  "entityId": "SERVICE-1125C375A187D27A",
  "displayName": "dotNetBackend_easyTravel_x64",
  "firstSeenTms": 1424310498896,
  "lastSeenTms": 1590609632865,
  "properties": {
    "serviceType": "WEB_REQUEST_SERVICE",
    "internalName": "dotNetBackend_easyTravel_x64",
    "webServerName": "dotNetBackend_easyTravel_x64",
    "softwareTechnologies": [
      {
        "edition": "FullCLR",
        "version": "2.0.50727"
      },
      {
        "type": "DOTNET",
        "edition": ".NET Framework",
        "version": "3.5.1.0"
      },
      {
        "type": "ADO_NET",
        "edition": "System.Data",
        "version": "2.0.50727.8751"
      },
      {
        "type": "ASP_DOTNET",
        "version": "3.5.1.0"
      },
      {
        "type": "IIS_APP_POOL",
        "version": "10.0.14393.0"
      },
      {
        "type": "DOTNET_REMOTING",
        "version": "2.0.50727.8771"
      }
    ],
    "serviceTechnologyTypes": [
      "IIS app pool",
      "ASP.NET",
      "DotNet"
    ],
    "mainServiceSoftwareTech": {
      "type": "ASP_DOTNET"
    },
    "contextRoot": "/",
    "agentTechnologyType": "DOTNET"
  },
  "tags": [
    {
      "context": "CONTEXTLESS",
      "key": "customService",
      "stringRepresentation": "customService"
    },
    {
      "context": "CONTEXTLESS",
      "key": "easytravel",
      "value": "backend",
      "stringRepresentation": "easytravel:backend"
    }
  ],
  "mangementZones": [
    {
      "id": "2827032493241090264",
      "name": "allServices"
    },
    {
      "id": "9130632296508575249",
      "name": "Easytravel"
    }
  ],
  "fromRelationships": {
    "calls": [
      {
        "id": "SERVICE-775060208AAA1058",
        "type": "SERVICE"
      },
      {
        "id": "SERVICE-6737CDED8F9BF969",
        "type": "SERVICE"
      }
    ],
    "runsOn": [
      {
        "id": "PROCESS_GROUP-0A9A52EA262BC039",
        "type": "PROCESS_GROUP"
      }
    ],
    "runsOnHost": [
      {
        "id": "HOST-B64B6B9CB11E2244",
        "type": "HOST"
      },
      {
        "id": "HOST-CF61BC45E6282234",
        "type": "HOST"
      }
    ],
    "runsOnProcessGroupInstance": [
      {
        "id": "PROCESS_GROUP_INSTANCE-DE765F657721AF59",
        "type": "PROCESS_GROUP_INSTANCE"
      }
    ]
  },
  "toRelationships": {
    "calls": [
      {
        "id": "SERVICE-D20E300A0A6814EF",
        "type": "SERVICE"
      },
      {
        "id": "SERVICE-7675DAA7464128F8",
        "type": "SERVICE"
      }
    ]
  }
}

Response code

200