Statuses
Ingestion tasks and their entities progress through a series of statuses during processing. Understanding these statuses helps you build correct polling logic, display appropriate UI states, and filter results effectively.
▶Task Status (overall_status)
overall_status)The task's overall_status represents the current phase of the entire ingestion job.
| Status | Description | What to do |
|---|---|---|
pending | Task created, processing has not started yet. | Wait — the system will begin shortly. |
validating | File is being validated and entities are being extracted. | Show a progress indicator. Poll GET /ingestions/:id/summary. |
staged | Entities validated and staged. Ready for batch processing (deforestation/emissions). | Call PUT /ingestions/assets?filter[assets.task_id]=eq:{id} with metrics: ["deforestation"] to trigger metrics. |
processing | Batch metrics (deforestation, emissions) are being computed by the analysis engine. | Poll GET /ingestions/:id/summary until status changes. Show progress bar using by_status counts. |
completed | All processing finished successfully. Results are available. | Fetch results via GET /ingestions/assets/:id and metrics endpoints. |
completed_with_errors | Processing finished but some entities failed or were skipped. Partial results are available. | Fetch results and review entity-level statuses to identify failures. |
skipped | All entities were skipped (e.g. no valid locations or commodity types found). | Show a message explaining no valid data was found. Check entity-level skip reasons. |
failed | Processing failed due to an error. | Retry the same task with PUT /ingestions/assets?filter[assets.task_id]=eq:{id}, which reuses the rows already staged rather than re-uploading. See Retrying a failed task. If it fails again, contact support. |
▶Task Status Flow
pending ──→ validating ──→ staged ──→ processing ──→ completed
│ │
│ ├──→ completed_with_errors (some entities failed/skipped)
│ ├──→ skipped (all entities skipped)
│ └──→ failed (processing error)
│ ↑
│ └── retry: PUT /ingestions/assets
│ ?filter[assets.task_id]=eq:{id}
│
└──→ failed (validation error / no entities found)
▶Retrying a failed task
A failed task keeps the rows it staged, so a retry does not need the file
again. Send the same reprocess call you would use on a staged task:
PUT /ingestions/assets?filter[assets.task_id]=eq:{asset_task_id}
Content-Type: application/json
{
"metrics": ["deforestation"]
}
Check the id in the response, and poll that one. The task is reused only
from staged and failed. From any other status the call still answers 202,
but it creates a new task and returns the new id, because the original
cannot be reclaimed: processing and validating mean a run is already in
flight, completed and completed_with_errors mean the work is done, pending
has nothing staged yet, and skipped produced no usable rows.
Both outcomes are a 202, so tell them apart from the response rather than
assuming:
attributes.message ends with | Meaning |
|---|---|
processing triggered on the existing task | The task you named was reused. The id matches the one you sent. |
processing triggered on a new task | The task you named could not be reused. The id is a new task — poll that one; the original is finished and will not change again. |
A retry resumes work already submitted rather than repeating it, so a batch
that was part-way through is not recomputed or re-billed from scratch. If none
of the staged rows survive (a task that failed before its batch was submitted
has its rows cleared), the call answers 400 with No staged assets match the given filters — re-ingest from the file in that case.
▶When to Filter by Task Status
Use filter[overall_status] on GET /ingestions/tasks to find tasks in specific states:
| Use case | Filter |
|---|---|
| Find tasks ready for processing | filter[overall_status]=eq:staged |
| Find tasks still running | filter[overall_status]=eq:processing |
| Find completed tasks with results | filter[overall_status]=eq:completed |
| Find tasks that completed with partial failures | filter[overall_status]=eq:completed_with_errors |
| Find tasks that need attention | filter[overall_status]=eq:failed |
▶Entity Status (status)
status)Each entity (row) within a task has its own status tracking its individual progress.
| Status | Description | When it is set |
|---|---|---|
pending | Entity inserted but location matching has not started. | Immediately after task creation / file parsing. |
staged | Entity matched to a geocoded location successfully. | During validation phase — the entity has coordinates and is ready for metrics. |
processing | Batch metrics have been submitted for this entity's location. | When process is called and the batch is sent to the analysis engine. |
completed | Metrics computed and resources (facility, plots, sheds) linked. | After the analysis engine returns results and resources are linked. |
skipped | Entity excluded from processing. | When the entity has no resolved location or no valid commodity type. |
failed | Processing failed for this entity's batch. | When the analysis engine reports a failure for the batch this entity was submitted in. Each plot supplier unit is its own batch, so one unit's failure leaves the others' entities alone. |
▶Entity Status Flow
pending ──→ staged ──→ processing ──→ completed
│ │
│ ├──→ skipped (batch skipped)
│ └──→ failed (batch error)
│
└──→ skipped (no location or no commodity)
▶Common Skip Reasons
Entities are skipped (not failed) when:
- No location found — the geocoder could not resolve the input address/coordinates to a valid location.
- No commodity type — the entity's commodity type is null or
unknown, which is required for metrics. - Batch skipped — the analysis engine determined no processing was needed (e.g. location already covered by a recent analysis).
▶When to Filter by Entity Status
Use filter[status] on GET /ingestions/assets/:id to focus on specific entities:
| Use case | Filter |
|---|---|
| Show only successfully processed entities | filter[status]=eq:completed |
| Find entities that need review | filter[status]=eq:failed |
| Find entities excluded from processing | filter[status]=eq:skipped |
| Check what is still in progress | filter[status]=eq:processing |
▶Monitoring Progress with the Summary Endpoint
GET /ingestions/:id/summary returns a breakdown of entity counts by status and confidence level:
{
"data": {
"type": "ingestion_summary",
"id": "<task-id>",
"attributes": {
"overall_status": "processing",
"total": 42,
"by_status": {
"pending": 0,
"staged": 0,
"processing": 12,
"completed": 28,
"skipped": 1,
"failed": 1
},
"by_confidence_level": {
"high": 30,
"medium": 8,
"low": 4
}
}
}
}
▶Polling Strategy
- Poll
GET /ingestions/:id/summaryat a regular interval (e.g. every 3–5 seconds). - Compute progress as:
(completed + skipped + failed) / total. - Stop polling when
overall_statusiscompleted,skipped, orfailed. - Display
by_statuscounts to show users how many entities are in each phase.
▶Progress Bar Example
Total: 42 entities
████████████████████░░░░░ 28 completed, 12 processing, 1 skipped, 1 failed
▶Relationship Between Task and Entity Status
The task's overall_status is derived from the aggregate state of its entities:
| Entity states | Resulting task status |
|---|---|
| All entities completed | completed |
| All entities skipped | skipped |
| All entities failed | failed |
| Mix of completed, failed, skipped | completed_with_errors |
| Any entities still processing | processing |
A task with overall_status: completed_with_errors contains a mix of successful and unsuccessful entities. Always check entity-level status when you need per-supplier accuracy.
▶Filtering Completed Results
Once a task reaches completed, combine status and confidence filters to get the most relevant data:
GET /ingestions/assets/:id?filter[status]=eq:completed&filter[validation.confidence_level]=eq:high&include=validation,normalised_data
This returns only successfully processed, high-confidence entities — ideal for display in a results table or map visualization.