Docs » Use an API Test to test an endpoint » Set up an API test

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:

  1. From the landing page of Splunk Observability Cloud, navigate to Splunk Synthetic Monitoring.

  2. Under Tests, select Add new test and select API test from the drop-down list. The test creation view opens.

  3. In the Name field, enter a name for your test.

  4. Beside Steps, select Add requests to add requests to your API test. The requests setup page opens.

  5. Add as many requests as you would like to include in your test, including setup and validation steps.

Add requests to your API test 🔗

Follow these steps to add requests to your API test:

  1. Enter a name for your first request, such as “Request Auth Token”.

  2. 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.

  3. In the Request section, choose a method for your request.

  4. Enter the URL for your request, including http or https.

  5. (Optional) To add a request header, select the + button labeled Request Headers and enter the type and content. Requests can include multiple headers.

  6. In the Validation section, enter any validation steps you want to use to validate the request and response.

  7. (Optional) Select + Request to add another request to your test.

  8. Repeat until you have added as many requests as you’d like to include in your API test.

  9. 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:

  1. In the Locations field, enter the locations from which you want to test the URL. You can select one or multiple locations.

  2. In the Device Type field, use the list to select the device from which you’d like to conduct the test.

  3. In the Frequency field, select your desired test frequency from the list.

  4. (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.

  5. 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.

  6. 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.

  7. (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 🔗