REST API (Active)
The REST API Active Monitor allows you to monitor any REST API that supports anonymous and basic authentication. It also allows you to validate the JSON Response with JSONPath Queries.
To configure a REST API active monitor:
- . Enter a unique name for the monitor. This name displays in the Active Monitor Library.
- . Enter additional information for the monitor. This description displays next to the monitor name in the Active Monitor Library.
- . This option indicates to WhatsUp Gold that it should attempt to apply this active monitor when Discovery detects any new conditions that warrant it.
- . Enter the amount of time WhatsUp Gold waits for the REST API to respond before terminating the connection and returning the timeout error. The minimum allowed value is 1 second and the maximum allowed value is 120.
- . Enter up to ten custom headers required to access the REST API endpoint. A default Accept header is provided and is specified as .
: For monitoring a Progress Application Server for OpenEdge OEManager REST API endpoint, the Accept header must be set to or .
- . The URL for the REST API endpoint that you want to monitor.
: Reference variables (also called Percent variables) for System (%System), Device (%Device), and Application (%Application) are supported in the REST API URL. For more information, see Percent Variables.
- . Select a supported HTTP method for the REST API endpoint. Currently, only the GET method is supported.
- . Enable this checkbox to force WhatsUp Gold to disregard any certificate errors.
- . If the REST API endpoint does not require authentication, check this box.
- . The monitor will report as down if any of the HTTP response codes listed is returned. You can control which response codes indicate that the monitor is down, and you can also provide a JSONPath Query along with conditions to indicate if the monitor is down. The monitor can use either a Down Condition, a JSONPath Query, or both to return a down response.
- . Design a logical test for evaluating conditions that the REST API endpoint returns:
- Select the Add icon to enter a conditional test using the JSONPath Query. By default, the "No Comparison Set" text appears in-line.
- Double-click inside the JSONPath Query entry, and then select the magnifying glass logo. This prompts you to enter a REST API Credential if "Use anonymous access" is not checked. After the REST API Credentials are verified, the JSONPath Builder window opens.
- Select the endpoint that you want to monitor.
- Build a logical test that represents a down condition for monitoring the REST API endpoint. Supported value types are Boolean, Number, String, and Other. The Other data type checks if a value is null. Empty strings are supported.
- Click .
: For more information about JSONPath and JSONPath Builder, see JSONPath Query and JSONPath Builder.