The questionnaire will be shown to members after they sign up and contains a custom list of questions and answers.
PUT https://:subdomain.cobot.me/api/questionnaire
This will update or create a questionnaire for the space.
PUT https://co-up.cobot.me/api/questionnaire
Request:
{ "message": 'welcome message', "questions": [{ "text": 'What do you like?', "type": 'checkboxes', "required": false, "choices": ['cake', 'apple'], "public": true }] }
Response:
{ "message": 'welcome message', "questions": [{ "text": 'What do you like?', "type": 'checkboxes', "required": false, "choices": ['cake', 'apple'], "public": true }] }
The Questionnaire will be shown to members after they sign up and contains a custom list of questions and answers.
GET https://:subdomain.cobot.me/api/questionnaire
Response:
{ "message": 'welcome message', "questions": [{ "text": 'What do you like?', "type": 'checkboxes', "required": false, "choices": ['cake', 'apple'], "public": true }] }
As admin:
GET https://:subdomain.cobot.me/api/memberships/:membership_id/answers
As member:
GET https://:subdomain.cobot.me/api/membership/answers
This returns the answers a member has given to the questions the space has set up. Only answers that are part of the space's current questionnaire are returned.
As admin:
GET https://co-up.cobot.me/api/memberships/12345/answers
As member:
GET https://co-up.cobot.me/api/membership/answers
Response:
[{ "question": "What is your Twitter handle?", "answer": "@cobot_me" }]
If no answers have been given yet returns an empty array but still a 200 code.
GET https://:subdomain.cobot.me/api/answers
This returns all current members and the answered publicly visible questions. If the access is authenticated it will return all answered.
You can pass an optional membership_ids
query parameter, containing a comma
separated list of membership ids to return answers for.
GET https://co-up.cobot.me/api/memberships/12345/answers
Response:
[{ membership: { name: Cobot, id: "0c4f75fa14924423810d6f12aeb56fbb" address: { name: nil, company: 'Cobot', country: 'Germany' }}, answers: [{ "question": "What is your Twitter handle?", "answer": "@cobot_me" }] }]
As admin:
PUT https://:subdomain.cobot.me/api/memberships/:membership_id/answers
As member:
PUT https://:subdomain.cobot.me/api/membership/answers
This will change answers that are send and discard answers that are not send. An empty list will have the same effect as using DELETE.
As admin:
PUT https://co-up.cobot.me/api/memberships/12345/answers
As member:
PUT https://:subdomain.cobot.me/api/membership/answers
Request:
[{ "question": "What is your Twitter handle?", "answer": "@cobot_me" }]
Response:
[{ "question": "What is your Twitter handle?", "answer": "@cobot_me" }]
As admin:
DELETE https://:subdomain.cobot.me/api/memberships/:membership_id/answers
As member:
DELETE https://:subdomain.cobot.me/api/membership/answers
As admin:
DELETE https://co-up.cobot.me/api/memberships/12345/answers
As member:
DELETE https://:subdomain.cobot.me/api/membership/answers
Returns an empty 204 response