Request History

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

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.

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

Request History is similar to content search, 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.

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:

{
  "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.

Example Request Body:

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

Last updated