# Request

{% hint style="info" %}
Enables mocking, testing, and replaying
{% endhint %}

## Fields

<details>

<summary>Hostname</summary>

Name of the host where the request was received at

</details>

<details>

<summary>Port</summary>

Port where the request received at

</details>

<details>

<summary>Path</summary>

Request path e.g. /users/1

</details>

<details>

<summary>Latency</summary>

Response latency in milliseconds

</details>

<details>

<summary>Status</summary>

Response status code

</details>

## Components

<details>

<summary>Headers</summary>

List of **name** and **value** pairs respectively representing the header name and header value

</details>

<details>

<summary>Query Params</summary>

List of **name** and **value** pairs respectively representing the query param name and query param value

</details>

<details>

<summary>Body</summary>

Data of blob format representing the request body

</details>

<details>

<summary>Response</summary>

Represents a HTTP response. See details [here](/core-concepts/mock-api/requests/response.md)

</details>

<details>

<summary>Response Headers</summary>

List of **name** and **value** pairs respectively representing the response header name and response header value

</details>

## Request Key

Every request will have a unique identifier for your Stoobly context. This can be retrieved from the UI or the CLI.

### From the UI

Navigate to the requests page then click on a request. This will open the request details page from the right side. At the top there will be a **Key** field which is the request Key.

<figure><img src="/files/Ut7nT4Cjog5Dyvglf55I" alt=""><figcaption><p>Request Key in the details page</p></figcaption></figure>

### From the CLI

Run the following command to view some requests:

```
$ stoobly-agent request list

method    host                path     port  body_text_hash    query_params_hash      body_params_hash  committed_at  latency  query  status    is_deleted    http_version  key
GET       localhost           /users   8081                    cddd9a61a91320bb71702                                      287            200             0             1.1  eyJwIjogMCwgImkiOiA0MjR9
```

Here in our example we have a single request. The request key can be found in the `key` column. In the example above, it is`eyJwIjogMCwgImkiOiA0MjR9`.


---

# Agent Instructions: 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:

```
GET https://docs.stoobly.com/core-concepts/mock-api/requests.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
