Pre_Requisite_Forms
Last updated
Last updated
If your API call relies on another API call, enabling the Prerequisite API checkbox will introduce the Prerequisite API in Monitored Form tab. This feature enables the user to retrieve the output of the prerequisite API and utilize it as input for the Monitored API. Enabling this option will also introduce supplementary fields within the Headers, Authorization, and Body tabs. Further details about the prerequisite API are provided in the following section. If you do not need a Prerequisite API, you can proceed directly to the URL section.
Depending on the type of Prerequisite API, you will have the option to specify the expected response type from the API and provide the corresponding JSON or XPath path. This feature is further enhanced by the support of the JSON Path Extractor and XPath Extractor.
To simplify the user experience when specifying the path, we offer JSON and XPath extractors in the top right corner of the script.
Prerequisite APIs Authorization:
Authorization in the context of APIs refers to the process of granting or denying access to specific resources, data, or functionalities within an API. You will be provided with the list of authorization options like:
You can choose None if the API does not require any authorization, or you can select one of the supported authorization methods from the dropdown menu displayed.
Basic Authentication (Basic Auth) is a method of securing web resources by transmitting a username and password with each HTTP request.
OAuth 2.0 is an industry-standard protocol for authorization, allowing secure access to resources on behalf of a user or application without sharing the users credentials.
You can now provide access token for the API.
Some Monitored APIs require data from a prerequisite API to be placed in a specific place. This is specified by a “key/value” relationship. The value in this field represents the “key” portion of that relationship while the prerequisite API output represents the “value” portion of that relationship.
This field is required when the parameter type for the prerequisite API is set to Path, Query, Header or Request Key
Parameter Type This field specifies the type of input (if any) that will be added to the Monitored API. The output of the prerequisite API can be mapped to 6 different inputs for the Monitored API:
Path – will replace the path parameter (denoted by the curly braces in the URL) with the prerequisite API output
Query – will attach prerequisite input value and the prerequisite API output value (in key/value format) to the URL as a query parameter
Header – attaches the prerequisite input value and the prerequisite API output value (in key/value) format as a header
Request Body — attaches the prerequisite API output as the Monitored API’s request body
Request Key — maps the prerequisite API output to a specified value in the request body of the Monitored API. If the Monitored API is of type REST, an additional field (“Content-Type”) will appear where the user sets the value to either JSON or XML.
Bearer Token – sets the prerequisite API output as the bearer token for the Monitored API
None — This is used when the Monitored API depends on a prerequisite API to cause an event before it is called. In this scenario, no output is provided to the Monitored API.
When you select the prerequisite API option, the Monitored API Form will display additional fields designed to facilitate the transfer of output data from the Prerequisite API to the corresponding input fields of the Monitored API.
You can now provide username and password for the API.