Modern web applications are built with an complex mix of HTML and API calls ie. applications are highly dependent on REST API calls to retrieve the data or perform an actions. When an API call fails, it can affect complete workflow of the application. Therefore, it is important to monitor each API call. REST API Sequence monitor is meant to monitor the complete workflow of REST-based mobile and web applications.
To configure REST API Sequence monitor, follow the steps mentioned below:
You can also provide the status code range separated with a colon. Example: 200:250
After entering all the above details, click Save.
Parameter forwarding can be used to pass data and test data validation between chained requests. Individual values from API response are extracted using XPath, JSONPath, or Regular expressions and can be saved as custom parameters. Also, values can be extracted from response headers using a regular expression. These parameters can then be used to build custom query strings or POST data for subsequent steps. Based on your selection of Text, XML or JSON-based response data format, you can build custom Regex-based expressions, XPath expressions, or JSONPath based expression assertions. Upon invoking ${Parameter} argument into the HTTP requests of your successive steps, the output value of the invoked expression assertion will be used in these steps for various step validation scenarios.
Go to the Monitors Category View by clicking the Monitors tab. Click on REST API Sequence under the Web Server/Services section. Displayed is the REST API Sequence Monitor's bulk configuration view distributed into three tabs:
Following are the list of metrics shown in the REST API Sequence Monitor in their corresponding tabs:
Parameter | Description |
---|---|
Average Response Time | Average time taken to obtain complete response of all the APIs in the sequence (in ms). |
Transaction Time | Total time taken to complete all the transactions in the sequence (in ms). |
Step Response Time | Total time taken to obtain response of the API in a recorded step (in ms). |
Page Size | Total response size of the API in a recorded step (in bytes). |
Parameter | Description |
---|---|
REST API Sequence | |
Step Name | Name of the recorded step. |
Response Time | Time taken to obtain response of the API in a recorded step (in ms). |
DNS Time | Amount of time spent for resolving domain name for the request (in ms). |
Connection Time | Amount of time spent for establishing TCP connection with server (in ms). |
First Byte Time | Amount of time taken from when the connection to the server established until the first response starts coming in for the API (in ms). |
Download Time | Amount of time taken for receiving last byte of the response for the API (in ms). |
Page Size | Total response size of the API in a recorded step (in bytes). |
Response Code | Indicates whether a specific HTTP request has been successfully completed. Interpreted from numeric values:
|
Response | Displays the response of the API obtained in the recorded step. You can also monitor specific values by defining custom attributes in the API response. Learn more |
To customize your own attributes to monitor specific values in the API response, go to the Response Details tab of the REST API Sequence monitor and select the Response icon. A pop-up window displaying the custom attribute option will open. Click here to learn more about custom attributes.