Skip to main content

Config for kobotoolbox

Jobs that use the kobotoolbox adaptor may require authentication. A "credential" for the kobotoolbox 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.

{
"username": "test@openfn.org",
"baseURL": "https://kf.kobotoolbox.org",
"password": "@some(!)Strongpassword",
"apiVersion": "v2"
}

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": {
"baseURL": {
"title": "Base URL",
"type": "string",
"default": "https://kf.kobotoolbox.org",
"description": "Kobotoolbox URL",
"format": "uri",
"minLength": 1,
"examples": [
"https://kf.kobotoolbox.org"
]
},
"username": {
"title": "Username",
"type": "string",
"description": "Kobotoolbox username",
"minLength": 1,
"examples": [
"test@openfn.org"
]
},
"password": {
"title": "Password",
"type": "string",
"description": "Kobotoolbox password",
"writeOnly": true,
"minLength": 1,
"examples": [
"@some(!)Strongpassword"
]
},
"apiVersion": {
"title": "API Version",
"type": "string",
"placeholder": "v2",
"description": "Kobotoolbox API version to use",
"minLength": 1,
"examples": [
"v2"
]
}
},
"type": "object",
"additionalProperties": true,
"required": [
"username",
"baseURL",
"password",
"apiVersion"
]
}