Set up an API test 🔗
An API test provides a flexible way to check the functionality and performance of API endpoints. See Use an API Test to test an endpoint for an overview of API tests in Splunk Synthetic Monitoring.
Set up an API test 🔗
Follow these steps to set up an API test:
From the landing page of Splunk Observability Cloud, navigate to Splunk Synthetic Monitoring.
Under Tests, select Add new test and select API test from the list. The test creation view opens.
In the Name field, enter a name for your test.
Beside Steps, select Add requests to add requests to your API test. The requests setup page opens.
Add as many requests as you would like to include in your test, including setup and validation steps.
As you build your test, you can use Try now to check that the configuration of your test is valid. Try now results are ephemeral and don’t impact persisted run metrics. For more, see Validate your test configuration with try now.
Custom properties 🔗
Custom properties are key-value pairs you can assign to dimensions of existing MTSes after ingest. Custom properties are single-valued and don’t support multiple values, like
Keys must start with an uppercase or lowercase letter. Keys can’t start with special characters or numbers.
The remainder of the key can contain letters, numbers, underscores and hyphens.
Keys can’t be named test_id or test.
Key size can’t exceed 128 characters.
See, Custom properties.
Add requests to your API test 🔗
Follow these steps to add requests to your API test:
Enter a name for your first request, such as “Request Auth Token”.
In the Setup section, use the selectors to add as many setup steps as you want to include. See Use an API Test to test an endpoint to learn more about your options.
In the Request section, choose a method for your request.
Enter the URL for your request, including
(Optional) To add a request header, select the
+button labeled Request Headers and enter the type and content. Requests can include multiple headers.
In the Validation section, enter any validation steps you want to use to validate the request and response.
(Optional) Select + Request to add another request to your test.
Repeat until you have added as many requests as you’d like to include in your API test.
Select Save steps & return to test to finish creating your test.
Customize your test details 🔗
Use these steps to customize your test configuration and finish creating your test:
In the Locations field, enter the locations from which you want to test the URL. You can select one or multiple locations.
In the Device Type field, use the list to select the device from which you’d like to conduct the test.
In the Frequency field, select your desired test frequency from the list.
(Optional) Use the Round Robin selector to switch between options: enabling Round Robin means your test cycles through your selected locations one at a time, while disabling Round Robin runs the test from all selected locations concurrently at your selected frequency.
If you want to receive alerts from this test, select + Create detector to set up a detector on the test. Use the dialog box to customize your detector.
Select Submit. This redirects you to the Test History page for your new test. If you’ve just created the test, allow at least one test frequency interval for your test to begin collecting synthetic data.
(Optional) Select Edit test or the three-dot Actions menu in the row for your test to edit, pause, duplicate, or delete this test.
See also 🔗
See Public locations to learn more about the locations from which you can run your test.
See Set up detectors and alerts in Splunk Synthetic Monitoring to learn more about detector options.
For an example, see Scenario: Monitor API performance for a critical workflow.