Create API Monitor
API monitors execute configured HTTP requests at regular intervals and trigger alerts based on configured assertion failures or via scripted assertion failures.
Add a new API Monitor
Navigate to API Monitors page.
- Click New Monitor button.
- Provide a Name for your test e.g. Get Users
- Optionally, select an Environment which contains variables that can be referenced in your test.
- Select the HTTP Method for the HTTP(s) request
- Provide the Request URL.
- Optionally, add Request Headers for the request.
- Enter the Request Body for the request.
- Provide Before Request Script (Javascript) for executing custom script before the HTTP request is executed.
- Provide After Request Script (Javascript) for executing custom script after the HTTP request is executed.
info
Mustache style variables are supported in URL, Body and Header values which can resolve to variables in the configured environment. For example, if a variable named URL is defined as a variable in the selected environment, the URL value can accessed by setting up {{URL}} as Request URL.
- Configure assertions to be executed for asserting the HTTP responses for the API call.
- Check Ignore SSL Errors if you are running tests against non-production environments using self-signed certificates.
- Check Set Trace ID for enabling distributed tracing for your test and setting a Trace ID for your test. Refer Distributed Tracing section for more details.
- Click Submit
- A new API monitor is created.