get https://apidocs.cloud.answerhub.com/services/v2/node//survey.json
This endpoint allows the user to retrieve the survey specific to a node. In this case, the only nodes that will have surveys will be questions.
/services/v2/node/{node}/survey.json
Permissions & Notes:
There is no permission required to make this API request.
Sample Request
In the example request below, the user wants to find the survey for a question posted with a node ID of 123.
-u "answerhub:test123"
-H "Accept: application/json"
-H "Content-type: application/json"
-X GET "http://apidocs.cloud.answerhub.com/services/v2/node/123/survey.json
Successful Sample Response
HTTP Status: 201
{
“id”:<long id>,
“creationDate”:<>,
“modificationDate”:<>,
“title”:"<string>",
“deadline”:<date>,
“surveyElement”:[
{
“content”:"<string>",
“id”:<long id>
}
]
}
Expected Error Response
HTTP Status: 404
{
"error": "Node has no survey"
}