Skip to main content

Get indicator by ID

GET /indicators/{indicator_id}
Returns a full Indicator object with the domain field populated as a complete object.

Path parameters

indicator_id
string
required
ObjectId string of the indicator. Returns 400 if not a valid ObjectId.

Response

id
string
required
ObjectId string of the indicator.
name
string
required
Display name.
periodicity
string
required
Measurement frequency.
favourites
integer
required
Favourite count.
governance
boolean
required
Governance classification flag.
description
string
Longer description. null if not set.
font
string
Data source attribution. null if not set.
scale
string
Measurement scale. null if not set.
unit
string
Unit of measurement. null if not set.
carrying_capacity
string
Carrying capacity description. null if not set.
domain
object
required
Populated domain object.
subdomain
string
required
Subdomain name.
resources
string[]
required
Array of resource ID strings linked to this indicator.

Errors

StatusCondition
400indicator_id is not a valid ObjectId format
404No indicator with the given ID exists

Examples

curl --request GET \
  --url 'http://localhost:8080/indicators/64a1f2b3c4d5e6f7a8b9c0d1'

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": {
    "id": "64a1f2b3c4d5e6f7a8b9c0a1",
    "name": "Tourism flows",
    "color": "#3B82F6",
    "image": "",
    "icon": "",
    "subdomains": ["Visitor volume", "Visitor spending", "Visitor origin"]
  },
  "subdomain": "Visitor volume",
  "resources": [
    "64a1f2b3c4d5e6f7a8b9c0b2"
  ]
}

Get total indicator count

GET /indicators/count
Returns the total number of non-deleted indicators as an integer.

Response

An integer.
200
157

Example

curl --request GET \
  --url 'http://localhost:8080/indicators/count'

List indicators by domain

GET /indicators/domain/{domain_id}/
Returns a paginated list of SimpleIndicator objects belonging to the given domain. Supports the same skip, limit, sort_by, sort_order, and governance_filter query parameters as list indicators.

Path parameters

domain_id
string
required
ObjectId string of the domain. Returns 400 if not a valid ObjectId.

Errors

StatusCondition
400domain_id is not a valid ObjectId format
404Domain with the given ID does not exist

Example

curl --request GET \
  --url 'http://localhost:8080/indicators/domain/64a1f2b3c4d5e6f7a8b9c0a1/?limit=20&sort_by=favourites&sort_order=desc'

Get indicator count by domain

GET /indicators/domain/{domain_id}/count
Returns the number of indicators in a domain as an integer. Accepts an optional governance_filter boolean query parameter.

Path parameters

domain_id
string
required
ObjectId string of the domain.

Query parameters

governance_filter
boolean
When provided, counts only indicators with the matching governance value.

Example

curl --request GET \
  --url 'http://localhost:8080/indicators/domain/64a1f2b3c4d5e6f7a8b9c0a1/count'

List indicators by subdomain

GET /indicators/domain/{domain_id}/subdomain/{subdomain_name}/
Returns a paginated list of SimpleIndicator objects within a specific subdomain. Supports the same pagination and filter query parameters as list indicators.

Path parameters

domain_id
string
required
ObjectId string of the domain.
subdomain_name
string
required
Name of the subdomain to filter by.

Errors

StatusCondition
400domain_id is not a valid ObjectId format
404Domain or subdomain does not exist

Example

curl --request GET \
  --url 'http://localhost:8080/indicators/domain/64a1f2b3c4d5e6f7a8b9c0a1/subdomain/Visitor%20volume/'

Get indicator count by subdomain

GET /indicators/domain/{domain_id}/subdomain/{subdomain_name}/count
Returns the number of indicators in a subdomain as an integer. Accepts an optional governance_filter boolean query parameter.

Path parameters

domain_id
string
required
ObjectId string of the domain.
subdomain_name
string
required
Name of the subdomain.

Query parameters

governance_filter
boolean
When provided, counts only indicators with the matching governance value.

Example

curl --request GET \
  --url 'http://localhost:8080/indicators/domain/64a1f2b3c4d5e6f7a8b9c0a1/subdomain/Visitor%20volume/count'

Build docs developers (and LLMs) love