InsightsGet insight

Get insight

Fetch a single insight by id. The insight must belong to the resolved location. Returns the full row including config.

curl -X GET "https://mythic-analytics.gulp.workers.dev/builder/insights/123e4567-e89b-12d3-a456-426614174000?location_id=acme-retail" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN"
{
  "data": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "location_id": "acme-retail",
    "data_connection_id": "123e4567-e89b-12d3-a456-426614174000",
    "created_by": "123e4567-e89b-12d3-a456-426614174000",
    "name": "Daily visitors",
    "description": "example_string",
    "insight_type": "number",
    "config": {
      "query": {
        "kind": "trend",
        "date_range": {
          "preset": "30d"
        },
        "interval": "day",
        "series": [
          {
            "event": "$pageview",
            "math": "dau",
            "label": "Visitors"
          }
        ],
        "compare": "previous_period"
      }
    },
    "visualization": {},
    "is_embeddable": false,
    "embed_token": "9f8a7b6c5d4e3f2a1b0c9d8e7f6a5b4c",
    "tags": [
      "funnel",
      "paid"
    ],
    "canvas_id": "123e4567-e89b-12d3-a456-426614174000",
    "is_favorite": false,
    "created_at": "2024-12-25T10:00:00Z",
    "updated_at": "2024-12-25T10:00:00Z"
  }
}
GET
/insights/{id}
GET
Base URLstring

Target server for requests. Edit to use your own host.

Bearer Token
Bearer Tokenstring
Required

Builder key as a bearer token. Use an agency key (Bearer ak_...) for writes, or a viewer key (Bearer sk_...) for reads. Scoped keys (mcp_) with insights:read/insights:write are accepted too.

Builder key as a bearer token. Use an agency key (Bearer ak_...) for writes, or a viewer key (Bearer sk_...) for reads. Scoped keys (mcp_) with insights:read/insights:write are accepted too.
path
idstring
Required

Insight UUID

Format: uuid
query
location_idstring

Client location to scope the request to. Required when authenticating with an agency key (ak_). Ignored for viewer keys (sk_).

Request Preview
Response

Response will appear here after sending the request

Authentication

header
Authorizationstring
Required

Bearer token. Builder key as a bearer token. Use an agency key (Bearer ak_...) for writes, or a viewer key (Bearer sk_...) for reads. Scoped keys (mcp_) with insights:read/insights:write are accepted too.

Path Parameters

idstring
Required

Insight UUID

Query Parameters

location_idstring

Client location to scope the request to. Required when authenticating with an agency key (ak_). Ignored for viewer keys (sk_).

Example:
acme-retail

Responses

dataobject