List attachments
List attachments: listAttachments in the TypeScript, Python, Rust and Go clients.
GET /v1/projects/{id}/attachments
Lists the Project's Attachment metadata, with optional time filters. An Attachment can be absent until its upload finishes, which advances its updatedAt; follow changes with updatedSince.
photon.projects.listAttachments(input: ListAttachmentsInput, options?: RequestOptions): Promise<ListAttachmentsOutput>photon.projects.list_attachments(input: ListAttachmentsInput, *, options: RequestOptions | None = None) -> models.AttachmentPageclient.list_attachments(id: String, params: Option<ListAttachmentsParams>).await -> Result<ResponseValue<types::AttachmentPage>, Error<ListAttachmentsError>>client.Projects.ListAttachments(ctx context.Context, params *ListAttachmentsParams, opts ...RequestOption) (*AttachmentPage, error)import { Photon } from "@photon-ai/api";
const photon = new Photon({
headers: { Authorization: `Bearer ${process.env.PHOTON_API_TOKEN}` },
});
const result = await photon.projects.listAttachments({
path: {
id: "id",
},
});import os
from photon_api import Photon
from photon_api.rpc_generated import ListAttachmentsInput
photon = Photon(headers={"Authorization": f"Bearer {os.environ['PHOTON_API_TOKEN']}"})
result = photon.projects.list_attachments(
ListAttachmentsInput.model_validate({
"path": {
"id": "id",
},
})
)use photon_ai_api::{Credential, PhotonClientBuilder, SecretString};
let token = std::env::var("PHOTON_API_TOKEN")?;
let client = PhotonClientBuilder::new()
.credential("accountServiceKey", Credential::Bearer(SecretString::from(token)))
.build()?;
let result = client
.list_attachments("id".to_owned(), None)
.await
.map_err(|error| format!("{error:?}"))?
.into_inner();import (
"context"
"os"
photonapi "github.com/photon-hq/api/packages/go"
)
ctx := context.Background()
client := photonapi.NewClient(photonapi.WithAPIKey(os.Getenv("PHOTON_API_TOKEN")))
result, err := client.Projects.ListAttachments(ctx, &photonapi.ListAttachmentsParams{
ID: "id",
})
if err != nil {
return err
}
_ = result{
"items": [
{
"contentType": "string",
"createdAt": "2026-01-01T00:00:00Z",
"filename": "string",
"id": "string",
"metadata": {},
"projectId": "string",
"sizeBytes": 1,
"updatedAt": "2026-01-01T00:00:00Z"
}
],
"nextPageToken": "string"
}Parameters
Exclusive upper bound on createdAt, RFC 3339. Cannot combine with updatedAt bounds.
Inclusive lower bound on createdAt, RFC 3339. Cannot combine with updatedAt bounds.
Direction along orderBy; desc, the default, is newest first
Sort timestamp; defaults to the filtered timestamp, otherwise created_at. Must match the time bounds.
Items per page. A value above 100 returns at most 100 items.
Token from nextPageToken. Keep the same Project and query.
Exclusive upper bound on updatedAt, RFC 3339. Cannot combine with createdAt bounds.
Inclusive lower bound on updatedAt, RFC 3339. Cannot combine with createdAt bounds.
Returns
200 A page of Project Attachments in the requested order. AttachmentPage
Continue with this token, even if items is empty. Omitted when no more pages remain.