List operations
List operations: listOperations in the TypeScript, Python, Rust and Go clients.
GET /v1/projects/{id}/platforms/operations
Lists the project's operations using the same operation representation as creation and GET. The API includes detail.setupUrl only with platforms:write for this project. Results are oldest first — every provision and release it has ever asked for, including the ones still running. This is the entire in-flight view: a resource only appears once it is real, so nothing half-built shows up in the resource list and nothing in flight is missing from this one. Filter by resourceId to get one resource's whole history, which for a pooled line is every tenure this project has had on it. state is comma-separated; type accepts one operation type and an absent filter means everything, including failed and cancelled operations. endedAfter keeps only operations that finished after that instant, so what failed or was withdrawn recently is one short page. Requires the platforms:read permission bound to the project resource in the path.
photon.projects.platforms.listOperations(input: ListOperationsInput, options?: RequestOptions): Promise<ListOperationsOutput>photon.projects.platforms.list_operations(input: ListOperationsInput, *, options: RequestOptions | None = None) -> models.OperationPageclient.list_operations(id: String, params: Option<ListOperationsParams>).await -> Result<ResponseValue<types::OperationPage>, Error<ListOperationsError>>client.Projects.Platforms.ListOperations(ctx context.Context, params *ListOperationsParams, opts ...RequestOption) (*OperationPage, error)import { Photon } from "@photon-ai/api";
const photon = new Photon({
headers: { Authorization: `Bearer ${process.env.PHOTON_API_TOKEN}` },
});
const result = await photon.projects.platforms.listOperations({
path: {
id: "id",
},
});import os
from photon_api import Photon
from photon_api.rpc_generated import ListOperationsInput
photon = Photon(headers={"Authorization": f"Bearer {os.environ['PHOTON_API_TOKEN']}"})
result = photon.projects.platforms.list_operations(
ListOperationsInput.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_operations("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.Platforms.ListOperations(ctx, &photonapi.ListOperationsParams{
ID: "id",
})
if err != nil {
return err
}
_ = result{
"nextPageToken": "string",
"operations": [
{
"cancellable": true,
"createdAt": "2026-01-01T00:00:00.000Z",
"detail": {},
"endedAt": "2026-01-01T00:00:00.000Z",
"error": {
"code": "CHARGE_REFUSED",
"remediation": {
"action": "Check the payment method in Billing, then request the purchase again."
},
"status": 402,
"title": "Charge Refused",
"type": "https://photon.codes/docs/problems/charge-refused"
},
"operationId": "string",
"projectId": "string",
"reason": "charge_refused",
"resourceId": "string",
"resourceType": "string",
"startedAt": "2026-01-01T00:00:00.000Z",
"state": "pending",
"type": "resource.provision",
"updatedAt": "2026-01-01T00:00:00.000Z"
}
]
}Parameters
Selects the API contract date. Without it, the request is served as 2026-07-01.
Returns
200 A page of the project's operations. OperationPage
Headers: ETag, Photon-Version. The raw response carries these headers; see Raw responses.
304 Not Modified. Sent only when If-None-Match matches the ETag of an earlier 200 response for the same representation; no body. No body.
Headers: ETag, Photon-Version. The raw response carries these headers; see Raw responses.