Перейти к содержимому

GET /files

Download a file

Параметры

  • Agentbox-Sandbox-Id · string · заголовок · обязательно

    Identifier of the sandbox that receives the request.

  • Agentbox-Sandbox-Port · integer · заголовок · обязательно

    Internal envd HTTP port exposed through the sandbox proxy.

    По умолчанию: 49983

  • path · string · запрос · необязательно

    Path to the file, URL encoded. Can be relative to the user's home directory (e.g. "file.txt" resolves to ~/file.txt).

  • username · string · запрос · необязательно

    User for setting file ownership and resolving relative paths. Defaults to the sandbox's default user.

  • signature · string · запрос · необязательно

    Signature used for file access permission verification.

  • signature_expiration · integer · запрос · необязательно

    Unix timestamp (seconds) after which the signature expires. Only used with the signature parameter.

Ответы

200

Entire file downloaded successfully.

Content-Type: application/octet-stream

Схема: string

The raw file content

Формат: binary

400

Invalid path

Content-Type: application/json

Схема: Error

  • message · string · обязательно

    Error message

  • code · integer · обязательно

    Error code

401

Invalid user

Content-Type: application/json

Схема: Error

  • message · string · обязательно

    Error message

  • code · integer · обязательно

    Error code

404

File not found

Content-Type: application/json

Схема: Error

  • message · string · обязательно

    Error message

  • code · integer · обязательно

    Error code

406

Requested encoding is not supported

Content-Type: application/json

Схема: Error

  • message · string · обязательно

    Error message

  • code · integer · обязательно

    Error code

500

Internal server error

Content-Type: application/json

Схема: Error

  • message · string · обязательно

    Error message

  • code · integer · обязательно

    Error code