> ## Documentation Index
> Fetch the complete documentation index at: https://docs.repdata.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Text responses for project

> # Description

Retrieve responses for all text questions in a project.

# Payload

```json
{
    "fromDate": string,
    "toDate": string,
    "filter": array,
    "questionProjection": [string]
}
```

where:

* `fromDate`: start date of responses to query. __(Required)__.
* `toDate`: end date of responses to query. __(Required)__.
* `filter`: array of questions to filter responses by. (Optional).
* `questionProjection`: array of unique identifiers of text questions. Each question ID is prepended with a "q". __(Required)__.

# Responses

## 200 OK

```json
{
    "projectId": "string",
    "fromDate": "date (string)",
    "toDate": "date (string)",
    "filter": array,
    "responses": {
        "q000000000000000000000000": [
            "response1 (string)",
            "response2 (string)"
        ],
        "q000000000000000000000001": [
            "response1 (string)",
            "response2 (string)"
        ]
    }
}
```
where:

* `projectId`: unique identifier of the project.
* `fromDate`: start date of responses to query.
* `toDate`: end date of responses to query.
* `filter`: array of questions to filter responses by.
* `responses`: object mapping unique question identifiers to arrays of text responses.

## 400 Bad Request
> Missing or invalid required fields.

## 401 Unauthorized
> Invalid authorization.

## 404 Not Found
> Resource not found.

## 500 Internal Server Error
> Error occurred in text-service microservice.

# Description

Retrieve responses for all text questions in a project.

# Payload

```json theme={null}
{
    "fromDate": string,
    "toDate": string,
    "filter": array,
    "questionProjection": [string]
}
```

where:

* `fromDate`: start date of responses to query. **(Required)**.
* `toDate`: end date of responses to query. **(Required)**.
* `filter`: array of questions to filter responses by. (Optional).
* `questionProjection`: array of unique identifiers of text questions. Each question ID is prepended with a "q". **(Required)**.

# Responses

## 200 OK

```json theme={null}
{
    "projectId": "string",
    "fromDate": "date (string)",
    "toDate": "date (string)",
    "filter": array,
    "responses": {
        "q000000000000000000000000": [
            "response1 (string)",
            "response2 (string)"
        ],
        "q000000000000000000000001": [
            "response1 (string)",
            "response2 (string)"
        ]
    }
}
```

where:

* `projectId`: unique identifier of the project.
* `fromDate`: start date of responses to query.
* `toDate`: end date of responses to query.
* `filter`: array of questions to filter responses by.
* `responses`: object mapping unique question identifiers to arrays of text responses.

## 400 Bad Request

> Missing or invalid required fields.

## 401 Unauthorized

> Invalid authorization.

## 404 Not Found

> Resource not found.

## 500 Internal Server Error

> Error occurred in text-service microservice.

##### Query Parameters

| Parameter   | Description | Required | Example |
| ----------- | ----------- | -------- | ------- |
| `projectId` | —           | No       | —       |


## OpenAPI

````yaml POST /text-service/text
openapi: 3.0.3
info:
  title: SightX API
  version: 1.0.0
  description: >-
    SightX REST API documentation. Most responses are JSON; some export
    endpoints return files. API access is a paid add-on — contact
    sales@sightx.io for details.
servers:
  - url: https://auth.admin.sightx.io
    description: Authentication (Production)
  - url: https://auth.staging-admin.sightx.io
    description: Authentication (Staging)
security:
  - AuthorizationHeader: []
