PPanel Edge

files

由 openapi.json 自动生成的 15 个端点及其请求、响应和权限元数据。

此参考由已发布 API 契约生成。字段、请求头和权限要求如下。

下载完整 OpenAPI 文档 · SHA-256: ccaa20cec11fad96e369b88073ce3608a5b071ce55d6dc03fa31df7b0f08c525

标识符和数据结构与公开契约一致,说明直接给出调用规则。共享模型见 数据模型.

GET /api/v1/admin/files

GET /api/v1/admin/files

List files

{
  "parameters": [
    {
      "description": "Purpose; repeat the parameter for several values",
      "in": "query",
      "name": "purpose",
      "required": false,
      "schema": {
        "anyOf": [
          {
            "enum": [
              "site_asset",
              "image",
              "package",
              "ticket_attachment",
              "receipt",
              "export"
            ],
            "type": "string"
          },
          {
            "items": {
              "enum": [
                "site_asset",
                "image",
                "package",
                "ticket_attachment",
                "receipt",
                "export"
              ],
              "type": "string"
            },
            "type": "array"
          }
        ],
        "description": "Purpose; repeat the parameter for several values"
      }
    },
    {
      "description": "Status; repeat the parameter for several values",
      "in": "query",
      "name": "status",
      "required": false,
      "schema": {
        "anyOf": [
          {
            "enum": [
              "uploading",
              "verifying",
              "ready",
              "rejected",
              "deleted"
            ],
            "type": "string"
          },
          {
            "items": {
              "enum": [
                "uploading",
                "verifying",
                "ready",
                "rejected",
                "deleted"
              ],
              "type": "string"
            },
            "type": "array"
          }
        ],
        "description": "Status; repeat the parameter for several values"
      }
    },
    {
      "in": "query",
      "name": "visibility",
      "required": false,
      "schema": {
        "enum": [
          "public",
          "private"
        ],
        "type": "string"
      }
    },
    {
      "in": "query",
      "name": "owner_type",
      "required": false,
      "schema": {
        "enum": [
          "user",
          "staff",
          "system"
        ],
        "type": "string"
      }
    },
    {
      "description": "File name substring or SHA-256 hex prefix",
      "in": "query",
      "name": "q",
      "required": false,
      "schema": {
        "description": "File name substring or SHA-256 hex prefix",
        "maxLength": 64,
        "minLength": 1,
        "type": "string"
      }
    },
    {
      "in": "query",
      "name": "sort",
      "required": false,
      "schema": {
        "enum": [
          "created_at",
          "size",
          "filename"
        ],
        "type": "string"
      }
    },
    {
      "in": "query",
      "name": "order",
      "required": false,
      "schema": {
        "enum": [
          "asc",
          "desc"
        ],
        "type": "string"
      }
    },
    {
      "description": "Default 20, at most 100",
      "in": "query",
      "name": "page_size",
      "required": false,
      "schema": {
        "description": "Default 20, at most 100",
        "maximum": 100,
        "minimum": 1,
        "type": "integer"
      }
    },
    {
      "description": "`next_cursor` of the previous page",
      "in": "query",
      "name": "cursor",
      "required": false,
      "schema": {
        "description": "`next_cursor` of the previous page",
        "maxLength": 512,
        "minLength": 1,
        "type": "string"
      }
    },
    {
      "description": "Adds `total` (first page only)",
      "in": "query",
      "name": "include_total",
      "required": false,
      "schema": {
        "description": "Adds `total` (first page only)",
        "enum": [
          "true",
          "false"
        ],
        "type": "string"
      }
    }
  ],
  "responses": {
    "200": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/FilePage"
          }
        }
      },
      "description": "A page of files"
    },
    "422": {
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      },
      "description": "Invalid filter or cursor"
    }
  },
  "summary": "List files",
  "tags": [
    "files"
  ],
  "x-body": "none",
  "x-body-limit": 0,
  "x-permission": "support.file.read",
  "effectiveSecurity": []
}

POST /api/v1/admin/files

POST /api/v1/admin/files

Open an upload session

Checks the file name, declared type and size against the purpose (413 before any storage call) and returns the part plan: send parts/1…part_count (each exactly part_size bytes but the last), then complete.

