> For the complete documentation index, see [llms.txt](https://docs.avoautomation.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.avoautomation.com/avo-assure/actions/apis/assertion/status-code-1.md).

# Response time

This is a pre-built action available under **@Assertion** element type. It checks whether the API response time is within the expected limit to validate the performance and responsiveness of the API request.

{% hint style="info" %}
**Note**: An API request must be added and executed successfully before configuring or evaluating API Assertion.
{% endhint %}

## Syntax

**Input Value**: `<Expected response time in ms>`

{% hint style="info" %}
**Note**: Before adding the expected response time in **Input Value** column, select a condition:

* Less Than (**>**)&#x20;
* Greater Than (**<**)&#x20;
* Equal (**=**)&#x20;
* Greater Than or Equal To (**<=**)&#x20;
* Less Than or Equal To (**>=**)
  {% endhint %}

| Argument                                               | Description                                                            |
| ------------------------------------------------------ | ---------------------------------------------------------------------- |
| <p>\<Expected response time in ms> <br>(Required) </p> | Specify the expected time in milliseconds to compare with actual time. |

**Output Value**: `<Actual value>(optional);<Keyword Status>(optional)`

| Argument                                    | Description                                                                |
| ------------------------------------------- | -------------------------------------------------------------------------- |
| <p>\<Actual value> </p><p>(Optional) </p>   | The actual value stores the response time extracted from the executed API. |
| <p>\<Keyword Status> </p><p>(Optional) </p> | The keyword status variable stores the status as **True** or **False**.    |

### Example: Validating Response Time Using Less Than Condition

In this example, we verify that the API response is received in less than the specified response time.

* **Action**: Response time
* **Input Value**: >2000
  * The value **2000** specifies the expected response time in milliseconds.
* **Output Value**: {Actual Time};{Action Status}
  * The first output variable **{Actual Time}** stores the actual API response time in milliseconds.
  * If the second output variable **{Action Status}** is defined, it stores the operation status with the following possible values:
    * **True**: If the actual response time is less than 2000 milliseconds.
    * **False**: If the actual response time is greater than or equal to 2000 milliseconds.
* **Logical Explanation**: The **Response time** action fetches the expected response time 2000 milliseconds from the **Input Value** column and compares it with the actual API response time using the **Less Than** (**>**) condition. The actual response time is stored in the **{Actual Time}** variable. If the **{Action Status}** variable is defined, it stores **True** when the actual response time is less than 2000 milliseconds.

![](https://2174257472-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fk8QZzXZMIJSStKAzDSTu%2Fuploads%2FTTk0DkHvHT3m80VQJMxN%2Funknown.png?alt=media\&token=e4f378a8-a06b-4daa-a7cb-f90fe90407f3)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.avoautomation.com/avo-assure/actions/apis/assertion/status-code-1.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
