API Syntax
6.4.1. Send API Request
Submitting a request to an API and that API retrieving the requested data from the external server or program and delivering it back to the client.
- Target: The API service object.
- Data Input: No Data Input is required.
- Data Output: Create or call a variable.
- Syntax: send api request [request] => output;
6.4.2. Get Response Header
Get the specific value of Response’s header.
- Target: No Target is required
- Data Input:
- response: The response from API requested.
- header: The specific value of response’ header (example: Connection, Date, Content- Type…)
- Data Output: The specific value of Response’s header.
- Syntax: get response header ("", "") => output;
6.4.3. Get Response Body
Get Response Body content of a Request.
- Target: No Target is required
- Data Input: Response: The response from API requested.
- Data Output: The response body content of a request.
- Syntax: get response body ("") => output;
6.4.4. Get Response Status Code
Get HTTP response status codes which indicate whether a specific HTTP request has been successfully completed.
- Target: No Target is required
- Data Input: Response: The response from API requested.
- Data Output: The HTTP response status.
- Syntax: get response status code ("") => output;
6.4.5. Verify Response Header Value
Verify Response Header from a response.
- Target: No Target is required
- Data Input:
- response: The response from API requested
- header: Name of the information you want to verify in the response header
- expectedHeaderValue: Expected value for the information
- Data Output: Create or call a variable.
- Syntax: verify response header value ("", "", "");
6.4.6. Verify Status Code
Verify expected status code from a response.
- Target: No Target is required
- Data Input:
- response: The response from API requested
- expectedStatusCode: Expected value of the status code
- Data Output: Create or call a variable.
- Syntax: verify status code ("", "0");