The Admin API provides endpoints for triggering GeoSentinel’s data ingestion scripts and incident lifecycle maintenance as non-blocking background tasks. Each POST endpoint immediately returns aDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/danizd/GeoSentinel/llms.txt
Use this file to discover all available pages before exploring further.
202 Accepted response containing a job_id UUID, which you can then poll with the status endpoint until the job reaches completed or failed. All job state is tracked in a shared in-memory JOBS dictionary protected by an asyncio.Lock, and the API refuses to start a second instance of the same job while one is already running — returning 409 Conflict with the ID of the existing job instead.
POST /v1/admin/run/{source} — Run a Single Ingestor
Launches one of the five data ingestor scripts as a background subprocess. The source path parameter determines which script is executed.
The ingestor to run. Must be one of:
| Value | Script | Description |
|---|---|---|
usgs | run_usgs.py | USGS earthquake feed ingestion |
firms | run_firms.py | NASA FIRMS active fire ingestion |
gdelt | run_gdelt.py | GDELT conflict event ingestion |
acled | run_acled.py | ACLED armed conflict event ingestion |
clustering | run_clustering.py | Spatial incident clustering |
JobResponse on success. Returns 400 Bad Request if source is not one of the valid values above. Returns 409 Conflict if a job with the same source name is already running.
POST /v1/admin/run/lifecycle — Run Lifecycle Job
Triggers the incident lifecycle maintenance job, which marks stale incidents and resets incidents from updated status back to open. This job runs in-process (not as a subprocess) against the PostgreSQL database directly.
Returns 202 Accepted with a JobResponse. Returns 409 Conflict if the lifecycle job is already running.
POST /v1/admin/run/all — Run All Jobs
Runs a full pipeline as a single orchestrated background task: all four ingestors (usgs, firms, gdelt, acled) are executed in parallel using asyncio.gather, followed sequentially by the clustering job, and then the lifecycle job. The aggregated metrics from all stages are summed and stored in the job result.
Returns 202 Accepted with a JobResponse. Returns 409 Conflict if an all job is already running. Individual ingestor failures within the pipeline are captured per-source in the result.details object and do not abort the remaining stages.
GET /v1/admin/run/status/{job_id} — Poll Job Status
Retrieves the current state of a previously submitted job by its UUID.
The UUID returned in the
job_id field of the JobResponse from any POST endpoint.JobStatusResponse. Returns 404 Not Found if no job with the given ID exists in the current server session.
Response schemas
JobResponse — 202 from all POST endpoints
The name of the job that was started (e.g.
"usgs", "lifecycle", "all").Always
"running" in the immediate 202 response.ISO 8601 UTC timestamp of when the job was registered (e.g.
"2025-01-15T12:00:00+00:00").UUID v4 string to use when polling
GET /v1/admin/run/status/{job_id}.JobStatusResponse — 200 from GET status endpoint
The UUID of this job record.
The name of the job (e.g.
"usgs", "firms", "clustering", "lifecycle", "all").Current state of the job. One of:
"running"— the background task is still executing"completed"— the script exited with return code 0 and metrics were parsed"failed"— the script raised an exception or exited with a non-zero return code
ISO 8601 UTC timestamp of when the job started.
ISO 8601 UTC timestamp of when the job completed or failed.
null while still running.Wall-clock duration of the job in whole seconds.
null while still running.Parsed metrics from the job’s stdout output once completed.
null while running or if the job failed. Contains the following integer fields:Error message captured from the script’s stderr or the Python exception message if
status is "failed". null otherwise.Full polling example
All job state is stored in the server process’s memory. If the GeoSentinel backend is restarted, all job history — including running, completed, and failed jobs — is permanently lost. Any
job_id obtained before a restart will return 404 Not Found.