Topology and Smartscape API

Topology and Smartscape endpoint

https://{id}.live.dynatrace.com/api/v1/entity/

This family of endpoints delivers details about the applications, services, and infrastructure entities that Dynatrace automatically detects and monitors within a given environment. The returned information contains important attributes about the monitored entities as well as outgoing and incoming relationships. This family of endpoints is organized along the three major environment layers: applications, services, and infrastructure as detailed below.

Applications endpoint

https://{id}.live.dynatrace.com/api/v1/entity/applications

A call to the /applications endpoint returns a list of currently monitored applications along with their attributes and relationships.

Result

  • fromRelationships: Outgoing connections from the application to other entities (e.g., calls to a service).
  • toRelationships: Incoming connections to the application.
  • applicationType: The application type (e.g., a custom RUM or synthetic application).
  • tags: The tags that have been defined for the application. This list contains all user-defined labels as well as all tags imported from third-party systems, such as AWS.

The following code block shows an example result:

[
{
entityId: "APPLICATION-EA7C4B59F27D43EB",
displayName: "RUM Default Application",
customizedName: "RUM Default Application",
tags: [
{
context: "USER",
key: "mytest"
},
{
context: "USER",
key: "test"
},
{
context: "USER",
key: "anothertag"
}
],
fromRelationships: {
calls: [
"SERVICE-A6573F56394A4D90",
"SERVICE-CF188BBF8568DE91",
"SERVICE-E5AA28EFED7D593E"
]
},
toRelationships: { },
applicationType: "DEFAULT"
}
]

Services endpoint

https://{id}.live.dynatrace.com/api/v1/entity/services

A call to the /services endpoint returns a list of currently monitored services along with their attributes and relationships.

Result

  • fromRelationships: Outgoing connections from the service to other entities (e.g., a call from the service to another service).
  • toRelationships: Incoming onnections to the service from other entities.
  • agentTechnologyType: Shows the monitored technology type, such as Java or .NET.
  • serviceTechnologyType: Shows the technologies that the service is built on (e.g., Tomcat and Java).
  • tags: Returns the list of tags that have been defined for the service. The list contains all user-defined labels as well as all tags imported from third-party systems, such as AWS.
  • serviceType: Shows the service type, such as web service, messaging service, or service method.

The following code block shows an example result:

[
{
entityId: "SERVICE-713DAEE6611DE663",
displayName: "JourneyService",
tags: [
{
context: "USER",
key: "Production"
}
],
fromRelationships: {
calls: [
"SERVICE-CA23CAF4CAAE890A",
"SERVICE-B0ECCA259E8568E0"
]
},
toRelationships: {
calls: [
"SERVICE-2489BAD30B017B36",
"SERVICE-30F0B00E7B2DF49A"
]
},
agentTechnologyType: "JAVA",
serviceTechnologyTypes: [
"Tomcat",
"Java"
],
serviceType: "WEBSERVICE",
webServiceName: "JourneyService",
webServiceNamespace: "http://webservice.business.easytravel.dynatrace.com"
}
]

Infrastructure endpoint

https://{id}.live.dynatrace.com/api/v1/entity/infrastructure/hosts

A call to the /infrastructure/hosts endpoint returns a list of currently monitored hosts along with their attributes and relationships.

Result

  • fromRelationships: Outgoing connections from the host to other entities.
  • toRelationships: Incoming connections to the host.
  • tags: Returns the list of tags that have been defined for the host. This list contains all user-defined labels as well as all tags imported from third-party systems, such as AWS.
  • osType: Shows the operating system type of the host, such as Linux or Windows.
  • osVersion: Shows the operating system version of the host, such as Ubuntu 14.04.4 LTS, Trusty Tahr (kernel 4.2.0-41-generic), or Windows 10.

The following code block shows an example result:

[
{
entityId: "HOST-D70EC6885E79D6C4",
displayName: "gdn-rx-ub12-ci04v (maintained by PHP agent team)",
customizedName: "gdn-rx-ub12-ci04v (maintained by PHP agent team)",
tags: [
{
context: "USER",
key: "opsTeamBoston"
}
],
fromRelationships: {
isNetworkClientOfHost: [
"HOST-D70EC6885E79D6C4"
]
},
toRelationships: {
isNetworkClientOfHost: [
"HOST-D70EC6885E79D6C4"
]
},
osType: "LINUX",
osArchitecture: "X86",
osVersion: "Ubuntu 12.04.5 LTS, Precise Pangolin (kernel 3.13.0-39-generic)",
hypervisorType: "VMWARE",
ipAddresses: [
"172.18.147.13"
]
}
]

Tagging

The Smartscape and topology API not only offers REST endpoints for fetching information related to all the monitored components in your environment, it also allows you to assign tags to individual components. By using the same REST endpoints as described above, it’s possible to perform an HTTP POST call to push a list of tags to a given entity ID, as shown in the example below.

https://{id}.live.dynatrace.com/api/v1/entity/services/{YOUR_SERVICE_ID}

with HTTP POST payload:

{
  "tags": ["myTagthroughAPI", "secondTag"]
}