{
  "description": "Checks the file name, declared type and size against the purpose (413 before any storage call) and returns the part plan: send `parts/1…part_count` (each exactly `part_size` bytes but the last), then `complete`.",
  "parameters": [
    {
      "description": "Idempotency-Key: 16–128 visible ASCII characters",
      "in": "header",
      "name": "idempotency-key",
      "required": true,
      "schema": {
        "description": "Idempotency-Key: 16–128 visible ASCII characters",
        "pattern": "^[\\x21-\\x7e]{16,128}$",
        "type": "string"
      }
    }
  ],
  "requestBody": {
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/FileUploadCreate"
        }
      }
    },
    "required": true
  },
  "responses": {
    "201": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/File"
          }
        }
      },
      "description": "The file in `uploading` with its part plan"
    },
    "413": {
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      },
      "description": "support.file_too_large"
    },
    "422": {
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      },
      "description": "support.file_type_not_allowed or validation failed"
    },
    "503": {
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      },
      "description": "support.storage_unavailable"
    }
  },
  "summary": "Open an upload session",
  "tags": [
    "files"
  ],
  "x-audit": "support.file.upload_create",
  "x-body": "json",
  "x-body-limit": 65536,
  "x-idempotency": "required",
  "x-permission": "support.file.manage",
  "effectiveSecurity": []
}

POST /api/v1/admin/files/migrate-storage

POST /api/v1/admin/files/migrate-storage

Copy and verify objects between pinned storage revisions

{
  "requestBody": {
    "content": {
      "application/json": {
        "schema": {
          "additionalProperties": false,
          "properties": {
            "bucket": {
              "enum": [
                "public",
                "private"
              ],
              "type": "string"
            },
            "source_revision": {
              "exclusiveMinimum": 0,
              "type": "integer"
            },
            "source_version": {
              "exclusiveMinimum": 0,
              "type": "integer"
            },
            "target_revision": {
              "exclusiveMinimum": 0,
              "type": "integer"
            },
            "target_version": {
              "exclusiveMinimum": 0,
              "type": "integer"
            }
          },
          "required": [
            "source_revision",
            "source_version",
            "target_revision",
            "target_version",
            "bucket"
          ],
          "type": "object"
        }
      }
    },
    "required": true
  },
  "responses": {
    "202": {
      "content": {
        "application/json": {
          "schema": {
            "properties": {
              "job_id": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "job_id"
            ],
            "type": "object"
          }
        }
      },
      "description": "Queued verified copy"
    },
    "422": {
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      },
      "description": "Invalid revisions or active uploads"
    }
  },
  "summary": "Copy and verify objects between pinned storage revisions",
  "tags": [
    "files"
  ],
  "x-audit": "support.storage.migrate",
  "x-body": "json",
  "x-body-limit": 65536,
  "x-idempotency": "required",
  "x-permission": "system.settings.manage",
  "x-rate-limit": "support.storage_migration",
  "x-reauth": true,
  "effectiveSecurity": []
}

DELETE /api/v1/admin/files/{id}

DELETE /api/v1/admin/files/{id}

Soft delete (restorable until expires_at); lists possible references

{
  "parameters": [
    {
      "in": "path",
      "name": "id",
      "required": true,
      "schema": {
        "format": "uuid",
        "type": "string"
      }
    }
  ],
  "responses": {
    "200": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/FileDetail"
          }
        }
      },
      "description": "The deleted file"
    },
    "404": {
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      },
      "description": "No such file"
    },
    "409": {
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      },
      "description": "support.upload_incomplete: still uploading or verifying"
    }
  },
  "summary": "Soft delete (restorable until expires_at); lists possible references",
  "tags": [
    "files"
  ],
  "x-audit": "support.file.delete",
  "x-body": "none",
  "x-body-limit": 0,
  "x-idempotency": "optional",
  "x-permission": "support.file.manage",
  "effectiveSecurity": []
}

GET /api/v1/admin/files/{id}

GET /api/v1/admin/files/{id}

One file with its upload state and possible references

{
  "parameters": [
    {
      "in": "path",
      "name": "id",
      "required": true,
      "schema": {
        "format": "uuid",
        "type": "string"
      }
    }
  ],
  "responses": {
    "200": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/FileDetail"
          }
        }
      },
      "description": "The file"
    },
    "404": {
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      },
      "description": "No such file"
    }
  },
  "summary": "One file with its upload state and possible references",
  "tags": [
    "files"
  ],
  "x-body": "none",
  "x-body-limit": 0,
  "x-permission": "support.file.read",
  "effectiveSecurity": []
}

