Questions
Questions define what has been asked to get the feedback. They give the meaning for the different feedback options. Questions are company-specific.
Summary of available resource patterns
Section titled “Summary of available resource patterns”| Code | URL |
|---|---|
GET | /v1/questions |
GET | /v1/questions/:key |
GET | /v1/questions/:key/surveys |
Question
Section titled “Question”JSON presentation of question.
Properties
Section titled “Properties”| Name | Description |
|---|---|
| key | The identifier of the question |
| name | The question |
| locale | IETF BCP 47-formatted language tag The default language of the question. For example: en-US. |
Example JSON objects
Section titled “Example JSON objects”Single question without surveys.
Section titled “Single question without surveys.”{ "key": 1, "name": "How was your day?", "locale": "en-US"}GET /v1/questions
Section titled “GET /v1/questions”Lists the company’s questions.
Parameters
Section titled “Parameters”| Name | Description |
|---|---|
| offset | optional, zero-based numeric value The index of the first result returned and used to paginate results. |
| limit | optional, numeric value in range 1..100 The number of results returned and used to paginate results. Default value is |
Example requests and responses
Section titled “Example requests and responses”GET /v1/questions?offset=0&limit=5
Section titled “GET /v1/questions?offset=0&limit=5”{ "meta": { "offset": 0, "limit": 5, "total": 1 }, "data": [ { "key": 3, "name": "How was your day?", "locale": "en-US" } ]}Result
Section titled “Result”| Name | Description |
|---|---|
| Success | Object containing two properties: meta for additional information (of pagination etc.) and data for a list of questions. Empty list when company does not have any questions. |
GET /v1/questions/:key
Section titled “GET /v1/questions/:key”Retrieves a specific question.
Parameters
Section titled “Parameters”| Name | Description |
|---|---|
| key | required, identifier of the question |
Example requests and responses
Section titled “Example requests and responses”GET /v1/questions/3
Section titled “GET /v1/questions/3”{ "key": 3, "name": "How was your day?", "locale": "en-US"}Result
Section titled “Result”| Name | Description |
|---|---|
| Success | Question |
| Error | HTTP status code 404 when no question is found. |
GET /v1/questions/:key/surveys
Section titled “GET /v1/questions/:key/surveys”Lists surveys for specific question.
Parameters
Section titled “Parameters”| Name | Description |
|---|---|
| key | required, identifier of question |
| state | optional, one of active, ended, starting When present, the result only contains surveys in given state. |
| offset | optional, zero-based numeric value. The index of first result returned and used to paginate results. |
| limit | optional, numeric value in range 1..100. The number of results returned and used to paginate results Default value is 50 and maximum 100. |
Examples
Section titled “Examples”GET /v1/questions/3/surveys
Section titled “GET /v1/questions/3/surveys”{ "meta": { "offset": 0, "limit": 50, "total": 4 }, "data": [ { "key": 1, "folder": { "key": 3, "name": "Tampere" }, "timeZone": "Europe/Helsinki", "activePeriods": [ { "start": "2013-01-01T00:00:00.000+0200", "end": "2013-02-01T00:00:00.000+0200" }, { "start": "2013-03-01T00:00:00.000+0200", "end": "2013-04-01T00:00:00.000+0300" } ] }, { "key": 2, "folder": { "key": 4, "name": "London" }, "timeZone": "Europe/London", "activePeriods": [ { "start": "2013-01-01T00:00:00.000+0200", "end": "2013-02-01T00:00:00.000+0200" }, { "start": "2013-03-01T00:00:00.000+0200", "end": "2013-04-01T00:00:00.000+0300" } ] } ]}Result
Section titled “Result”| Name | Description |
|---|---|
| Success | Object containing two properties: meta for additional information (of pagination etc.) and data for a list of folders. |
| Error | HTTP status code 404 when no folder is found. |