GET Surveys

Overview

The survey list endpoint returns survey definitions for a group. This is helpful for discovering surveys and making requests to the survey details endpoint. A valid group UUID is required.

Base path

/api/v1/groups/GROUP_UUID/surveys

Path parameters

GROUP_UUID

(string) The unique identifier for a group.

Query parameters

limit

See Paging parameters

offset

See Paging parameters

sortBy

See Paging parameters
Available values: CREATED, TYPE
CREATED - when the survey was created
TYPE - the survey type
Default: CREATED

sortDirection

See Paging parameters

Curl example

curl -X GET \
'https://API_HOSTNAME/api/v1/groups/GROUP_UUID/surveys? \
sortBy=TYPE&sortDirection=ASC&limit=10&offset=10' \
--header 'Authorization: Bearer BEARER_TOKEN'

Response

The response is a list of surveys, with additional fields that contain paging metadata and links to the previous and next pages, if they exist.

Response body

{
    "totalCount": 23,
    "limit": 10,
    "offset": 10,
    "results": [
        {
            "href": "/api/v1/groups/GROUP_UUID/surveys/SURVEY_UUID",
            "uuid": "SURVEY_UUID",
            "group": {
            "href": "/api/v1/groups/GROUP_UUID",
            "title": "My Group"
        },
            "name": "survey name",
            "title": "Survey Title",
            "version": 1
        },
        ...
    ],
    "nextPage": "https://API_HOSTNAME/api/v1/groups/GROUP_UUID/surveys?sortBy=TYPE&sortDirection=ASC&offset=20&limit=10",
    "previousPage": "https://API_HOSTNAME/api/v1/groups/GROUP_UUID/surveys?sortBy=STATUS&sortDirection=ASC&offset=0&limit=10"
}

Result attributes

uuid

(string) A unique identifier for the survey.

href

(string) A URL fragment that can be used to retrieve details about the specific survey.

group

(link) A reference to the group that the survey is defined in.

name

(string) The name of the survey.

title

(string) The title of the survey.

version

(number) The most recent version of the survey.