Creating an API Endpoint Monitor

An API endpoint monitor sends an HTTP request to the specified URL and checks the response time and status. You can specify the request headers and payload, such as JSON or XML data.

API endpoint monitors can be used for both REST and SOAP APIs.

Basic knowledge of HTTP request and response contents is recommended to use API endpoint monitors.

In This Guide

Step 1: Configure Request URL, Headers and Body

Start on the AlertSite Dashboard, click the big +, then click + New Monitor. Select API on the left, then click Single API Endpoint Monitor.

Creating an API endpoint monitor in AlertSite UXM

On the next screen, you can configure the request – specify the URL (including http:// or https://), request method (GET, POST, PATCH or others), headers and body. The body is only used for POST, PUT and PATCH requests.

If you are sending a request body, such as JSON or XML, select the appropriate content type from the list. To use a different content type, select Custom and enter the content type manually.

Click the image to enlarge.

Configuring an API request in AlertSite UXM

Notes:

Request Examples

Authentication

API endpoint monitors support Basic authentication. To authenticate the request, switch to the Authentication type, select the check box and enter the username and password.

Username and password for Basic authentication

Test the Request

After you have entered the request data, click Validate to send a sample request and see the response. If there is an error, go back and double-check the request configuration (URL, headers and body).

API response

Configure Response Validation (Recommended)

AlertSite can look for specific text in the response, and alert you if this text is missing or present. To configure the validation, use the Keyword Match options to the right of the response.

Keyword validation for API response

The options are:

Step 2: Configure Monitoring Settings

On the next screen, you can give your monitor a name, select the run interval, timeout and the locations where the monitor will run. More settings are displayed if clicking Edit Configurations in the top right corner. One useful setting accessible via Edit Configurations is Capture Level, which lets you store request and response contents from the test runs. For a description of all settings, see API Endpoint Monitor Settings. You will be able to change all settings later if needed.

Note: VM Node and InSite plans and locations are currently not supported for API endpoint monitors.

Selecting locations for an API endpoint monitor

Once done, click Start Monitoring Now in the top right corner to create the monitor.

 

AlertSite will now monitor your API endpoint and alert you on errors. The first results will appear on the AlertSite Dashboard in a few minutes.

What’s Next

See Also

© 2017 SmartBear Software. All rights reserved.      Terms of Use · Privacy Policy