Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/danizd/geoviable/llms.txt

Use this file to discover all available pages before exploring further.

The /layers/status endpoint returns the current state of all 7 environmental data layers that back the spatial analysis. For each layer it reports when it was last updated, whether the update succeeded, and how many records are currently loaded in the PostGIS database. This is useful for verifying data availability before running an analysis or diagnosing unexpected results. Method and path: GET /api/v1/layers/status

Request

No parameters. No request body.
curl https://geoviable.movilab.es/api/v1/layers/status

Response — 200 OK

layers
array
Array of 7 status objects, one per environmental layer, in a fixed order matching the analysis output.
last_global_update
string | null
The most recent last_updated timestamp across all 7 layers. Represents the freshness of the dataset as a whole. null if no layer has ever been updated.

Response Example

{
  "layers": [
    {
      "name": "red_natura_2000",
      "display_name": "Red Natura 2000",
      "last_updated": "2026-04-01T03:12:45Z",
      "status": "success",
      "records_count": 1247
    },
    {
      "name": "zonas_inundables",
      "display_name": "Zonas inundables (SNCZI)",
      "last_updated": "2026-04-01T03:15:30Z",
      "status": "success",
      "records_count": 3891
    },
    {
      "name": "dominio_publico_hidraulico",
      "display_name": "Dominio Público Hidráulico",
      "last_updated": "2026-04-01T03:18:02Z",
      "status": "success",
      "records_count": 5623
    },
    {
      "name": "vias_pecuarias",
      "display_name": "Vías pecuarias",
      "last_updated": "2026-04-01T03:20:15Z",
      "status": "success",
      "records_count": 342
    },
    {
      "name": "espacios_naturales_protegidos",
      "display_name": "Espacios Naturales Protegidos",
      "last_updated": "2026-04-01T03:22:30Z",
      "status": "success",
      "records_count": 89
    },
    {
      "name": "masas_agua_superficial",
      "display_name": "Masas de agua superficiales",
      "last_updated": "2026-04-01T03:25:00Z",
      "status": "success",
      "records_count": 2156
    },
    {
      "name": "masas_agua_subterranea",
      "display_name": "Masas de agua subterráneas",
      "last_updated": "2026-04-01T03:27:00Z",
      "status": "success",
      "records_count": 45
    }
  ],
  "last_global_update": "2026-04-01T03:27:00Z"
}

Status Values

ValueMeaning
successThe most recent data ingestion run completed successfully.
failedThe most recent update attempt errored. Check the error_message column in the layer_update_log database table for the full error.
no_dataThis layer has never been through an update cycle. No records will be present.

Use Case

Call this endpoint to verify that all layers are loaded and up to date before running your first analysis. A layer with status: "no_data" or records_count: 0 will return affected: false for every polygon, which may give a misleadingly low risk score.

Build docs developers (and LLMs) love