Skip to main content
POST
https://api.app.shinzo.ai
/
v1
/
agent
/
{agentId}
/
filesystem
/
archives
/
extract
Extract Archive
curl --request POST \
  --url https://api.app.shinzo.ai/v1/agent/{agentId}/filesystem/archives/extract \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "archivePath": "<string>",
  "outputPath": "<string>",
  "overwrite": true
}
'

Authentication

Requires JWT token or Platform API key.
agentId
string
required
Agent UUID
archivePath
string
required
Path to the archive file in the workspace
outputPath
string
required
Directory to extract the archive contents into
overwrite
boolean
Overwrite existing files during extraction

Example Request

curl -X POST "https://api.app.shinzo.ai/v1/agent/agt_abc123/filesystem/archives/extract" \
  -H "Authorization: Bearer <jwt_token>" \
  -H "Content-Type: application/json" \
  -d '{
    "archive_path": "/workspace/backup.tar.gz",
    "destination": "/workspace/restored",
    "overwrite": true
  }'

Response

{
  "destination": "/workspace/restored",
  "files_extracted": 12
}

Response Fields

FieldTypeDescription
destinationstringDirectory where the archive was extracted
files_extractednumberTotal number of files extracted

Status Codes

CodeDescription
200Archive extracted successfully
400Invalid request body or unsupported archive format
401Invalid authentication
403Access denied
404Agent or archive file not found