Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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?

share|improve this question
    
Any one know a resolution? –  Praveen Prasannan Mar 27 at 8:26

1 Answer 1

up vote 1 down vote accepted

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
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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