Reputation: 1
I am able to retrieve stats like CPU utilization through the Mulesoft Anypoint CloudHub API asset located here - https://anypoint.mulesoft.com/exchange/portals/anypoint-platform. But cannot find a way to get response time stats for any endpoint/application. I can see these stats in the Anypoint Monitor, but am not finding any API or documentation on how to pull this data out.
I can retrieve dashboardStats like so:
curl "https://anypoint.mulesoft.com/cloudhub/api/v2/applications/{domain}/dashboardStats?workerIds=workerIds=i-100ca3e0&startDate=2015-05-09T04:57:28.572Z&endDate=2015-05-09T05:59:23.572Z" \
-H "X-ANYPNT-ENV-ID: "
And can retrieve the total response time for a given day(s) like so:
curl -H "Authorization: Bearer XXXX-XXXX-XXXXX" -X GET https://anypoint.mulesoft.com/monitoring/api/organizations/{ORG_ID}/environments/{ENV_ID}/reports/{REPORT_TYPE}/from/now-{NNN}d/to/now
I have also tried the Anypoint Monitoring Archive API, but this requires a titanium subscription and does not appear to be real time.
But cannot find an api that returns a set of datapoints <timestamp,value> that I can use in a custom chart like dashboardStats returns.
Upvotes: 0
Views: 465
Reputation: 25664
If you are seeing the information on the page but the API is not documented you could use the network inspection tool to review the HTTP requests and reverse engineering the call. Note that when an API is not documented there are no guarantees of stability. Any implementation changes could break what you are using and you will need to start again.
Upvotes: 0