Skip to content

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>
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",
  },
});
{
  "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

Photon-VersionPhotonVersion

Selects the API contract date. Without it, the request is served as 2026-07-01.

idstringrequired
endedAfterstring (date-time)
pageSizeinteger
pageTokenstring
resourceIdstring
statestring
typeOperationType

Returns

200 A page of the project's operations. OperationPage

Headers: ETag, Photon-Version. The raw response carries these headers; see Raw responses.

nextPageTokenstring
operationsarray of Operationrequired

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.