Skip to main content

Import Measurement Observations

Import Measurement Observations​

Observation imports are bounded to 5,000 rows or 10 MB per request. HTTP 202 only means the import request was processed; callers must inspect every row result.

First create the project and series and initialize an authenticated SDK client. Replace the sample slug and timestamp with a real point in your series. Start with one row.

const result = await client.admin.measurement.projects.submitObservations(
"checkout-runway",
{
rows: [{
seriesSlug: "completed-work",
observedAt: "2026-07-01T00:00:00Z",
value: 42,
idempotencyKey: "completed-work-2026-07-01",
}],
},
);

CSV imports use the same row-result contract:

const csv = "seriesSlug,observedAt,value\ncompleted-work,2026-07-01T00:00:00Z,42\n";
const result = await client.admin.measurement.projects.importCSVString(
"checkout-runway",
csv,
1,
);

Fail the workflow if the response row count differs from the submitted row count, a valid import row has success: false, or a successful row is missing observationUuid. Failed rows preserve problem fields such as title and detail.

Expected result: the accepted row has an observation UUID; rejected rows have problem details. Keep the import ID for the Measure import review. Correct rejected rows while preserving intended idempotency identities; do not blindly resubmit successful rows. Then run a forecast.