dhis2w-mcp

v1.38.3
dhis2w-mcp Checked 4 days ago Published 1 month ago

The dhis2w FastMCP server and the MCP tools of every built-in dhis2w-core plugin.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

analytics_query Analytics Query

Run a DHIS2 analytics query. `dimensions` is a list like ['dx:fbfJHSPpUQD;cYeuwXTCPkU', 'pe:LAST_12_MONTHS', 'ou:ImspTQPwCqd']. `dx` = data elements / indicators, `pe` = periods, `ou` = org units. `filters` uses the same syntax. `shape` picks the response format: - `table` (default): aggregated rows, /api/analytics. - `raw`: pre-aggregation rows, /api/analytics/rawData. - `dvs`: DataValueSet envelope (round-trippable into dataValueSets import). `aggregation_type`: SUM, AVERAGE, COUNT, MIN, MAX, etc. `output_id_scheme`: UID (default), NAME, CODE, ID. `profile` selects a named profile.

ParameterTypeDescription
dimensions *array
aggregation_type
display_property
end_date
filters
include_num_den
output_id_scheme
profile
shapestring
skip_metaboolean
start_date

analytics_events_query Analytics Events Query

Run an event analytics query at /api/analytics/events/{mode}/{program}. `mode` is `query` (line-listed events) or `aggregate` (grouped counts). `stage` narrows to one ProgramStage UID. `output_type` picks the row shape: EVENT | ENROLLMENT | TRACKED_ENTITY_INSTANCE.

ParameterTypeDescription
program *string
dimensions
end_date
filters
modestring
output_type
page
page_size
profile
skip_metaboolean
stage
start_date

analytics_enrollments_query Analytics Enrollments Query

Run an enrollment analytics query at /api/analytics/enrollments/query/{program}.

ParameterTypeDescription
program *string
dimensions
end_date
filters
page
page_size
profile
skip_metaboolean
start_date

analytics_outlier_detection Analytics Outlier Detection

Run `/api/analytics/outlierDetection` — flag anomalous data values. `algorithm` is `Z_SCORE` (default), `MODIFIED_Z_SCORE`, or `MIN_MAX`. Supply either `data_elements` OR `data_sets` (the DS is expanded to its DEs); `org_units` + `periods` (or `start_date`/`end_date`) narrow the scope. Returns an `Grid` — the Grid envelope with `headers` and `rows`. Row columns typically include `dx`, `pe`, `ou`, `value`, `mean`, `stdDev`, `absDev`, `zScore` (check `headers` for the exact ordering).

ParameterTypeDescription
algorithm
data_elements
data_sets
end_date
max_results
order_by
org_units
periods
profile
sort_order
start_date
threshold

analytics_tracked_entities_query Analytics Tracked Entities Query

Line-list tracked entities via `/api/analytics/trackedEntities/query/{trackedEntityType}`. `dimensions` + `filters` use the `dx:`/`pe:`/`ou:` compound syntax. `program` narrows to specific programs (repeatable). `ou_mode` is `SELECTED` / `CHILDREN` / `DESCENDANTS` / `ACCESSIBLE` / `ALL`.

ParameterTypeDescription
tracked_entity_type *string
asc
desc
dimensions
display_property
end_date
filters
include_metadata_detailsboolean
ou_mode
page
page_size
profile
program
skip_databoolean
skip_metaboolean
start_date

apps_list Apps List

List every installed DHIS2 app (`GET /api/apps`). Returns typed App records.

ParameterTypeDescription
profile

apps_get Apps Get

Return one installed app by `key`; None if not installed.

ParameterTypeDescription
key *string
profile

apps_install_from_file Apps Install From File

Install / update an app from a local `.zip` at `path` (`POST /api/apps`).

ParameterTypeDescription
path *string
profile

apps_install_from_hub Apps Install From Hub

Install an App Hub app by version id or app id; returns the resolved install target. A version id installs directly (`POST /api/appHub/{versionId}`); an app id resolves to that app's latest version first (App Hub app ids and version ids are both bare UUIDs - see DHIS2_ISSUES.md #46).

ParameterTypeDescription
app_or_version_id *string
profile

apps_uninstall Apps Uninstall

Remove an installed app by `key` (`DELETE /api/apps/{key}`).

ParameterTypeDescription
key *string
profile

apps_reload Apps Reload

Re-read every app from disk (`PUT /api/apps`). No new versions fetched.

ParameterTypeDescription
profile

apps_hub_list Apps Hub List

List apps available in the configured App Hub (`GET /api/appHub`). `query` applies a case-insensitive substring filter on name + description; the filter runs client-side because DHIS2's `/api/appHub` proxy doesn't expose a server-side query parameter on v42.

ParameterTypeDescription
profile
query

apps_hub_versions Apps Hub Versions

List every published version of one App Hub app by app id (newest first). Returns the catalog `AppHubApp` with its `versions` sorted by descending semver; each version's `id` is an `apps_install_from_hub` target that pins that exact version.

ParameterTypeDescription
app_id *string
profile

apps_restore Apps Restore

Reinstall every hub-backed entry in the given snapshot. Takes a typed `AppsSnapshot` (previously produced by `apps_snapshot`) and calls `install_from_hub` for each entry whose `hub_version_id` is set and whose currently installed version differs. Returns a per-app `RestoreSummary` matching the `apps_update_all` shape. `dry_run=True` tags would-install entries as `AVAILABLE` and skips every POST.

ParameterTypeDescription
snapshot *objectTyped inventory of every installed app — portable across instances.
dry_runboolean
profile

apps_snapshot Apps Snapshot

Capture a portable inventory of every installed app. Each entry records the app's key / name / version / app_hub_id plus (when installed from the App Hub) the version_id + download_url needed to rehydrate it on another instance via `apps_install_from_hub(version_id)`. Side-loaded apps appear with `source='side-loaded'` and no reinstall target.

ParameterTypeDescription
profile

apps_hub_url_get Apps Hub Url Get

Read DHIS2's configured App Hub URL (`keyAppHubUrl` system setting). Returns None when unset (DHIS2 uses its hard-coded default).

ParameterTypeDescription
profile

apps_hub_url_set Apps Hub Url Set

