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

POST /files/compose

Compose multiple files into a single file using zero-copy concatenation. Source files are deleted after successful composition.

Параметры

  • 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

Тело запроса

Обязательно: да

application/json

Схема: ComposeRequest

  • source_paths · array<string> · обязательно

    Ordered list of source file paths to concatenate

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

    Destination file path for the composed file

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

    User for setting ownership and resolving relative paths

Ответы

200

Files composed successfully

Content-Type: application/json

Схема: EntryInfo

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

    Path to the file

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

    Name of the file

  • type · file · обязательно

    Type of the file

    Допустимые значения: file

  • metadata · object · необязательно

    User-defined metadata stored as extended attributes on the file.

  • metadata.* · string · additional property

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

500

Internal server error

Content-Type: application/json

Схема: Error

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

    Error message

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

    Error code

507

Not enough disk space

Content-Type: application/json

Схема: Error

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

    Error message

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

    Error code