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",
"writeOnly": true,
"examples": [
"x.y.z"
]
},
"project_id": {
"title": "Project Id",
"type": "string",
"description": "The project id for the run",
"writeOnly": true,
"examples": [
"46569296-9d82-4a32-8737-fbe64b7851cf"
]
}
},
"type": "object",
"additionalProperties": true,
"required": [
"collections_endpoint",
"collections_token"
]
}