3

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?

2

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
  • hello can i add survey list item using rest? – Vishal Thakkar May 2 '16 at 6:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.