文档API 参考

Rust · 0.1.0

List Attachments

GET /api/v1/attachments

AttachmentService · AttachmentService_ListAttachments

基于协议生成的参考。授权与实例策略仍然生效。结构描述继承自 MIT 许可的应用接口定义;本站不会向真实服务执行示例。

访问权限

需要认证,仅返回调用者拥有且仍可读取的附件;管理员不会通过此列表获得所有用户的附件。

排序与游标行为

当前实现忽略声明的 orderBy。结果按更新时间倒序,再按 ID 倒序排列。页面已满时仍需跟随 nextPageToken,此接口可能最后返回一页空结果。filter 应用于调用者拥有且可读的集合,指定空间筛选要求成员资格。

请求

ListAttachments lists all attachments.

GET/api/v1/attachments

参数

名称 / 位置类型 / 是否必需描述
pageSize
query
integer (int32)
OpenAPI 未标记为必需
Optional. The maximum number of attachments to return. The service may return fewer than this value. If unspecified, at most 50 attachments will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.
pageToken
query
string
OpenAPI 未标记为必需
Optional. A page token, received from a previous `ListAttachments` call. Provide this to retrieve the subsequent page.
filter
query
string
OpenAPI 未标记为必需
Optional. Filter to apply to the list results. Example: "mime_type==\"image/png\"" or "filename.contains(\"test\")" Supported operators: =, !=, <, <=, >, >=, : (contains), in Supported fields: filename, mime_type, create_time, memo_id, space. `space` only supports a non-negated `==` comparison with a Space resource name or null. `space` is the linked memo's space resource name, or null when the attachment is unlinked or its linked memo has no space.
orderBy
query
string
OpenAPI 未标记为必需
Optional. The order to sort results by. Example: "create_time desc" or "filename asc"

请求体

未声明请求体。

响应

200 · OK

application/json · ListAttachmentsResponse

default · Default error response

application/json · Status

完整操作定义

下方保留全部已声明约束、媒体类型和响应细节。结构引用链接到完整定义。

展开 JSON 定义
{
  "tags": [
    "AttachmentService"
  ],
  "description": "ListAttachments lists all attachments.",
  "operationId": "AttachmentService_ListAttachments",
  "parameters": [
    {
      "name": "pageSize",
      "in": "query",
      "description": "Optional. The maximum number of attachments to return.\n The service may return fewer than this value.\n If unspecified, at most 50 attachments will be returned.\n The maximum value is 1000; values above 1000 will be coerced to 1000.",
      "schema": {
        "type": "integer",
        "format": "int32"
      }
    },
    {
      "name": "pageToken",
      "in": "query",
      "description": "Optional. A page token, received from a previous `ListAttachments` call.\n Provide this to retrieve the subsequent page.",
      "schema": {
        "type": "string"
      }
    },
    {
      "name": "filter",
      "in": "query",
      "description": "Optional. Filter to apply to the list results.\n Example: \"mime_type==\\\"image/png\\\"\" or \"filename.contains(\\\"test\\\")\"\n Supported operators: =, !=, <, <=, >, >=, : (contains), in\n Supported fields: filename, mime_type, create_time, memo_id, space.\n `space` only supports a non-negated `==` comparison with a Space resource\n name or null.\n `space` is the linked memo's space resource name, or null when the\n attachment is unlinked or its linked memo has no space.",
      "schema": {
        "type": "string"
      }
    },
    {
      "name": "orderBy",
      "in": "query",
      "description": "Optional. The order to sort results by.\n Example: \"create_time desc\" or \"filename asc\"",
      "schema": {
        "type": "string"
      }
    }
  ],
  "responses": {
    "200": {
      "description": "OK",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/ListAttachmentsResponse"
          }
        }
      }
    },
    "default": {
      "description": "Default error response",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Status"
          }
        }
      }
    }
  }
}