Create a dashboard
Creates a new dashboard in the project. If you omit the template field,
an empty dashboard with a default sheet is created automatically.
When you provide a template, the required top-level title is applied
to that document. A top-level description is also applied when
provided; when omitted, the template's own description is preserved.
Optional tags classify the dashboard for exact-match discovery and are
returned in ascending lexical order.
A Matrix card (matrixTable) whose config.matrix can never render, such as
one with an unknown key, an id that isn't a UUID, a totals map that doesn't
list every level, or SQL text on the card, is refused with 400 and the
errorCode invalid_matrix_cards. details.errors names each card and the
path of each problem. A Matrix card with no definition yet, or an unfinished
one, is saved. To catch those, and to check field names against your
datasets, use Validate a single dashboard.
A card that holds a retired format or rule field, such as
preferences.formatNumber, a column's dateFormat, or
preferences.tablePrefs.conditionalFormatting, is refused with 400 and
the errorCode retired_presentation_field; details.issues names each
field's path and what replaces it (see the template field for the
stores). A preferences.conditionalFormatting store that doesn't parse,
or a rule naming a column the card doesn't have, is refused with
invalid_conditional_formatting.
Every dataset a semantic card or dashboard filter names must be one its
semantic domain has: a card's selected datasets, a column's entityName
or source.datasetName, a join plan, a Matrix source, and a filter's
fieldMeta. A name that resolves to exactly one dataset by another
spelling (another case, the dataset's label, or the physical table of a
dataset that was renamed) is accepted and saved as sent. A name that
matches no dataset, or the physical table of more than one, is refused
with 400 and the errorCode unknown_dataset. Each entry of
details.errors has a message, the card (cardId, cardTitle,
sheetId) or filter (inputId, filterTitle), the field when the
name sits on a column, the datasetName, the domainId, the reason
(unknown or ambiguous) and the candidates: the datasets it could
mean, or every dataset the domain has. A card whose domain isn't in the
project is not checked.
The caller must have permission to create dashboards in the project. The new dashboard is owned by the authenticated user.
Provide commitMessage to commit the newly created dashboard to the
project's connected GitHub repository. When the project requires commits
on save, commitMessage is required.
Authorization
BearerAuth A project-scoped or dashboard-scoped access token. Generate one via the Token API using your project ID and project secret.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X post "https://semaphor.cloud/api/management/v1/dashboards" \ -H "Content-Type: application/json" \ -d '{ "title": "string" }'{
"versionControl": {
"status": "committed",
"commitSha": "string",
"commitUrl": "http://example.com"
},
"id": "string",
"kind": "string",
"tags": [
"string"
],
"title": "string",
"description": "string",
"projectId": "string",
"tenantId": "string",
"isPrivate": true,
"isPublic": true,
"version": "string",
"permissions": {
"canEdit": true,
"canShare": true,
"canDelete": true
},
"ownership": {},
"isFavorite": true,
"favoritedAt": "2019-08-24T14:15:22Z"
}{
"error": "string",
"code": "string",
"errorCode": "string",
"details": {},
"success": true
}{
"error": "string",
"code": "string",
"errorCode": "string",
"details": {},
"success": true
}{
"error": "string",
"code": "string",
"errorCode": "string",
"details": {},
"success": true
}{
"error": "string",
"code": "string",
"errorCode": "string",
"details": {},
"success": true
}{
"error": "string",
"errorCode": "COMMIT_FAILED",
"dashboardSaved": true,
"dashboard": {
"id": "string",
"kind": "string",
"tags": [
"string"
],
"title": "string",
"description": "string",
"projectId": "string",
"tenantId": "string",
"isPrivate": true,
"isPublic": true,
"version": "string",
"permissions": {
"canEdit": true,
"canShare": true,
"canDelete": true
},
"ownership": {},
"isFavorite": true,
"favoritedAt": "2019-08-24T14:15:22Z"
},
"versionControl": {
"status": "committed",
"commitSha": "string",
"commitUrl": "http://example.com"
}
}