Skip to content

GET /v1/organizations/{organizationId}/projects/count

Counts the projects the same filter would list. The count is read from the primary, so it is authoritative rather than replica-lagged.

photon.organizations.projects.count(input: CountProjectsInput, options?: RequestOptions): Promise<CountProjectsOutput>
import { Photon } from "@photon-ai/api";

const photon = new Photon({
  headers: { Authorization: `Bearer ${process.env.PHOTON_API_TOKEN}` },
});
const result = await photon.organizations.projects.count({
  path: {
    organizationId: "organizationId",
  },
});
{
  "count": 0
}

Parameters

Photon-VersionPhotonVersion

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

organizationIdstringrequired
createdAfterstring (date-time)
createdBeforestring (date-time)
querystring

Returns

200 The number of matching projects. ProjectCount

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

countintegerrequired

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.