> For the complete documentation index, see [llms.txt](https://docs.maiagent.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.maiagent.ai/maiagent-user-guide/en/org/developer/api-logs.md).

# API Call Logs

View complete records of all API calls to MaiAgent services, including request content, response results, and performance data

## Overview <a href="#features" id="features"></a>

API Call Logs provide a complete record of all requests made through the MaiAgent API, including HTTP method, endpoint path, status code, response time, request and response content, and more. This is ideal for developers to debug, monitor performance, and track usage during API integration.

***

## View Logs <a href="#view-log" id="view-log"></a>

In the left menu, click <mark style="color:blue;">Developer</mark> → <mark style="color:blue;">API Call Logs</mark> to view the list of all API request records.

### Record Field Descriptions <a href="#log-fields" id="log-fields"></a>

| Field                                          | Description                                                                                                                            |
| ---------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| <mark style="color:blue;">ID</mark>            | Unique identifier for the request; click to copy                                                                                       |
| <mark style="color:blue;">Method</mark>        | HTTP method (GET, POST, PUT, DELETE, PATCH), color-coded                                                                               |
| <mark style="color:blue;">Endpoint</mark>      | API endpoint path                                                                                                                      |
| <mark style="color:blue;">Status Code</mark>   | HTTP response status code, color-coded by type: 2xx (green), 4xx (orange), 5xx (red)                                                   |
| <mark style="color:blue;">Latency</mark>       | Request duration, color-coded by speed: under 100ms (green), 100–500ms (orange), over 500ms (red); shown in seconds when over 1 second |
| <mark style="color:blue;">Request Body</mark>  | Request content preview                                                                                                                |
| <mark style="color:blue;">Response Body</mark> | Response content preview                                                                                                               |
| <mark style="color:blue;">IP</mark>            | Source IP of the request                                                                                                               |
| <mark style="color:blue;">Time</mark>          | Request time                                                                                                                           |

***

## Filter and Search <a href="#filter-and-search" id="filter-and-search"></a>

Use the filter bar at the top to quickly find the records you need:

* <mark style="color:blue;">Date Range</mark>: Select start and end dates to view records for a specific time period
* <mark style="color:blue;">Method</mark>: Filter by HTTP method (GET, POST, PUT, DELETE, PATCH); the default is <mark style="color:blue;">All Methods</mark>
* <mark style="color:blue;">Status Category</mark>: Filter by response status (<mark style="color:blue;">2xx Success</mark>, <mark style="color:blue;">4xx Client Error</mark>, <mark style="color:blue;">5xx Server Error</mark>); the default is <mark style="color:blue;">All Status Codes</mark>
* <mark style="color:blue;">Search</mark>: Enter an endpoint, key name, or IP to search

{% hint style="info" %}
When troubleshooting API integration issues, filter by 4xx or 5xx status codes first to quickly locate failed requests.
{% endhint %}

***

## View Request Details <a href="#request-detail" id="request-detail"></a>

In the record list, click the view icon on the right side of any record to open the <mark style="color:blue;">View Details</mark> window, which helps developers debug:

* <mark style="color:blue;">Basic Information</mark>: Request ID, time, method, status code, latency, IP address, endpoint, and User-Agent
* <mark style="color:blue;">Request Headers</mark>, <mark style="color:blue;">Request Body</mark>: The complete request content
* <mark style="color:blue;">Response Headers</mark>, <mark style="color:blue;">Response Body</mark>: The complete response content
* <mark style="color:blue;">Error</mark>: Appears only when the request produced an error, and shows the error message


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.maiagent.ai/maiagent-user-guide/en/org/developer/api-logs.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
