# List the Analytics Datasets

`GET https://api.suger.cloud/ai/org/{orgId}/analytics/dataset`

Lists the datasets the caller can query, each with its description, the names of its measures and segments, the datasets it relates to, its main `time` field, and how much data the organization has in it: `rows`, and the first and last day of its `time` field, or `no rows yet`. A dataset whose data could not be read now is listed without it, and `dataNotRead` says so. Read the datasets a question needs with GetAnalyticsDataset and the query grammar with GetAnalyticsQueryGrammar before writing a query. Plan from what the data covers: a short history rules out a change on the previous year and a long trend, and a dataset with no rows yet gets no chart, or one that says it has no data yet.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `orgId` | path | string | yes | Organization ID |

## Responses

### 200 — The datasets

Content-Type: `application/json` · Schema: `AnalyticsDatasetList`

**`AnalyticsDatasetList`** fields:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `datasets` | array<object> | yes |  |
| `dataNotRead` | string | no | Which datasets are listed without their `data`, and why. |

### 401 — No valid token

Content-Type: `application/json` · Schema: `AiErrorResponse`

**`AiErrorResponse`** fields:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `error` | string | yes | Error message |

### 403 — Not a member of the organization

Content-Type: `application/json` · Schema: `AiErrorResponse`

**`AiErrorResponse`** fields:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `error` | string | yes | Error message |

### 500 — ANALYTICS_UNAVAILABLE: an unexpected failure

Content-Type: `application/json` · Schema: `AnalyticsError`

**`AnalyticsError`** fields:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `error` | object | yes |  |

### 503 — ANALYTICS_UNAVAILABLE: analytics is not configured or not ready

Content-Type: `application/json` · Schema: `AnalyticsError`

**`AnalyticsError`** fields:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `error` | object | yes |  |

## Example

_Generated from this operation's schema. Values are placeholders — substitute your own ids, and set `SUGER_TOKEN` to a bearer token from the [OAuth client-credentials exchange](https://doc.fours.com/settings/oauth-app/)._

### Request

```bash
curl -X GET 'https://api.suger.cloud/ai/org/{orgId}/analytics/dataset' \
  -H "Authorization: Bearer $SUGER_TOKEN"
```

### Response — 200

```json
{
  "datasets": [
    {
      "name": "Acme Corp",
      "description": "string",
      "measures": [
        "string"
      ],
      "segments": [
        "string"
      ],
      "relatesTo": [
        "string"
      ],
      "time": "2026-01-31T12:00:00Z",
      "data": {
        "rows": 1,
        "first": "string",
        "last": "string"
      }
    }
  ],
  "dataNotRead": "string"
}
```

### Error — 401

```json
{
  "error": "string"
}
```

---

API reference: https://doc.fours.com/api/
