Metis · DHIS2 Expert — DHIS2 Query
dhis2_queryMake authenticated API calls to a DHIS2 instance for live metadata validation, data element lookup, indicator queries, and data quality checks.
Instructions
Make an authenticated API call to the configured DHIS2 instance.
Returns the JSON response as formatted text. Use for live metadata
validation, data element lookup, indicator queries, and data quality checks.
Args:
endpoint: API path relative to /api/, e.g. "dataElements" or "organisationUnits.json".
If it does not start with "/api/", that prefix is added automatically.
params: Query parameters as a dict, e.g. {"fields": "id,name", "paging": "false"}.
method: HTTP method — "GET" (default), "POST", or "PUT".
body: Request body for POST/PUT (serialised to JSON).
Examples:
dhis2_query("dataElements", {"fields": "id,name,valueType", "paging": "false"})
dhis2_query("system/info")
dhis2_query("organisationUnits", {"filter": "level:eq:2", "fields": "id,name,level"})
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| body | No | ||
| method | No | GET | |
| params | No | ||
| endpoint | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |