Skip to main content
Version: 1.0.0

Files API

Attachment storage. A file belongs to an owner resource ARN (e.g. atl:inventory:paris:item/01J…). Reading requires <service>.<type>.read on the owner, uploading and deleting <service>.<type>.update (project resources: projects.file.read / projects.file.write). Permissions missing from the catalogue are denied. The owner site (atl:settings:<site>:site/<site>) is always passed to authz as a parent.

Delegated authorization: when that check is denied (403, not on authz errors) and the owner service has a delegate (FILES_DELEGATES, e.g. borrowing=http://borrowing:8087,inventory=http://inventory:8085), files calls the internal endpoint POST <delegate>/internal/v1/attachments/authorize with {"owner": "<ARN>", "parents": [...], "action": "read" | "write"} and the caller X-Atl-Principal token (timeout FILES_DELEGATE_TIMEOUT, no caching). 204 allows; 401/403/404 deny (the original 403 is returned); any other answer or a timeout answers 503. Delegates: borrowing sheets (atl:borrowing:<site>:sheet/<id>: borrower and creator), inventory issues (atl:inventory:<site>:issue/<id>: reporter, handlers). The internal endpoints are not routed by the gateway.

Uploads are sniffed (the client content type is ignored). Raster images (jpeg, png, gif, webp, heic) are converted to webp (metadata/EXIF removed, orientation applied, longest side capped) with a thumbnail; SVG is sanitised with an allow-list; pdf, csv, txt, dst, exp, pes and jef are stored as is.

Authentication​

Security Scheme Type:

apiKey

Cookie parameter name:

atl_session