API Checks provide a flexible way to check the functionality and performance of API endpoints.
Note: Splunk Synthetic Monitoring API Checks support REST APIs only. SOAP APIs are not supported.
How to Create a New API Check:
- Navigate to API + New, or
- From the side navigation, click New > API
On the Basic tab:
- Name the check. Be sure to pick a unique, descriptive name so that we can determine the check’s function at a glance.
- Notify. Tell Splunk Synthetic Monitoring who, how, and when to alert users or groups if the check fails.
- Frequency. Define how often the check should run.
- Check Active / Inactive. Use this slider to activate or pause the check.
- Notifications Active / Muted. Use this slider to send or mute alerts.
Steps
An API Check is made up of one or more steps. Each step provides limited functionality on its own, but together steps can be composed to provide powerful interactions with an API. An API check requires at least 1 step.
Request
A Request Step makes an HTTP request to some endpoint and collects data from that interaction. Unlike other check types, API Checks do not require an initial URL to start the check. All HTTP requests are configured within request steps. For more information, please visit our request step article.
Assert
An Assert Step makes an assertion on two values. To make an assertion, supply two parameters along with the comparison that you would like to perform between the two. For more information, please visit our assert step article.
Save
A Save Step stores some data to be reused later in the check. To save data, supply the source and the name of the custom variable to save to. For more information, please visit our save step article.
Extract
An Extract Step extracts data out of JSON, XML, or HTML formatted data. For more information, please visit our extract step article.
JavaScript
A JavaScript Step runs arbitrary JavaScript code and saves the result into a custom variable to be reused at a later point. For more information, please visit our JavaScript step article.
Variables
API Check allows variables in most fields. A variable consists of two parts, the namespace, and the variable name. To use a variable in a step, surround the variable with {{
and }}
. For more information, see our article on variables.