Skip to main content

Config for dhis2

Jobs that use the dhis2 adaptor may require authentication. A "credential" for the dhis2 adaptor will follow the schema below. When using the CLI, you can set up your own state.configuration by using the sample below.

Sample Configuration

Paste this into the configuration key of your state.json file and modify the values to run jobs locally.

{
"hostUrl": "https://play.dhis2.org/2.36.6",
"password": "@some(!)Password",
"username": "admin"
}

Full Schema

The full configuration schema describes each attribute of the credential and notes those that are required.

{
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"hostUrl": {
"title": "Host URL",
"type": "string",
"description": "The base DHIS2 instance URL",
"format": "uri",
"minLength": 1,
"examples": [
"https://play.dhis2.org/2.36.6"
]
},
"username": {
"title": "Username",
"type": "string",
"description": "Username",
"minLength": 1,
"examples": [
"admin"
]
},
"password": {
"title": "Password",
"type": "string",
"description": "Password",
"writeOnly": true,
"minLength": 1,
"examples": [
"@some(!)Password"
]
},
"apiVersion": {
"title": "API Version",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"placeholder": "38",
"description": "DHIS2 api version",
"minLength": 1,
"examples": [
"v2"
]
}
},
"type": "object",
"additionalProperties": true,
"required": [
"hostUrl",
"password",
"username"
]
}