Definition

GET - 3/surveys/{surveyId}/questions?asFlatList={asFlatList}&stripHtml={stripHtml}&lang={lang}&top={top}&skip={skip}&select={select}&filter={filter}

Retrieve all questions from a survey which match the passed criteria.

Request information

surveyId

The id of the survey for which the questions will be retrieved.


Type integer
Additional info
Required
asFlatList

Indicate if you would like to return the questions as a flat list or as a tree structure.


Type boolean
Additional info
Optional, Default value is False
stripHtml

Indicate if you would like to strip all HTML tags in the question caption and response caption.


Type boolean
Additional info
Optional, Default value is False
lang

The language in which you would like to retrieve the questions. If the requested language is not available we will use the default language from the survey. The available language code can be found for each survey in the Survey - Langs property.


Type string
Additional info
Optional
top

Select only the first N questions of the list. read more


Type string
Additional info
Optional, Default value is 1000
skip

Skip the first N questions of the list. read more


Type string
Additional info
Optional
select

Define the properties which you want in the result. If empty all properties are returned except the ones which don't contain data. read more


Type string
Additional info
Optional
filter

Select only the questions that satisfy the predicate expression. read more


Type string
Additional info
Optional

Response information

Payload containing a list of survey questions.


Meta

The metadata such as paging parameters, status code, timestamp,... which are related to this request.


Type MetaData
Data

The actual data returned by the request.


Type Collection of SurveyQuestion
Links

HATEOAS related to this object. It wil contain relevant url's such as previous and next page for paged results, create/update/delete action. These url's can be used in your application for the next steps in your application logic.


Type Hateoas
Sample:
{
  "Meta": {
    "Status": 1,
    "TotalRowCount": 1,
    "Limit": 1,
    "Offset": 1,
    "TotalPageCount": 1,
    "StartRec": 1,
    "StopRec": 1,
    "Timestamp": "2024-11-10T03:08:14.1120976Z",
    "IsFiltered": true
  },
  "Data": [
    {
      "$id": "1",
      "Id": 1,
      "DataLabel": "sample string 2",
      "Language": "sample string 3",
      "QuestionTypeId": 4,
      "Caption": "sample string 5",
      "Required": true,
      "DataTypeId": 7,
      "ScaleTypeId": 64,
      "Hidden": true,
      "MinValue": 1,
      "MaxValue": 1,
      "PageNumber": 8,
      "OrderNumber": 9,
      "QuestionNumber": 10,
      "ParentQuestionId": 11,
      "UseSentimentScore": true,
      "SubQuestions": [
        {
          "$ref": "1"
        },
        {
          "$ref": "1"
        }
      ],
      "QuestionResponses": [
        {
          "ResponseId": 2,
          "Caption": "sample string 3",
          "Hidden": true,
          "Other": true,
          "NotApplicable": true,
          "Order": 1,
          "Value": 1.0,
          "ScaleValue": 1
        },
        {
          "ResponseId": 2,
          "Caption": "sample string 3",
          "Hidden": true,
          "Other": true,
          "NotApplicable": true,
          "Order": 1,
          "Value": 1.0,
          "ScaleValue": 1
        }
      ]
    },
    {
      "$ref": "1"
    }
  ]
}
Sample:
<Payload xmlns:i="http://www.w3.org/2001/XMLSchema-instance" z:Id="i1" xmlns:z="http://schemas.microsoft.com/2003/10/Serialization/">
  <Data>
    <SurveyQuestion z:Id="i2">
      <Caption>sample string 5</Caption>
      <DataLabel>sample string 2</DataLabel>
      <DataTypeId>7</DataTypeId>
      <Hidden>true</Hidden>
      <Id>1</Id>
      <Language>sample string 3</Language>
      <MaxValue>1</MaxValue>
      <MinValue>1</MinValue>
      <OrderNumber>9</OrderNumber>
      <PageNumber>8</PageNumber>
      <ParentQuestionId>11</ParentQuestionId>
      <QuestionNumber>10</QuestionNumber>
      <QuestionResponses>
        <SurveyQuestionResponse z:Id="i3">
          <Caption>sample string 3</Caption>
          <Hidden>true</Hidden>
          <NotApplicable>true</NotApplicable>
          <Order>1</Order>
          <Other>true</Other>
          <ResponseId>2</ResponseId>
          <ScaleValue>1</ScaleValue>
          <Value>1</Value>
        </SurveyQuestionResponse>
        <SurveyQuestionResponse z:Ref="i3" />
      </QuestionResponses>
      <QuestionTypeId>4</QuestionTypeId>
      <Required>true</Required>
      <ScaleTypeId>64</ScaleTypeId>
      <SubQuestions>
        <SurveyQuestion z:Ref="i2" />
        <SurveyQuestion z:Ref="i2" />
      </SubQuestions>
      <UseSentimentScore>true</UseSentimentScore>
    </SurveyQuestion>
    <SurveyQuestion z:Ref="i2" />
  </Data>
  <Meta>
    <IsFiltered>true</IsFiltered>
    <Limit>1</Limit>
    <Offset>1</Offset>
    <StartRec>1</StartRec>
    <Status>1</Status>
    <StopRec>1</StopRec>
    <Timestamp>2024-11-10T03:08:14.1120976+00:00</Timestamp>
    <TotalPageCount>1</TotalPageCount>
    <TotalRowCount>1</TotalRowCount>
  </Meta>
</Payload>

Related Examples

Title
Register responses from your own code