Ingestion Assets Summary
Bucket counts over every record matching the active filters โ not just the current page.
A page cannot answer "how much of this portfolio is non-compliant?": meta.total is capped at 10 000, and is absent entirely in cursor mode. This counts the whole filtered set server-side instead.
Takes the same filter[...] grammar, organisation scoping, ?rollup= and ?deforestation= semantics as List All Assets. page, page_size, sort, include and fields[...] are rejected with a 400 rather than silently ignored โ none has a meaning on a bucket count.
โถ?rollup=true changes what a row is
?rollup=true changes what a row isWith rollup=true (or its explicit spelling rollup=task) a plot task folds to one row, so the summary counts that task once, not once per plot. counted therefore equals the total the list reports for the same grain โ pinned by an integration test against the list method itself.
With rollup=unit the summary counts one row per supplier unit, the same rows List All Assets returns under rollup=unit. A plot task with three units counts three times. Each row's by_compliance bucket is its own unit's verdict, read from the per-unit deforestation summary; a task that has no per-unit rows at all uses its task verdict when it has one unit, and counts each unit as not_assessed when it has several. counted equals the list's total at that grain.
โถResponse
{
"meta": {},
"links": { "self": "/ingestions/assets/summary" },
"data": {
"type": "asset_summary",
"attributes": {
"counted": 851,
"capped": false,
"by_compliance": { "non_compliant": 97, "pending": 21, "compliant": 381, "excluded": 6, "not_assessed": 346 },
"by_status": {
"pending": 0, "staged": 0, "processing": 0, "validating": 0,
"completed": 830, "completed_with_errors": 4, "skipped": 12, "failed": 5
},
"by_location_type": { "facility": 611, "shed": 40, "plot": 190 },
"unlocated": 10,
"not_assessable": 20
}
}
}
| Field | Meaning |
|---|---|
counted | Records the buckets cover โ the whole filtered set unless capped. |
capped | The filtered set exceeded the summary cap (10 000). Every bucket is then null. |
by_compliance | Counts by the status each row displays, in five buckets that sum to counted. See below. |
by_status | Counts by the processing status each row displays โ see below. |
by_location_type | Counts by resolved location type. |
unlocated | Records that resolved no location (the filter[has_location]=eq:false set). |
not_assessable | Unlocated or skipped. A union, not a sum. |
Under ?rollup=true a folded plot task counts as unlocated once any of its matched plots resolved no location โ which is what filter[has_location]=eq:false selects at that grain, since it renders staged_location_id IS NULL per plot. The bit is one boolean per task, so this parity cannot double-count.
โถby_compliance counts the displayed verdict
by_compliance counts the displayed verdictThe buckets report what each row shows, which keeps them reconcilable with the table. Each row lands in exactly one of non_compliant, pending, compliant, excluded and not_assessed, so the five sum to counted. filter[compliance] selects on the same verdict, so each bucket equals that value's filtered count:
- a rolled row reads the task-grain roll-up, the same source
?include=deforestationhydrates from; - an unrolled row reads its own location's roll-up.
โถTwo further caveats
capped withholds the buckets rather than estimating them. Above the cap the matched set is bounded without an ordering, so a split over it would describe an arbitrary prefix โ a wrong number, not an approximate one. Narrow the filters and retry.
by_status is a displayed-grain bucket too. A rolled row reports its task's overall_status, while filter[status] matches entity status at plot grain, so the two select different sets on a task whose plots disagree. It also carries validating and completed_with_errors, which exist only on the task status enum โ so those can only be non-zero for rolled rows.
by_location_type can sum to less than counted minus unlocated โ a record that never resolved a location is in no type bucket, and neither is one whose location_type is null (the column is nullable).
Required scope:
ingestions:read