I need to custom render the survey on the client side so I need to be able to get it's settings via a REST (or web service) call. I tried calling Web/Lists(listguid)/Fields and I get all the fields including the survey questions, but I don't see how to distinguish "question" fields from all other fields - there is no special type or flag saying that this field is a question. Any idea how to do that?
1
-
Any one know a resolution? – Praveen Prasannan Mar 27 '14 at 8:26
Add a comment
|
How to get the list of questions from a Survey List via REST API
You could specify SPField.CanBeDeleted property in filter expression to get the list of questions from a Survey List:
/_api/Web/Lists/getByTitle('Survey')/fields?$filter=(CanBeDeleted eq true)
The following endpoint returns all the answers from a Survey list:
/_api/Web/Lists/getByTitle('Survey')/items