Data

Get Aggregated Question Responses Data

Get aggregated data for a requested question. The range between min_date and max_date must not exceed 10 years.

post/responses

Request

Request body

data_source_idstring uuid required

The unique identifier for a data source.

question_idstring uuid required

The unique identifier for a question.

min_datestring date

Minimum date of data returned in YYYY-MM-DD format. The date provided is inclusive. Omitting this field will return the earliest available trend data.

max_datestring date

Maximum date of data returned in YYYY-MM-DD format. The date provided is inclusive. Omitting this field will return the most recent available trend data.

Example request

{
  "data_source_id": "00de2081-e013-411d-823c-cd483283e38d",
  "question_id": "a7ee637c-e5d1-4cf8-b484-8eb372f22941",
  "min_date": "2018-01-31",
  "max_date": "2018-01-31",
  "audience": {
    "question_id": "29433f2b-3ea0-4214-ae8f-9ad09549c082",
    "response_ids": [
      "1",
      "2"
    ]
  },
  "aggregation": {
    "interval": "month"
  }
}

Response

Responses Data

Example response

{
  "data": [
    {
      "date": "2017-11-23",
      "responses": [
        {
          "percent": 42.953760405946554,
          "id": "1",
          "label": "Very Favorable"
        },
        {
          "percent": 57.046239594053446,
          "id": "2",
          "label": "Somewhat Favorable"
        }
      ],
      "total_n": 1570
    }
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.