6 Get Assets with Metrics

Step 6: Get Assets with Metrics

Retrieve the processed entity results. This is the base data for the combined visualization. Use steps 6aโ€“6d to fetch facilities, plots, and metrics data, then join them together for the full table and map view.

What this step does

It re-reads the entity rows for the task โ€” same shape as Step 3, now that processing has completed โ€” with normalised_data and assessments included. These entities are the spine of the visualization: the row set you render in the table, onto which the location geometries (6a/6b) and metric values (6c/6d) are joined.

Why it's needed

The processed metrics live on separate resources (/metrics/*) and the geometries on the locations endpoints โ€” none of them is the entity list itself. This step fetches that entity list so the later joins have something to attach to: each metric carries a facility_id / shed_id / plot_id that matches back to these entities and their locations. It is the base table the combined visualization builds on top of.

When you can skip it

If you only need the aggregate metrics or the map โ€” not a per-entity table โ€” you can go straight to the locations and metrics reads (6aโ€“6e) scoped by filter[assets.task_id]. Step 7's combined visualization actually issues those reads for you, so this explicit call is mainly for when you want the entity rows in hand yourself.

Request

GET /ingestions/assets/:id?include=normalised_data,assessments

Additional Endpoints for Visualization

To build the full visualization, call these endpoints with the same process_task_id:

StepEndpointData
6aGET /locations/facilities?filter[assets.task_id]=eq:{id}Facility polygons for map
6bGET /locations/plots?filter[assets.task_id]=eq:{id}Plot polygons for map
6cGET /metrics/sheds/deforestation?filter[assets.task_id]=eq:{id}Deforestation metrics
6dGET /metrics/sheds/emissions?filter[assets.task_id]=eq:{id}Emissions metrics

Data Joining

  1. Fetch assets (this step), facilities (6a), plots (6b), deforestation (6c), emissions (6d)
  2. Metrics include attributes.facility_id, attributes.shed_id, and attributes.plot_id for joining
  3. Match attributes.facility_id to facility IDs from location endpoints
  4. Metric ID format: {shed_id}:{monitoring_end_date}
  5. Each resource includes links for direct navigation to related resources

Combined Assets Table

ColumnSource
Namenormalised_data.normalized_name
Locationnormalised_data.normalized_country + lat/lng
Commoditynormalised_data.commodity_type
Confidencevalidation.confidence_level
Deforestation Risknoncompliance_area / area from deforestation metrics
Forest Area (ha)forest_area from deforestation metrics
LUC Emissionsluc from emissions metrics
Non-LUC Emissionsnonluc from emissions metrics

Next Step

โ†’ Step 7: Combined Visualization (chains 6aโ€“6d automatically)