# Get Analytics Data Source Table

Read one of the creator's fixed sources as a table: its columns with their types, a window of its rows in order (each keyed by column; a row's index is offset plus its place), and the revision, also in the ETag header. Change some of it with Update Analytics Data Source Table, which counts rows by that index.

`GET https://connect.mindcloud.co/v2/analytics/data-sources/:dataSourceId/table`

Permissions: `analytics:page:view`.

## Parameters

### Path

- `dataSourceId` (string, required): The fixed source's id, from List Analytics Data Sources.

### Headers

- `X-Company-Id` (string): Optional. The id of the organization to act in. Leave it out to act in the API key's own organization. Here a key acts in another organization only as one of its members: with "Use this key across all of your organizations" on, in an organization its creator belongs to with a role. Child organizations and MindCloud staff access do not reach this endpoint. Every response's X-Company-Id header names the organization it acted in. See [Organizations](https://mindcloud.co/docs/api/rest/introduction/organizations).

### Query

- `limit` (number): How many rows to answer, 1-1000.
  How many rows to answer, 1-1000. Defaults to 100.
  Default: `100`
- `offset` (number): How many rows to skip.
  How many rows to skip. Defaults to 0.
  Default: `0`

## Example request

```bash
curl --request GET \
  --url 'https://connect.mindcloud.co/v2/analytics/data-sources/Ds3Hq9Lp2WxM/table?limit=100&offset=0' \
  --header 'Authorization: Bearer $MINDCLOUD_API_TOKEN'
```

## Response fields

- `id` (string): The data source's id.
- `revision` (string): The table as read, also in the ETag header. Send it in If-Match to Update Analytics Data Source Table; an update to a table changed since is refused.
- `columnTypes` (array of objects): Every column, in order, with its stored type.
  - `key` (string): The column's key.
  - `type` (string): The column's stored type, such as VARCHAR, BIGINT or DATE.
- `columns` (array of string): The column names the rows carry, in order.
- `rows` (array of objects): The rows in this window, as objects keyed by column.
- `rowCount` (number): How many rows there are in all.
- `offset` (number): Where this window starts.
- `nextOffset` (number): The offset of the next window, or null when this is the last.
