AgentFS

Upload a file

Accepts an upload with an API key, or without one: a keyless upload is limited to 100 MB, is always unlisted, expires after 24 hours, and cannot set path, project, prefix, if_exists=replace, expires_in, label, or Idempotency-Key. Send Idempotency-Key with a key to make a lost response safe to retry.

Accepts an upload with an API key, or without one: a keyless upload is limited to 100 MB, is always unlisted, expires after 24 hours, and cannot set path, project, prefix, if_exists=replace, expires_in, label, or Idempotency-Key. Send Idempotency-Key with a key to make a lost response safe to retry.

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Header Parameters

Idempotency-Key?string

A stable key for one logical write.

Length1 <= length <= 200
If-Match?string

The ETag of the file version the caller expects.

Request Body

multipart/form-data

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/problem+json

application/problem+json

POST
/v1/files
curl -X POST "https://example.com/v1/files" \  -F file="string"
{  "type": "file",  "id": "string",  "name": "string",  "path": "string",  "size_bytes": 0,  "revision": 0,  "visibility": "public",  "url": "http://example.com",  "etag": "string",  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z"}