Files

Create, extract, or list an archive

Archive utility for .zip, .tar, and .tar.gz (format inferred from extension when not explicit). create packs source_paths into archive_path; extract writes contents under output_dir (defaults to the archive's parent dir); list enumerates entries without extracting. All paths must be absolute. Optional password for supported formats.

post/v1/archive

Request

  • Base URL: http://localhost:9998
  • URL: http://localhost:9998/v1/archive
  • Auth: HTTP bearer

Request body

action'create' | 'extract' | 'list' required
archive_pathstring required

Absolute path to the archive file.

format'zip' | 'tar' | 'tar.gz'

Archive format. Inferred from archive_path extension when omitted.

source_pathsstring[]

Absolute paths to pack. Required for action=create.

output_dirstring

Absolute extraction directory. Defaults to the archive's parent dir. action=extract only.

passwordstring

Optional password for supported formats.

Response

Action-specific response (shape varies by action)

archivePathstring required
formatstring required
entryCountinteger

Number of entries (set on create and list).

extractedDirstring

Extraction directory (set on extract).

Changes

No recorded changes to this operation across all 1 revision of this API.