Skip to main content

Config for magpi

Jobs that use the magpi adaptor may require authentication. A "credential" for the magpi 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",
"accessToken": "somEThINGkeyish"
}

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": {
"username": {
"title": "username",
"type": "string",
"description": "Magpi username",
"minLength": 1,
"examples": [
"test@openfn.org"
]
},
"accessToken": {
"title": "Access Token",
"type": "string",
"description": "Magpi access token",
"writeOnly": true,
"minLength": 1,
"examples": [
"somEThINGkeyish"
]
}
},
"type": "object",
"additionalProperties": true,
"required": [
"username",
"accessToken"
]
}