POST /api/v1/admin/files/{id}/complete

POST /api/v1/admin/files/{id}/complete

Complete an upload: ready (single part) or verifying (multipart, SHA-256 computed by a job)

{
  "parameters": [
    {
      "in": "path",
      "name": "id",
      "required": true,
      "schema": {
        "format": "uuid",
        "type": "string"
      }
    }
  ],
  "requestBody": {
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/FileUploadComplete"
        }
      }
    },
    "required": false
  },
  "responses": {
    "200": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/File"
          }
        }
      },
      "description": "The file (`ready` or `verifying`)"
    },
    "404": {
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      },
      "description": "No such upload"
    },
    "409": {
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      },
      "description": "support.upload_incomplete (missing parts) or support.upload_expired"
    },
    "413": {
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      },
      "description": "support.file_too_large (image above 8192 × 8192)"
    },
    "422": {
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      },
      "description": "support.file_type_mismatch / support.checksum_mismatch: rejected and deleted"
    },
    "503": {
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      },
      "description": "support.storage_unavailable"
    }
  },
  "summary": "Complete an upload: ready (single part) or verifying (multipart, SHA-256 computed by a job)",
  "tags": [
    "files"
  ],
  "x-audit": "support.file.upload_complete",
  "x-body": "json",
  "x-body-limit": 1048576,
  "x-idempotency": "optional",
  "x-permission": "support.file.manage",
  "effectiveSecurity": []
}

GET /api/v1/admin/files/{id}/content

GET /api/v1/admin/files/{id}/content

Download a ready file from its bucket (private files only this way)

{
  "parameters": [
    {
      "in": "path",
      "name": "id",
      "required": true,
      "schema": {
        "format": "uuid",
        "type": "string"
      }
    }
  ],
  "responses": {
    "200": {
      "content": {
        "application/gzip": {
          "schema": {
            "format": "binary",
            "type": "string"
          }
        },
        "application/json": {
          "schema": {
            "format": "binary",
            "type": "string"
          }
        },
        "application/pdf": {
          "schema": {
            "format": "binary",
            "type": "string"
          }
        },
        "application/vnd.android.package-archive": {
          "schema": {
            "format": "binary",
            "type": "string"
          }
        },
        "application/vnd.appimage": {
          "schema": {
            "format": "binary",
            "type": "string"
          }
        },
        "application/vnd.debian.binary-package": {
          "schema": {
            "format": "binary",
            "type": "string"
          }
        },
        "application/vnd.microsoft.portable-executable": {
          "schema": {
            "format": "binary",
            "type": "string"
          }
        },
        "application/x-7z-compressed": {
          "schema": {
            "format": "binary",
            "type": "string"
          }
        },
        "application/x-apple-diskimage": {
          "schema": {
            "format": "binary",
            "type": "string"
          }
        },
        "application/x-msi": {
          "schema": {
            "format": "binary",
            "type": "string"
          }
        },
        "application/x-rpm": {
          "schema": {
            "format": "binary",
            "type": "string"
          }
        },
        "application/x-xar": {
          "schema": {
            "format": "binary",
            "type": "string"
          }
        },
        "application/zip": {
          "schema": {
            "format": "binary",
            "type": "string"
          }
        },
        "image/avif": {
          "schema": {
            "format": "binary",
            "type": "string"
          }
        },
        "image/gif": {
          "schema": {
            "format": "binary",
            "type": "string"
          }
        },
        "image/jpeg": {
          "schema": {
            "format": "binary",
            "type": "string"
          }
        },
        "image/png": {
          "schema": {
            "format": "binary",
            "type": "string"
          }
        },
        "image/svg+xml": {
          "schema": {
            "format": "binary",
            "type": "string"
          }
        },
        "image/webp": {
          "schema": {
            "format": "binary",
            "type": "string"
          }
        },
        "image/x-icon": {
          "schema": {
            "format": "binary",
            "type": "string"
          }
        },
        "text/csv": {
          "schema": {
            "format": "binary",
            "type": "string"
          }
        },
        "text/plain": {
          "schema": {
            "format": "binary",
            "type": "string"
          }
        },
        "video/mp4": {
          "schema": {
            "format": "binary",
            "type": "string"
          }
        },
        "video/webm": {
          "schema": {
            "format": "binary",
            "type": "string"
          }
        }
      },
      "description": "The file (attachment, private files `Cache-Control: private, no-store`)"
    },
    "206": {
      "content": {
        "application/gzip": {
          "schema": {
            "format": "binary",
            "type": "string"
          }
        },
        "application/json": {
          "schema": {
            "format": "binary",
            "type": "string"
          }
        },
        "application/pdf": {
          "schema": {
            "format": "binary",
            "type": "string"
          }
        },
        "application/vnd.android.package-archive": {
          "schema": {
            "format": "binary",
            "type": "string"
          }
        },
        "application/vnd.appimage": {
          "schema": {
            "format": "binary",
            "type": "string"
          }
        },
        "application/vnd.debian.binary-package": {
          "schema": {
            "format": "binary",
            "type": "string"
          }
        },
        "application/vnd.microsoft.portable-executable": {
          "schema": {
            "format": "binary",
            "type": "string"
          }
        },
        "application/x-7z-compressed": {
          "schema": {
            "format": "binary",
            "type": "string"
          }
        },
        "application/x-apple-diskimage": {
          "schema": {
            "format": "binary",
            "type": "string"
          }
        },
        "application/x-msi": {
          "schema": {
            "format": "binary",
            "type": "string"
          }
        },
        "application/x-rpm": {
          "schema": {
            "format": "binary",
            "type": "string"
          }
        },
        "application/x-xar": {
          "schema": {
            "format": "binary",
            "type": "string"
          }
        },
        "application/zip": {
          "schema": {
            "format": "binary",
            "type": "string"
          }
        },
        "image/avif": {
          "schema": {
            "format": "binary",
            "type": "string"
          }
        },
        "image/gif": {
          "schema": {
            "format": "binary",
            "type": "string"
          }
        },
        "image/jpeg": {
          "schema": {
            "format": "binary",
            "type": "string"
          }
        },
        "image/png": {
          "schema": {
            "format": "binary",
            "type": "string"
          }
        },
        "image/svg+xml": {
          "schema": {
            "format": "binary",
            "type": "string"
          }
        },
        "image/webp": {
          "schema": {
            "format": "binary",
            "type": "string"
          }
        },
        "image/x-icon": {
          "schema": {
            "format": "binary",
            "type": "string"
          }
        },
        "text/csv": {
          "schema": {
            "format": "binary",
            "type": "string"
          }
        },
        "text/plain": {
          "schema": {
            "format": "binary",
            "type": "string"
          }
        },
        "video/mp4": {
          "schema": {
            "format": "binary",
            "type": "string"
          }
        },
        "video/webm": {
          "schema": {
            "format": "binary",
            "type": "string"
          }
        }
      },
      "description": "The requested range"
    },
    "304": {
      "description": "Not modified (If-None-Match)"
    },
    "404": {
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      },
      "description": "No such ready file"
    },
    "416": {
      "description": "Range not satisfiable (`Content-Range: bytes */<size>`)"
    },
    "503": {
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      },
      "description": "support.storage_unavailable"
    }
  },
  "summary": "Download a ready file from its bucket (private files only this way)",
  "tags": [
    "files"
  ],
  "x-audit": "support.file.download",
  "x-body": "none",
  "x-body-limit": 0,
  "x-permission": "support.file.read",
  "effectiveSecurity": []
}

PUT /api/v1/admin/files/{id}/parts/{n}

PUT /api/v1/admin/files/{id}/parts/{n}

Upload one part (raw bytes; re-sending a part replaces it)

{
  "parameters": [
    {
      "in": "path",
      "name": "id",
      "required": true,
      "schema": {
        "format": "uuid",
        "type": "string"
      }
    },
    {
      "in": "path",
      "name": "n",
      "required": true,
      "schema": {
        "type": "integer"
      }
    }
  ],
  "requestBody": {
    "content": {
      "application/octet-stream": {
        "schema": {
          "format": "binary",
          "type": "string"
        }
      }
    },
    "required": true
  },
  "responses": {
    "200": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/FilePartResult"
          }
        }
      },
      "description": "The stored part"
    },
    "404": {
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      },
      "description": "No such upload"
    },
    "409": {
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      },
      "description": "support.upload_expired"
    },
    "413": {
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      },
      "description": "Request body above the part size"
    },
    "415": {
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      },
      "description": "Not application/octet-stream"
    },
    "422": {
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      },
      "description": "Wrong part length, part number, or support.checksum_mismatch"
    },
    "503": {
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      },
      "description": "support.storage_unavailable"
    }
  },
  "summary": "Upload one part (raw bytes; re-sending a part replaces it)",
  "tags": [
    "files"
  ],
  "x-audit": "support.file.upload_part",
  "x-body": "octet-stream",
  "x-body-limit": 16777216,
  "x-idempotency": "none",
  "x-permission": "support.file.manage",
  "effectiveSecurity": []
}

