Sign inGet Started

Download an attachment

GET
/v1/amb/attachments/{attachment_id}/content
bird amb attachments download <attachment-id>

Downloads an attachment by its aat_ ID and returns its decrypted bytes with the media type the attachment declares. Bird checks the bytes only for a declared PNG, JPEG, GIF or WebP type: a declared raster type the bytes do not match returns application/octet-stream. Any other declared type is returned as declared, without a check that the bytes match it. A missing or malformed type returns application/octet-stream. The Content-Disposition header carries the original filename.

Bird serves a received attachment from its own copy when it has one, including after expires_at; otherwise it downloads the attachment from Apple. An unknown ID returns 404. An attachment past expires_at that Apple confirms it no longer holds returns 410; any other failure to download from Apple returns 503, and the request can be retried.

Parameter

attachment_idstring

Attachment identifier. Starts with aat_.

Weiter mit der Dokumentation, Anleitungen und Beispielen zu diesem Thema.