Skip to content

GET /v1/projects/{id}/attachments/{attachmentId}/content

Downloads an Attachment's bytes. If unavailable after ten seconds, returns ATTACHMENT_NOT_READY with Retry-After: 5.

photon.projects.downloadAttachment(input: DownloadAttachmentInput, options?: RequestOptions): Promise<DownloadAttachmentOutput>
import { Photon } from "@photon-ai/api";

const photon = new Photon({
  headers: { Authorization: `Bearer ${process.env.PHOTON_API_TOKEN}` },
});
const result = await photon.projects.downloadAttachment({
  path: {
    attachmentId: "attachmentId",
    id: "id",
  },
});

Parameters

attachmentIdstringrequired
idstringrequired

Returns

200 The Attachment's raw file bytes. Content-Type identifies the media type of the response. The */* body as bytes.

Headers: Content-Disposition. The raw response carries these headers; see Raw responses.