Skip to content

GET /v1/projects/{projectId}/metrics/backfill

Returns historical metrics update progress. Completion reflects lastVerifiedAt; queries remain available during updates.

photon.projects.getMessageMetricsBackfill(input: GetMessageMetricsBackfillInput, options?: RequestOptions): Promise<GetMessageMetricsBackfillOutput>
import { Photon } from "@photon-ai/api";

const photon = new Photon({
  headers: { Authorization: `Bearer ${process.env.PHOTON_API_TOKEN}` },
});
const result = await photon.projects.getMessageMetricsBackfill({
  path: {
    projectId: "projectId",
  },
});
{
  "failedWrites": 0,
  "lastVerifiedAt": null,
  "processedWrites": 0,
  "state": "disabled",
  "version": "2026-01-01"
}

Parameters

projectIdstringrequired
x-photon-versionstring (date)

API schema date. Defaults to the latest served version; resolves to the latest served date on or before this value.

Returns

200 Project-scoped backfill progress. GetMessageMetricsBackfillResponse

failedWritesintegerrequired
lastVerifiedAtstring (date-time) | nullrequired
processedWritesintegerrequired
stateMessageMetricsBackfillStaterequired
versionstring (date)required