03 Add Core And EUDR Assessments
โถStep 3: Add Core + EUDR Assessments
Filter-scoped post-hoc validation via PUT /ingestions/assets. Adds
core confidence + the four EUDR add-ons (art9, art10, hazard,
infrastructure) to the locations bound to this task โ same
cache-aware runner the DDS POST endpoint uses, just keyed by filter
rather than by asset_task_id.
โถWhat this step does
It runs validation after the fact against the plots that step 1
staged. include_core produces the confidence/flags row that scores each
location; include_eudr adds the four regulatory add-ons (art9,
art10, hazard, infrastructure). The runner is cache-aware โ for each
requested group it reuses an existing assessment when one already covers
that location (and check_* snapshot), and only calls out for a fresh
assessment on a miss. The response acknowledges what matched and enrolled;
detailed counters land on the log line.
โถWhy it's needed
Step 1 deliberately skipped validation, so the plots exist but carry no
core score and no EUDR add-ons โ the results endpoint (step 4) would
show every assessments.* slot as null. This step is where the
upload-first flow pays for the validation it deferred: without it, there
is nothing for the table/map views to show under assessments, and no
EUDR risk basis (art9 deforestation values) for a compliance decision.
It is scoped by filter[assets.task_id] so it hits exactly the plots from
this upload and no others.
โถWhy opt in here vs at upload
Running assessments post-hoc โ rather than in the POST body โ is what lets
you review the staged geometry first and decide what's worth validating.
You can request core alone, or core + EUDR, and re-issue the PUT to
broaden scope later; the cache means already-covered locations don't
re-run. If you never needed the review gap, sending assessments on the
original upload (Quick Ingestion) collapses steps 1 and 3 into one.
โถRequest
PUT /ingestions/assets?filter[assets.task_id]=eq:{plot_lifecycle_task_id}
Body shape:
{
"assessments": {
"include_core": true,
"include_eudr": true,
"check_water_access": true,
"check_road_access": true
}
}
include_core: trueโ opt in to thecoreconfidence/flags row. Ignored at upload time on POST when omitted (the new default), so you must opt in explicitly here when running post-hoc.include_eudr: trueโ shorthand for the four add-ons.include_art9/include_art10/include_hazard/include_infrastructureare an advanced override;include_eudrcannot turn an individual group off (the union wins).check_water_access/check_port_proximity/check_road_accessโ cross-cutting access flags. Recorded on both thecoreandinfrastructurerows so the cache can decide later whether a row covers a narrower request.
โถResponse (200 or 202)
See the Examples tab for the full envelope. Key fields:
data.idโ the sameasset_task_idas steps 1 and 2 (PUT reuses the existing task when the filter resolves to a single one).data.attributes.messageโ human-readable summary, e.g."1 entities matched filters; assessments enrolled (0 cache hits, 5 re-runs)".meta.totalโ number of asset entities the filter resolved to.
Detailed cache counters (cache_hits / cache_misses /
sco2_api_calls / pivots_inserted) are emitted on the structured
log line for the request, not the response body โ grep
process locations (direct): assessment run in the FM API logs to
see what the runner actually did.
โถCache semantics
For each requested group, the runner checks for an existing
assessment covering that location and assessment type (and, for
core and infrastructure, the check_* snapshot). A hit
short-circuits to granting visibility; a miss runs a fresh assessment with
normalize_input=false and stores a new assessment.
โถErrors
| Status | Code | Cause |
|---|---|---|
| 400 | VALIDATION_ERROR | Empty assessments block (no truthy include_*) and no metrics/tags. |
| 401 | MISSING_API_KEY / INVALID_API_KEY | Auth missing or invalid |
| 403 | FORBIDDEN | Filter resolves to a task in a different org |
| 404 | NOT_FOUND | assets.task_id doesn't exist for this caller |
โถNext Step
โ Step 4: Get Plot Results Table โ GET /ingestions/assets/{id}?include=normalised_data,assessments