Population Sets
Core
List population sets
/population-setsList population sets (across all workspaces and forms).
Filters
Provided via query string:
| Name | Type | Description |
|---|---|---|
id |
String |
ID |
formId |
String |
Owning form's ID |
workspaceId |
String |
Owning workspace's ID |
name |
String |
Name |
published |
Boolean |
Published |
Parameters
Provided via query string:
| Name | Type | Description |
|---|---|---|
limit |
Number |
Number of items to return |
offset |
Number |
Number of items to skip before returning |
Response
An array of PopulationSet objects.
Count population sets
/population-sets/countCount population sets (across all workspaces and forms).
Filters
Provided via query string:
| Name | Type | Description |
|---|---|---|
id |
String |
ID |
formId |
String |
Owning form's ID |
workspaceId |
String |
Owning workspace's ID |
name |
String |
Name |
published |
Boolean |
Published |
Response
A Count object.
Add a population set
/population-setsAdd a population set (to a form or workspace).
Request Body
As JSON object with the following contents:
| Property | Type | Description |
|---|---|---|
formId |
String |
Owning form's ID Nullable |
workspaceId |
String |
Owning workspace's ID Nullable |
name |
String |
Name |
Note that either a formId or workspaceId must be provided.
Example
{
"formId": "0963435f-f5a4-4379-b751-7573e9be5ec6",
"workspaceId": null,
"name": "Example",
}
Response
A PopulationSet object.
Note that since new population sets are created without any populations, they're created as not published.
Get a population set
/population-sets/{id}Update a population set
/population-sets/{id}Update a population set.
Request Body
As JSON object with the following contents:
| Property | Type | Description |
|---|---|---|
name |
String |
Name Unchanged if null |
published |
Boolean |
Published Unchanged if null |
Response
A PopulationSet object.
Delete a population set
/population-sets/{id}Delete a population set.
Response
An empty 204.
Mapped Forms
These endpoints only apply to workspace-level population sets.
List mapped form IDs
/population-sets/{id}/form-idsList the IDs of forms mapped to this population set.
Response
An array of form IDs.
Set mapped form IDs
/population-sets/{id}/form-idsSet the IDs of forms mapped to this population set.
Request Body
A JSON array of form IDs.
Response
The resultant array of form IDs.
Populations
List populations in a set
/population-sets/{id}/populationsList populations in a population set.
Parameters
Provided via query string:
| Name | Type | Description |
|---|---|---|
limit |
Number |
Number of items to return |
offset |
Number |
Number of items to skip before returning |
Response
An array of Population objects.
Count populations in a set
/population-sets/{id}/populations/countAdd populations
/population-sets/{id}/populationsAdd populations.
Request Body
An array of JSON object with the following contents:
| Property | Type | Description |
|---|---|---|
key |
String |
Population identifier |
user |
String |
Optional user binding (email or ID) Nullable |
participant |
String |
Optional participant binding Nullable |
data |
Object |
Token key-value map |
Example
[
{
"key": "First",
"user": null,
"participant": null,
"data": {
"text": "Hello World",
"choices": "a;b;c"
}
},
{
"key": "Second",
"user": null,
"participant": null,
"data": {
"text": "Goodbye World",
"choices": "d;e;f"
}
}
]
Response
An array of population IDs.
Delete all populations in a set
/population-sets/{id}/populationsDelete all populations in a set.
Response
An empty 204.
Get a population
/population-sets/{id}/populations/{id}Delete a population
/population-sets/{id}/populations/{id}Delete a population.
Response
An empty 204.