GET
/Surveys/{id}/Interviews
Returns interview (response) data for a specific survey. Supports filtering and pagination.
Large Datasets Warning
Without parameters, this endpoint returns ALL interviews. For large surveys, always use pagination parameters (Start, MaxLength).
Request
GET /Surveys/{id}/InterviewsPath Parameters
| Parameter | Type | Description |
|---|---|---|
id | string (GUID) | The unique identifier of the survey |
Query Parameters
| Parameter | Type | Description |
|---|---|---|
Start | integer | Starting interview number (for pagination) |
MaxLength | integer | Maximum number of interviews to return |
CompleteOnly | boolean | Return only completed interviews (true/false) |
Variables | array[string] | Filter to specific variable IDs |
InterviewIdents | array[string] | Filter to specific interview IDs |
DateFrom | string | Start date filter (YYYY-MM-DD) |
DateTo | string | End date filter (YYYY-MM-DD) |
Example Requests
Basic Request (All Interviews)
https://tsapi-demo.azurewebsites.net/Surveys/1e6cb0a1-2289-4650-9148-9fc3e6e129b2/InterviewsWith Pagination
https://tsapi-demo.azurewebsites.net/Surveys/1e6cb0a1-2289-4650-9148-9fc3e6e129b2/Interviews?Start=901&MaxLength=100Returns interviews 901-1000
Completed Interviews Only
https://tsapi-demo.azurewebsites.net/Surveys/1e6cb0a1-2289-4650-9148-9fc3e6e129b2/Interviews?CompleteOnly=trueSpecific Variables
https://tsapi-demo.azurewebsites.net/Surveys/1e6cb0a1-2289-4650-9148-9fc3e6e129b2/Interviews?Variables=3&Variables=4&Variables=7Returns data for variables 3, 4, and 7 only
Specific Interviews
https://tsapi-demo.azurewebsites.net/Surveys/1e6cb0a1-2289-4650-9148-9fc3e6e129b2/Interviews?InterviewIdents=1&InterviewIdents=2&InterviewIdents=10Date Range
https://tsapi-demo.azurewebsites.net/Surveys/1e6cb0a1-2289-4650-9148-9fc3e6e129b2/Interviews?DateFrom=2021-10-05&DateTo=2021-11-28Combined Parameters
https://tsapi-demo.azurewebsites.net/Surveys/1e6cb0a1-2289-4650-9148-9fc3e6e129b2/Interviews?MaxLength=50&CompleteOnly=true&DateFrom=2021-10-05&DateTo=2021-11-2850 completed interviews from the specified date range
Response Structure
Returns an array of Interview objects:
[
{
"interviewId": "1",
"date": "2021-01-01T03:09:57",
"complete": true,
"responses": [
{
"variableId": "2",
"data": [
{ "value": "20210101" }
]
},
{
"variableId": "4",
"data": [
{ "value": "0", "state": "NotSelected" },
{ "value": "1", "state": "Selected" },
{ "value": "2", "state": "NotSelected" }
]
}
]
}
]Response Fields
Interview Object
| Field | Type | Description |
|---|---|---|
interviewId | string | Unique identifier for the interview |
date | string (ISO 8601) | Interview completion date/time |
complete | boolean | Whether the interview was completed |
responses | array | Array of VariableData objects |
VariableData Object
| Field | Type | Description |
|---|---|---|
variableId | string | References the variable in metadata |
data | array | Array of VariableDataItem objects |
VariableDataItem Object
| Field | Type | Description |
|---|---|---|
value | string | The response value (code for categorical) |
state | string | "Selected" or "NotSelected" (for categorical) |
loopedVariableData | array | Nested variable data (for looped questions) |
Data Structure by Variable Type
Single Response (single)
{
"variableId": "4",
"data": [
{ "value": "0", "state": "NotSelected" },
{ "value": "1", "state": "Selected" },
{ "value": "2", "state": "NotSelected" }
]
}Multiple Response (multiple)
{
"variableId": "5",
"data": [
{ "value": "1", "state": "Selected" },
{ "value": "2", "state": "Selected" },
{ "value": "3", "state": "NotSelected" }
]
}Quantity / Numeric
{
"variableId": "3",
"data": [
{ "value": "26" }
]
}Date
{
"variableId": "2",
"data": [
{ "value": "20210101" }
]
}Time
{
"variableId": "3",
"data": [
{ "value": "080000" }
]
}Character / Text
{
"variableId": "8",
"data": [
{ "value": "Great service, would recommend!" }
]
}Looped Data
For variables with nested loops, the loopedVariableData field contains responses to follow-up questions:
{
"variableId": "7",
"data": [
{
"value": "1",
"state": "Selected",
"loopedVariableData": [
{
"variableId": "8",
"data": [
{
"value": "1",
"state": "Selected",
"loopedVariableData": [
{
"variableId": "9",
"data": [
{ "value": "1", "state": "Selected" },
{ "value": "2", "state": "NotSelected" }
]
}
]
}
]
}
]
}
]
}This structure allows for complex survey designs where questions are asked repeatedly for each selected option in a parent question.