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

# 列出文档

> 返回项目中文档的分页列表

```
GET /openapi/memorylake/api/v1/projects/{id}/documents
```

返回与项目关联的文档分页列表。

<Note>
  **所需权限：** [`project:doc_list`](/features/team-collaboration/permission-reference#查看”文件”标签页) · `instance`
</Note>

### 路径参数

<ParamField path="id" type="string" required>
  项目 ID
</ParamField>

### 查询参数

<ParamField query="page" type="integer" default="1">
  页码（从 1 开始）
</ParamField>

<ParamField query="size" type="integer" default="20">
  每页数量（最大 100）
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X GET 'https://app.memorylake.cn/openapi/memorylake/api/v1/projects/proj-a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6/documents?page=1&size=20' \
    -H 'Authorization: Bearer sk_xxxxxx'
  ```
</RequestExample>

### 响应

<ResponseField name="data" type="object">
  <Expandable title="文档分页列表">
    <ResponseField name="items" type="array">
      文档对象数组

      <Expandable title="文档对象">
        <ResponseField name="id" type="string">文档 ID</ResponseField>
        <ResponseField name="name" type="string">文件名</ResponseField>
        <ResponseField name="status" type="string">处理状态：`pending`、`running`、`okay` 或 `error`</ResponseField>
        <ResponseField name="drive_item_id" type="string">云盘项标识符</ResponseField>
        <ResponseField name="created_at" type="string">创建时间戳</ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="total" type="integer">文档总数</ResponseField>
    <ResponseField name="page" type="integer">当前页码</ResponseField>
    <ResponseField name="size" type="integer">每页数量</ResponseField>
    <ResponseField name="total_pages" type="integer">总页数</ResponseField>
  </Expandable>
</ResponseField>

<ResponseExample>
  ```json Success (200) theme={null}
  {
    "success": true,
    "data": {
      "items": [
        {
          "id": "doc-8f86f326d4eb4f7a88cc51c5774cae56",
          "name": "report.pdf",
          "status": "okay",
          "drive_item_id": "sc-4d2beb72e9af4b01:inode-926ead7cac284666",
          "created_at": "2024-01-15T10:30:00Z"
        }
      ],
      "total": 1,
      "page": 1,
      "size": 20,
      "total_pages": 1
    }
  }
  ```
</ResponseExample>
