GIS Labs
Documentation
Developer4 min read

REST API

Authenticate, submit a validation, fetch results.

Everything the interface does is available over a versioned REST API, in every tier. A call may do what the signed-in user’s role allows, so create a dedicated API user with the role the pipeline needs rather than reusing a person’s account, and the audit trail attributes automated actions correctly.

Authenticate#

bash
curl -sS -X POST https://geodoctor.internal/api/v1/auth/login \
  -H 'Content-Type: application/json' \
  -d '{"email":"[email protected]","password":"..."}'

# → { "access_token": "...", "token_type": "bearer", "expires_in": 1800 }

Submit a validation#

bash
curl -sS -X POST https://geodoctor.internal/api/v1/validation/ \
  -H "Authorization: Bearer $TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{ "dataset_id": "…", "rule_packs": ["core", "cadastre"] }'

# → 201 { "id": "…", "status": "pending" }

Poll and fetch#

bash
# Progress, including the current stage
curl -sS -H "Authorization: Bearer $TOKEN" \
  https://geodoctor.internal/api/v1/validation/$RUN/progress

# Findings, filterable and paginated
curl -sS -H "Authorization: Bearer $TOKEN" \
  "https://geodoctor.internal/api/v1/validation/$RUN/violations?severity=P0,P1"

Note

If you only need to know when a run finishes, a notification policy with the webhook channel tells you, instead of polling on a timer.

Stuck on something not covered here? Email [email protected] — a person replies within one business day.