Skip to main content

Developer README for the kobotoolbox adaptor

Source: https://github.com/OpenFn/adaptors/tree/main/packages/kobotoolbox

Language KoboToolbox

Language Pack for building expressions and operations to interact with the [TEMPLATE] API.

Documentation

post

sample configuration

{
"baseURL": "https://kf.kobotoolbox.org",
"username": "mamadou@openfn.org",
"password": "supersecret",
"apiVersion": "v2"
}

Get the list of forms

getForms({}, state => {
console.log(state.data);
return state;
});

Get submissions for a specific form

A query can be used to filter results.

getSubmissions(
{ formId: 'aXecHjmbATuF6iGFmvBLBX', query: { end: { $gte: '2020-11-20' } } },
state => {
console.log(state.data);
return state;
}
);

Development

Clone the adaptors monorepo. Follow the Getting Started guide inside to get set up.

Run tests using pnpm run test or pnpm run test:watch

Build the project using pnpm build.

To just build the docs run pnpm build docs