Hi Marcie
In short you would need to do the following
1. Create an API user in the controller with the relevant permissions that would be able to query the data you are after.
2. The API call will consist of 2 things, the first is to query the token API of AppD, to be used in any API call to get data from the controller.
https://<fqdn of controller>/controller/api/oauth/access_token
You can then use this token response in the follow up call to request the API of the top 300 queries
The API I used for queries is as below, using the POST method
https://<fqdn of controller>/controller/databasesui/databases/queryListData
With the payload as below, with the db_server_id specific to the database in your controller and the size parameter, and then start and end dates in epoch format.
'{"dbConfigId":-1,"dbServerId":<db_server_id>,"field":"query-id","size":300,"filterBy":"time","startTime":1658298356592,"endTime":1658301956592,"waitStateIds":[],"useTimeBasedCorrelation":false}'
When you do this, you will get the output in json
Ciao
... View more