...
Step | Screenshot |
---|---|
Open ASMNavigate to Tools, API Select a check using the drop-down box | |
Select the Target check for the APIWe've selected the Test Demo check. Beneath that check selection is some example API calls to help you get started quickly. We've copied the Last Result call pasted it into Postman to run it. |
|
Postman Results of Standard API Check EndpointHere, via API, is the last value of your check run, 200. | 200 is the last status code of the URL. This is nice but is just a raw number without data or context, and there's no JSON used. This could be used just for a small script or something you can pull the last result of your check maybe test it for something. A better API endpoint is the Checks Generic Check ID Results API endpoint. |
Apica API for Generic ResultsThis API endpoint looks up the results for checks that present a result type of generic. 'Generic' checks mean that they have the expandable JSON result format we saw in Step 5 above. | Generic type Checks: Run Python scripts, Run Javascript, Run Java, and (when released) Run Azure Cloud, Run Lamda, etc. |
Postman Results of Generic API Check EndpointIn Postman, using this API endpoint:
Instead of the earlier (for comparison):
| The API documentation for Generic Check shows these capabilities:
This is a POST endpoint: Note the JSON results returned above. So you may need to use these in some other API call to lookup even more information. In this example, we're just going to use the most recent because that is the simplest and easiest to show. |
The Result ObjectNote the headers that returned and (not shown in the screen capture) the content size, the header count, etc. All of the information you recorded in your script comes through the API. | What you choose to do next with these metrics is all up to your needs.
|
...