Point DHIS2 at a different App Hub by writing the `keyAppHubUrl` system setting. Pass `url=None` to clear the setting; DHIS2 reverts to its default hub. The App Hub is open source (https://github.com/dhis2/app-hub), so self-hosted catalogs are supported.

ParameterTypeDescription
url *
profile

apps_update Apps Update

Update a single installed app to its latest App Hub version. Pass `dry_run=True` to report whether a newer version exists without calling the install endpoint — outcome status is `AVAILABLE` when a newer hub version is present, `UP_TO_DATE` otherwise.

ParameterTypeDescription
key *string
dry_runboolean
profile

apps_update_all Apps Update All

Walk every installed app; install the latest App Hub version where available. Apps without an `app_hub_id` (side-loaded zips) are reported as `SKIPPED` in the returned summary. Bundled core apps with a hub id still update in place. `dry_run=True` tags available updates as `AVAILABLE` and skips every install POST.

ParameterTypeDescription
dry_runboolean
profile

customize_logo_front Customize Logo Front

Upload an image file as the DHIS2 login-page splash / upper-right logo. Also flips `keyUseCustomLogoFront=true` so DHIS2 serves the uploaded bytes instead of redirecting to the built-in default.

ParameterTypeDescription
path *string
profile

customize_logo_banner Customize Logo Banner

Upload an image file as the DHIS2 top-menu banner logo (authenticated pages). Also flips `keyUseCustomLogoBanner=true`.

ParameterTypeDescription
path *string
profile

customize_style Customize Style

Upload a CSS file served as `/api/files/style` on every authenticated page. DHIS2's standalone login app does NOT load this stylesheet — it only affects post-authentication pages.

ParameterTypeDescription
path *string
profile

customize_show Customize Show

Return DHIS2's read-only `/api/loginConfig` summary (what the login app renders).

ParameterTypeDescription
profile

customize_apply Customize Apply

Apply a committed preset directory in one call. Expected files (all optional; missing are skipped): - `logo_front.png` — upper-right / login splash logo - `logo_banner.png` — top-menu banner - `style.css` — stylesheet served on authenticated pages - `preset.json` — `{system-setting-key: value}` map

ParameterTypeDescription
directory *string
profile

data_aggregate_get Data Aggregate Get

Fetch a DHIS2 aggregate data value set. Use either `period` for a single period (e.g. `202401`, `2024W12`, `2024`) or `start_date`+`end_date` (ISO YYYY-MM-DD). `org_unit` is the UID of the org-unit (or `org_unit_group`); set `children=True` to include descendants. `include_deleted` also returns soft-deleted values; `last_updated` keeps only values modified since a date (YYYY-MM-DD) or duration (e.g. `7d`). `limit` truncates the `dataValues` array client-side (default 100). `profile` selects a named profile; omit for the default.

ParameterTypeDescription
childrenboolean
data_element_group
data_set
end_date
include_deletedboolean
last_updated
limitinteger
org_unit
org_unit_group
period
profile
start_date

data_aggregate_push Data Aggregate Push

Bulk push aggregate data values via POST /api/dataValueSets. Each `data_values` item must include at minimum `dataElement`, `period`, `orgUnit`, and `value`. Optional: `categoryOptionCombo`, `attributeOptionCombo`, `comment`, `followup`. `import_strategy` is one of `CREATE`, `UPDATE`, `CREATE_AND_UPDATE`, `DELETE` (server default: `CREATE_AND_UPDATE`). Set `dry_run=True` to validate without writing.

ParameterTypeDescription
data_values *array
data_set
dry_runboolean
import_strategy
org_unit
period
profile

data_aggregate_set Data Aggregate Set

Set a single aggregate data value via POST /api/dataValues. An attribute option combo is addressed by `attribute_combo` (its CategoryCombo UID, `cc`) plus `attribute_options` (its category-option UIDs, `cp`) — DHIS2 has no attributeOptionCombo param. Pass both together.

ParameterTypeDescription
data_element *string
org_unit *string
period *string
value *string
attribute_combo
attribute_options
category_option_combo
comment
profile

data_aggregate_delete Data Aggregate Delete

Delete a single aggregate data value via DELETE /api/dataValues. Address an attribute option combo via `attribute_combo` (`cc`) plus `attribute_options` (`cp`) — DHIS2 has no attributeOptionCombo param.

ParameterTypeDescription
data_element *string
org_unit *string
period *string
attribute_combo
attribute_options
category_option_combo
profile

data_aggregate_followup Data Aggregate Followup

Set or clear the follow-up flag on a single aggregate data value (PUT /api/dataValues/followup).

ParameterTypeDescription
data_element *string
org_unit *string
period *string
attribute_option_combo
category_option_combo
followupboolean
profile

data_tracker_list Data Tracker List

List tracked entities of the given TrackedEntityType. `type` is a TrackedEntityType name (case-insensitive) or UID — e.g. `"Person"`, `"Patient"`, or `"tet01234567"`. Names are resolved server-side via `/api/trackedEntityTypes?filter=name:ilike:...`. Optional scoping: `program` (tracker program UID), `tracked_entities` (comma-separated UIDs to fetch specific entities directly), `org_unit` + `ou_mode` (SELECTED/CHILDREN/DESCENDANTS/ACCESSIBLE/CAPTURE/ALL). `filter` follows DHIS2's `uid:operator:value` syntax.

ParameterTypeDescription
type *string
fields
filter
org_unit
ou_modestring
page
page_sizeinteger
profile
program
tracked_entities
updated_after

data_tracker_get Data Tracker Get

Fetch one tracked entity by UID (TrackedEntityType inferred from the entity).

ParameterTypeDescription
uid *string
fields
profile
program

data_tracker_type_list Data Tracker Type List

List every TrackedEntityType configured on the connected instance. Each entry has `id`, `name`, and `description`. Useful for picking the right `type` argument before calling `data_tracker_list`.

ParameterTypeDescription
profile

data_tracker_enrollment_list Data Tracker Enrollment List

List DHIS2 tracker enrollments. `status` filter values: ACTIVE, COMPLETED, CANCELLED. Tracker programs only (event programs have no enrollments).

ParameterTypeDescription
fields
org_unit
ou_modestring
page
page_sizeinteger
profile
program
status
tracked_entity
updated_after

data_tracker_event_list Data Tracker Event List

List DHIS2 tracker events. Works for both event programs (no registration) and tracker programs. `status` values: ACTIVE, COMPLETED, VISITED, SCHEDULE, OVERDUE, SKIPPED. Date filters are ISO YYYY-MM-DD.

ParameterTypeDescription
enrollment
fields
occurred_after
occurred_before
org_unit
ou_modestring
page
page_sizeinteger
profile
program
program_stage
status
tracked_entity

data_tracker_relationship_list Data Tracker Relationship List

List DHIS2 relationships (one of tracked_entity/enrollment/event required).

ParameterTypeDescription
enrollment
event
fields
page_sizeinteger
profile
tracked_entity

data_tracker_push Data Tracker Push

Bulk import a tracker bundle via POST /api/tracker. The `bundle` envelope shape: {"trackedEntities": [...], "enrollments": [...], "events": [...], "relationships": [...]} Any key may be omitted. `import_strategy` options: CREATE, UPDATE, CREATE_AND_UPDATE, DELETE. `atomic_mode` options: ALL, OBJECT. `dry_run=True` sends importMode=VALIDATE (validate-only, nothing commits). The push runs synchronously by default so per-object errors come back inline; `async_mode=True` returns a job reference immediately.

ParameterTypeDescription
bundle *object
async_modeboolean
atomic_mode
dry_runboolean
import_strategy
profile

data_tracker_register Data Tracker Register

Register a tracked entity + enroll in one program via POST /api/tracker. `attributes` maps TrackedEntityAttribute UID -> value. `events` optional list of `{"program_stage": uid, "org_unit": uid?, "occurred_at": date?, "data_values": {de_uid: value, ...}}`. Returns `{tracked_entity, enrollment, events, response}` — the new UIDs are assigned client-side and surfaced for downstream reference.

ParameterTypeDescription
org_unit *string
program *string
tracked_entity_type *string
attributes
enrolled_at
events
profile

data_tracker_enroll Data Tracker Enroll

Add an enrollment to an existing tracked entity.

ParameterTypeDescription
org_unit *string
program *string
tracked_entity *string
enrolled_at
profile

data_tracker_event_create Data Tracker Event Create

Add one event — tracker (with enrollment) or event-only (standalone). Pass `enrollment` for WITH_REGISTRATION programs. Omit it for WITHOUT_REGISTRATION programs (community surveys, case-investigation forms, one-shot data collection not bound to a registered patient).

ParameterTypeDescription
org_unit *string
program *string
program_stage *string
data_values
enrollment
occurred_at
profile
tracked_entity

data_tracker_outstanding Data Tracker Outstanding

List ACTIVE enrollments missing events on any non-repeatable stage. "What's due" report: one row per enrollment with its tracked-entity, org unit, and the list of missing program-stage UIDs. Repeatable stages are excluded — their `due` semantic isn't single-valued.

ParameterTypeDescription
program *string
org_unit
ou_modestring
page_sizeinteger
profile

datastore_list_namespaces Datastore List Namespaces

List every namespace in the DHIS2 data store. `user=True` targets the per-user store.

ParameterTypeDescription
profile
userboolean

datastore_list_keys Datastore List Keys

List every key in a data-store namespace.

ParameterTypeDescription
namespace *string
profile
userboolean

datastore_get Datastore Get

Return the value at `namespace/key` — arbitrary user JSON (object, array, or scalar).

ParameterTypeDescription
key *string
namespace *string
profile
userboolean

datastore_set Datastore Set

Create or update `namespace/key`. `value` is arbitrary JSON. Returns a status line.

ParameterTypeDescription
key *string
namespace *string
value *
profile
userboolean

datastore_delete Datastore Delete

Delete `namespace/key` from the data store. Returns a status line.

ParameterTypeDescription
key *string
namespace *string
profile
userboolean

doctor_run Doctor Run

Probe a DHIS2 instance — metadata health + DHIS2 data-integrity by default. Three probe categories: - `metadata` — workspace-specific instance-health checks (data sets with no data elements, programs without stages, user groups with no members, etc.). Each offending UID is listed in the probe's `offending_uids`. - `integrity` — wraps DHIS2's own `/api/dataIntegrity/summary` (~40 built-in checks). `pass` when a DHIS2 check reports zero issues. - `bugs` — verifies DHIS2_ISSUES.md workarounds still apply (workspace drift detection; not usually the right default for operators).…

ParameterTypeDescription
all_categoriesboolean
profile

doctor_metadata Doctor Metadata

Run only the workspace metadata-health probes (no DHIS2 integrity, no bug drift).

ParameterTypeDescription
profile

doctor_integrity Doctor Integrity

Run only DHIS2's `/api/dataIntegrity/summary` probes.

ParameterTypeDescription
profile

doctor_bugs Doctor Bugs

Run only DHIS2_ISSUES.md workaround drift probes (workspace maintenance).

ParameterTypeDescription
profile

files_documents_list Files Documents List

List DHIS2 documents (`/api/documents`). `filter` accepts DHIS2 filter syntax (`name:like:Annual`). `page` is 1-indexed; `page_size` defaults to 50 on the DHIS2 side.

ParameterTypeDescription
filter
page
page_size
profile

files_documents_get Files Documents Get

Return typed metadata for one document by UID.

ParameterTypeDescription
uid *string
profile

files_documents_create_external Files Documents Create External

Create an EXTERNAL_URL document — no bytes uploaded, DHIS2 links out to `url`.

ParameterTypeDescription
name *string
url *string
profile

files_documents_delete Files Documents Delete

Delete one document by UID.

ParameterTypeDescription
uid *string
profile

files_resources_get Files Resources Get

Return typed metadata for one file resource (`/api/fileResources/{uid}`).

ParameterTypeDescription
uid *string
profile

maintenance_task_type_list Maintenance Task Type List

List every background-job type DHIS2 tracks under /api/system/tasks. Use one of these values as the `task_type` argument to the other task tools. Common ones: `ANALYTICS_TABLE`, `DATA_INTEGRITY`, `DATA_INTEGRITY_DETAILS`, `HOUSEKEEPING`, `METADATA_IMPORT`.

ParameterTypeDescription
profile

maintenance_task_list Maintenance Task List

List every task UID recorded for a given job type (most-recent first).

ParameterTypeDescription
task_type *string
profile

maintenance_task_status Maintenance Task Status

Return every notification emitted by a task, oldest first. A notification with `completed=true` marks the terminal state; the preceding rows track progress. Level is one of `INFO`, `WARN`, `ERROR`.

ParameterTypeDescription
task_type *string
task_uid *string
profile

maintenance_cache_clear Maintenance Cache Clear

POST /api/maintenance/cache — clear every server-side cache.

ParameterTypeDescription
profile

maintenance_cleanup_soft_deleted Maintenance Cleanup Soft Deleted

Hard-remove soft-deleted rows of the given kind. `target` is one of: `data-values`, `events`, `enrollments`, `tracked-entities`. DHIS2 keeps rows marked `deleted=true` for audit; this endpoint purges them, unblocking parent-metadata deletion (see DHIS2_ISSUES.md #2).

ParameterTypeDescription
target *string
profile

maintenance_dataintegrity_checks Maintenance Dataintegrity Checks

List every built-in data-integrity check definition.

ParameterTypeDescription
profile

maintenance_dataintegrity_run Maintenance Dataintegrity Run

Kick off a data-integrity run; returns the task envelope. `checks` is a list of check names (from `maintenance_dataintegrity_checks`); omit to run every check. `details=True` populates `issues[]`; `details=False` (default) only records `count`. Poll the task UID returned in `response.id` with `maintenance_task_status`.

ParameterTypeDescription
checks
detailsboolean
profile

maintenance_dataintegrity_result Maintenance Dataintegrity Result

Read the stored result of a completed data-integrity run (summary or details mode).

ParameterTypeDescription
checks
detailsboolean
profile

maintenance_refresh_analytics Maintenance Refresh Analytics

Regenerate the analytics star schema (POST /api/resourceTables/analytics, job=ANALYTICS_TABLE). Primary post-ingest refresh workflow. Returns the typed task-ref envelope — pass to `maintenance_task_status` / a watch loop to track progress.

ParameterTypeDescription
last_years
profile
skip_resource_tablesboolean

maintenance_refresh_resource_tables Maintenance Refresh Resource Tables

Regenerate resource tables only (POST /api/resourceTables, job=RESOURCE_TABLE). Rebuilds supporting OU / category hierarchy tables without touching the analytics star schema.

ParameterTypeDescription
profile

maintenance_refresh_monitoring Maintenance Refresh Monitoring

Regenerate monitoring tables (POST /api/resourceTables/monitoring, job=MONITORING). Rebuilds the tables backing data-quality / validation-rule monitoring.

ParameterTypeDescription
profile

maintenance_validation_run Maintenance Validation Run

Run a validation-rule analysis synchronously + return violations. `org_unit` is the root of the sub-tree DHIS2 walks. `persist=True` writes violations into `/api/validationResults` so later list calls can walk them; `notification=True` fires configured templates.

ParameterTypeDescription
end_date *string
org_unit *string
start_date *string
max_results
notificationboolean
persistboolean
profile
validation_rule_group

maintenance_validation_result_list Maintenance Validation Result List

List persisted validation results, with optional filters.

ParameterTypeDescription
org_unit
page
page_size
period
profile
validation_rule

maintenance_validation_validate_expression Maintenance Validation Validate Expression

Parse-check a DHIS2 expression + render a human description. `context` picks the parser: one of `generic` / `validation-rule` / `indicator` / `predictor` / `program-indicator`. Each has a different allowed-reference set (e.g. indicators allow `#{ou.de}` refs, predictors allow sample-function calls, etc.).

ParameterTypeDescription
expression *string
contextstring
profile

maintenance_predictors_run Maintenance Predictors Run

Run predictor expressions + emit data values. Pass `predictor_uid` to run one predictor, `group_uid` to run a PredictorGroup, or neither to run every predictor on the instance.

ParameterTypeDescription
end_date *string
start_date *string
group_uid
predictor_uid
profile

messaging_list Messaging List

List conversations the authenticated user is part of. `filter` accepts DHIS2's standard DSL (`read:eq:false` for unread only). `page` is 1-indexed; DHIS2 defaults `page_size` to 50.

ParameterTypeDescription
filter
page
page_size
profile

messaging_get Messaging Get

Fetch one conversation with its full message thread.

ParameterTypeDescription
uid *string
profile

messaging_send Messaging Send

Create a new conversation with an initial message; returns the typed conversation. At least one recipient list (`users` / `user_groups` / `organisation_units`) must be non-empty. `attachments` is a list of fileResource UIDs previously uploaded with `domain=MESSAGE_ATTACHMENT` (see the `files` plugin). The `MessageConversation.id` is the new conversation UID (DHIS2 returns it on the Location header — see DHIS2_ISSUES.md #17 — the accessor looks it up for you).

ParameterTypeDescription
subject *string
text *string
attachments
organisation_units
profile
user_groups
users

messaging_reply Messaging Reply

Reply to an existing conversation with a plain-text message. DHIS2's reply endpoint takes text/plain body on v42 — attachments + the internal-note flag only work on the initial `messaging_send` call.

ParameterTypeDescription
text *string
uid *string
profile

messaging_mark_read Messaging Mark Read

Mark one or more conversations as read.

ParameterTypeDescription
uids *array
profile

messaging_mark_unread Messaging Mark Unread

Mark one or more conversations as unread.

ParameterTypeDescription
uids *array
profile

messaging_delete Messaging Delete

Delete a conversation (soft-delete for the calling user).

ParameterTypeDescription
uid *string
profile

messaging_set_priority Messaging Set Priority

Set a conversation's ticket-workflow priority: NONE / LOW / MEDIUM / HIGH.

ParameterTypeDescription
priority *string
uid *string
profile

messaging_set_status Messaging Set Status

Set a conversation's ticket-workflow status: NONE / OPEN / PENDING / INVALID / SOLVED.

ParameterTypeDescription
status *string
uid *string
profile

messaging_assign Messaging Assign

Assign a conversation to a user (ticket workflows).

ParameterTypeDescription
uid *string
user_uid *string
profile

messaging_unassign Messaging Unassign

Remove the assignee from a conversation.

ParameterTypeDescription
uid *string
profile

metadata_type_list Metadata Type List

List every metadata resource type the connected DHIS2 instance exposes. Pass `profile` to target a named profile; omit to use the default.

ParameterTypeDescription
profile

metadata_list Metadata List

List instances of a metadata resource (e.g. `dataElements`, `indicators`). Every DHIS2 `/api/<resource>` query parameter is exposed: - `fields`: DHIS2 selector. Supports plain lists (`id,name`), presets (`:identifiable`, `:nameable`, `:owner`, `:all`), exclusions (`:all,!lastUpdated`), nested selectors (`children[id,name]`), and field transformers (`organisationUnits~size` for the collection's count, `~isEmpty`, `name~rename(label)`). A transformed selection comes back as DHIS2 answered it, under the untransformed key. - `filters`: list of `property:operator:value` strings. Multipl…

ParameterTypeDescription
resource *string
fieldsstring
filters
locale
order
page
page_size
paging
profile
root_junction
translate

metadata_count Metadata Count

Count instances of a metadata resource without fetching the rows. Returns the DHIS2 `pager.total` for `resource` (e.g. `dataElements`, `indicators`) in one cheap request. `filters` narrows the count the same way `metadata_list`'s filters narrow a listing (AND by default; pass `root_junction="OR"` to OR them). Prefer this over `metadata_list` for "how many X" questions — it never pulls the full collection. `profile` selects a named profile; omit for the default.

ParameterTypeDescription
resource *string
filters
profile
root_junction

metadata_get Metadata Get

Fetch one metadata object by UID from the named resource.

ParameterTypeDescription
resource *string
uid *string
fields
profile

metadata_usage Metadata Usage

Reverse lookup — find every object that references the given UID. Resolves the UID's owning resource via `/api/identifiableObjects/{uid}`, then fans out concurrent `/api/<target>?filter=<path>:eq:<uid>` calls against every known reference path for that owning type (datasets / visualizations / maps / dashboards / program stages / etc., depending on the owning resource kind). Useful as a deletion-safety probe — any object that references the UID surfaces in the result. Empty result means no reference was found on any covered path. Returns the same `SearchResults` shape as `metadata_search`…

ParameterTypeDescription
uid *string
page_sizeinteger
profile

metadata_export Metadata Export

Download a metadata bundle from `GET /api/metadata`. `resources` limits the export to specific types (e.g. `["dataElements", "indicators"]`); omit for every type DHIS2 exports by default. `fields` defaults to `":owner"` for a lossless round-trip; use `:identifiable` / `:all` / a custom selector to narrow. `per_resource_filters` narrows an export to a subset of each resource using DHIS2's `?<resource>:filter=<expr>` wire format. Key is the resource name, value is a list of `property:operator:value` filter strings (same DSL as `metadata_list`'s `filters`). `per_resource_fields` overrides the…

ParameterTypeDescription
check_referencesboolean
fields
output_path
per_resource_fields
per_resource_filters
profile
resources
skip_sharingboolean
skip_translationboolean
skip_validationboolean

metadata_diff Metadata Diff

Structurally compare two metadata bundles (or one bundle vs the live instance). Pass `left_path` + `right_path` to diff two files on disk. Pass `left_path` + `live=True` (omit `right_path`) to diff the file against the live DHIS2 instance — only the resource types present in the left bundle are exported, so this stays fast on full catalogs. Returns the `MetadataDiff` as a dict with per-resource create / update / delete / unchanged counts and `ObjectChange` entries carrying UIDs, names, and the `changed_fields` list. `ignore_fields` extends DHIS2's per-instance noise defaults (lastUpdated,…

ParameterTypeDescription
left_path *string
ignore_fields
liveboolean
profile
right_path

metadata_diff_profiles Metadata Diff Profiles

Diff a narrow metadata slice between two registered profiles. Staging-vs-prod drift monitoring — exports `resources` from both profiles concurrently, optionally narrows each resource with `per_resource_filters` (e.g. `{"dataElements": ["name:like:ANC"]}`), then structurally compares the two bundles. `ignore_fields` extends DHIS2's per-instance noise defaults so timestamps and `createdBy` blocks don't dominate the drift count. `resources` is required — a whole-instance diff is almost always noise (user accounts, org-unit assignments, incidental settings always diverge between environments…

ParameterTypeDescription
profile_a *string
profile_b *string
resources *array
fieldsstring
ignore_fields
per_resource_filters

metadata_merge Metadata Merge

Export a metadata slice from one profile and import it into another. Pairs with `metadata_diff_profiles` (same resource + filter shape). Preview with `diff_profiles`, then apply via `merge`. `resources` is required — whole-instance merges overwrite user / role / org- unit state operators rarely want synced. `dry_run=True` flips target import to `importMode=VALIDATE` — DHIS2 walks the bundle + reports conflicts without committing. Use to catch cross-instance UID references before the real run. `include_sharing=False` (default) strips sharing blocks so per-instance user/group UID differen…

ParameterTypeDescription
resources *array
source_profile *string
target_profile *string
atomicstring
dry_runboolean
fieldsstring
include_sharingboolean
per_resource_filters
strategystring

metadata_merge_bundle Metadata Merge Bundle

Import a saved bundle file into a target profile. The bundle-source variant of `metadata_merge`. `bundle_path` is a local path to a JSON bundle (the shape `GET /api/metadata` returns). Useful when the bundle came from a saved `metadata export`, hand-crafted, or produced by a non-DHIS2 tool. Same import semantics as `metadata_merge` — atomic + sharing stripped by default, `dry_run=True` flips to `importMode=VALIDATE`. `resources` restricts the import to those resource collections — the bundle is filtered before the POST, so the count summary reports exactly what was written. Omit to impor…

ParameterTypeDescription
bundle_path *string
target_profile *string
atomicstring
dry_runboolean
include_sharingboolean
resources
strategystring

metadata_legend_set_get Metadata Legend Set Get

Fetch one LegendSet by UID with its colour bands resolved inline.

ParameterTypeDescription
uid *string
profile

metadata_legend_set_create Metadata Legend Set Create

Create a LegendSet with ordered colour-range legends. Each `legends` entry is a dict with `start` (float), `end` (float), `color` (`#RRGGBB` or `#RRGGBBAA`), and optional `name`. `start` must be strictly less than `end`. POSTs via `/api/metadata` so the LegendSet + its Legends land atomically.

ParameterTypeDescription
legends *array
name *string
code
profile
uid

metadata_legend_set_delete Metadata Legend Set Delete

Delete a LegendSet by UID.

ParameterTypeDescription
uid *string
profile

metadata_patch Metadata Patch

Apply an RFC 6902 JSON Patch to a metadata object. `ops` is a list of `{op, path, value?, from?}` dicts. Every standard RFC 6902 op is accepted (`add`, `remove`, `replace`, `test`, `move`, `copy`); the adapter picks the right variant by the `op` tag. Returns the typed `WebMessageResponse` envelope.

ParameterTypeDescription
ops *array
resource *string
uid *string
profile

metadata_rename Metadata Rename

Bulk-rename metadata objects by RFC 6902 patch. Matches the CLI `d2w metadata rename <resource>` surface. Pass at least one mutation flag. Prefix/suffix add + strip variants are idempotent — re-running won't double-apply. Strip runs before add so you can combine `name_strip_prefix=X` + `name_prefix=Y` to rewrite the prefix in one pass. Strip values must be non-empty strings. `dry_run` defaults True (preview only) — set `dry_run=False` to apply. A live rename with no `filters` mutates the whole catalog and is refused unless `allow_all=True`.

ParameterTypeDescription
resource *string
allow_allboolean
concurrencyinteger
dry_runboolean
filters
name_prefix
name_strip_prefix
name_strip_suffix
name_suffix
profile
root_junction
set_description
short_name_prefix
short_name_strip_prefix
short_name_strip_suffix
short_name_suffix

metadata_share Metadata Share

Merge a sharing change across many UIDs of one resource (read-merge-write). `resource_type` is the DHIS2 singular form used by `/api/sharing?type=` (`dataSet`, `program`, ...). `user_access` and `user_group_access` are repeatable `UID:access` strings (e.g. `U_ALICE:rw------`, `UG_PROG:rwrw----`). Each UID's current sharing is fetched first and the new grants merged in — existing grants are preserved, and `publicAccess` only changes when `public_access` is given. Set `dry_run=True` to preview the merged sharing without sending any POSTs.

ParameterTypeDescription
resource_type *string
uids *array
concurrencyinteger
dry_runboolean
profile
public_access
user_access
user_group_access

metadata_retag Metadata Retag

Bulk-rewrite ref / enum fields across a filtered cohort. Sister to `metadata_rename`. Each kwarg maps to an RFC 6902 patch: `category_combo_uid` / `option_set_uid` / `legend_set_uids` = replace the ref(s); `clear_option_set` / `clear_legend_sets` = remove / empty; `aggregation_type` / `domain_type` = replace the enum value. Per-UID failures land on the nested `BulkPatchResult.failures`, not raised. `dry_run` defaults True (preview only) — set `dry_run=False` to apply. A live retag with no `filters` mutates the whole catalog and is refused unless `allow_all=True`.

ParameterTypeDescription
resource *string
aggregation_type
allow_allboolean
category_combo_uid
clear_legend_setsboolean
clear_option_setboolean
concurrencyinteger
domain_type
dry_runboolean
filters
legend_set_uids
option_set_uid
profile
root_junction

metadata_import Metadata Import

Upload a metadata bundle via `POST /api/metadata`. Pass `bundle_path` for a file-on-disk (preferred for large bundles — keeps the MCP payload small) OR `bundle_inline` for an inline JSON object. Exactly one of the two must be provided. `dry_run=True` maps to DHIS2's `importMode=VALIDATE` — the server runs validation + preheat without committing anything, so callers can pre-check a bundle before a real import. Returns the `WebMessageResponse` with full import report (stats, conflicts, error reports).

ParameterTypeDescription
atomic_modestring
bundle_inline
bundle_path
dry_runboolean
flush_mode
identifierstring
import_strategystring
merge_mode
preheat_mode
profile
skip_sharingboolean
skip_translationboolean
skip_validationboolean

metadata_option_set_get Metadata Option Set Get

Fetch one OptionSet (with options inline) by UID or business code. `uid_or_code` accepts either the 11-char DHIS2 UID or the OptionSet's business `code`. Returns None if nothing matches.

ParameterTypeDescription
uid_or_code *string
profile

metadata_option_set_find Metadata Option Set Find

Locate one option in a set by `option_code` or `option_name`. Exactly one of `option_code` / `option_name` must be provided. `set_ref` accepts a UID or the OptionSet's business code. Returns None on miss.

ParameterTypeDescription
set_ref *string
option_code
option_name
profile

metadata_option_set_attribute_get Metadata Option Set Attribute Get

Read one attribute value off an Option; None if unset. `attribute` accepts the Attribute's UID or its business code (e.g. `SNOMED_CODE`). The code path resolves via `/api/attributes?filter=code:eq:...`.

ParameterTypeDescription
attribute *string
option_uid *string
profile

metadata_option_set_attribute_set Metadata Option Set Attribute Set

Set / replace one attribute value on an Option (read-merge-write).

ParameterTypeDescription
attribute *string
option_uid *string
value *string
profile

metadata_option_set_attribute_find Metadata Option Set Attribute Find

Reverse lookup — find the Option in a set whose attribute matches a value. Given an external-system code (e.g. SNOMED CT `386661006`), returns the DHIS2 Option it maps to. Returns None on miss.

ParameterTypeDescription
attribute *string
set_ref *string
value *string
profile

metadata_attribute_get Metadata Attribute Get

Read one attribute value off any resource with `attributeValues`. `resource` is the plural DHIS2 name (`dataElements`, `options`, `organisationUnits`, …). `attribute` accepts a UID or the Attribute's business code. None when unset.

ParameterTypeDescription
attribute *string
resource *string
resource_uid *string
profile

metadata_attribute_set Metadata Attribute Set

Set / replace one attribute value on any resource (read-merge-write).

ParameterTypeDescription
attribute *string
resource *string
resource_uid *string
value *string
profile

metadata_attribute_delete Metadata Attribute Delete

Remove one attribute value; True if anything was removed, False on no-op.

ParameterTypeDescription
attribute *string
resource *string
resource_uid *string
profile

metadata_attribute_find Metadata Attribute Find

Reverse lookup — UIDs of every resource whose attribute value matches. `extra_filters` passes additional DHIS2 filter constraints through (e.g. `["domainType:eq:AGGREGATE"]` to narrow a DataElement lookup, `["optionSet.id:eq:OsVaccType1"]` to scope an Option lookup).

ParameterTypeDescription
attribute *string
resource *string
value *string
extra_filters
profile

metadata_program_rule_get Metadata Program Rule Get

Show one ProgramRule with actions resolved inline.

ParameterTypeDescription
rule_uid *string
profile

metadata_program_rule_vars_for Metadata Program Rule Vars For

List every `ProgramRuleVariable` in scope for a program.

ParameterTypeDescription
program_uid *string
profile

metadata_program_rule_validate_expression Metadata Program Rule Validate Expression

Parse-check a program-rule condition expression. `context` picks which DHIS2 expression parser runs — `program-indicator` (default, matches program-rule grammar), `validation-rule`, `indicator`, `predictor`, or `generic`.

ParameterTypeDescription
expression *string
contextstring
profile

metadata_program_rule_where_de_is_used Metadata Program Rule Where De Is Used

Impact analysis — every ProgramRule whose actions reference this DataElement.

ParameterTypeDescription
data_element_uid *string
profile

metadata_sql_view_get Metadata Sql View Get

Show one SqlView with its stored sqlQuery.

ParameterTypeDescription
view_uid *string
profile

metadata_sql_view_execute Metadata Sql View Execute

Execute a SqlView and return its result grid as a JSON-friendly payload. `variables` populate `${name}` placeholders on QUERY views — DHIS2 strips non-alphanumeric characters from values server-side, so wildcards live in the SQL template. `criteria` filter the output of VIEW / MATERIALIZED_VIEW runs by column value.

ParameterTypeDescription
view_uid *string
criteria
profile
variables

metadata_sql_view_refresh Metadata Sql View Refresh

Refresh a MATERIALIZED_VIEW or lazily create a VIEW's DB object.

ParameterTypeDescription
view_uid *string
profile

metadata_visualization_get Metadata Visualization Get

Show one Visualization with axes + data dimensions resolved inline.

ParameterTypeDescription
viz_uid *string
profile

metadata_visualization_create Metadata Visualization Create

Create a Visualization from a typed VisualizationSpec. `viz_type` is a VisualizationType value (LINE / COLUMN / PIVOT_TABLE / SINGLE_VALUE / etc.). Default dimensional placement depends on type — LINE and friends default to time on the x-axis and OU as series. Override with `category_dimension` (x-axis), `series_dimension` (legend colours), `filter_dimension`.

ParameterTypeDescription
data_elements *array
name *string
organisation_units *array
periods *array
viz_type *string
category_dimension
description
filter_dimension
profile
series_dimension
uid

metadata_visualization_clone Metadata Visualization Clone

Clone an existing Visualization with a fresh UID + new name.

ParameterTypeDescription
new_name *string
source_uid *string
new_description
new_uid
profile

metadata_dashboard_get Metadata Dashboard Get

Show one Dashboard with every dashboardItem resolved inline.

ParameterTypeDescription
dashboard_uid *string
profile

metadata_dashboard_add_item Metadata Dashboard Add Item

Add one metadata-backed item to a dashboard. `kind` selects the DashboardItem reference field on DHIS2's side: `"visualization"` (default), `"map"`, `"eventVisualization"`, `"eventChart"`, `"eventReport"`. Omit all of `x` / `y` / `width` / `height` to auto-stack below existing items (full width). Supply them explicitly for side-by-side tiling.

ParameterTypeDescription
dashboard_uid *string
target_uid *string
height
kindstring
profile
width
x
y

metadata_map_get Metadata Map Get

Show one Map with its viewport + every mapViews layer resolved inline.

ParameterTypeDescription
map_uid *string
profile

metadata_map_create Metadata Map Create

Create a single-layer thematic choropleth Map. `organisation_units` is usually the parent boundary (e.g. country root); `organisation_unit_levels` picks which hierarchy level the choropleth colours (e.g. [2] for provinces). Multi-layer maps need raw construction from the library side.

ParameterTypeDescription
data_elements *array
name *string
organisation_unit_levels *array
organisation_units *array
periods *array
basemapstring
classesinteger
color_highstring
color_lowstring
description
latitudenumber
longitudenumber
profile
uid
zoominteger

metadata_map_clone Metadata Map Clone

Clone an existing Map with a fresh UID + new name.

ParameterTypeDescription
new_name *string
source_uid *string
new_description
new_uid
profile

metadata_data_element_get Metadata Data Element Get

Fetch one DataElement by UID.

ParameterTypeDescription
uid *string
profile

metadata_data_element_create Metadata Data Element Create

Create a DataElement. Omit `category_combo_uid` to use the instance default.

ParameterTypeDescription
name *string
short_name *string
value_type *string
aggregation_typestring
category_combo_uid
code
description
domain_typestring
form_name
legend_set_uids
option_set_uid
profile
uid
zero_is_significantboolean

metadata_data_element_rename Metadata Data Element Rename

Partial-update the label fields on a DataElement.

ParameterTypeDescription
uid *string
description
form_name
name
profile
short_name

metadata_data_element_set_legend_sets Metadata Data Element Set Legend Sets

Replace the legend-set refs on a DataElement (empty list clears).

ParameterTypeDescription
legend_set_uids *array
uid *string
profile

metadata_data_element_delete Metadata Data Element Delete

Delete a DataElement — DHIS2 rejects deletes on DEs with saved values.

ParameterTypeDescription
uid *string
profile

metadata_data_element_group_get Metadata Data Element Group Get

Fetch one DataElementGroup with member + group-set refs inline.

ParameterTypeDescription
uid *string
profile

metadata_data_element_group_members Metadata Data Element Group Members

Page through DataElements in a group.

ParameterTypeDescription
uid *string
pageinteger
page_sizeinteger
profile

metadata_data_element_group_create Metadata Data Element Group Create

Create an empty DataElementGroup.

ParameterTypeDescription
name *string
short_name *string
code
description
profile
uid

metadata_data_element_group_add_members Metadata Data Element Group Add Members

Add DataElements to a group via the per-item POST shortcut.

ParameterTypeDescription
data_element_uids *array
uid *string
profile

metadata_data_element_group_remove_members Metadata Data Element Group Remove Members

Drop DataElements from a group via the per-item DELETE shortcut.

ParameterTypeDescription
data_element_uids *array
uid *string
profile

metadata_data_element_group_delete Metadata Data Element Group Delete

Delete a DataElementGroup — members stay.

ParameterTypeDescription
uid *string
profile

metadata_data_element_group_set_get Metadata Data Element Group Set Get

Fetch one DataElementGroupSet by UID.

ParameterTypeDescription
uid *string
profile

metadata_data_element_group_set_create Metadata Data Element Group Set Create

Create an empty DataElementGroupSet.

ParameterTypeDescription
name *string
short_name *string
code
compulsoryboolean
data_dimensionboolean
description
profile
uid

metadata_data_element_group_set_add_groups Metadata Data Element Group Set Add Groups

Add groups to a group set via the per-item POST shortcut.

ParameterTypeDescription
group_uids *array
uid *string
profile

metadata_data_element_group_set_remove_groups Metadata Data Element Group Set Remove Groups

Drop groups from a group set via the per-item DELETE shortcut.

ParameterTypeDescription
group_uids *array
uid *string
profile

metadata_data_element_group_set_delete Metadata Data Element Group Set Delete

Delete a DataElementGroupSet — groups stay.

ParameterTypeDescription
uid *string
profile

metadata_indicator_get Metadata Indicator Get

Fetch one Indicator by UID.

ParameterTypeDescription
uid *string
profile

metadata_indicator_create Metadata Indicator Create

Create an Indicator from numerator / denominator expressions.

ParameterTypeDescription
denominator *string
indicator_type_uid *string
name *string
numerator *string
short_name *string
annualizedboolean
code
decimals
denominator_description
description
legend_set_uids
numerator_description
profile
uid

metadata_indicator_rename Metadata Indicator Rename

Partial-update the label fields on an Indicator.

ParameterTypeDescription
uid *string
description
name
profile
short_name

metadata_indicator_validate_expression Metadata Indicator Validate Expression

Parse-check one numerator / denominator expression via DHIS2's validator.

ParameterTypeDescription
expression *string
profile

metadata_indicator_set_legend_sets Metadata Indicator Set Legend Sets

Replace the legend-set refs on an Indicator.

ParameterTypeDescription
legend_set_uids *array
uid *string
profile

metadata_indicator_delete Metadata Indicator Delete

Delete an Indicator.

ParameterTypeDescription
uid *string
profile

metadata_indicator_group_get Metadata Indicator Group Get

Fetch one IndicatorGroup with member + group-set refs.

ParameterTypeDescription
uid *string
profile

metadata_indicator_group_members Metadata Indicator Group Members

Page through Indicators in a group.

ParameterTypeDescription
uid *string
pageinteger
page_sizeinteger
profile

metadata_indicator_group_create Metadata Indicator Group Create

Create an empty IndicatorGroup.

ParameterTypeDescription
name *string
short_name *string
code
description
profile
uid

metadata_indicator_group_add_members Metadata Indicator Group Add Members

Add Indicators to a group via the per-item POST shortcut.

ParameterTypeDescription
indicator_uids *array
uid *string
profile

metadata_indicator_group_remove_members Metadata Indicator Group Remove Members

Drop Indicators from a group via the per-item DELETE shortcut.

ParameterTypeDescription
indicator_uids *array
uid *string
profile

metadata_indicator_group_delete Metadata Indicator Group Delete

Delete an IndicatorGroup — members stay.

ParameterTypeDescription
uid *string
profile

metadata_indicator_group_set_get Metadata Indicator Group Set Get

Fetch one IndicatorGroupSet by UID.

ParameterTypeDescription
uid *string
profile

metadata_indicator_group_set_create Metadata Indicator Group Set Create

Create an empty IndicatorGroupSet.

ParameterTypeDescription
name *string
short_name *string
code
compulsoryboolean
description
profile
uid

metadata_indicator_group_set_add_groups Metadata Indicator Group Set Add Groups

Add groups to an IndicatorGroupSet via the per-item POST shortcut.

ParameterTypeDescription
group_uids *array
uid *string
profile

metadata_indicator_group_set_remove_groups Metadata Indicator Group Set Remove Groups

Drop groups from an IndicatorGroupSet via the per-item DELETE shortcut.

ParameterTypeDescription
group_uids *array
uid *string
profile

metadata_indicator_group_set_delete Metadata Indicator Group Set Delete

Delete an IndicatorGroupSet — groups stay.

ParameterTypeDescription
uid *string
profile

metadata_program_indicator_get Metadata Program Indicator Get

Fetch one ProgramIndicator by UID.

ParameterTypeDescription
uid *string
profile

metadata_program_indicator_create Metadata Program Indicator Create

Create a ProgramIndicator for a given program.

ParameterTypeDescription
expression *string
name *string
program_uid *string
short_name *string
aggregation_type
analytics_typestring
code
decimals
description
filter_expression
legend_set_uids
profile
uid

metadata_program_indicator_rename Metadata Program Indicator Rename

Partial-update the label fields on a ProgramIndicator.

ParameterTypeDescription
uid *string
description
name
profile
short_name

metadata_program_indicator_validate_expression Metadata Program Indicator Validate Expression

Parse-check one program-indicator expression via DHIS2's validator.

ParameterTypeDescription
expression *string
profile

metadata_program_indicator_set_legend_sets Metadata Program Indicator Set Legend Sets

Replace the legend-set refs on a ProgramIndicator.

ParameterTypeDescription
legend_set_uids *array
uid *string
profile

metadata_program_indicator_delete Metadata Program Indicator Delete

Delete a ProgramIndicator.

ParameterTypeDescription
uid *string
profile

metadata_program_indicator_group_get Metadata Program Indicator Group Get

Fetch one ProgramIndicatorGroup with member refs.

ParameterTypeDescription
uid *string
profile

metadata_program_indicator_group_members Metadata Program Indicator Group Members

Page through ProgramIndicators in a group.

ParameterTypeDescription
uid *string
pageinteger
page_sizeinteger
profile

metadata_program_indicator_group_create Metadata Program Indicator Group Create

Create an empty ProgramIndicatorGroup.

ParameterTypeDescription
name *string
short_name *string
code
description
profile
uid

metadata_program_indicator_group_add_members Metadata Program Indicator Group Add Members

Add ProgramIndicators to a group via the per-item POST shortcut.

ParameterTypeDescription
program_indicator_uids *array
uid *string
profile

metadata_program_indicator_group_remove_members Metadata Program Indicator Group Remove Members

Drop ProgramIndicators from a group via the per-item DELETE shortcut.

ParameterTypeDescription
program_indicator_uids *array
uid *string
profile

metadata_program_indicator_group_delete Metadata Program Indicator Group Delete

Delete a ProgramIndicatorGroup — members stay.

ParameterTypeDescription
uid *string
profile

metadata_category_option_get Metadata Category Option Get

Fetch one CategoryOption by UID.

ParameterTypeDescription
uid *string
profile

metadata_category_option_create Metadata Category Option Create

Create a CategoryOption. Pass ISO-8601 dates for the validity window.

ParameterTypeDescription
name *string
short_name *string
code
description
end_date
form_name
profile
start_date
uid

metadata_category_option_rename Metadata Category Option Rename

Partial-update the label fields on a CategoryOption.

ParameterTypeDescription
uid *string
description
form_name
name
profile
short_name

metadata_category_option_set_validity Metadata Category Option Set Validity

Set the `startDate` / `endDate` validity window on a CategoryOption.

ParameterTypeDescription
uid *string
end_date
profile
start_date

metadata_category_option_delete Metadata Category Option Delete

Delete a CategoryOption — DHIS2 rejects deletes on options in use.

ParameterTypeDescription
uid *string
profile

metadata_category_get Metadata Category Get

Fetch one Category by UID.

ParameterTypeDescription
uid *string
profile

metadata_category_create Metadata Category Create

Create a Category, optionally wiring CategoryOption members on create. `data_dimension_type` is `DISAGGREGATION` (default) or `ATTRIBUTE`. `options` is an ordered list of CategoryOption UIDs.

ParameterTypeDescription
name *string
short_name *string
code
data_dimension_typestring
description
options
profile
uid

metadata_category_rename Metadata Category Rename

Partial-update the label fields on a Category.

ParameterTypeDescription
uid *string
description
name
profile
short_name

metadata_category_add_option Metadata Category Add Option

Append a CategoryOption to this Category's ordered membership.

ParameterTypeDescription
option_uid *string
uid *string
profile

metadata_category_remove_option Metadata Category Remove Option

Remove a CategoryOption from this Category's membership.

ParameterTypeDescription
option_uid *string
uid *string
profile

metadata_category_delete Metadata Category Delete

Delete a Category — DHIS2 rejects deletes on categories referenced by a CategoryCombo.

ParameterTypeDescription
uid *string
profile

metadata_category_combo_get Metadata Category Combo Get

Fetch one CategoryCombo by UID.

ParameterTypeDescription
uid *string
profile

metadata_category_combo_create Metadata Category Combo Create

Create a CategoryCombo with an ordered list of Category UIDs. DHIS2 regenerates the CategoryOptionCombo matrix server-side on save; reach for `metadata_category_combo_wait_for_cocs` after a large combo create when the next step depends on the matrix being ready.

ParameterTypeDescription
categories *array
name *string
code
data_dimension_typestring
profile
skip_totalboolean
uid

metadata_category_combo_rename Metadata Category Combo Rename

Partial-update label fields on a CategoryCombo.

ParameterTypeDescription
uid *string
code
name
profile

metadata_category_combo_add_category Metadata Category Combo Add Category

Append a Category to this CategoryCombo's ordered membership.

ParameterTypeDescription
category_uid *string
uid *string
profile

metadata_category_combo_remove_category Metadata Category Combo Remove Category

Remove a Category from this CategoryCombo's membership.

ParameterTypeDescription
category_uid *string
uid *string
profile

metadata_category_combo_wait_for_cocs Metadata Category Combo Wait For Cocs

Block until the COC matrix on a CategoryCombo reaches `expected_count`. Use after `metadata_category_combo_create` / `metadata_category_combo_add_category` when the next step depends on the materialised matrix. Raises `TimeoutError` when `timeout_seconds` elapses without reaching the expected count.

ParameterTypeDescription
expected_count *integer
uid *string
poll_interval_secondsnumber
profile
timeout_secondsnumber

metadata_category_combo_delete Metadata Category Combo Delete

Delete a CategoryCombo — DHIS2 rejects the default + combos in use.

ParameterTypeDescription
uid *string
profile

metadata_category_combo_build Metadata Category Combo Build

One-pass create-or-reuse for the full Category dimension stack. `spec` is a JSON-shaped CategoryComboBuildSpec: `{name, categories: [{name, options: [{name, ...}, ...]}, ...]}`. Walks the spec ensuring every CategoryOption -> Category -> CategoryCombo exists; idempotent on re-run. Polls the COC matrix until the cross-product count lands. Returns a typed CategoryComboBuildResult carrying every UID and a created-vs- reused breakdown.

ParameterTypeDescription
spec *object
poll_interval_secondsnumber
profile
timeout_secondsnumber

metadata_category_option_combo_get Metadata Category Option Combo Get

Fetch one CategoryOptionCombo by UID.

ParameterTypeDescription
uid *string
profile

metadata_category_option_combo_list_for_combo Metadata Category Option Combo List For Combo

List every CategoryOptionCombo materialised by one CategoryCombo.

ParameterTypeDescription
combo_uid *string
profile

metadata_category_option_group_get Metadata Category Option Group Get

Fetch one CategoryOptionGroup with member + group-set refs.

ParameterTypeDescription
uid *string
profile

metadata_category_option_group_members Metadata Category Option Group Members

Page through CategoryOptions in a group.

ParameterTypeDescription
uid *string
pageinteger
page_sizeinteger
profile

metadata_category_option_group_create Metadata Category Option Group Create

Create an empty CategoryOptionGroup.

ParameterTypeDescription
name *string
short_name *string
code
data_dimension_typestring
description
profile
uid

metadata_category_option_group_add_members Metadata Category Option Group Add Members

Add CategoryOptions to a group via the per-item POST shortcut.

ParameterTypeDescription
category_option_uids *array
uid *string
profile

metadata_category_option_group_remove_members Metadata Category Option Group Remove Members

Drop CategoryOptions from a group via the per-item DELETE shortcut.

ParameterTypeDescription
category_option_uids *array
uid *string
profile

metadata_category_option_group_delete Metadata Category Option Group Delete

Delete a CategoryOptionGroup — members stay.

ParameterTypeDescription
uid *string
profile

metadata_category_option_group_set_get Metadata Category Option Group Set Get

Fetch one CategoryOptionGroupSet by UID.

ParameterTypeDescription
uid *string
profile

metadata_category_option_group_set_create Metadata Category Option Group Set Create

Create an empty CategoryOptionGroupSet.

ParameterTypeDescription
name *string
short_name *string
code
data_dimensionboolean
data_dimension_typestring
description
profile
uid

metadata_category_option_group_set_add_groups Metadata Category Option Group Set Add Groups

Add groups to a CategoryOptionGroupSet via the per-item POST shortcut.

ParameterTypeDescription
group_uids *array
uid *string
profile

metadata_category_option_group_set_remove_groups Metadata Category Option Group Set Remove Groups

Drop groups from a CategoryOptionGroupSet via the per-item DELETE shortcut.

ParameterTypeDescription
group_uids *array
uid *string
profile

metadata_category_option_group_set_delete Metadata Category Option Group Set Delete

Delete a CategoryOptionGroupSet — member groups stay.

ParameterTypeDescription
uid *string
profile

metadata_data_set_get Metadata Data Set Get

Fetch one DataSet with its DSE + section + OU refs resolved.

ParameterTypeDescription
uid *string
profile

metadata_data_set_create Metadata Data Set Create

Create a DataSet. `period_type` is required (Monthly, Weekly, Daily, Quarterly, Yearly, …).

ParameterTypeDescription
name *string
period_type *string
short_name *string
category_combo_uid
code
description
expiry_days
form_name
open_future_periods
profile
timely_days
uid

metadata_data_set_rename Metadata Data Set Rename

Partial-update the label fields on a DataSet.

ParameterTypeDescription
uid *string
description
form_name
name
profile
short_name

metadata_data_set_add_element Metadata Data Set Add Element

Attach a DataElement to a DataSet, with optional per-set CategoryCombo override.

ParameterTypeDescription
data_element_uid *string
data_set_uid *string
category_combo_uid
profile

metadata_data_set_remove_element Metadata Data Set Remove Element

Detach a DataElement from a DataSet.

ParameterTypeDescription
data_element_uid *string
data_set_uid *string
profile

metadata_data_set_delete Metadata Data Set Delete

Delete a DataSet — DHIS2 rejects deletes on DataSets with saved values.

ParameterTypeDescription
uid *string
profile

metadata_section_get Metadata Section Get

Fetch one Section with its DE + indicator refs resolved.

ParameterTypeDescription
uid *string
profile

metadata_section_create Metadata Section Create

Create a Section attached to `data_set_uid`. Seed `data_element_uids` for an ordered DE list.

ParameterTypeDescription
data_set_uid *string
name *string
code
data_element_uids
description
indicator_uids
profile
show_column_totals
show_row_totals
sort_order
uid

metadata_section_rename Metadata Section Rename

Partial-update the label / sort-order fields on a Section.

ParameterTypeDescription
uid *string
description
name
profile
sort_order

metadata_section_add_element Metadata Section Add Element

Append (or insert at `position`) a DataElement to a Section.

ParameterTypeDescription
data_element_uid *string
section_uid *string
position
profile

metadata_section_remove_element Metadata Section Remove Element

Remove a DataElement from a Section (stays on the parent DataSet).

ParameterTypeDescription
data_element_uid *string
section_uid *string
profile

metadata_section_reorder Metadata Section Reorder

Replace the Section's `dataElements` with exactly the given UIDs in order.

ParameterTypeDescription
data_element_uids *array
section_uid *string
profile

metadata_section_delete Metadata Section Delete

Delete a Section — DEs stay on the parent DataSet.

ParameterTypeDescription
uid *string
profile

metadata_validation_rule_get Metadata Validation Rule Get

Fetch one ValidationRule with both expression sides.

ParameterTypeDescription
uid *string
profile

metadata_validation_rule_create Metadata Validation Rule Create

Create a ValidationRule.

ParameterTypeDescription
left_expression *string
name *string
operator *string
right_expression *string
short_name *string
code
description
importancestring
missing_value_strategystring
organisation_unit_levels
period_typestring
profile
uid

metadata_validation_rule_rename Metadata Validation Rule Rename

Partial-update the label fields on a ValidationRule.

ParameterTypeDescription
uid *string
description
name
profile
short_name

metadata_validation_rule_delete Metadata Validation Rule Delete

Delete a ValidationRule.

ParameterTypeDescription
uid *string
profile

metadata_validation_rule_group_get Metadata Validation Rule Group Get

Fetch one ValidationRuleGroup with rule refs.

ParameterTypeDescription
uid *string
profile

metadata_validation_rule_group_members Metadata Validation Rule Group Members

Page through ValidationRules in a group.

ParameterTypeDescription
uid *string
pageinteger
page_sizeinteger
profile

metadata_validation_rule_group_create Metadata Validation Rule Group Create

Create an empty ValidationRuleGroup.

ParameterTypeDescription
name *string
code
description
profile
short_name
uid

metadata_validation_rule_group_add_members Metadata Validation Rule Group Add Members

Attach ValidationRules to a group.

ParameterTypeDescription
uid *string
validation_rule_uids *array
profile

metadata_validation_rule_group_remove_members Metadata Validation Rule Group Remove Members

Detach ValidationRules from a group.

ParameterTypeDescription
uid *string
validation_rule_uids *array
profile

metadata_validation_rule_group_delete Metadata Validation Rule Group Delete

Delete a ValidationRuleGroup — member rules stay.

ParameterTypeDescription
uid *string
profile

metadata_predictor_get Metadata Predictor Get

Fetch one Predictor.

ParameterTypeDescription
uid *string
profile

metadata_predictor_create Metadata Predictor Create

Create a Predictor.

ParameterTypeDescription
expression *string
name *string
output_data_element_uid *string
short_name *string
annual_sample_countinteger
code
description
organisation_unit_level_uids
output_combo_uid
period_typestring
profile
sequential_sample_countinteger
uid

metadata_predictor_rename Metadata Predictor Rename

Partial-update the label fields on a Predictor.

ParameterTypeDescription
uid *string
description
name
profile
short_name

metadata_predictor_delete Metadata Predictor Delete

Delete a Predictor.

ParameterTypeDescription
uid *string
profile

metadata_predictor_group_get Metadata Predictor Group Get

Fetch one PredictorGroup with predictor refs.

ParameterTypeDescription
uid *string
profile

metadata_predictor_group_members Metadata Predictor Group Members

Page through Predictors in a group.

ParameterTypeDescription
uid *string
pageinteger
page_sizeinteger
profile

metadata_predictor_group_create Metadata Predictor Group Create

Create an empty PredictorGroup.

ParameterTypeDescription
name *string
code
description
profile
short_name
uid

metadata_predictor_group_add_members Metadata Predictor Group Add Members

Attach Predictors to a group.

ParameterTypeDescription
predictor_uids *array
uid *string
profile

metadata_predictor_group_remove_members Metadata Predictor Group Remove Members

Detach Predictors from a group.

ParameterTypeDescription
predictor_uids *array
uid *string
profile

metadata_predictor_group_delete Metadata Predictor Group Delete

Delete a PredictorGroup — member predictors stay.

ParameterTypeDescription
uid *string
profile

metadata_tracked_entity_attribute_get Metadata Tracked Entity Attribute Get

Fetch one TrackedEntityAttribute.

ParameterTypeDescription
uid *string
profile

metadata_tracked_entity_attribute_create Metadata Tracked Entity Attribute Create

Create a TrackedEntityAttribute.

ParameterTypeDescription
name *string
short_name *string
aggregation_typestring
code
confidentialboolean
description
display_in_list_no_programboolean
field_mask
form_name
generatedboolean
inheritboolean
legend_set_uids
option_set_uid
orgunit_scopeboolean
pattern
profile
uid
uniqueboolean
value_typestring

metadata_tracked_entity_attribute_rename Metadata Tracked Entity Attribute Rename

Partial-update the label fields on a TrackedEntityAttribute.

ParameterTypeDescription
uid *string
description
form_name
name
profile
short_name

metadata_tracked_entity_attribute_delete Metadata Tracked Entity Attribute Delete

Delete a TrackedEntityAttribute.

ParameterTypeDescription
uid *string
profile

metadata_tracked_entity_type_get Metadata Tracked Entity Type Get

Fetch one TrackedEntityType.

ParameterTypeDescription
uid *string
profile

metadata_tracked_entity_type_create Metadata Tracked Entity Type Create

Create a TrackedEntityType.

ParameterTypeDescription
name *string
short_name *string
allow_audit_log
code
description
feature_type
form_name
max_tei_count_to_return
min_attributes_required_to_search
profile
uid

metadata_tracked_entity_type_rename Metadata Tracked Entity Type Rename

Partial-update the label fields on a TrackedEntityType.

ParameterTypeDescription
uid *string
description
form_name
name
profile
short_name

metadata_tracked_entity_type_add_attribute Metadata Tracked Entity Type Add Attribute

Attach a TrackedEntityAttribute to a TrackedEntityType.

ParameterTypeDescription
attribute_uid *string
tet_uid *string
display_in_listboolean
mandatoryboolean
profile
searchableboolean

metadata_tracked_entity_type_remove_attribute Metadata Tracked Entity Type Remove Attribute

Detach a TrackedEntityAttribute from a TrackedEntityType.

ParameterTypeDescription
attribute_uid *string
tet_uid *string
profile

metadata_tracked_entity_type_delete Metadata Tracked Entity Type Delete

Delete a TrackedEntityType.

ParameterTypeDescription
uid *string
profile

metadata_program_get Metadata Program Get

Fetch one Program.

ParameterTypeDescription
uid *string
profile

metadata_program_create Metadata Program Create

Create a Program. WITH_REGISTRATION requires `tracked_entity_type_uid`.

ParameterTypeDescription
name *string
short_name *string
category_combo_uid
code
description
display_incident_date
enrollment_date_label
expiry_days
feature_type
form_name
incident_date_label
max_tei_count_to_return
min_attributes_required_to_search
only_enroll_once
profile
program_typestring
tracked_entity_type_uid
uid
use_first_stage_during_registration

metadata_program_rename Metadata Program Rename

Partial-update the label fields on a Program.

ParameterTypeDescription
uid *string
description
form_name
name
profile
short_name

metadata_program_set_labels Metadata Program Set Labels

Set the v43-only Program UI label overrides shown in capture / tracker apps. DHIS2 2.43 lets each Program override the default "Enrollments" / "Events" / "Program stages" terminology. Pass only the labels to change (2-255 chars each). Requires the active DHIS2 to be v43.

ParameterTypeDescription
uid *string
enrollments_label
events_label
profile
program_stages_label

metadata_program_set_change_log_enabled Metadata Program Set Change Log Enabled

Toggle the v43-only `enableChangeLog` audit flag on a Program. Behavioural switch — gates the per-program change-log endpoints (`/api/tracker/enrollments/{uid}/changeLogs` etc.). Orthogonal to the UI label setters. Requires the active DHIS2 to be v43.

ParameterTypeDescription
enabled *boolean
uid *string
profile

metadata_program_set_enrollment_category_combo Metadata Program Set Enrollment Category Combo

Set the v43-only `enrollmentCategoryCombo` reference on a Program. An alt CategoryCombo applied specifically at enrollment time, distinct from the Program's regular `categoryCombo`. Requires the active DHIS2 to be v43.

ParameterTypeDescription
category_combo_uid *string
uid *string
profile

metadata_program_add_attribute Metadata Program Add Attribute

Attach a TrackedEntityAttribute to a Program's enrollment form.

ParameterTypeDescription
attribute_uid *string
program_uid *string
allow_future_dateboolean
display_in_listboolean
mandatoryboolean
profile
render_options_as_radioboolean
searchableboolean
sort_order

metadata_program_remove_attribute Metadata Program Remove Attribute

Detach a TrackedEntityAttribute from a Program's enrollment form.

ParameterTypeDescription
attribute_uid *string
program_uid *string
profile

metadata_program_add_organisation_unit Metadata Program Add Organisation Unit

Scope a Program to another OrganisationUnit.

ParameterTypeDescription
organisation_unit_uid *string
program_uid *string
profile

metadata_program_remove_organisation_unit Metadata Program Remove Organisation Unit

Drop an OrganisationUnit from a Program's scope.

ParameterTypeDescription
organisation_unit_uid *string
program_uid *string
profile

metadata_program_delete Metadata Program Delete

Delete a Program.

ParameterTypeDescription
uid *string
profile

metadata_program_stage_get Metadata Program Stage Get

Fetch one ProgramStage with its PSDE list resolved.

ParameterTypeDescription
uid *string
profile

metadata_program_stage_create Metadata Program Stage Create

Create a ProgramStage under `program_uid`.

ParameterTypeDescription
name *string
program_uid *string
auto_generate_event
code
description
feature_type
generated_by_enrollment_date
min_days_from_start
period_type
profile
repeatable
short_name
sort_order
standard_interval
uid
validation_strategy

metadata_program_stage_rename Metadata Program Stage Rename

Partial-update the label fields on a ProgramStage.

ParameterTypeDescription
uid *string
description
form_name
name
profile
short_name

metadata_program_stage_add_element Metadata Program Stage Add Element

Attach a DataElement to a ProgramStage's PSDE list.

ParameterTypeDescription
data_element_uid *string
stage_uid *string
allow_future_dateboolean
allow_provided_elsewhereboolean
compulsoryboolean
display_in_reportsboolean
profile
render_options_as_radioboolean
sort_order

metadata_program_stage_remove_element Metadata Program Stage Remove Element

Detach a DataElement from a ProgramStage's PSDE list.

ParameterTypeDescription
data_element_uid *string
stage_uid *string
profile

metadata_program_stage_reorder Metadata Program Stage Reorder

Replace the PSDE list with exactly the given DE UIDs in order.

ParameterTypeDescription
data_element_uids *array
stage_uid *string
profile

metadata_program_stage_delete Metadata Program Stage Delete

Delete a ProgramStage.

ParameterTypeDescription
uid *string
profile

metadata_organisation_unit_get Metadata Organisation Unit Get

Fetch one OrganisationUnit by UID.

ParameterTypeDescription
uid *string
profile

metadata_organisation_unit_tree Metadata Organisation Unit Tree

Walk a subtree rooted at `root_uid` at bounded depth.

ParameterTypeDescription
root_uid *string
max_depthinteger
profile

metadata_organisation_unit_create Metadata Organisation Unit Create

Create a child OU under `parent_uid`. `opening_date` is ISO-8601.

ParameterTypeDescription
name *string
opening_date *string
parent_uid *string
short_name *string
code
description
profile
uid

metadata_organisation_unit_move Metadata Organisation Unit Move

Reparent an OU. DHIS2 recomputes `path` + `hierarchyLevel` server-side.

ParameterTypeDescription
new_parent_uid *string
uid *string
profile

metadata_organisation_unit_delete Metadata Organisation Unit Delete

Delete an OU — DHIS2 rejects deletes on units with children or data.

ParameterTypeDescription
uid *string
profile

metadata_organisation_unit_group_get Metadata Organisation Unit Group Get

Fetch one OrganisationUnitGroup with member + group-set refs inline.

ParameterTypeDescription
uid *string
profile

metadata_organisation_unit_group_members Metadata Organisation Unit Group Members

Page through OUs that belong to one group.

ParameterTypeDescription
uid *string
pageinteger
page_sizeinteger
profile

metadata_organisation_unit_group_create Metadata Organisation Unit Group Create

Create an empty OrganisationUnitGroup.

ParameterTypeDescription
name *string
short_name *string
code
color
description
profile
uid

metadata_organisation_unit_group_add_members Metadata Organisation Unit Group Add Members

Add OUs to a group via the per-item POST shortcut.

ParameterTypeDescription
ou_uids *array
uid *string
profile

metadata_organisation_unit_group_remove_members Metadata Organisation Unit Group Remove Members

Drop OUs from a group via the per-item DELETE shortcut.

ParameterTypeDescription
ou_uids *array
uid *string
profile

metadata_organisation_unit_group_delete Metadata Organisation Unit Group Delete

Delete an OrganisationUnitGroup — members stay.

ParameterTypeDescription
uid *string
profile

metadata_organisation_unit_group_set_get Metadata Organisation Unit Group Set Get

Fetch one group set with per-group member counts. Return shape: `{"group_set": {...}, "member_counts": {"<group_uid>": <int or null>}}` — a null count means DHIS2 returned an unreadable `~size` (unknown), not an empty group.

ParameterTypeDescription
uid *string
profile

metadata_organisation_unit_group_set_create Metadata Organisation Unit Group Set Create

Create an empty OrganisationUnitGroupSet.

ParameterTypeDescription
name *string
short_name *string
code
compulsoryboolean
data_dimensionboolean
description
profile
uid

metadata_organisation_unit_group_set_add_groups Metadata Organisation Unit Group Set Add Groups

Add groups to a group set via the per-item POST shortcut.

ParameterTypeDescription
group_uids *array
uid *string
profile

metadata_organisation_unit_group_set_remove_groups Metadata Organisation Unit Group Set Remove Groups

Drop groups from a group set via the per-item DELETE shortcut.

ParameterTypeDescription
group_uids *array
uid *string
profile

metadata_organisation_unit_group_set_delete Metadata Organisation Unit Group Set Delete

Delete an OrganisationUnitGroupSet — groups stay.

ParameterTypeDescription
uid *string
profile

metadata_organisation_unit_level_get Metadata Organisation Unit Level Get

Fetch one level row — pass `uid` or `level` (numeric depth), not both.

ParameterTypeDescription
level
profile
uid

metadata_organisation_unit_level_rename Metadata Organisation Unit Level Rename

Rename a level row — pass `uid` or `level` (numeric depth), not both.

ParameterTypeDescription
name *string
code
level
offline_levels
profile
uid

metadata_option_set_sync Metadata Option Set Sync

Idempotent bulk sync — reconcile an OptionSet against a spec. `spec` is a list of `{code, name, sort_order?}` dicts. Returns a typed `UpsertReport` as a JSON-friendly dict: codes grouped into `added` / `updated` / `removed` / `skipped`. `remove_missing=True` also deletes options whose code isn't in the spec. `dry_run=True` previews without writing.

ParameterTypeDescription
set_ref *string
spec *array
dry_runboolean
profile
remove_missingboolean

profile_list Profile List

List every DHIS2 profile the server can see. Returns one entry per profile with name, base_url, auth kind, source (`project-toml` | `global-toml`), source_path, and whether it's the effective default. Project profiles shadow global ones with the same name.

profile_verify Profile Verify

Verify one profile by calling /api/system/info and /api/me. Returns `{name, ok, base_url, auth, version, username, latency_ms, error}`. Useful to pick between profiles interactively — the agent can list then verify the likely one before calling other tools with it.

ParameterTypeDescription
name *string

profile_verify_all Profile Verify All

Verify every known profile. Returns one result per profile.

profile_show Profile Show

Show a profile with secrets redacted (token/password/client_secret → '***').

ParameterTypeDescription
name *string

route_list Route List

List DHIS2 integration routes (GET /api/routes).

ParameterTypeDescription
fieldsstring
profile

route_get Route Get

Fetch one route by UID or code.

ParameterTypeDescription
route *string
fields
profile

route_create Route Create

Create a route via POST /api/routes. `payload` must include at minimum `code`, `name`, `url`. Optional fields: `auth` (headers/basic/OIDC), `headers`, `authorities`, `disabled`.

ParameterTypeDescription
payload *objectTyped body for `POST /api/routes` + `PUT /api/routes/{uid}`. DHIS2 accepts (and requires on create) at least `code`, `name`, `url`. `extra="allow"` preserves anything else the server cares about that…
profile

route_update Route Update

Replace a route via PUT /api/routes/{uid} (full-object semantics). `route` accepts the route's UID or its `code`.

ParameterTypeDescription
payload *objectTyped body for `POST /api/routes` + `PUT /api/routes/{uid}`. DHIS2 accepts (and requires on create) at least `code`, `name`, `url`. `extra="allow"` preserves anything else the server cares about that…
route *string
profile

route_patch Route Patch

Apply a JSON Patch (RFC 6902) to a route. `route` accepts the route's UID or its `code`. Each patch element is one `{op, path, value?, from?}` operation; the `from` JSON key maps to the typed `from_` alias.

ParameterTypeDescription
patch *array
route *string
profile

route_delete Route Delete

Delete a route. `route` accepts the route's UID or its `code`.

ParameterTypeDescription
route *string
profile

route_run Route Run

Execute a route — DHIS2 proxies the request to the configured target URL. `route` accepts the route's UID or its `code`. `method` is GET (default), POST, PUT, or DELETE. `sub_path` is appended to the route's target URL — required when the route URL ends in a wildcard (`/**`). `body` is the JSON payload for POST/PUT.

ParameterTypeDescription
route *string
body
methodstring
profile
sub_path

system_whoami System Whoami

Return the authenticated DHIS2 user. `profile` selects a named profile from the project or global `profiles.toml`. Omit to use the default (from `DHIS2_PROFILE` env, raw `DHIS2_URL/PAT` env, or the TOML `default`).

ParameterTypeDescription
profile

system_info System Info

Return /api/system/info for the given profile (see `system_whoami` for precedence).

ParameterTypeDescription
profile

system_settings_set System Settings Set

Set a single DHIS2 system setting. Login-page relevant keys: `applicationTitle` (no `key` prefix!), `keyApplicationIntro`, `keyApplicationNotification`, `keyApplicationFooter`, `keyApplicationRightFooter`, `keyStyle`.

ParameterTypeDescription
key *string
value *string
profile

system_settings_set_many System Settings Set Many

Bulk-set DHIS2 system settings from a `{key: value}` mapping; returns keys applied.

ParameterTypeDescription
settings *object
profile

system_settings_get System Settings Get

Read a single DHIS2 system setting (null when unset).

ParameterTypeDescription
key *string
profile

system_settings_list System Settings List

Return every DHIS2 system setting as a key->value snapshot.

ParameterTypeDescription
profile

system_server_info System Server Info

Return the MCP server's active plugin tree + bound package versions. Process-local introspection — no DHIS2 client is opened. Tells the caller which plugin tree (`v41` / `v42` / `v43` / `v44`) was selected at startup, where that selection came from (`profile.version`, `DHIS2_VERSION` env, or default fallback), and which `dhis2w-*` packages are installed. Useful for MCP clients that want to detect version mismatch before issuing version-sensitive calls.

system_calendar_get System Calendar Get

Return the active DHIS2 calendar (`keyCalendar`) — `iso8601` by default.

ParameterTypeDescription
profile

system_calendar_set System Calendar Set

Set the DHIS2 calendar setting and return the value written. `calendar` must be one of the canonical DHIS2 calendar names — coptic, ethiopian, gregorian, islamic, iso8601, julian, nepali, persian, thai. Rarely needs to be changed.

ParameterTypeDescription
calendar *stringCanonical DHIS2 calendar names (the values DHIS2 accepts on `keyCalendar`). Matches the `@Component` `name()` of every calendar implementation under `org.hisp.dhis.calendar.impl` on `dhis2/dhis2w-cor…
profile

user_list User List

List DHIS2 users. Accepts the full metadata query surface: fields selector, repeatable `filters` / `order`, `root_junction`, paging. `paging=False` returns every user in one response.

ParameterTypeDescription
fieldsstring
filters
order
page
page_size
paging
profile
root_junction

user_get User Get

Fetch one user by UID or username.

ParameterTypeDescription
uid_or_username *string
fields
profile

user_invite User Invite

Create a user + dispatch the invitation email (POST /api/users/invite).

ParameterTypeDescription
email *string
first_name *string
surname *string
org_unit_uids
profile
user_role_uids
username

user_reinvite User Reinvite

Re-send the invitation email for a pending user.

ParameterTypeDescription
uid *string
profile

user_reset_password User Reset Password

Trigger DHIS2's password-reset email for a user.

ParameterTypeDescription
uid *string
profile

user_group_list User Group List

List DHIS2 user groups with the metadata query surface.

ParameterTypeDescription
fieldsstring
filters
order
page_size
paging
profile

user_group_get User Group Get

Fetch one user group by UID.

ParameterTypeDescription
uid *string
fields
profile

user_group_add_member User Group Add Member

Add a user to a user group.

ParameterTypeDescription
group_uid *string
user_uid *string
profile

user_group_remove_member User Group Remove Member

Remove a user from a user group.

ParameterTypeDescription
group_uid *string
user_uid *string
profile

user_group_sharing_get User Group Sharing Get

Return the current sharing block for one user group.

ParameterTypeDescription
uid *string
profile

user_role_list User Role List

List DHIS2 user roles with the metadata query surface.

ParameterTypeDescription
fieldsstring
filters
order
page_size
paging
profile

user_role_get User Role Get

Fetch one user role by UID.

ParameterTypeDescription
uid *string
fields
profile

user_role_authority_list User Role Authority List

Return the sorted authorities carried by one role.

ParameterTypeDescription
uid *string
profile

user_role_add_user User Role Add User

Grant a user a role.

ParameterTypeDescription
role_uid *string
user_uid *string
profile

user_role_remove_user User Role Remove User

Revoke a user's role.

ParameterTypeDescription
role_uid *string
user_uid *string
profile