POST /api/v1/admin/files/{id}/purge

POST /api/v1/admin/files/{id}/purge

Delete the object and the record now (re-authentication)

{
  "parameters": [
    {
      "in": "path",
      "name": "id",
      "required": true,
      "schema": {
        "format": "uuid",
        "type": "string"
      }
    }
  ],
  "responses": {
    "204": {
      "description": "Purged; the public URL answers 404"
    },
    "404": {
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      },
      "description": "No such file"
    },
    "503": {
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      },
      "description": "support.storage_unavailable: the record stays and gc finishes the deletion"
    }
  },
  "summary": "Delete the object and the record now (re-authentication)",
  "tags": [
    "files"
  ],
  "x-audit": "support.file.purge",
  "x-body": "none",
  "x-body-limit": 0,
  "x-idempotency": "optional",
  "x-permission": "support.file.manage",
  "x-reauth": true,
  "effectiveSecurity": []
}

POST /api/v1/admin/files/{id}/restore

POST /api/v1/admin/files/{id}/restore

Restore a soft-deleted file within its window

{
  "parameters": [
    {
      "in": "path",
      "name": "id",
      "required": true,
      "schema": {
        "format": "uuid",
        "type": "string"
      }
    }
  ],
  "responses": {
    "200": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/File"
          }
        }
      },
      "description": "The ready file"
    },
    "404": {
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      },
      "description": "No such file, or past the restore window"
    },
    "409": {
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      },
      "description": "support.upload_incomplete"
    }
  },
  "summary": "Restore a soft-deleted file within its window",
  "tags": [
    "files"
  ],
  "x-audit": "support.file.restore",
  "x-body": "none",
  "x-body-limit": 0,
  "x-idempotency": "optional",
  "x-permission": "support.file.manage",
  "effectiveSecurity": []
}

DELETE /api/v1/admin/files/{id}/upload

DELETE /api/v1/admin/files/{id}/upload

Abandon an upload session

{
  "parameters": [
    {
      "in": "path",
      "name": "id",
      "required": true,
      "schema": {
        "format": "uuid",
        "type": "string"
      }
    }
  ],
  "responses": {
    "204": {
      "description": "Aborted"
    },
    "404": {
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      },
      "description": "No such upload"
    },
    "409": {
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      },
      "description": "support.upload_expired: the session is already closed"
    },
    "503": {
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      },
      "description": "support.storage_unavailable"
    }
  },
  "summary": "Abandon an upload session",
  "tags": [
    "files"
  ],
  "x-audit": "support.file.upload_abort",
  "x-body": "none",
  "x-body-limit": 0,
  "x-idempotency": "optional",
  "x-permission": "support.file.manage",
  "effectiveSecurity": []
}

POST /api/v1/me/files

POST /api/v1/me/files

Open an upload session for a ticket attachment (one part)

{
  "parameters": [
    {
      "description": "Idempotency-Key: 16–128 visible ASCII characters",
      "in": "header",
      "name": "idempotency-key",
      "required": true,
      "schema": {
        "description": "Idempotency-Key: 16–128 visible ASCII characters",
        "pattern": "^[\\x21-\\x7e]{16,128}$",
        "type": "string"
      }
    }
  ],
  "requestBody": {
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/PortalFileUploadCreate"
        }
      }
    },
    "required": true
  },
  "responses": {
    "201": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/File"
          }
        }
      },
      "description": "The file in `uploading`"
    },
    "413": {
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      },
      "description": "support.file_too_large"
    },
    "422": {
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      },
      "description": "support.file_type_not_allowed or validation failed"
    },
    "429": {
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      },
      "description": "support.storage_quota_exceeded"
    },
    "503": {
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      },
      "description": "support.storage_unavailable"
    }
  },
  "summary": "Open an upload session for a ticket attachment (one part)",
  "tags": [
    "files"
  ],
  "x-audit": "support.file.upload_create",
  "x-body": "json",
  "x-body-limit": 65536,
  "x-idempotency": "required",
  "effectiveSecurity": []
}

