Skip to content

Get Status Code Of Api Request: REQ_STATUS

The Get Status Code Of Api Request command retrieves the status code of an API request. This helps determine if the request was successful or encountered issues. The status code is stored in a variable for further validation or use in automation scripts.

Example: Suppose you want to retrieve and validate the status code for an API call.

Steps to configure:

  1. From the Action drop-down, select Get Status Code Of Api Request.
  2. Leave the Screen Name and Element Key fields blank.
  3. In the Parameter section, define a variable (e.g., status_code) to store the API status code.
  4. Click Save.

Note: While the steps for adding an action command are identical in both views, the display of the steps changes:

scrn-get-status-code-of-api-request-tabular-view
Tabular View
scrn-get-status-code-of-api-request-card-view
Card View

Example Workflow:

The following screenshot illustrates how the Get Status Code Of Api Request command appears in an API automation sequence, showing its placement within the overall request flow.

scrn-example-workflow-get-status-code-of-api-request
Workflow showing the Get Status Code Of Api Request step in an API automation sequence

Expected Outcome: The API’s status code (e.g., 200 for success or 404 for not found) is stored in the specified variable for further processing.

Back To Top