<span id="查询槽位操作日志"></span>

# List service slot operation logs

```{raw} html
<div class="mo-api-page-show-toc" aria-hidden="true"></div>
```

Read recent change summaries for all slots or a specified slot. Only the latest window is available, with no next-page cursor or offset.

```text
GET https://api.moi.matrixorigin.cn/v5/admin/aistudio/service-slots/operation-logs
```

<span id="调用前准备"></span>

## Before you call this API

Prepare a Genesis administrator Bearer token valid in the current environment. An ordinary personal access token, X-API-Key, or workspace Owner is insufficient. Session authentication also requires the corresponding CSRF token. See [AI Studio](../../../../../developer/api/ai-studio/index.md). These are account-level administration operations and require no workspace ID.

<span id="请求参数"></span>

## Request parameters

:::::::{div} mo-api-tabs
::::::{tab-set}
:::::{tab-item} Request example

```bash
curl --get "https://api.moi.matrixorigin.cn/v5/admin/aistudio/service-slots/operation-logs" \
  -H "Authorization: Bearer $GENESIS_ADMIN_TOKEN" \
  --data-urlencode "slot_id=agent_chat" --data-urlencode "page_size=50"
```

:::::
:::::{tab-item} Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `Authorization` | string | Yes in the Bearer example | Bearer followed by the environment's administrator token. Do not send X-API-Key at the same time. |
| `slot_id` | string | No | Query parameter. Omission or whitespace selects all slots; a nonempty value must identify a registered slot. |
| `page_size` | integer | No | Query parameter, default 50. Nonpositive values use the default; values above 200 are capped at 200. Noninteger strings return 400. |

:::::
::::::
:::::::

<span id="成功响应"></span>

## Successful response

:::::::{div} mo-api-tabs mo-api-response-tabs
::::::{tab-set}
:::::{tab-item} Response example

```json
{
  "logs": [
    {
      "id": 1,
      "actor_user_id": "admin-example",
      "actor_name": "Admin",
      "action": "update",
      "slot_id": "agent_chat",
      "summary": "agent_chat: model-example",
      "created_at": 1794456000
    }
  ]
}
```

:::::
:::::{tab-item} Fields

| Field | Type | Description |
| --- | --- | --- |
| `logs` | object (array of objects) | Latest window ordered by created_at and id, both descending. No total or next_cursor. |
| `logs[].id` | integer | Log ID. |
| `logs[].actor_user_id` | string | Optional operator ID. |
| `logs[].actor_name` | string | Optional operator name. |
| `logs[].action` | string | Optional action; current updates record update. |
| `logs[].slot_id` | string | Optional slot identifier. |
| `logs[].summary` | string | Optional change summary; it cannot reconstruct the complete previous configuration. |
| `logs[].created_at` | integer | Unix timestamp in seconds. |

:::::
::::::
:::::::

<span id="错误响应"></span>

## Error responses

:::::::{div} mo-api-tabs
::::::{tab-set}
:::::{tab-item} Response example

```json
{
  "code": "ErrForbidden",
  "msg": "Forbidden"
}
```

:::::
:::::{tab-item} Fields

| Field | Type | Description |
| --- | --- | --- |
| `code` | string | Current error code. |
| `msg` | string | Description of the current failure phase; this example contains the HTTP Forbidden message. |

| HTTP / code | Conditions and handling |
| --- | --- |
| 400 / ErrParamInvalid | Invalid slot, model, defaults, JSON text, or log-count parameters. |
| 401 / Unauthorized | Invalid identity or an inapplicable authentication method such as X-API-Key. |
| 403 / ErrForbidden | No Genesis administrator eligibility. |
| 503 / ErrServiceUnavailable | Classified unavailability of required identity or configuration dependencies. |
| 500 / ErrServer or InternalServerError | Internal or identity-phase failure. Reread after a write error before inferring rollback. |

Errors use code/msg, whereas success returns a raw object. Failure phases can use different code strings. Do not invent a distinct machine-readable reason for every validation error.

:::::
::::::
:::::::
