definitions: pkg_server_fs.CreateFolderRequest: properties: mode: type: string path: type: string required: - path type: object pkg_server_process.ExecuteRequest: properties: command: type: string cwd: description: Current working directory type: string timeout: type: integer required: - command type: object pkg_server_process.ExecuteResponse: properties: exitCode: type: integer output: type: string type: object pkg_server_volumefs.DeleteResponse: properties: deleted: type: boolean type: object pkg_server_volumefs.ExportFileRequest: properties: base_path: type: string rel_path: type: string upload_url: type: string required: - base_path - rel_path - upload_url type: object pkg_server_volumefs.ExportFileResponse: properties: mtime: type: string sha256: type: string size: type: integer type: object pkg_server_volumefs.FileItem: properties: is_dir: type: boolean mime: type: string modified_at: type: string name: type: string path: type: string size: type: integer type: object pkg_server_volumefs.ListExtraData: properties: directory: type: integer files: type: integer type: object pkg_server_volumefs.ListResponse: properties: count: type: integer extra_data: $ref: '#/definitions/pkg_server_volumefs.ListExtraData' results: items: $ref: '#/definitions/pkg_server_volumefs.FileItem' type: array type: object pkg_server_volumefs.StatResponse: properties: exists: type: boolean mime: type: string modified_at: type: string path: type: string size: type: integer type: object info: contact: {} paths: /files: delete: consumes: - application/json description: Delete base_path/rel_path; deleting a non-existent file is idempotent operationId: PVDeleteFile parameters: - description: jail root path issued by apiserver in: query name: base_path required: true type: string - description: volume-relative path in: query name: rel_path required: true type: string produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/pkg_server_volumefs.DeleteResponse' summary: Delete a single file in a volume tags: - pv /files/: delete: consumes: - application/json description: Delete a file or folder at the specified path, with optional recursive deletion for directories operationId: DeleteFile parameters: - description: Path to the file or folder to delete in: query name: path required: true type: string - description: Enable recursive deletion for directories in: query name: recursive type: boolean produces: - application/json responses: "204": description: No Content summary: Delete a file or folder tags: - files /files/download: get: consumes: - application/json description: Download a file from the specified path operationId: DownloadFile parameters: - description: Path to the file to download in: query name: path required: true type: string produces: - application/octet-stream responses: "200": description: OK summary: Download a file tags: - files /files/export: post: consumes: - application/json description: Read a file from the volume, compute its sha256, and upload it using a presigned URL operationId: ExportFile parameters: - description: Export file request in: body name: request required: true schema: $ref: '#/definitions/pkg_server_volumefs.ExportFileRequest' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/pkg_server_volumefs.ExportFileResponse' summary: Export a file to object storage tags: - pv /files/folder: post: consumes: - application/json description: Create a new folder with optional permission mode operationId: CreateFolder parameters: - description: Folder creation request in: body name: request required: true schema: $ref: '#/definitions/pkg_server_fs.CreateFolderRequest' produces: - application/json responses: "201": description: Created summary: Create a folder tags: - files /files/list: get: consumes: - application/json description: List files under base_path/rel_path with pagination, optionally recursive operationId: ListFiles parameters: - in: query name: base_path required: true type: string - in: query name: is_recursive type: boolean - in: query name: page type: integer - in: query name: page_size type: integer - in: query name: rel_path type: string - in: query name: since type: string - in: query name: until type: string produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/pkg_server_volumefs.ListResponse' summary: List files in a volume path tags: - pv /files/preview: get: consumes: - application/json description: Return the first max_bytes of a text file as UTF-8; 415 for non-text types operationId: PreviewFile parameters: - in: query name: base_path required: true type: string - in: query name: max_bytes type: integer - in: query name: rel_path required: true type: string produces: - text/plain responses: "200": description: OK headers: X-Truncated: description: whether the content was truncated type: string summary: Preview a text file tags: - pv /files/stat: get: consumes: - application/json description: Return metadata of base_path/rel_path; returns 200 with exists=false if not found operationId: StatFile parameters: - in: query name: base_path required: true type: string - in: query name: rel_path required: true type: string produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/pkg_server_volumefs.StatResponse' summary: Stat a file in a volume tags: - pv /files/upload: post: consumes: - multipart/form-data description: Upload a file to the specified destination path operationId: UploadFile parameters: - description: File to upload in: formData name: file required: true type: file - description: Destination path for the uploaded file in: formData name: destPath required: true type: string produces: - application/json responses: "204": description: No Content summary: Upload a file tags: - files /process/execute: post: consumes: - application/json description: Execute a shell command and return the output and exit code operationId: ExecuteCommand parameters: - description: Command execution request in: body name: request required: true schema: $ref: '#/definitions/pkg_server_process.ExecuteRequest' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/pkg_server_process.ExecuteResponse' summary: Execute a command tags: - process swagger: "2.0"