OpenAPI spec at /api/docs with a Scalar viewer, opt-in via FEAT_API_DOCS
This commit is contained in:
6 files changed
+300
-14
No files matched your search
@@ -90,6 +90,7 @@ function createTarArchive(filename: string, content: Uint8Array): Uint8Array {
|
||||
* @openapi
|
||||
* summary: Upload one or more files into a container directory (requires the 'exec' permission)
|
||||
* description: Send `multipart/form-data` with one or more `files` parts; each file is tar-wrapped and written into the target directory. Partial success is reported per file in `uploaded`/`errors`.
|
||||
* body-multipart: files:binary[]! One or more files to write into the target directory
|
||||
* path: id:string! Container ID or name (from GET /api/containers)
|
||||
* query: env:integer The target environment ID (omit for the local/default Docker host) (from GET /api/environments)
|
||||
* query: path:string! Absolute target directory inside the container
|
||||
|
||||
@@ -21,6 +21,7 @@ import type { RequestHandler } from './$types';
|
||||
* @openapi
|
||||
* summary: Load a Docker image from an uploaded tar (docker load) for air-gapped hosts
|
||||
* description: The request body is the raw image tar (Content-Type application/x-tar), streamed straight to the daemon without buffering. Local/socket or direct TCP only; Hawser is rejected.
|
||||
* body-raw: application/x-tar The raw image tar, streamed to the daemon (docker load)
|
||||
* query: env:integer Target environment id
|
||||
* resp-200: {success:boolean!, loaded:string}
|
||||
* resp-200-desc: loaded echoes the daemon's final line, e.g. "Loaded image: alpine:3.20"
|
||||
|
||||
Reference in new issue
Block a user