{
  "openapi": "3.1.1",
  "info": {
    "title": "Index Data API",
    "description": "Read access to an organisation's Index survey data. Human-readable specification at /docs.",
    "version": "v1"
  },
  "servers": [
    {
      "url": "https://api.index.gslglobal.com/"
    }
  ],
  "paths": {
    "/v1/media": {
      "get": {
        "tags": [
          "MediaEndpoints"
        ],
        "summary": "Media experiences (photo/video/audio URLs with transcription) attached to in-scope responses. Paginated by response.",
        "operationId": "GetMedia",
        "parameters": [
          {
            "name": "From",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "To",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "Wave",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Cursor",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          },
          {
            "name": "Question",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "Accommodation",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfMediaDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpValidationProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "429": {
            "description": "Too Many Requests"
          }
        }
      }
    },
    "/v1/questions": {
      "get": {
        "tags": [
          "QuestionsEndpoints"
        ],
        "summary": "Questions that have at least one in-scope response in the date range (default language). Not paginated; cursor and pageSize are ignored.",
        "operationId": "GetQuestions",
        "parameters": [
          {
            "name": "From",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "To",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "Wave",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Cursor",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          },
          {
            "name": "Question",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "Accommodation",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfQuestionDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpValidationProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "429": {
            "description": "Too Many Requests"
          }
        }
      }
    },
    "/v1/responses": {
      "get": {
        "tags": [
          "ResponsesEndpoints"
        ],
        "summary": "Answers in long (EAV) format: one row per response/question. Paginated by response.",
        "operationId": "GetResponsesLong",
        "parameters": [
          {
            "name": "From",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "To",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "Wave",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Cursor",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          },
          {
            "name": "Question",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "Accommodation",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfResponseLongDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpValidationProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "429": {
            "description": "Too Many Requests"
          }
        }
      }
    },
    "/v1/responses/wide": {
      "get": {
        "tags": [
          "ResponsesEndpoints"
        ],
        "summary": "One object per response; keys are questionids from /questions plus AccommodationName, AccommodationCity, InstitutionName and submitdate. Paginated by response. The column set can vary between pages.",
        "operationId": "GetResponsesWide",
        "parameters": [
          {
            "name": "From",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "To",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "Wave",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Cursor",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          },
          {
            "name": "Question",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "Accommodation",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfDictionaryOfstringAndObject"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpValidationProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "429": {
            "description": "Too Many Requests"
          }
        }
      }
    },
    "/v1/sentiment": {
      "get": {
        "tags": [
          "SentimentEndpoints"
        ],
        "summary": "Experience themes with sentiment and confidence for in-scope responses. Paginated by response.",
        "operationId": "GetSentiment",
        "parameters": [
          {
            "name": "From",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "To",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "Wave",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Cursor",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          },
          {
            "name": "Question",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "Accommodation",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfSentimentDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpValidationProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "429": {
            "description": "Too Many Requests"
          }
        }
      }
    },
    "/v1/summary": {
      "get": {
        "tags": [
          "SummaryEndpoints"
        ],
        "summary": "Diagnostic: counts of what the same window and filters would return across all pages of every dataset. pageSize is used only to compute the number of pages.",
        "operationId": "GetSummary",
        "parameters": [
          {
            "name": "From",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "To",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "Wave",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Cursor",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          },
          {
            "name": "Question",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "Accommodation",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfSummaryDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpValidationProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "429": {
            "description": "Too Many Requests"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "ApiResponseOfDictionaryOfstringAndObject": {
        "required": [
          "data",
          "meta"
        ],
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "meta": {
            "$ref": "#/components/schemas/Meta"
          }
        },
        "description": "The envelope every dataset endpoint returns."
      },
      "ApiResponseOfMediaDto": {
        "required": [
          "data",
          "meta"
        ],
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MediaDto"
            }
          },
          "meta": {
            "$ref": "#/components/schemas/Meta"
          }
        },
        "description": "The envelope every dataset endpoint returns."
      },
      "ApiResponseOfQuestionDto": {
        "required": [
          "data",
          "meta"
        ],
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/QuestionDto"
            }
          },
          "meta": {
            "$ref": "#/components/schemas/Meta"
          }
        },
        "description": "The envelope every dataset endpoint returns."
      },
      "ApiResponseOfResponseLongDto": {
        "required": [
          "data",
          "meta"
        ],
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ResponseLongDto"
            }
          },
          "meta": {
            "$ref": "#/components/schemas/Meta"
          }
        },
        "description": "The envelope every dataset endpoint returns."
      },
      "ApiResponseOfSentimentDto": {
        "required": [
          "data",
          "meta"
        ],
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SentimentDto"
            }
          },
          "meta": {
            "$ref": "#/components/schemas/Meta"
          }
        },
        "description": "The envelope every dataset endpoint returns."
      },
      "ApiResponseOfSummaryDto": {
        "required": [
          "data",
          "meta"
        ],
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SummaryDto"
            }
          },
          "meta": {
            "$ref": "#/components/schemas/Meta"
          }
        },
        "description": "The envelope every dataset endpoint returns."
      },
      "HttpValidationProblemDetails": {
        "type": "object",
        "properties": {
          "type": {
            "type": [
              "null",
              "string"
            ]
          },
          "title": {
            "type": [
              "null",
              "string"
            ]
          },
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "detail": {
            "type": [
              "null",
              "string"
            ]
          },
          "instance": {
            "type": [
              "null",
              "string"
            ]
          },
          "errors": {
            "type": "object",
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        }
      },
      "MediaDto": {
        "required": [
          "responseId",
          "questionId",
          "mediaType",
          "mediaUrl",
          "transcription"
        ],
        "type": "object",
        "properties": {
          "responseId": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "questionId": {
            "type": "string"
          },
          "mediaType": {
            "type": [
              "null",
              "string"
            ]
          },
          "mediaUrl": {
            "type": "string"
          },
          "transcription": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "Meta": {
        "required": [
          "from",
          "to",
          "wave",
          "question",
          "accommodation",
          "count",
          "nextCursor",
          "nextLink",
          "generatedAt"
        ],
        "type": "object",
        "properties": {
          "from": {
            "type": "string",
            "description": "Inclusive start date that was applied.",
            "format": "date"
          },
          "to": {
            "type": "string",
            "description": "Inclusive end date that was applied (today when the client omitted it).",
            "format": "date"
          },
          "wave": {
            "type": [
              "null",
              "string"
            ],
            "description": "Wave filter that was applied, or null for all overlapping waves."
          },
          "question": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string"
            },
            "description": "Question ids the results were restricted to, or null for all questions."
          },
          "accommodation": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string"
            },
            "description": "Hall ids the responses were restricted to, or null for all halls."
          },
          "count": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "Number of items in `data`.",
            "format": "int32"
          },
          "nextCursor": {
            "type": [
              "null",
              "string"
            ],
            "description": "Opaque cursor for the next page; pass as `cursor=`. Null on the last page."
          },
          "nextLink": {
            "type": [
              "null",
              "string"
            ],
            "description": "Absolute URL of the next page: this request with `cursor` replaced. Null on the last page."
          },
          "generatedAt": {
            "type": "string",
            "description": "UTC time the page was produced.",
            "format": "date-time"
          }
        },
        "description": "Describes the window and filters that were applied and how to fetch the next page."
      },
      "QuestionDto": {
        "required": [
          "questionId",
          "lang",
          "title"
        ],
        "type": "object",
        "properties": {
          "questionId": {
            "type": "string"
          },
          "lang": {
            "type": "string"
          },
          "title": {
            "type": "string"
          }
        }
      },
      "ResponseLongDto": {
        "required": [
          "responseId",
          "questionId",
          "answerId",
          "lang",
          "value"
        ],
        "type": "object",
        "properties": {
          "responseId": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "questionId": {
            "type": [
              "null",
              "string"
            ]
          },
          "answerId": {
            "type": [
              "null",
              "string"
            ]
          },
          "lang": {
            "type": [
              "null",
              "string"
            ]
          },
          "value": {
            "type": [
              "null",
              "string"
            ]
          }
        },
        "description": "One answer in long (EAV) form. All values are strings, including submitdate."
      },
      "SentimentDto": {
        "required": [
          "responseId",
          "questionId",
          "theme",
          "sentiment",
          "confidence"
        ],
        "type": "object",
        "properties": {
          "responseId": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "questionId": {
            "type": "string"
          },
          "theme": {
            "type": [
              "null",
              "string"
            ]
          },
          "sentiment": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "confidence": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          }
        },
        "description": "`ext.sentiment` and `ext.confidence` are `float` columns in the Index schema (verified against the dev database),\nso both are doubles here. Sentiment runs from -1 (most negative) to 1 (most positive); confidence from 0 to 1.\nBoth are null when an experience has no theme row."
      },
      "SummaryDto": {
        "required": [
          "responsesInScope",
          "responsesReturned",
          "answerRows",
          "questions",
          "accommodations",
          "firstSubmitted",
          "lastSubmitted",
          "mediaRows",
          "sentimentRows",
          "pageSize",
          "pages"
        ],
        "type": "object",
        "properties": {
          "responsesInScope": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "responsesReturned": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "answerRows": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "questions": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "accommodations": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "firstSubmitted": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "lastSubmitted": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "mediaRows": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "sentimentRows": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "pageSize": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "pages": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        },
        "description": "What a window plus filters would produce across all pages of every dataset, without returning the data."
      }
    },
    "securitySchemes": {
      "basic": {
        "type": "http",
        "description": "Client id as user name, client secret as password. X-Client-Id / X-Client-Secret headers are also accepted.",
        "scheme": "basic"
      }
    }
  },
  "security": [
    {
      "basic": [ ]
    }
  ],
  "tags": [
    {
      "name": "MediaEndpoints"
    },
    {
      "name": "QuestionsEndpoints"
    },
    {
      "name": "ResponsesEndpoints"
    },
    {
      "name": "SentimentEndpoints"
    },
    {
      "name": "SummaryEndpoints"
    }
  ]
}