Skip to content

Files — API reference

View as Markdown

Stored files and the artifacts derived from them.

GET /v1/files

List files

Parameters
NameInRequirementDescription
limitqueryOptionalPage size.
Responses
StatusDescription
200A page of files, newest first.
400Codes: invalid_request, unsupported_file, file_too_large, corrupted_file, encrypted_file, unsupported_operation.
401Codes: missing_credentials, invalid_api_key, expired_api_key, revoked_api_key, api_key_in_query.
403Codes: insufficient_scope, ip_not_allowed, environment_mismatch, organization_suspended, forbidden, key_restricted.
429Rate limited or out of credits. Retry after the interval in Retry-After. Codes: key_spend_limit, rate_limited, concurrency_limit, credits_exhausted.
500Codes: internal_error.
503Codes: processing_unavailable, dependency_unavailable.
504Codes: timeout.

GET /v1/files/{file_id}

Retrieve a file

Parameters
NameInRequirementDescription
file_idpathRequiredFile identifier.
Responses
StatusDescription
200The file and its artifacts.
401Codes: missing_credentials, invalid_api_key, expired_api_key, revoked_api_key, api_key_in_query.
403Codes: insufficient_scope, ip_not_allowed, environment_mismatch, organization_suspended, forbidden, key_restricted.
404Not found. A resource belonging to another organization returns 404, never 403 — a 403 would confirm it exists. Codes: not_found.
429Rate limited or out of credits. Retry after the interval in Retry-After. Codes: key_spend_limit, rate_limited, concurrency_limit, credits_exhausted.
500Codes: internal_error.
503Codes: processing_unavailable, dependency_unavailable.
504Codes: timeout.

DELETE /v1/files/{file_id}

Deletes the file and every artifact derived from it. Not reversible.

Parameters
NameInRequirementDescription
file_idpathRequiredFile identifier.
Responses
StatusDescription
204Deleted, along with every artifact derived from it.
401Codes: missing_credentials, invalid_api_key, expired_api_key, revoked_api_key, api_key_in_query.
403Codes: insufficient_scope, ip_not_allowed, environment_mismatch, organization_suspended, forbidden, key_restricted.
404Not found. A resource belonging to another organization returns 404, never 403 — a 403 would confirm it exists. Codes: not_found.
429Rate limited or out of credits. Retry after the interval in Retry-After. Codes: key_spend_limit, rate_limited, concurrency_limit, credits_exhausted.
500Codes: internal_error.
503Codes: processing_unavailable, dependency_unavailable.
504Codes: timeout.

GET /v1/files/{file_id}/history

The file’s own story, in order: upload opened, validated or rejected, every job created and how each finished — assembled from the records the platform already keeps, never a second ledger that could disagree with the first.

Parameters
NameInRequirementDescription
file_idpathRequiredFile identifier.
Responses
StatusDescription
200The events, oldest first.
401Codes: missing_credentials, invalid_api_key, expired_api_key, revoked_api_key, api_key_in_query.
403Codes: insufficient_scope, ip_not_allowed, environment_mismatch, organization_suspended, forbidden, key_restricted.
404Not found. A resource belonging to another organization returns 404, never 403 — a 403 would confirm it exists. Codes: not_found.
429Rate limited or out of credits. Retry after the interval in Retry-After. Codes: key_spend_limit, rate_limited, concurrency_limit, credits_exhausted.
500Codes: internal_error.
503Codes: processing_unavailable, dependency_unavailable.
504Codes: timeout.

POST /v1/files/{file_id}/download-url

Authorises first, then mints a short-lived URL on cdn.fylane.dev. The authorisation decision happens before the URL exists, so possession of a URL is never itself the permission.

Parameters
NameInRequirementDescription
file_idpathRequiredFile identifier.
Idempotency-KeyheaderRequiredClient-generated key, scoped to (organization, endpoint) and retained 24 hours. A replay with the same body returns the stored response without re-executing or re-billing; a replay with a different body returns 409.
Request body
FieldTypeRequirementDescription
artifact_idstringOptionalDefaults to the original file.
expires_inintegerOptionalLifetime in seconds.
Responses
StatusDescription
201A short-lived URL.
400Codes: invalid_request, unsupported_file, file_too_large, corrupted_file, encrypted_file, unsupported_operation.
401Codes: missing_credentials, invalid_api_key, expired_api_key, revoked_api_key, api_key_in_query.
403Codes: insufficient_scope, ip_not_allowed, environment_mismatch, organization_suspended, forbidden, key_restricted.
404Not found. A resource belonging to another organization returns 404, never 403 — a 403 would confirm it exists. Codes: not_found.
409Codes: idempotency_conflict, upload_session_consumed, conflict.
429Rate limited or out of credits. Retry after the interval in Retry-After. Codes: key_spend_limit, rate_limited, concurrency_limit, credits_exhausted.
500Codes: internal_error.
503Codes: processing_unavailable, dependency_unavailable.
504Codes: timeout.