Skip to main content

Endpoint

GET /indicators/

Query parameters

skip
integer
default:"0"
Number of indicators to skip. Minimum: 0.
limit
integer
default:"10"
Maximum number of indicators to return. Minimum: 1. Maximum: 50.
sort_by
string
default:"name"
Field to sort results by. Accepted values: name, periodicity, favourites. Unknown values fall back to name.
sort_order
string
default:"asc"
Sort direction. Accepted values: asc, desc.
governance_filter
boolean
When provided, filters results to indicators where governance matches the given value. Omit to return all indicators regardless of governance status.

Response

Returns an array of SimpleIndicator objects. The domain field contains the domain ObjectId string, not a populated domain object.
[]
object[]

Examples

curl --request GET \
  --url 'http://localhost:8080/indicators/?skip=0&limit=10&sort_by=name&sort_order=asc'
Filtering by governance and sorting by favourites descending:
curl --request GET \
  --url 'http://localhost:8080/indicators/?governance_filter=true&sort_by=favourites&sort_order=desc&limit=20'

Sample response

200
[
  {
    "id": "64a1f2b3c4d5e6f7a8b9c0d1",
    "name": "Annual tourist arrivals",
    "periodicity": "annual",
    "favourites": 42,
    "governance": false,
    "description": "Total number of tourist arrivals recorded each year.",
    "font": "National Tourism Board",
    "scale": "national",
    "unit": "persons",
    "carrying_capacity": null,
    "domain": "64a1f2b3c4d5e6f7a8b9c0a1",
    "subdomain": "Visitor volume",
    "resources": [
      "64a1f2b3c4d5e6f7a8b9c0b2"
    ]
  },
  {
    "id": "64a1f2b3c4d5e6f7a8b9c0d2",
    "name": "Carbon emissions per visitor",
    "periodicity": "annual",
    "favourites": 17,
    "governance": true,
    "description": null,
    "font": null,
    "scale": null,
    "unit": "kg CO2",
    "carrying_capacity": "5000 kg CO2 per year",
    "domain": "64a1f2b3c4d5e6f7a8b9c0a2",
    "subdomain": "Environmental impact",
    "resources": []
  }
]

Build docs developers (and LLMs) love