> ## 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.

# Get Table By Id

> # Description

Get pivot table information.

# Payload

```json
{
    "projectId": string
}
```

where:

* `projectId`: Project identifier to which the pivot table was created. __(Required)__. 

# Response 

## 200 OK

```json
{
  "_id": string,
  "projectId": string,
  "name": string,
  "selectedChart": string,
  "rows": array,
  "columns": array,
  "values": array,
  "alphaValue": number,
  "updatedAt": string,
  "createdAt": string,
  "createdBy": string,
  "updatedBy": string,
}
```

## 401 Unauthorized
> Invalid authorization.

## 404 Not Found
> Resource not found.

## 500 Internal Server Error
> Error occurred in the service.

# Description

Get pivot table information.

# Payload

```json theme={null}
{
    "projectId": string
}
```

where:

* `projectId`: Project identifier to which the pivot table was created. **(Required)**.

# Response

## 200 OK

```json theme={null}
{
  "_id": string,
  "projectId": string,
  "name": string,
  "selectedChart": string,
  "rows": array,
  "columns": array,
  "values": array,
  "alphaValue": number,
  "updatedAt": string,
  "createdAt": string,
  "createdBy": string,
  "updatedBy": string,
}
```

## 401 Unauthorized

> Invalid authorization.

## 404 Not Found

> Resource not found.

## 500 Internal Server Error

> Error occurred in the service.


## OpenAPI

````yaml POST /v1/pivotTable/get/{pivotTableId}
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:
  /v1/pivotTable/get/{pivotTableId}:
    post:
      summary: Get Table By Id
      description: >-
        # Description


        Get pivot table information.


        # Payload


        ```json

        {
            "projectId": string
        }

        ```


        where:


        * `projectId`: Project identifier to which the pivot table was created.
        __(Required)__. 


        # Response 


        ## 200 OK


        ```json

        {
          "_id": string,
          "projectId": string,
          "name": string,
          "selectedChart": string,
          "rows": array,
          "columns": array,
          "values": array,
          "alphaValue": number,
          "updatedAt": string,
          "createdAt": string,
          "createdBy": string,
          "updatedBy": string,
        }

        ```


        ## 401 Unauthorized

        > Invalid authorization.


        ## 404 Not Found

        > Resource not found.


        ## 500 Internal Server Error

        > Error occurred in the service.
      operationId: get-table-by-id-post-v1-pivottable-get-pivottableid
      parameters:
        - name: Authorization
          in: header
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: true
            example:
              projectId: '{{projectId}}'
      responses:
        '200':
          description: Get Table By Id
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
              example:
                _id: 6137ecaa37cb8f00aebb13cd
                projectId: 60de2ba329a7230061e209f6
                name: ''
                selectedChart: BANNER_CROSSTAB
                rows:
                  - frontendId: 1
                    questionId: ''
                columns:
                  - frontendId: 1
                    questionId: ''
                values:
                  - frontendId: 1
                    aggregationType: 1
                    valueType: ''
                    formatType: ''
                    color: ''
                alphaValue: 1
                updatedAt: '2021-09-07T23:06:46.455Z'
                createdAt: '2021-09-07T22:50:18.655Z'
                createdBy: 5e1155a9091833000f274bbd
                updatedBy: 5e1155a9091833000f274bbd
                __v: 0
                displayNullData: true
                transpose: false
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '500':
          description: Internal server error
      servers:
        - url: https://pivot-table.sightx.io
components:
  securitySchemes:
    AuthorizationHeader:
      type: apiKey
      in: header
      name: Authorization
      description: Access token obtained from the m2m-token endpoint.

````