Get an Analytics Dataset

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

Gets a dataset the caller can query: its fields, measures, segments and relationships, with their types and descriptions, the names a query over it may use. A dataset the caller may not read, and a name no dataset has, answer DATASET_FORBIDDEN alike.

Parameters

NameInTypeRequiredDescription
orgId path string yes Organization ID
name path string yes

Responses

200 — The dataset

Content-Type: application/json · Schema: AnalyticsDataset

AnalyticsDataset fields:

FieldTypeRequiredDescription
description string yes
fields object yes
measures object yes
segments object yes
relationships object yes
name string yes

401 — No valid token

Content-Type: application/json · Schema: AiErrorResponse

AiErrorResponse fields:

FieldTypeRequiredDescription
error string yes Error message

403 — Not a member of the organization, or DATASET_FORBIDDEN: the caller may not read a dataset of that name

Content-Type: application/json

500 — ANALYTICS_UNAVAILABLE: an unexpected failure

Content-Type: application/json · Schema: AnalyticsError

AnalyticsError fields:

FieldTypeRequiredDescription
error object yes

503 — ANALYTICS_UNAVAILABLE: analytics is not configured or not ready

Content-Type: application/json · Schema: AnalyticsError

AnalyticsError fields:

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

Request

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

Response — 200

{
  "description": "string",
  "fields": {},
  "measures": {},
  "segments": {},
  "relationships": {},
  "name": "Acme Corp"
}

Error — 401

{
  "error": "string"
}

View as Markdown · API reference overview

Spotted something wrong or out of date on this page? Tell us and we'll correct it.