paths:
  /text-service/text:
    post:
      summary: Text responses for project
      description: >-
        # Description


        Retrieve responses for all text questions in a project.


        # Payload


        ```json

        {
            "fromDate": string,
            "toDate": string,
            "filter": array,
            "questionProjection": [string]
        }

        ```


        where:


        * `fromDate`: start date of responses to query. __(Required)__.

        * `toDate`: end date of responses to query. __(Required)__.

        * `filter`: array of questions to filter responses by. (Optional).

        * `questionProjection`: array of unique identifiers of text questions.
        Each question ID is prepended with a "q". __(Required)__.


        # Responses


        ## 200 OK


        ```json

        {
            "projectId": "string",
            "fromDate": "date (string)",
            "toDate": "date (string)",
            "filter": array,
            "responses": {
                "q000000000000000000000000": [
                    "response1 (string)",
                    "response2 (string)"
                ],
                "q000000000000000000000001": [
                    "response1 (string)",
                    "response2 (string)"
                ]
            }
        }

        ```

        where:


        * `projectId`: unique identifier of the project.

        * `fromDate`: start date of responses to query.

        * `toDate`: end date of responses to query.

        * `filter`: array of questions to filter responses by.

        * `responses`: object mapping unique question identifiers to arrays of
        text responses.


        ## 400 Bad Request

        > Missing or invalid required fields.


        ## 401 Unauthorized

        > Invalid authorization.


        ## 404 Not Found

        > Resource not found.


        ## 500 Internal Server Error

        > Error occurred in text-service microservice.
      operationId: text-responses-for-project-post-text-service-text
      parameters:
        - name: Authorization
          in: header
          required: true
          schema:
            type: string
        - name: projectId
          in: query
          required: false
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: true
            example:
              fromDate: '2020-01-01'
              toDate: '2022-12-31'
              filter: []
              questionProjection:
                - qQuestionId
      responses:
        '200':
          description: Text responses for project
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
              example:
                projectId: 60de2ba329a7230061e209f6
                fromDate: '2020-01-01'
                toDate: '2022-12-31'
                filter: []
                responses:
                  q60de3468ffcabb005be2974a:
                    - asdasd
                    - qweqweqw
                  q60de347a29a7230061e20b93:
                    - asdasd
                    - '10'
                  q60de348129a7230061e20b98:
                    - asdasd
                    - '21'
                  q60de3468ffcabb005be2974b:
                    - '234234'
                    - awesome
                    - Chevere puma
                  q60de347a29a7230061e20b94:
                    - qwewqeq
                    - good
                    - Chevere puma
                  q60de348129a7230061e20b99:
                    - qeqww
                    - bad
                    - bacan Chevere puma
                  q60de3528ffcabb005be2983a:
                    - '234'
                    - tytyty
                    - none
                    - it is extreme
                    - surf
                    - bad
                    - Water
                    - Lorem ipsum
                  q60de3528ffcabb005be2983b:
                    - '345'
                    - rtr
                    - none
                    - really nice
                    - surf
                    - cool
                    - '10'
                    - otra vez surf
                  q60de3528ffcabb005be2983c:
                    - '23'
                    - rtrtrt
                    - none
                    - red
                    - surf
                    - terrible
                    - '90'
                    - Lorem ipsum SUrf
                  q60de3564ffcabb005be29b0c:
                    - '2342'
                    - '124323'
                    - none
                    - I love it
                    - soccer
                    - not sure
                    - as
                    - Sokser
                  q60de3564ffcabb005be29b0d:
                    - '234'
                    - '213'
                    - none
                    - 'yes '
                    - soccer
                    - great
                    - as
                    - design Sokser
                  q60de3564ffcabb005be29b0e:
                    - '343'
                    - '123'
                    - none
                    - white
                    - soccer
                    - awful
                    - as
                    - colors Sokser
                  q60de3564ffcabb005be29b1d:
                    - '2342'
                    - '89'
                    - none
                    - funny
                    - basketball
                    - not sure
                    - '12'
                    - Canasta
                  q60de3564ffcabb005be29b1e:
                    - '234'
                    - '56'
                    - none
                    - it is really good
                    - basketball
                    - awesome
                    - des
                    - Canasta
                  q60de3564ffcabb005be29b1f:
                    - '2342'
                    - '42'
                    - none
                    - black
                    - basketball
                    - amazing
                    - ign
                    - COlor canasta
                  q60de355bffcabb005be29ad8:
                    - qweqw
                    - none
                    - it is rude
                    - '12'
                  q60de355bffcabb005be29ad9:
                    - qweq
                    - none
                    - it is bored
                    - '12'
                  q60de355bffcabb005be29ada:
                    - qweq
                    - none
                    - white
                    - '22'
                  q60de3564ffcabb005be29b2f:
                    - qweqwe
                    - yuiyui
                    - none
                    - It is cool
                    - once a month
                    - not sure
                    - Ni idea
                  q60de3564ffcabb005be29b30:
                    - qweqweqeq
                    - uyiy
                    - none
                    - sure
                    - once a month
                    - cool
                    - Deisgn ni idea
                  q60de3564ffcabb005be29b31:
                    - asdadasd
                    - yuiyu
                    - none
                    - black
                    - once a month
                    - great
                    - dasdadas
                  q60de3564ffcabb005be29b40:
                    - '123123'
                    - '78'
                    - it happens once a week
                    - Once a week
                    - fsdfsd
                  q60de3564ffcabb005be29b41:
                    - '234'
                    - '98'
                    - sure
                    - Once a week
                    - gdfg dgfg
                  q60de3564ffcabb005be29b42:
                    - 2qweq
                    - '23'
                    - nice
                    - Once a week
                    - gdfg dgf g
                  q60de3564ffcabb005be29b51:
                    - '89'
                    - Daily
                    - so cool
                    - dsily
                  q60de3564ffcabb005be29b52:
                    - '89'
                    - Daily
                    - nice
                    - werw
                  q60de3564ffcabb005be29b53:
                    - '54'
                    - Daily
                    - awesome
                    - rwerwecw. wer wer
                  q60de3468ffcabb005be29749:
                    - nice
                  q60de347a29a7230061e20b92:
                    - nothing
                  q60de348129a7230061e20b97:
                    - more  nothing
                  q60de3468ffcabb005be29748:
                    - 'it is good '
                    - nike
                    - Just do it
                  q60de347429a7230061e20b8d:
                    - It is good
                    - nike
                    - Wow
                  q60de348129a7230061e20b96:
                    - not bad
                    - nike
                    - Wonderful
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '500':
          description: Internal server error
      servers:
        - url: https://text.sightx.io
components:
  securitySchemes:
    AuthorizationHeader:
      type: apiKey
      in: header
      name: Authorization
      description: Access token obtained from the m2m-token endpoint.

````