# Use the Dynatrace Classic APIs: Beginner’s Guide

**URL:** <https://community.dynatrace.com/t/use-the-dynatrace-classic-apis-beginner-s-guide/45575>\
**Category:** Dynatrace Tips\
**Tags:** postman, tips-and-tricks, dynatrace-api\
**Created:** [May 14, 2024, 3:34pm UTC](https://community.dynatrace.com/t/use-the-dynatrace-classic-apis-beginner-s-guide/45575 "2024-05-14T15:34:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![aeric-walls](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/aeric-walls/32/27636_2.png) [@aeric-walls](https://community.dynatrace.com/u/aeric-walls)\
**Post date:** [May 14, 2024, 3:34pm UTC](https://community.dynatrace.com/t/use-the-dynatrace-classic-apis-beginner-s-guide/45575/1 "2024-05-14T15:34:55Z")

</div>

_Summary:&nbsp;This post provides an overview of Dynatrace Classic API usage. It explains authentication, endpoint structure, common use cases, and where to find official documentation._

### Intro

Hi Dynatrace Community,&nbsp;[@clyde\_anderson](https://community.dynatrace.com/user/7122),&nbsp;[@jourdanw](https://community.dynatrace.com/user/39848),&nbsp;and I ([@aeric-walls](https://community.dynatrace.com/user/55395)) have put together a multi-part API guide on how to use the Dynatrace API within Swagger UI and in Postman. This will include general setup, pro tips, and visuals to get you started on extending the Dynatrace Platform. Enjoy 😄

### Which APIs are Classic?

With the release Dynatrace Platform, there are new ways that we can access different API endpoints. Until the release of the Dynatrace Platform, we had Configuration, Environment v1, and Environment v2 APIs. These are what we consider the “Classic” APIs.

### How do we access Classic APIs?

Accessing these APIs has not changed: we still use an

- **Tip** : In any version of Dynatrace, navigate to Access Tokens, and there will be a URL to go to the Swagger UI

\*Note: This example only shows for a production environment. If you are using a Sprint environment, the URL would look like _[abc67890.sprint.dynatracelabs.com](http://abc67890.sprint.dynatracelabs.com)_, for example.

### How to Use the Swagger UI (Internal Access)

If you want to use the Swagger UI, it is quite straightforward. Below are some steps to help you get started:

1. Open Dynatrace via the Classic URL ([xyz12345.live.dynatrace.com](http://xyz12345.live.dynatrace.com)).

2. Generate an Access Token or Personal Access Token with the **minimum** scope necessary for what you are trying to do.

3. Navigate to the top-right and click the person icon&nbsp;and scroll down. You will see the options for Configuration, Environment v1, and Environment v2 APIs. Select the appropriate API.

4. Click “Authorize” and paste in your token.

5. Find the API endpoint you want to test, select “Try it out”, fill out the appropriate parameters, and click “Execute”.

6. From here, you can see the

#### Adding an API to Postman

1. Open Dynatrace via the Classic URL ([xyz12345.live.dynatrace.com](http://xyz12345.live.dynatrace.com)).

2. Navigate to the appropriate API (see Step 3 in _How to Use the Swagger UI (Internal Access)_).

3. Under the title of the page, you will find a hyperlink to a JSON file (red rectangle in the below image). Open this to download a JSON copy of the API. These APIs follow a standard called [OpenAPI Specification](https://swagger.io/specification/).

4. We will now open this JSON file in a text editor and make a few changes:

Before:

```javascript
"variables" : { }

```

After:

```javascript
"variables": {
  "envURL": {
    "default": ""
  }
}

```

 ![aericwalls_28-1715700010133.png](https://global.discourse-cdn.com/dynatrace/original/3X/7/6/764967d30183df29f158b5939cf8aa06649fd4e1.png)

#### Interacting with an API via Postman

Now, we will test querying against an API endpoint.

1. In the top-right of Postman, click the drop-down select the appropriate environment that we will be testing in.

2. Under the “Collections” tab in the left-hand menu, expand the appropriate API.

3. Expand the endpoint you want to test.

4. You will either see more folders to dig deeper into or HTTP methods like GET, POST, UPDATE, DELETE, etc. that denote a testable endpoint. Pick the endpoint and method you want to test. A new tab should open with the API endpoint and its parameters.

5. Select/Deselect the parameters you intend to use (refer to the appropriate API documentation to determine what parameters are required or optional).

6. Fill out the “Value” field for each parameter.

7. Under the “Authorization” tab, we will make a couple changes:

 ![aericwalls_32-1715700104233.png](https://global.discourse-cdn.com/dynatrace/original/2X/4/49aa15c74f36081001f62fba9ae273bd7e7c24ab.png)  
**Tip:** You can handle authorization on request-level (/entities), group-level (entities APIs), or collection-level (Dynatrace Environment v2)

1. Click “Send” in the top-right to execute the request.

2. In the “Body”, we can observe the response body, response code, headers, etc.

3. Troubleshooting Tips:

![aericwalls_35-1715700243789.png](https://global.discourse-cdn.com/dynatrace/optimized/3X/d/b/db3ce7d3cefb54f13e0fe7ccd10ead424a0d7912_2_690x38.png)

---

<div class="post-metadata">

**Author:** ![Peter\_Youssef](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/peter_youssef/32/14668_2.png) [@Peter\_Youssef](https://community.dynatrace.com/u/Peter_Youssef)\
**Post date:** [November 13, 2024, 4:37pm UTC](https://community.dynatrace.com/t/use-the-dynatrace-classic-apis-beginner-s-guide/45575/2 "2024-11-13T16:37:43Z")

</div>

Thanks&nbsp;[@clyde\_anderson](https://community.dynatrace.com/user/7122)&nbsp;[@jourdanw](https://community.dynatrace.com/user/39848)&nbsp;&nbsp;and&nbsp;[@aeric-walls](https://community.dynatrace.com/user/55395)

Actually it’s appreciated and organized efforts.

KR,

Peter.
