Files

Get a file’s status

Returns the status of one file id. The status is pending (their upload link is waiting for its bytes), ready (a file they can open, with the same can_* fields a list row carries) or expired. The poll for an upload, and the cheap “can I use this id?” check before passing it to a connector tool. 404 is the one answer for an id that is not the caller’s to know about: unknown, someone else’s, another organization’s, or vetoed by a restriction.

get/file/{id}

Request

  • Base URL: https://api.elaichi.ai
  • URL: https://api.elaichi.ai/file/{id}
  • Auth: HTTP bearer

Path parameters

idstring required

File id (file_…).

Headers

X-Organization-Idstring

Target organization (org_…). Required for cookie/session auth on org-scoped routes; optional for API tokens, which carry their organization, and rejected when it names a different one.

Response

OK

file_idstring
status'pending' | 'ready' | 'expired'

pending: an upload link you made is waiting for its bytes (not a file yet: no type, size or URL). ready: a file you can open. expired: your link ran out unused, or the file it filled is gone.

filenamestring
mimestring nullable
size_bytesinteger nullable
expires_atstring date-time
urlstring nullable

The Elaichi app’s download page, for a ready file.

origin'tool' | 'upload' | 'request' | 'inline' | 'api' | 'url_import' | 'web_fetch' | 'export'

How the bytes got here: tool (a connector tool returned them), upload (a person chose it on the Files screen), request (a person handed it to an app that asked, through an upload request; origin_host is the app), inline (content an assistant wrote with file.create), api (a backend sent it to POST /file with a token), url_import, web_fetch (fetched from the web), export (produced by an export). Provenance for wording (“Uploaded by Dana”), never an access gate.

origin_hoststring nullable

The web host an import or web fetch read from, or the asking app’s name for origin request; null otherwise.

max_bytesinteger nullable

The link’s size limit while pending.

access'owner' | 'view' | 'null' nullable
can_openboolean
can_deleteboolean
can_shareboolean
can_see_sharesboolean
can_revoke_shareboolean

Changes

No recorded changes to this operation across all 1 revision of this API.