> ## Documentation Index
> Fetch the complete documentation index at: https://docs.photon.codes/docs/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Use Stable documentation by default. Honor an explicit Beta request or a URL under /docs/beta/. If the requested version conflicts with the installed CLI package or API origin, clarify the target before writing integration code.
> Pages under /docs/beta/ document Beta; other product pages document Stable. Keep the CLI package, commands, API origin, and credentials within the selected version. State the documentation version in your answer.
> For MCP search, always pass version: Stable or version: Beta. Unfiltered search mixes both versions. For filesystem reads, keep Beta queries under /beta/ and exclude /beta/ from Stable queries; discover paths before reading them.
> The public docs base is https://photon.codes/docs. Convert MCP page paths to public URLs under that base, preserving /beta/ when present. Read https://photon.codes/docs/skill.md for version selection and https://photon.codes/docs/llms.txt for the version indexes.

# List operations

> List operations: listOperations in the TypeScript, Python and Rust 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.

<Tabs>
  <Tab title="TypeScript">
    ```typescript TypeScript theme={null}
    photon.projects.platforms.listOperations(input: ListOperationsInput, options?: RequestOptions): Promise<ListOperationsOutput>
    ```
  </Tab>

  <Tab title="Python">
    ```python Python theme={null}
    photon.projects.platforms.list_operations(input: ListOperationsInput) -> models.OperationPage
    ```
  </Tab>

  <Tab title="Rust">
    ```rust Rust theme={null}
    client.list_operations(id: String, params: Option<ListOperationsParams>).await -> Result<ResponseValue<types::OperationPage>, Error<ListOperationsError>>
    ```
  </Tab>
</Tabs>

<RequestExample>
  ```typescript TypeScript theme={null}
  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",
    },
  });
  ```

  ```python Python theme={null}
  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",
          },
      })
  )
  ```

  ```rust Rust theme={null}
  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();
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "nextPageToken": "string",
    "operations": [
      {
        "cancellable": true,
        "createdAt": "2026-01-01T00:00:00.000Z",
        "detail": {},
        "endedAt": "2026-01-01T00:00:00.000Z",
        "error": {
          "code": "string",
          "detail": "string"
        },
        "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"
      }
    ]
  }
  ```
</ResponseExample>

## Parameters

<ParamField path="id" type={"string"} required />

<ParamField query="endedAfter" type={"string (date-time)"} />

<ParamField query="pageSize" type={"integer"} />

<ParamField query="pageToken" type={"string"} />

<ParamField query="resourceId" type={"string"} />

<ParamField query="state" type={"string"} />

<ParamField query="type" type={"OperationType"} />

## Returns

**`200`** A page of the project's operations. OperationPage

<ResponseField name="nextPageToken" type={"string"} />

<ResponseField name="operations" type={"array of Operation"} required />


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.