Skip to main content

Protocols

A protocol is a group of questionnaires that users can prepare. They are divided into measurements.

There are two flavors of protocols. Normal protocol are not much more than simple lists of questionnaires that you can prepare for the user by hand. Automatic protocols can be subscribed to, to fill out questionnaire every month or even multiple times a day, see protocol subscriptions.

Get a single protocol

Sample request

GET /api/v1/protocols/5.json
Status: 200 OK
{
"id": 5,
"name": "Protocol",
"description": "foo bar",
"active": true,
"automatic": false,
"measurements": [
{
"id": 4,
"name": "Measurement 3",
"description": null,
"active": true,
"label": "intake",
"protocol_id": 5,
"questionnaires": [
{
"id": 3,
"key": "roqua_simple",
"quby_key": "simple",
"name": "Simpele Vragenlijst"
}
]
}
]
}

Response Attributes

NameTypeDescription
idintegerId uniquely identifying the protocol.
namestringThe name of the protocol, as shown when preparing answers
descriptionstringBlob of text what the protocol is for
activebooleanIf false, the protocol doesn't show up in the interface.
automaticbooleantrue for automatic protocols, we don't show settings (yet).
measurementsarrayarray of hashes of format measurements.

Get a all protocols

GET /api/v1/protocols

Returns an array of protocols, each with the same data as show.