files

Make an upload always available, or stop [write]

Changed on

With attach_by_default: true, every session created in the workspace from then on starts with a read-only copy at /workspace/shared/<filename>, unless the session is created with defaults: "none". Only a workspace upload that does not expire can carry the flag (400 otherwise). A file whose name is already taken in a session, or that would take the set past 64 MiB or 50 files, is skipped for that session; the session still starts.

patch/files/{file_id}

Request

  • Base URL
    https://api.agentsky.dev/v1
  • URL
    https://api.agentsky.dev/v1/files/{file_id}
  • Auth
    HTTP bearer

Path parameters

file_idstring required

The file id (file_…)

Request body

attach_by_defaultboolean required

Response

OK

type'file' required
idstring required

file_…

created_atstring date-time required
filenamestring required
mime_typestring required
size_bytesinteger required
downloadableboolean required

true for image uploads (readable within the workspace) and for the per-session copies minted when a file rides a message; false for other uploads (write-once)

attach_by_defaultboolean required

Whether every new session in the workspace starts with a read-only copy under /workspace/shared/

expires_atstring date-time nullable required

Changes

    • info

      added the optional property to the response with the status

    • info

      added the optional property / to the response with the status