DocumentationAPI reference

Rust · 0.1.0

List Attachments

GET /api/v1/attachments

AttachmentService · AttachmentService_ListAttachments

Protocol-derived reference. Authorization and instance policy still apply. Schema descriptions are inherited from the MIT-licensed application contract; examples here are not executed against a live server.

Access

Requires authentication and returns only attachments owned by the caller that the caller can still read. An administrator does not receive every user's attachments from this list.

Ordering and cursor behavior

The declared orderBy input is currently ignored. Results are ordered by update time descending, then ID descending. Follow nextPageToken even when a page is full; this endpoint may return one final empty page. filter is applied to the caller-owned, readable collection, and a named space filter requires membership.

Request

ListAttachments lists all attachments.

GET/api/v1/attachments

Parameters

Name / locationType / requirementDescription
pageSize
query
integer (int32)
Not marked required in 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
Not marked required in OpenAPI
Optional. A page token, received from a previous `ListAttachments` call. Provide this to retrieve the subsequent page.
filter
query
string
Not marked required in 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
Not marked required in OpenAPI
Optional. The order to sort results by. Example: "create_time desc" or "filename asc"

Request body

No request body is declared.

Responses

200 · OK

application/json · ListAttachmentsResponse

default · Default error response

application/json · Status

Complete operation definition

All declared constraints, media types and response details are retained below. Schema references link to their complete definitions.

Open JSON definition
{
  "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"
          }
        }
      }
    }
  }
}