List resources
List resources: listResources in the TypeScript, Python, Rust and Go clients.
GET /v1/projects/{id}/platforms/resources
Lists the project's resources, oldest first, including retired ones unless state filters them out. Filter by type, by enabled ability and by comma-separated state. Lifecycle states are unallocated, active and retired; active means owned and non-retired, not provider-confirmed readiness. Every VoIP resource includes detail.activationState: activating or active, defaulting to active without owner-matched saved state. state=active includes numbers still activating. Requires the platforms:read permission bound to the project resource in the path.
photon.projects.platforms.listResources(input: ListResourcesInput, options?: RequestOptions): Promise<ListResourcesOutput>photon.projects.platforms.list_resources(input: ListResourcesInput, *, options: RequestOptions | None = None) -> models.ResourcePageclient.list_resources(id: String, params: Option<ListResourcesParams>).await -> Result<ResponseValue<types::ResourcePage>, Error<ListResourcesError>>client.Projects.Platforms.ListResources(ctx context.Context, params *ListResourcesParams, opts ...RequestOption) (*ResourcePage, 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.listResources({
path: {
id: "id",
},
});import os
from photon_api import Photon
from photon_api.rpc_generated import ListResourcesInput
photon = Photon(headers={"Authorization": f"Bearer {os.environ['PHOTON_API_TOKEN']}"})
result = photon.projects.platforms.list_resources(
ListResourcesInput.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_resources("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.ListResources(ctx, &photonapi.ListResourcesParams{
ID: "id",
})
if err != nil {
return err
}
_ = result{
"nextPageToken": "string",
"resources": [
{
"abilities": [
"string"
],
"createdAt": "2026-01-01T00:00:00.000Z",
"detail": {},
"projectId": "string",
"resourceId": "string",
"retiredAt": "2026-01-01T00:00:00.000Z",
"state": "unallocated",
"type": "string",
"updatedAt": "2026-01-01T00:00:00.000Z"
}
]
}Parameters
Selects the API contract date. Without it, the request is served as 2026-07-01.
Comma-separated lifecycle states: unallocated, active or retired. active selects all owned, non-retired resources, including numbers whose detail.activationState is activating.
Returns
200 A page of the project's resources. ResourcePage
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.