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

# 列出用户日志导出历史

> GET /user-logs/

在**管理 API** 主机 (`api.scanova.io`) 上列出账户的日志导出任务，使用您的原始管理 API 密钥进行身份验证。

```
GET https://api.scanova.io/user-logs/
Authorization: 401f7ac837da42b97f613d789819ff93537bee6a
```

<ParamField query="status" type="string">
  按任务状态筛选：`new`、`completed` 或 `failed`。
</ParamField>

<ParamField query="search" type="string">
  在导出用户的名字、姓氏和电子邮件中搜索。
</ParamField>

<ParamField query="ordering" type="string">
  按 `created`、`completed_on` 或 `status` 排序 —— 前缀 `-` 表示降序。默认值为 `-created`。
</ParamField>

<ParamField query="page" type="integer">
  页码。
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl "https://api.scanova.io/user-logs/?status=completed" \
    -H "Authorization: 401f7ac837da42b97f613d789819ff93537bee6a"
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "count": 2,
    "next": null,
    "previous": null,
    "results": [
      {
        "id": 482,
        "status": "completed",
        "result_file": "https://cdn.example.com/media/user_logs/results/1042/2026/09/Logs_09072026143210.csv",
        "completed_on": "2026-09-07T14:32:10Z",
        "created": "2026-09-07T14:31:55Z",
        "created_by_name": "Anuj Sharma"
      },
      {
        "id": 481,
        "status": "failed",
        "result_file": null,
        "completed_on": null,
        "created": "2026-09-06T09:12:00Z",
        "created_by_name": "ops@scanova.io"
      }
    ]
  }
  ```
</ResponseExample>

<Note>
  不存在按 id 单独查询导出任务状态的端点 —— 请改为查询此列表（按 `status` 筛选，或搜索/排序以找到特定任务），而不是使用不存在的 `GET /user-logs/{id}/`；该路径仅支持 `DELETE`。
</Note>

在任务达到 `completed` 之前，`result_file` 和 `completed_on` 均为 `null`。若任务在 `new` 状态停滞超过 30 分钟，将被自动标记为 `failed`。

## 相关内容

* [触发用户活动日志导出](/zh/api-reference/management-api/user-logs/export) —— 开始新任务。
* [删除导出历史记录](/zh/api-reference/management-api/user-logs/delete) —— 移除任务的跟踪记录。
* [管理 API 概述](/zh/api-reference/management-api/overview) —— 适用于此端点的身份验证方案和配额规则。


## OpenAPI

````yaml api-reference/openapi/management-api.json GET /user-logs/
openapi: 3.1.0
info:
  title: Scanova Management API (v2)
  description: >-
    The complete Scanova Management API — every endpoint available at
    api.scanova.io (QR codes, folders, tags, leads, forms, analytics, plans,
    shared users & roles), plus the token-creation and usage-stats endpoints
    used to authenticate against it. Every path and request/response shape below
    was verified live against a real API key and the actual running backend
    (Phase 7, 2026-08-16) — not guessed from reading urls.py alone.
  version: 2.0.0
servers:
  - url: https://api.scanova.io
    description: Management API — QR/folder/tag/lead/form/analytics/plans endpoints
security:
  - apiKeyAuth: []
paths:
  /user-logs/:
    get:
      summary: List user log export history
      description: >-
        Tracking records for the account's own log export jobs. Poll this
        endpoint to watch `status` (`new` → `completed`/`failed`) for an
        in-flight export — there is no separate by-id status endpoint.
      operationId: listUserLogsExports
      parameters:
        - name: status
          in: query
          schema:
            type: string
            enum:
              - new
              - completed
              - failed
        - name: search
          in: query
          schema:
            type: string
        - name: ordering
          in: query
          schema:
            type: string
        - name: page
          in: query
          schema:
            type: integer
      responses:
        '200':
          description: Paginated list of export jobs.
          content:
            application/json:
              example:
                count: 2
                next: null
                previous: null
                results:
                  - id: 482
                    status: completed
                    result_file: >-
                      https://cdn.example.com/media/user_logs/results/1042/2026/09/Logs_09072026143210.csv
                    completed_on: '2026-09-07T14:32:10Z'
                    created: '2026-09-07T14:31:55Z'
                    created_by_name: Anuj Sharma
                  - id: 481
                    status: failed
                    result_file: null
                    completed_on: null
                    created: '2026-09-06T09:12:00Z'
                    created_by_name: ops@scanova.io
components:
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        Send your Management API key as the raw value of the Authorization
        header — no "Bearer " or "Token " prefix, and no other characters.
        Example: `Authorization: 401f7ac837da42b97f613d789819ff93537bee6a`. A
        header containing more than one space-separated part is rejected
        outright. Requests also require the request's Host header to be the
        management API host (e.g. api.scanova.io) — the same key sent to the
        regular API host will not authenticate.

````