Ga naar inhoud

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.

Sample request

HTTP Request
GET /api/v1/protocols/5.json HTTP/1.1
Host: api.example.com
Authorization: Bearer YOUR_API_TOKEN
{
"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"
}
]
}
]
}
Name Type Description
id integer Id uniquely identifying the protocol.
name string The name of the protocol, as shown when preparing answers
description string Blob of text what the protocol is for
active boolean If false, the protocol doesn’t show up in the interface.
automatic boolean true for automatic protocols, we don’t show settings (yet).
measurements array array of hashes of format measurements.

GET /api/v1/protocols

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