Header background

Scale your API operations with our version 2 APIs

We're happy to announce the launch of the new generation of Dynatrace APIs, which will provide you with a consistent developer experience across endpoints while helping you scale your API operations.

Autonomous Cloud Programmability

Dynatrace v2 APIs transform your entire organization by making it as easy as possible to get started with monitoring automation and to solve your business problems with data-driven answers.

Move towards BizDevOps: Cover all automation and integration use cases across your organization, not just in the Development department.

Every-team API: We want to provide API success for all teams that want to make data-driven business decisions.

Easier transition to NoOps: Every product participant can integrate/interact with the API for faster time-to-value and automated insights.

Automate your business with Dynatrace

Many use cases in your software development, delivery, and operations depend on the real-time data that your Dynatrace monitoring environment collects. By making this data accessible for reporting and analyzing to everyone, the Dynatrace API helps you to automate your business.

Take a look at the following high-level use cases that we enable with our cross-organization APIs:

  • Enterprise orchestration and instrumentation for the automation of your rollout
  • Integration with a CMDB like ServiceNow
  • Tailored business insights to solve mission-critical issues
  • More cost-efficiency through the incorporation of consumption and usage data
  • Automation and auto-remediation of delivery processes
  • Impact analysis of problems from multiple business perspectives

Drive developer experience through consistency and scalability

Our API was first introduced in 2015 and has since led to great success for our customers in automating their IT operations. Over the years, many features and capabilities were introduced, but it was clear to us that certain improvements to our APIs could only be made with a new version.

The Dynatrace v2 Environment APIs such as the Metrics API v2 or the Monitored entites API v2 provide you with new capabilities and features, such as:

The Dynatrace Environment API v2 delivers a consistent developer experience and scalability by providing a set of common features for all endpoints. With these features, we’re fostering a “learn once, use often” mindset for users of our API.

Address a wide range of integration scenarios through standardized resource access

So that you can access a clear and easy-to-understand interface, all the new endpoints operate on resources using common HTTP methods. Thus, we provide RESTful and generic resources that you can use in a wide range of integration scenarios. Through this generic approach, we deliver endpoints that provide long-term value.

Scale your API operations with pagination

Pagination is a critical feature for API operation at scale, as returning too many data fields can result in an overload of the client or the integrating application. Therefore, all new APIs support pagination out of the box. From now on, you can serve your environments, from small to big, with our paginated endpoints. This also helps to minimize response times and resource usage for client data processing by providing the data in chunks.

Adapt to different use cases and API clients by customizing response fields

To help you adapt to different use cases and API clients, the new API allows you to add or remove fields from the response.

By default, the /v2/metrics endpoint returns a standard response that consists of metricId, displayName, description, and unit. With the newly added fields parameter, the response format of /metrics can be adjusted to reflect the needs of the integration client. Therefore, only the necessary data is transmitted over the wire, which also improves the scalability of the interface.

The response can be customized by setting the fields parameter with + and - respectively to add or remove fields from the response.

  • Example: GET /metric?fields=+aggregationTypes,-description
    This command adds the aggregationTypes field to the default response and removes the description field.

You can also explicitly state the required fields by omitting the + and signs. Then the fields parameter becomes an explicit list of properties to include in the response.

  • Example: GET /metric?fields=transformations,dimensionDefinitions
    This command yields a list of metrics with metricId, transformations, and dimensionDefinitions included in the response. To get a list of metric IDs, simply specify fields=metricId.

Easily handle errors with the unified error pattern

The unified error pattern allows you to write general code for handling errors once and then use it across endpoints.

All endpoints provide standardized error responses so that you don’t have to write integration code multiple times to handle errors. Error handling across endpoints becomes a one-time effort for your developers.

More interaction possibilities between API resources with common API selectors

With the Dynatrace Environment API v2, we’re introducing the concept of API selectors. Selectors are filter queries for a specific resource type that enable you to narrow down results. For example, the Metrics API currently supports two different API selectors: metricSelector and the entitySelector to filter query results based on metric and entity attributes.

  • The metricSelector can be used on the /metrics and /metrics/query endpoint.
  • The entitySelector can be used on the /metrics/query endpoint and will also be available for use with /entities, /problems, and /tags when those endpoints are released in the future.

As selectors are supported across multiple endpoints, they provide an easy-to-learn interface that increases the interplay between different API resources.

Easily control what can be done by whom with API permissions

When your API operation scales, it’s absolutely necessary to have fine-grained control over user permissions. The Dynatrace Environment API v2 gives you control over which resources can be accessed and how. Your system administrator can now control what exactly a token authorizes and restricts when you scale your automation team. Dynatrace differentiates between read, write, and ingest actions per resource for v2 APIs, as these actions have the most impact on your API operation in terms of access control.

What’s next

With the continuous release of additional v2 Environment APIs, we’re listening to your feedback regarding high-demand features. Please stay tuned for more details. As always, we want to hear from you about what’s working and not working for you. Share your feedback with us at Dynatrace answers.

Get started with v2 APIs

Now it’s time to try out the v2 APIs. To do so, expand the User menu in the top-right corner of the Dynatrace web UI. Then select Environment API to open the Dynatrace API Explorer and get started with the new endpoints.

Also, be sure to check out the Metrics API v2 documentation so that you get the full value from our new v2 API features.