Skip to main content

Config for collections

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

{
"collections_endpoint": "https://app.openfn.org",
"collections_token": "x.y.z"
}

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": {
"collections_endpoint": {
"title": "Collections api endpoint",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"description": "The base URL (http://app.openfn.org)",
"format": "uri",
"minLength": 1,
"examples": [
"https://app.openfn.org"
],
"default": "https://app.openfn.org"
},
"collections_token": {
"title": "Access Token",
"type": "string",
"description": "Access token for the collection",
"examples": [
"x.y.z"
]
}
},
"type": "object",
"additionalProperties": true,
"required": [
"collections_endpoint",
"collections_token"
]
}