Ingestion Latest Assets Summary

Bucket counts over the current record for every location โ€” the deduped twin of Assets Summary.

Why this exists rather than a flag on the plain summary

The cards have to describe the table beneath them. Latest Assets folds to one row per location; the plain summary counts every upload. Point the Records tab at one and the other and the two disagree by exactly the superseded records โ€” which reads as a counting bug rather than a wiring one.

So the pairing is the contract, and it is structural:

TableCards
GET /ingestions/assetsGET /ingestions/assets/summary
GET /ingestions/assets/latestGET /ingestions/assets/latest/summary

counted equals the total the deduped list reports for the same filters โ€” pinned by an integration test against the list method itself, the same way the plain pair is pinned.

Identical to the plain summary in every other respect

Same filter[...] grammar, same organisation scoping, same ?deforestation= view, same response shape, same 10 000 capped behaviour, and the same rejection of page / page_size / sort / include / fields[...] with a 400. Read Assets Summary for what each bucket means and how by_compliance counts the displayed verdict.

Two differences, both inherited from the list it pairs with:

rollup=false is a 400. The deduped grain is only defined under the fold, so there is no unfolded deduped set to count. rollup=true and rollup=task stay valid and inert, so a client can move from /ingestions/assets/summary?rollup=true to this path without editing its query.

rollup=unit counts supplier units. The dedupe stays on, and the fold moves to the supplier unit, matching List Latest Assets under rollup=unit. Send the same value to both so the cards describe the table.

filter[assets.task_id] bypasses the dedupe. Drilling into one upload counts its records whether or not a later upload replaced them โ€” a task is the historical record of what it ingested. The list does exactly the same, so the pair still agrees under that filter.

Response

{
  "meta": {},
  "links": { "self": "/ingestions/assets/latest/summary" },
  "data": {
    "type": "asset_summary",
    "attributes": {
      "counted": 604,
      "capped": false,
      "by_compliance": { "non_compliant": 71, "pending": 15, "compliant": 273, "excluded": 4, "not_assessed": 241 },
      "by_status": {
        "pending": 0, "staged": 0, "processing": 0, "validating": 0,
        "completed": 589, "completed_with_errors": 3, "skipped": 8, "failed": 4
      },
      "by_location_type": { "facility": 430, "shed": 28, "plot": 140 },
      "unlocated": 6,
      "not_assessable": 14
    }
  }
}

A record that a later upload replaced is in none of these buckets. counted is therefore lower than the plain summary's for the same filters by exactly the number of superseded records โ€” and the difference is the point, not a discrepancy.

Required scope: ingestions:read