# Dynatrace API

**URL:** https://community.dynatrace.com/c/platform/api/94.md?page=2

[Latest](https://community.dynatrace.com/latest.md) · [Categories](https://community.dynatrace.com/categories.md) · [Tags](https://community.dynatrace.com/tags.md)

**Page:** 3

---

## [Querying Processes with Pending Restart via API V2](https://community.dynatrace.com/t/querying-processes-with-pending-restart-via-api-v2/46377)

<div class="topic-metadata">

**Author:** [@crowngy](https://community.dynatrace.com/u/crowngy)\
**Replies:** 3\
**Last updated:** [August 2, 2025, 7:47pm UTC](https://community.dynatrace.com/t/querying-processes-with-pending-restart-via-api-v2/46377 "2025-08-02T19:47:46Z")

</div>

How can I extract processes with pending restart via API v2?

---

## [Toggle Monitoring State of a Host using App Function](https://community.dynatrace.com/t/toggle-monitoring-state-of-a-host-using-app-function/52599)

<div class="topic-metadata">

**Author:** [@MarwanC](https://community.dynatrace.com/u/MarwanC)\
**Replies:** 4\
**Last updated:** [July 24, 2025, 11:27am UTC](https://community.dynatrace.com/t/toggle-monitoring-state-of-a-host-using-app-function/52599 "2025-07-24T11:27:46Z")

</div>

I have written this AppFunction to toggle the monitoring state of a host, and I have given it all the required scope, but I am still getting this error below. Any idea? I am planning to develop this further to be able t…

---

## [Retrieving host instances from Host Classics](https://community.dynatrace.com/t/retrieving-host-instances-from-host-classics/52476)

<div class="topic-metadata">

**Author:** [@tylerv](https://community.dynatrace.com/u/tylerv)\
**Replies:** 5\
**Last updated:** [July 17, 2025, 12:09pm UTC](https://community.dynatrace.com/t/retrieving-host-instances-from-host-classics/52476 "2025-07-17T12:09:06Z")

</div>

Good day, is there perhaps an API endpoint that could help with retrieving only hosts in the “Host Classics” app? Running a GET entities and selecting type HOST seems to return more objects than shown in Classic. I’ve …

---

## [API to POST all request to key request](https://community.dynatrace.com/t/api-to-post-all-request-to-key-request/52258)

<div class="topic-metadata">

**Author:** [@carloss](https://community.dynatrace.com/u/carloss)\
**Replies:** 1\
**Last updated:** [June 26, 2025, 8:15pm UTC](https://community.dynatrace.com/t/api-to-post-all-request-to-key-request/52258 "2025-06-26T20:15:00Z")

</div>

I have a txt file with service and ID name from Dynatrace using those service ID to make all request from services as Key Request has anyone done this I keep getting erros when trying to post that change

---

## [OAuth authentication failed with status code 400](https://community.dynatrace.com/t/oauth-authentication-failed-with-status-code-400/45532)

<div class="topic-metadata">

**Author:** [@Hazard](https://community.dynatrace.com/u/Hazard)\
**Replies:** 17\
**Last updated:** [June 16, 2025, 8:27am UTC](https://community.dynatrace.com/t/oauth-authentication-failed-with-status-code-400/45532 "2025-06-16T08:27:50Z")

</div>

Hi guys, I have a problem using the rest api for oauth authentication. As described in your documentation I used POST in the request to the following endpoint: https://sso.dynatrace.com/sso/oauth2/token I executed th…

---

## [API Token required scope not always correct in API](https://community.dynatrace.com/t/api-token-required-scope-not-always-correct-in-api/51909)

<div class="topic-metadata">

**Author:** [@henk\_stobbe](https://community.dynatrace.com/u/henk_stobbe)\
**Replies:** 1\
**Last updated:** [June 11, 2025, 9:09am UTC](https://community.dynatrace.com/t/api-token-required-scope-not-always-correct-in-api/51909 "2025-06-11T09:09:07Z")

</div>

Nice to know, you also need settings.read to execute… Maybe this should be updated (-; Thanks @joep, @henri

---

## [Query on API - V1 to V2](https://community.dynatrace.com/t/query-on-api-v1-to-v2/46517)

<div class="topic-metadata">

**Author:** [@smartpraseetha](https://community.dynatrace.com/u/smartpraseetha)\
**Replies:** 4\
**Last updated:** [June 5, 2025, 11:57am UTC](https://community.dynatrace.com/t/query-on-api-v1-to-v2/46517 "2025-06-05T11:57:26Z")

</div>

Hello I have a custom script which stops the monitoring on the hosts based on some conditions. I am using 2 APIS the first API gets all the hosts - /entity/infrastructure/hosts/ and I made an iteration in a loop that i…

---

## [Obtain syslog info via API](https://community.dynatrace.com/t/obtain-syslog-info-via-api/51772)

<div class="topic-metadata">

**Author:** [@isi-consultor-m](https://community.dynatrace.com/u/isi-consultor-m)\
**Replies:** 1\
**Last updated:** [May 22, 2025, 7:38pm UTC](https://community.dynatrace.com/t/obtain-syslog-info-via-api/51772 "2025-05-22T19:38:18Z")

</div>

Hi everyone, We have been trying to ingest the syslog to Dynatrace but as we can’t via activagte because it is installed on widows server. Is it possible to get that information via API? Thanks in advance

---

## [Issues with API filter](https://community.dynatrace.com/t/issues-with-api-filter/50497)

<div class="topic-metadata">

**Author:** [@CrazyHarry](https://community.dynatrace.com/u/CrazyHarry)\
**Replies:** 4\
**Last updated:** [May 21, 2025, 4:15pm UTC](https://community.dynatrace.com/t/issues-with-api-filter/50497 "2025-05-21T16:15:49Z")

</div>

I am really stuck - Trying to create a filter for : dt.entity.cloud\_application This is the query that I'm trying to apply the filter for cloud application to. This query returns all apps within a management zone. T…

---

## [One more small question about AWS Dynatrace connection](https://community.dynatrace.com/t/one-more-small-question-about-aws-dynatrace-connection/46263)

<div class="topic-metadata">

**Author:** [@henk\_stobbe](https://community.dynatrace.com/u/henk_stobbe)\
**Replies:** 2\
**Last updated:** [May 19, 2025, 3:39pm UTC](https://community.dynatrace.com/t/one-more-small-question-about-aws-dynatrace-connection/46263 "2025-05-19T15:39:46Z")

</div>

See below setup screen: So you have to generate your accountid once ? On the first create. I assume you can bring your own? The API also will accept the accountid once? Can you add or delete these token(s) Last o…

---

## [Automation of Generating the API token](https://community.dynatrace.com/t/automation-of-generating-the-api-token/51516)

<div class="topic-metadata">

**Author:** [@smartpraseetha](https://community.dynatrace.com/u/smartpraseetha)\
**Replies:** 2\
**Last updated:** [May 7, 2025, 6:59pm UTC](https://community.dynatrace.com/t/automation-of-generating-the-api-token/51516 "2025-05-07T18:59:22Z")

</div>

Hello All, I am wondering if there is a any way to automate the token creation via a script without revealing the token?. I am aware that we can use the respective Environment APIs like POST/PUT etc. But in order to h…

---

## [Fetch "Consumed Host Units" for a given Host using the "Monitored Entities API" (API V2)](https://community.dynatrace.com/t/fetch-consumed-host-units-for-a-given-host-using-the-monitored-entities-api-api-v2/40486)

<div class="topic-metadata">

**Author:** [@Alfred-Le](https://community.dynatrace.com/u/Alfred-Le)\
**Replies:** 3\
**Last updated:** [May 6, 2025, 5:13pm UTC](https://community.dynatrace.com/t/fetch-consumed-host-units-for-a-given-host-using-the-monitored-entities-api-api-v2/40486 "2025-05-06T17:13:26Z")

</div>

Hello! Does anyone know how to fetch Consumed Host Units for a given host, using the Monitored Entities API? I have a script which uses the Environment API V1 to grab Consumed Host Units for my hosts, but am looking to…

---

## [Does Monaco support loops for account level management?](https://community.dynatrace.com/t/does-monaco-support-loops-for-account-level-management/51232)

<div class="topic-metadata">

**Author:** [@kumaravel](https://community.dynatrace.com/u/kumaravel)\
**Replies:** 7\
**Last updated:** [April 29, 2025, 10:16am UTC](https://community.dynatrace.com/t/does-monaco-support-loops-for-account-level-management/51232 "2025-04-29T10:16:14Z")

</div>

Hello, I am trying to manage the users, groups and policies via Monaco. The numbers of groups to be managed via SAML is large with some minor differnces. So is there a way to use the go templating or some other way to …

---

## [Ingesting data from the API](https://community.dynatrace.com/t/ingesting-data-from-the-api/51294)

<div class="topic-metadata">

**Author:** [@CrazyHarry](https://community.dynatrace.com/u/CrazyHarry)\
**Replies:** 4\
**Last updated:** [April 21, 2025, 4:02pm UTC](https://community.dynatrace.com/t/ingesting-data-from-the-api/51294 "2025-04-21T16:02:35Z")

</div>

I need some help getting a working API request to ingest data into Dynatrace Here is the CURL command. I just need to modify this so I can code it in Python. curl --silent -kX “POST” https://apm-qa.pncint.net/e/xxxxx…

---

## [PowerBI automate generation of nextPageKey](https://community.dynatrace.com/t/powerbi-automate-generation-of-nextpagekey/40381)

<div class="topic-metadata">

**Author:** [@AmayShah](https://community.dynatrace.com/u/AmayShah)\
**Replies:** 4\
**Last updated:** [April 17, 2025, 2:07am UTC](https://community.dynatrace.com/t/powerbi-automate-generation-of-nextpagekey/40381 "2025-04-17T02:07:18Z")

</div>

Hi, I am trying to use the Dynatrace API to import data into PowerBI and some metrics have a limited number of results per page and using the nextPageKey to get the next pages of the API request. My question is, how can…

---

## [What value do I use to pull the ID for maintenance windows for an API Call?](https://community.dynatrace.com/t/what-value-do-i-use-to-pull-the-id-for-maintenance-windows-for-an-api-call/51136)

<div class="topic-metadata">

**Author:** [@badgerfifteen](https://community.dynatrace.com/u/badgerfifteen)\
**Replies:** 3\
**Last updated:** [April 10, 2025, 7:44pm UTC](https://community.dynatrace.com/t/what-value-do-i-use-to-pull-the-id-for-maintenance-windows-for-an-api-call/51136 "2025-04-10T19:44:13Z")

</div>

Hi all, I’m trying to determine how to pull the GUUID for maintenance windows in Dynatrace. I’m not talking about the Object ID, as that is completely separate but possibly called the GUUID? When you go into Settings i…

---

## [Downtime API in the UI](https://community.dynatrace.com/t/downtime-api-in-the-ui/50948)

<div class="topic-metadata">

**Author:** [@bs43](https://community.dynatrace.com/u/bs43)\
**Replies:** 2\
**Last updated:** [April 10, 2025, 7:14pm UTC](https://community.dynatrace.com/t/downtime-api-in-the-ui/50948 "2025-04-10T19:14:44Z")

</div>

So, in the service we can get the downtime and even the time when it went down and recovery time as well, so this downtime is it available through API, we have availability % and availability state APIs. builtin:pgi.ava…

---

## [Response status 202 with api call](https://community.dynatrace.com/t/response-status-202-with-api-call/50074)

<div class="topic-metadata">

**Author:** [@ni5hat](https://community.dynatrace.com/u/ni5hat)\
**Replies:** 3\
**Last updated:** [April 10, 2025, 7:20am UTC](https://community.dynatrace.com/t/response-status-202-with-api-call/50074 "2025-04-10T07:20:26Z")

</div>

Sometimes when I make a POST API call to dynatrace through python, I get 202 as the response status code, meaning the request was accepted but is still being processed. My final goal is to get the final json response, …

---

## [Dynatrace API Metric v2 - 2-hour auto-resolution](https://community.dynatrace.com/t/dynatrace-api-metric-v2-2-hour-auto-resolution/51119)

<div class="topic-metadata">

**Author:** [@Cal-Smith](https://community.dynatrace.com/u/Cal-Smith)\
**Replies:** 1\
**Last updated:** [April 9, 2025, 12:35am UTC](https://community.dynatrace.com/t/dynatrace-api-metric-v2-2-hour-auto-resolution/51119 "2025-04-09T00:35:00Z")

</div>

Hi, I am attempting to export data from Dynatrace using the API Metrics v2. I have constructed a call using the correct endpoint from our managed environment and the relevant builtin:\* metric from the Data Explorer (as d…

---

## [Does the API-call of IAM-related operation  takes minutes or hours to completed?](https://community.dynatrace.com/t/does-the-api-call-of-iam-related-operation-takes-minutes-or-hours-to-completed/51081)

<div class="topic-metadata">

**Author:** [@waikeat\_chan](https://community.dynatrace.com/u/waikeat_chan)\
**Replies:** 1\
**Last updated:** [April 7, 2025, 9:18pm UTC](https://community.dynatrace.com/t/does-the-api-call-of-iam-related-operation-takes-minutes-or-hours-to-completed/51081 "2025-04-07T21:18:49Z")

</div>

Anyone experience this? I am wondering does this only happens to my tenant (or maybe the Singapore region only) or it actually happened to some other fellow community members here before? Today, I am working on my own a…

---

## [Mean time to resolve API in Problems V2](https://community.dynatrace.com/t/mean-time-to-resolve-api-in-problems-v2/50972)

<div class="topic-metadata">

**Author:** [@bs43](https://community.dynatrace.com/u/bs43)\
**Replies:** 2\
**Last updated:** [April 7, 2025, 5:58am UTC](https://community.dynatrace.com/t/mean-time-to-resolve-api-in-problems-v2/50972 "2025-04-07T05:58:02Z")

</div>

In problems V2 we get the start and end time of a problem so from that i am trying to get the time taken to resolve the problem and i got it but as unix sec , made few calculation in grafana Now need to show whet…

---

## [Get builtin:osservice.availability metrics filtered by os:service tags](https://community.dynatrace.com/t/get-builtin-osservice-availability-metrics-filtered-by-os-service-tags/50458)

<div class="topic-metadata">

**Author:** [@olegus](https://community.dynatrace.com/u/olegus)\
**Replies:** 3\
**Last updated:** [April 5, 2025, 8:55am UTC](https://community.dynatrace.com/t/get-builtin-osservice-availability-metrics-filtered-by-os-service-tags/50458 "2025-04-05T08:55:29Z")

</div>

I have os:service entities tagged with an Uptime tag - I want to get availability metrics only for those services via API. Here is my current metric selector that does not consider tags. It works in API v2: (builtin:os…

---

## [Use alias in WHERE clause for User Sessions Query Language](https://community.dynatrace.com/t/use-alias-in-where-clause-for-user-sessions-query-language/50787)

<div class="topic-metadata">

**Author:** [@plespera](https://community.dynatrace.com/u/plespera)\
**Replies:** 4\
**Last updated:** [March 27, 2025, 5:05pm UTC](https://community.dynatrace.com/t/use-alias-in-where-clause-for-user-sessions-query-language/50787 "2025-03-27T17:05:07Z")

</div>

Hello, I am trying to write a user sessions query to measure the number of user sessions per hour. I wish to only consider data from working days of the week (Monday to Friday). Point 1 When I run the following query: …

---

## [Get host ID using API](https://community.dynatrace.com/t/get-host-id-using-api/34753)

<div class="topic-metadata">

**Author:** [@gary1024](https://community.dynatrace.com/u/gary1024)\
**Replies:** 8\
**Last updated:** [March 20, 2025, 12:07pm UTC](https://community.dynatrace.com/t/get-host-id-using-api/34753 "2025-03-20T12:07:55Z")

</div>

Hi I need help to find a way to get hostid using an API. I know hostid can be found on the URL like this: https://my-domain/e/my-environment/#newhosts/hostdetails;id=HOST-B0363C0D000000000;gtf=-72h%20to%20now;gf=all H…

---

## [Help required with API Ingest Request](https://community.dynatrace.com/t/help-required-with-api-ingest-request/50793)

<div class="topic-metadata">

**Author:** [@Animesh](https://community.dynatrace.com/u/Animesh)\
**Replies:** 1\
**Last updated:** [March 20, 2025, 5:53am UTC](https://community.dynatrace.com/t/help-required-with-api-ingest-request/50793 "2025-03-20T05:53:41Z")

</div>

Hi, I am unable to find an example or proper templete for my required API Ingest request. I want to ingest logs from a source and exclude records based on the metric servicename. Any log record containing the servicenam…

---

## [How to get problem ID of a Custom Alert event created through API?](https://community.dynatrace.com/t/how-to-get-problem-id-of-a-custom-alert-event-created-through-api/45146)

<div class="topic-metadata">

**Author:** [@AntonioSousa](https://community.dynatrace.com/u/AntonioSousa)\
**Replies:** 5\
**Last updated:** [March 18, 2025, 11:33am UTC](https://community.dynatrace.com/t/how-to-get-problem-id-of-a-custom-alert-event-created-through-api/45146 "2025-03-18T11:33:36Z")

</div>

If one wants to create a Problem in Dynatrace, we can create an event of type “CUSTOM\_ALERT”, which will make it’s way into a Problem. When creating this event, one gets back correlationId’s, but not the ID of the corre…

---

## [Retrieving daily metric giving wrong date](https://community.dynatrace.com/t/retrieving-daily-metric-giving-wrong-date/50629)

<div class="topic-metadata">

**Author:** [@Vijayt](https://community.dynatrace.com/u/Vijayt)\
**Replies:** 4\
**Last updated:** [March 13, 2025, 10:49am UTC](https://community.dynatrace.com/t/retrieving-daily-metric-giving-wrong-date/50629 "2025-03-13T10:49:14Z")

</div>

I am trying to retries Cpu utilization from remote for a period but results are one day ahead following are details remote\_unix.cpu\_utilization:\<custom host\>:avg from=2025-02-21T01:57.01.123+00.00&to=2025-02-26T21:57…

---

## [POST monitoring config not working for extension](https://community.dynatrace.com/t/post-monitoring-config-not-working-for-extension/50655)

<div class="topic-metadata">

**Author:** [@rseibert1](https://community.dynatrace.com/u/rseibert1)\
**Replies:** 2\
**Last updated:** [March 12, 2025, 1:18pm UTC](https://community.dynatrace.com/t/post-monitoring-config-not-working-for-extension/50655 "2025-03-12T13:18:21Z")

</div>

The JSON body of the post fails no matter how I configure it, the documentation says the “value” is optional but if I leave it out it says the value is missing, if I add it it does not like the JSON. Using the format so…

---

## [How can we use Dynatrace API to group based on management area (mzId) and corresponding license consumption？](https://community.dynatrace.com/t/how-can-we-use-dynatrace-api-to-group-based-on-management-area-mzid-and-corresponding-license-consumption/50611)

<div class="topic-metadata">

**Author:** [@ADbyCool](https://community.dynatrace.com/u/ADbyCool)\
**Replies:** 3\
**Last updated:** [March 11, 2025, 2:10am UTC](https://community.dynatrace.com/t/how-can-we-use-dynatrace-api-to-group-based-on-management-area-mzid-and-corresponding-license-consumption/50611 "2025-03-11T02:10:13Z")

</div>

Our company wants to obtain statistics on license usage grouped by management zones (mzId). How can we achieve this via Dynatrace APIs? Please provide steps and official documentation references.

---

## [Extracting Management Zone IDs from Dynatrace SaaS Tenant](https://community.dynatrace.com/t/extracting-management-zone-ids-from-dynatrace-saas-tenant/50516)

<div class="topic-metadata">

**Author:** [@Sajarra](https://community.dynatrace.com/u/Sajarra)\
**Replies:** 8\
**Last updated:** [March 7, 2025, 2:29pm UTC](https://community.dynatrace.com/t/extracting-management-zone-ids-from-dynatrace-saas-tenant/50516 "2025-03-07T14:29:08Z")

</div>

Hello Team, Could you please advise how to extract Management Zone IDs (not the Object IDs) from Dynatrace either by Data Explorer /DQL or API? Tried using API but it’s giving only the Object IDs, not the management zon…

[Previous page](https://community.dynatrace.com/c/platform/api/94.md?page=1)

[Next page](https://community.dynatrace.com/c/platform/api/94.md?page=3)
