cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Get Key Request using API

andra_nosa
Helper

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

5 REPLIES 5

mark_bley
Dynatrace Champion
Dynatrace Champion

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

techean
Dynatrace Champion
Dynatrace Champion

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

KG

andra_nosa
Helper

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

 

andra_nosa_0-1654830344293.png

 

Thanks Guys!

 

techean
Dynatrace Champion
Dynatrace Champion

happy to know that 🙂

KG

ben_wrightson
Dynatrace Champion
Dynatrace Champion

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".

Featured Posts