(Quick Reference)
Service: Show a question
Description: This web service return an existing question of the specified id in JSON format
URL:
https://BASE_URL/api/VERSION/questions/{id}
Method: GET
Parameters:
Name | Description | Type | Required | Example values |
---|
id | The numerical ID of the desired question | Long | Yes | 777 |
Success Output
Success case: response.status = 200
{
"id": 7,
"survey": {
"id": 4,
"name": "Quality and satisfaction with documentation",
"href": "/api/v1.0/surveys/4"
},
"text": "How satisfied are you with the appropriateness of the documentation to your needs?",
"type": "2",
"isMandatory": true,
"isPhotoMandatory": false,
"enabled": true,
"questionOptions": [
{
"id": 10,
"text": "Satisfied",
"href": "/api/v1.0/questionOptions/10"
},
{
"id": 11,
"text": "Dissatisfied",
"href": "/api/v1.0/questionOptions/11"
},
{
"id": 12,
"text": "Neutral",
"href": "/api/v1.0/questionOptions/12"
}
],
"answers": [],
"questionLines": null,
"questionColumns": null,
"dynamicLines": false,
"addFilterByCategory": false,
"organization": "entity1",
"dateCreated": "2016-08-29T10:01:57Z",
"lastUpdated": "2016-08-29T10:20:10Z"
}
Failure Output
Failure case: response.status = 400
{
"error": "invalid_param_type",
"error_description": "The type of parameter id you provided is not valid for this request."
}
Failure case: response.status = 404
{
"error": "not_found",
"error_description": "The question with the id 99 doesn't exist."
}