> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xano.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Request History

The Metadata API enables you to interact with the API Request History of a given instance.

<Frame>
  <iframe width="1000" height="500" src="https://www.youtube.com/embed/BZfH14MCrEM" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen />
</Frame>

### Browse Workspace Request History

Browse is a straightforward approach to getting API Request History. The required parameter is the workspace ID. However, you can drill down further with the branch, API Group, or specific API Endpoint.

**Required Parameters**

* Workspace ID (workspace\_id)

**Optional Parameters**

* Branch ID (branch\_id) - Workspace Branch ID.

* API ID (api\_id) - The API Group ID.

* Query ID (query\_id) - The ID of a specific API Endpoint.

* Page

* Per\_Page - (500 max)

* include\_output - (true or false) - If you want to include the output of each API request.

<Frame>
  <img src="https://mintcdn.com/xano-997cb9ee/kUGpIho8LJSMl5Gv/images/390515c5-image.jpeg?fit=max&auto=format&n=kUGpIho8LJSMl5Gv&q=85&s=a83da1af15518e10de9283d8c4f10aa7" width="1311" height="756" data-path="images/390515c5-image.jpeg" />
</Frame>

### Search

Search workspace history allows for granular filtering and sorting of a workspace's API Request History.

Request History is similar to [content search](/xano-features/metadata-api/content#search-and-browse-content), except instead of fields for searching and filtering, request history uses the same options from the Xano dashboard.

* duration - duration of an API request, in seconds.

* status - the status code.

* created\_at - the time of execution, as a timestamp in milliseconds.

#### Examples:

**Search for requests with a duration of less than 2 seconds. Sort by the longest duration.**

<Frame>
  <img src="https://mintcdn.com/xano-997cb9ee/_Sd90ZcMa6hsPScv/images/c96f910c-image.jpeg?fit=max&auto=format&n=_Sd90ZcMa6hsPScv&q=85&s=a1bc66bc2f44346a21a13097e0458ec4" width="1327" height="613" data-path="images/c96f910c-image.jpeg" />
</Frame>

In this example, we are searching for requests with a duration less than 2 seconds and sorting the results by duration in descending order.

Example request body:

```json theme={null}
{
  "page": 1,
  "per_page": 50,
  "branch_id": null,
  "api_id": null,
  "query_id": null,
  "sort": {
    "duration": "desc"
  },
  "search": [
             {
              "duration|<|": 2
             }
              ]
}
```

**Search for Reqeusts with a status code of 400. Sort the Results by oldest.**

<Frame>
  <img src="https://mintcdn.com/xano-997cb9ee/WBQXG-4Ngk82eYAW/images/fe2b6471-image.jpeg?fit=max&auto=format&n=WBQXG-4Ngk82eYAW&q=85&s=d03247396d1889bd286b4c074231004e" width="1294" height="677" data-path="images/fe2b6471-image.jpeg" />
</Frame>

Example Request Body:

```json theme={null}
{
  "page": 1,
  "per_page": 50,
  "branch_id": null,
  "api_id": null,
  "query_id": null,
  "sort": {
    "created_at": "asc"
  },
  "search": [{
              "status": 400
  }]
}
```
