How do I fetch the list of monitored services?

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

Services endpoint

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

HTTP GET parameters

The endpoint allows the following parameters to be sent as HTTP GET requests:

  1. tag (optional) Filters the resulting set of services by the given tag. Use multiple tag parameters to combine multiple tag filters using the logical operator AND.
  2. startTimestamp and endTimestamp (optional) Filters the resulting set of services by the last seen timestamp. The timestamp values must be in UTC milliseconds and the query is restricted to a maximum period of 3 days.

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"
  }
]