POST /api/v1/me/files/{id}/complete

POST /api/v1/me/files/{id}/complete

Complete the upload (type check; ready or rejected)

{
  "parameters": [
    {
      "in": "path",
      "name": "id",
      "required": true,
      "schema": {
        "format": "uuid",
        "type": "string"
      }
    }
  ],
  "requestBody": {
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/FileUploadComplete"
        }
      }
    },
    "required": false
  },
  "responses": {
    "200": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/File"
          }
        }
      },
      "description": "The ready file"
    },
    "404": {
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      },
      "description": "No such upload"
    },
    "409": {
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      },
      "description": "support.upload_incomplete or support.upload_expired"
    },
    "413": {
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      },
      "description": "support.file_too_large"
    },
    "422": {
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      },
      "description": "support.file_type_mismatch / support.checksum_mismatch"
    },
    "503": {
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      },
      "description": "support.storage_unavailable"
    }
  },
  "summary": "Complete the upload (type check; ready or rejected)",
  "tags": [
    "files"
  ],
  "x-body": "json",
  "x-body-limit": 65536,
  "x-idempotency": "optional",
  "effectiveSecurity": []
}

GET /api/v1/me/files/{id}/content

GET /api/v1/me/files/{id}/content

Download one of your files

{
  "parameters": [
    {
      "in": "path",
      "name": "id",
      "required": true,
      "schema": {
        "format": "uuid",
        "type": "string"
      }
    }
  ],
  "responses": {
    "200": {
      "content": {
        "application/gzip": {
          "schema": {
            "format": "binary",
            "type": "string"
          }
        },
        "application/json": {
          "schema": {
            "format": "binary",
            "type": "string"
          }
        },
        "application/pdf": {
          "schema": {
            "format": "binary",
            "type": "string"
          }
        },
        "application/vnd.android.package-archive": {
          "schema": {
            "format": "binary",
            "type": "string"
          }
        },
        "application/vnd.appimage": {
          "schema": {
            "format": "binary",
            "type": "string"
          }
        },
        "application/vnd.debian.binary-package": {
          "schema": {
            "format": "binary",
            "type": "string"
          }
        },
        "application/vnd.microsoft.portable-executable": {
          "schema": {
            "format": "binary",
            "type": "string"
          }
        },
        "application/x-7z-compressed": {
          "schema": {
            "format": "binary",
            "type": "string"
          }
        },
        "application/x-apple-diskimage": {
          "schema": {
            "format": "binary",
            "type": "string"
          }
        },
        "application/x-msi": {
          "schema": {
            "format": "binary",
            "type": "string"
          }
        },
        "application/x-rpm": {
          "schema": {
            "format": "binary",
            "type": "string"
          }
        },
        "application/x-xar": {
          "schema": {
            "format": "binary",
            "type": "string"
          }
        },
        "application/zip": {
          "schema": {
            "format": "binary",
            "type": "string"
          }
        },
        "image/avif": {
          "schema": {
            "format": "binary",
            "type": "string"
          }
        },
        "image/gif": {
          "schema": {
            "format": "binary",
            "type": "string"
          }
        },
        "image/jpeg": {
          "schema": {
            "format": "binary",
            "type": "string"
          }
        },
        "image/png": {
          "schema": {
            "format": "binary",
            "type": "string"
          }
        },
        "image/svg+xml": {
          "schema": {
            "format": "binary",
            "type": "string"
          }
        },
        "image/webp": {
          "schema": {
            "format": "binary",
            "type": "string"
          }
        },
        "image/x-icon": {
          "schema": {
            "format": "binary",
            "type": "string"
          }
        },
        "text/csv": {
          "schema": {
            "format": "binary",
            "type": "string"
          }
        },
        "text/plain": {
          "schema": {
            "format": "binary",
            "type": "string"
          }
        },
        "video/mp4": {
          "schema": {
            "format": "binary",
            "type": "string"
          }
        },
        "video/webm": {
          "schema": {
            "format": "binary",
            "type": "string"
          }
        }
      },
      "description": "The file (attachment, `Cache-Control: private, no-store`)"
    },
    "206": {
      "content": {
        "application/gzip": {
          "schema": {
            "format": "binary",
            "type": "string"
          }
        },
        "application/json": {
          "schema": {
            "format": "binary",
            "type": "string"
          }
        },
        "application/pdf": {
          "schema": {
            "format": "binary",
            "type": "string"
          }
        },
        "application/vnd.android.package-archive": {
          "schema": {
            "format": "binary",
            "type": "string"
          }
        },
        "application/vnd.appimage": {
          "schema": {
            "format": "binary",
            "type": "string"
          }
        },
        "application/vnd.debian.binary-package": {
          "schema": {
            "format": "binary",
            "type": "string"
          }
        },
        "application/vnd.microsoft.portable-executable": {
          "schema": {
            "format": "binary",
            "type": "string"
          }
        },
        "application/x-7z-compressed": {
          "schema": {
            "format": "binary",
            "type": "string"
          }
        },
        "application/x-apple-diskimage": {
          "schema": {
            "format": "binary",
            "type": "string"
          }
        },
        "application/x-msi": {
          "schema": {
            "format": "binary",
            "type": "string"
          }
        },
        "application/x-rpm": {
          "schema": {
            "format": "binary",
            "type": "string"
          }
        },
        "application/x-xar": {
          "schema": {
            "format": "binary",
            "type": "string"
          }
        },
        "application/zip": {
          "schema": {
            "format": "binary",
            "type": "string"
          }
        },
        "image/avif": {
          "schema": {
            "format": "binary",
            "type": "string"
          }
        },
        "image/gif": {
          "schema": {
            "format": "binary",
            "type": "string"
          }
        },
        "image/jpeg": {
          "schema": {
            "format": "binary",
            "type": "string"
          }
        },
        "image/png": {
          "schema": {
            "format": "binary",
            "type": "string"
          }
        },
        "image/svg+xml": {
          "schema": {
            "format": "binary",
            "type": "string"
          }
        },
        "image/webp": {
          "schema": {
            "format": "binary",
            "type": "string"
          }
        },
        "image/x-icon": {
          "schema": {
            "format": "binary",
            "type": "string"
          }
        },
        "text/csv": {
          "schema": {
            "format": "binary",
            "type": "string"
          }
        },
        "text/plain": {
          "schema": {
            "format": "binary",
            "type": "string"
          }
        },
        "video/mp4": {
          "schema": {
            "format": "binary",
            "type": "string"
          }
        },
        "video/webm": {
          "schema": {
            "format": "binary",
            "type": "string"
          }
        }
      },
      "description": "The requested range"
    },
    "304": {
      "description": "Not modified"
    },
    "404": {
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      },
      "description": "No such file"
    },
    "416": {
      "description": "Range not satisfiable"
    },
    "503": {
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      },
      "description": "support.storage_unavailable"
    }
  },
  "summary": "Download one of your files",
  "tags": [
    "files"
  ],
  "x-body": "none",
  "x-body-limit": 0,
  "effectiveSecurity": []
}

PUT /api/v1/me/files/{id}/parts/1

PUT /api/v1/me/files/{id}/parts/1

Upload the file (raw bytes)

{
  "parameters": [
    {
      "in": "path",
      "name": "id",
      "required": true,
      "schema": {
        "format": "uuid",
        "type": "string"
      }
    }
  ],
  "requestBody": {
    "content": {
      "application/octet-stream": {
        "schema": {
          "format": "binary",
          "type": "string"
        }
      }
    },
    "required": true
  },
  "responses": {
    "200": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/FilePartResult"
          }
        }
      },
      "description": "Stored"
    },
    "404": {
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      },
      "description": "No such upload"
    },
    "409": {
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      },
      "description": "support.upload_expired"
    },
    "413": {
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      },
      "description": "Request body above the part size"
    },
    "415": {
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      },
      "description": "Not application/octet-stream"
    },
    "422": {
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      },
      "description": "Wrong length or support.checksum_mismatch"
    },
    "503": {
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      },
      "description": "support.storage_unavailable"
    }
  },
  "summary": "Upload the file (raw bytes)",
  "tags": [
    "files"
  ],
  "x-body": "octet-stream",
  "x-body-limit": 16777216,
  "x-idempotency": "none",
  "effectiveSecurity": []
}