24 May 2022 03:39 AM - last edited on 24 May 2022 09:26 AM by MaciejNeumann
Hi Guys,
How to get all key request via api?
Because i have try on data explorer and limit only 100 data key request with low transaction
Regards,
Andra
Solved! Go to Solution.
08 Jun 2022 03:35 PM
Hi @andra_nosa ,
you can try pulling a metric that contains the key requests and split the dimension accordingly.
Take e.g. following command (the output still has duplicates and is not well formatted, but contains only keyRequests)
curl -X GET "https://<tenant_id>/api/v2/metrics/query?metricSelector=builtin%3Aservice.keyRequest.cpu.perRequest%3AsplitBy%28%22dt.entity.service_method%22%29%3Aavg%3Aauto%3Asort%28value%28avg%2Cdescending%29%29" -H "accept: application/json; charset=utf-8" -H "Authorization: Api-Token <token>" | tr 'dimension' '\n' | grep SERVICE_METHOD
Following metric query is being used here:
builtin:service.keyRequest.cpu.perRequest:splitBy("dt.entity.service_method"):avg:auto:sort(value(avg,descending))
Best,
Mark
08 Jun 2022 05:24 PM
Hey did you checked this similar question mark solved already Solved: Re: Is there a way to get a list of all marked key requests & key user actions per tenant? -...
Key Requests:
with Metrics v2 API and Key User action
10 Jun 2022 04:05 AM
Hi @mark_bley and @techean thanks for sharing with me,
I used this metric builtin:service.keyRequest.count.total:parents:names and got all information
Thanks Guys!
13 Jun 2022 08:07 AM
happy to know that 🙂
23 Mar 2023 03:01 PM
This is now also possible using the Settings API (https://www.dynatrace.com/support/help/shortlink/api-v2-settings-get-objects) and the schemaId "builtin:settings.subscriptions.service".