Definition

GET - 3/surveys/{SurveyId}/questions/{QuestionId}/aggregates?filter={filter}&Period={Period}&ResponseId={ResponseId}

Retrieve the aggregates (Average, Median, StandardDeviation, NPS) from a question by the question label.

Required roles: Results (read)
Response cached for 60

Request information

NameDescriptionTypeAdditional information
SurveyId

The id of a survey.

integer

Required

QuestionId

The datalabel of a question.

string

Required

filter

Select only the respondents that satisfy the predicate expression, only these respondents will be used to calculate the result. read more

string

Optional

Period

When you want a timeline of the aggregates you can group the results by day, week, month, quarter or year.

string

Optional, Default value is null

ResponseId

Filter on a specific response

integer

Optional, Default value is 0

Response information

Payload containing the average, median, standarddeviation and optionally the NPS of a question.


NameDescriptionTypeAdditional information
Meta

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

MetaData

Data

The actual data returned by the request.

Collection of QuestionAggregate

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.

Hateoas

Sample:
{
  "Meta": {
    "Status": 1,
    "TotalRowCount": 1,
    "Limit": 1,
    "Offset": 1,
    "TotalPageCount": 1,
    "StartRec": 1,
    "StopRec": 1,
    "Timestamp": "2019-01-17T16:09:17.506819Z",
    "IsFiltered": true
  },
  "Data": [
    {
      "Date": "sample string 1",
      "ResponseCount": 2,
      "NPS": 3.1,
      "Median": 4.1,
      "Average": 5.1,
      "StandardDeviation": 6.1,
      "Sum": 7.1
    },
    {
      "Date": "sample string 1",
      "ResponseCount": 2,
      "NPS": 3.1,
      "Median": 4.1,
      "Average": 5.1,
      "StandardDeviation": 6.1,
      "Sum": 7.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>
    <QuestionAggregate z:Id="i2">
      <Average>5.1</Average>
      <Date>sample string 1</Date>
      <Median>4.1</Median>
      <NPS>3.1</NPS>
      <ResponseCount>2</ResponseCount>
      <StandardDeviation>6.1</StandardDeviation>
      <Sum>7.1</Sum>
    </QuestionAggregate>
    <QuestionAggregate z:Ref="i2" />
  </Data>
  <Meta>
    <IsFiltered>true</IsFiltered>
    <Limit>1</Limit>
    <Offset>1</Offset>
    <StartRec>1</StartRec>
    <Status>1</Status>
    <StopRec>1</StopRec>
    <Timestamp>2019-01-17T16:09:17.506819+00:00</Timestamp>
    <TotalPageCount>1</TotalPageCount>
    <TotalRowCount>1</TotalRowCount>
  </Meta>
</Payload>