Config for commcare
Jobs that use the commcare
adaptor may require authentication. A
"credential" for the commcare
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://www.commcarehq.org",
"domain": "some-proof-of-concept",
"appId": "the-long-uuid-in-the-url-that-designates-a-unique-commcare-project"
}
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 CommCare host url",
"format": "uri",
"minLength": 1,
"examples": [
"https://www.commcarehq.org"
]
},
"domain": {
"title": "Domain",
"type": "string",
"description": "The CommCare domain name",
"minLength": 1,
"examples": [
"some-proof-of-concept"
]
},
"apiKey": {
"title": "API Key",
"type": "string",
"description": "The CommCare API Key",
"minLength": 1,
"examples": [
"the-long-uuid-provided-by-commcare-that-authenticates-requests"
]
},
"appId": {
"title": "App ID",
"type": "string",
"description": "Your CommCare project UUID",
"minLength": 1,
"examples": [
"the-long-uuid-in-the-url-that-designates-a-unique-commcare-project"
]
},
"username": {
"title": "Username",
"type": "string",
"description": "The username to log in to CommCare",
"minLength": 1,
"examples": [
"test@openfn.org"
]
},
"password": {
"title": "Password",
"type": "string",
"description": "The password to log in to CommCare",
"writeOnly": true,
"minLength": 1,
"examples": [
"superscretepassword"
]
}
},
"type": "object",
"additionalProperties": true,
"required": [
"hostUrl",
"domain",
"appId"
]
}