API: Sharing
Public share links and their settings. All endpoints require authentication unless noted. 12 endpoints.
GET /api/shares
Section titled “GET /api/shares”List shares
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
contentType |
string | no | |
contentId |
string | no | |
limit |
integer | no | |
offset |
integer | no |
Responses: 200 · 400 · 401
POST /api/shares
Section titled “POST /api/shares”Create a share link
Request body (JSON)
| Field | Type | Required | Description |
|---|---|---|---|
contentType |
"dashboard" | "report" |
yes | |
contentId |
string | yes | |
shareType |
"public" | "password" | "rls" |
yes | |
password |
string | no | |
rlsContext |
object | no | |
expiresAt |
string | no |
Responses: 201 · 400 · 401 · 409
DELETE /api/shares/{id}
Section titled “DELETE /api/shares/{id}”Delete a share
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id |
string | yes |
Responses: 204 — No content · 401 · 404
PUT /api/shares/{id}/ai
Section titled “PUT /api/shares/{id}/ai”Enable/disable Ask-AI on a share and set its hourly cap (AIX-20)
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id |
string | yes |
Request body (JSON)
| Field | Type | Required | Description |
|---|---|---|---|
allowAi |
boolean | yes | |
aiRatePerHour |
integer | no |
Responses: 200 · 400 · 401 · 404
GET /api/shares/{token}
Section titled “GET /api/shares/{token}”Access a shared resource by token (public)
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
token |
string | yes |
Responses: 200 · 400 · 401 · 404
POST /api/shares/{token}/card-data
Section titled “POST /api/shares/{token}/card-data”Run a shared dashboard card’s query by token (public)
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
token |
string | yes |
Request body (JSON)
| Field | Type | Required | Description |
|---|---|---|---|
cardId |
string | yes | |
password |
string | no | |
limit |
integer | no | |
distinctColumn |
string | no | |
filters |
array of object | no |
Responses: 200
POST /api/shares/{token}/chart-data
Section titled “POST /api/shares/{token}/chart-data”Run a shared dashboard model-backed card’s query by token (public)
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
token |
string | yes |
Request body (JSON)
| Field | Type | Required | Description |
|---|---|---|---|
cardId |
string | yes | |
password |
string | no | |
distinctFieldId |
string | no | |
filters |
array of object | no |
Responses: 200
POST /api/shares/{token}/chat
Section titled “POST /api/shares/{token}/chat”Ask-AI on a shared/embedded view, scoped to the token’s own data (AIX-20, public)
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
token |
string | yes |
Request body (JSON)
| Field | Type | Required | Description |
|---|---|---|---|
message |
string | yes | |
password |
string | no | |
history |
array of object | no |
Responses: 200 · 403 · 429 · 503
GET /api/shares/{token}/content
Section titled “GET /api/shares/{token}/content”Get shared content (dashboard cards or report layout) by token (public)
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
token |
string | yes |
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
password |
string | no |
Responses: 200
POST /api/shares/{token}/content
Section titled “POST /api/shares/{token}/content”Get shared content by token (public; password in body)
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
token |
string | yes |
Request body (JSON)
| Field | Type | Required | Description |
|---|---|---|---|
password |
string | no |
Responses: 200
POST /api/shares/{token}/report-block-data
Section titled “POST /api/shares/{token}/report-block-data”Run a shared report block’s query by token (public)
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
token |
string | yes |
Request body (JSON)
| Field | Type | Required | Description |
|---|---|---|---|
blockId |
string | yes | |
password |
string | no | |
parameters |
array of object | no | |
filters |
array of object | no |
Responses: 200
POST /api/shares/{token}/usage
Section titled “POST /api/shares/{token}/usage”Record embed usage events (public)
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
token |
string | yes |
Request body (JSON)
| Field | Type | Required | Description |
|---|---|---|---|
password |
string | no | |
events |
array of object | yes |
Responses: 200