Skip to main content
POST
https://sandbox.getcollate.io/api
/
v1
/
charts
POST /v1/charts
from metadata.sdk import configure
from metadata.sdk.entities import Charts
from metadata.generated.schema.api.data.createChart import CreateChartRequest

configure(
    host="https://your-company.getcollate.io/api",
    jwt_token="your-jwt-token"
)

request = CreateChartRequest(
    name="114",
    displayName="# of Games That Hit 100k in Sales By Release Year",
    service="sample_superset",
    description="Bar chart showing games that hit 100k in sales by release year",
    chartType="Other",
    sourceUrl="http://localhost:808/explore/?slice_id=114"
)

chart = Charts.create(request)
print(f"Created: {chart.fullyQualifiedName}")
{
  "id": "2dde4b53-a577-424b-bbaa-18ac32eca8a9",
  "name": "114",
  "displayName": "# of Games That Hit 100k in Sales By Release Year",
  "fullyQualifiedName": "sample_superset.114",
  "description": "Bar chart showing games that hit 100k in sales by release year",
  "chartType": "Other",
  "version": 0.1,
  "updatedAt": 1769982666218,
  "updatedBy": "admin",
  "sourceUrl": "http://localhost:808/explore/?slice_id=114",
  "service": {
    "id": "b1e6a71d-7f47-4e5f-8ce0-e6e8a88ec97a",
    "type": "dashboardService",
    "name": "sample_superset",
    "fullyQualifiedName": "sample_superset",
    "deleted": false
  },
  "serviceType": "Superset",
  "href": "http://localhost:8585/api/v1/charts/2dde4b53-a577-424b-bbaa-18ac32eca8a9",
  "deleted": false,
  "owners": [],
  "tags": [],
  "followers": [],
  "votes": {
    "upVotes": 0,
    "downVotes": 0
  },
  "domains": []
}

Create a Chart

Create a new chart within a dashboard service.

Body Parameters

name
string
required
Name of the chart. Must be unique within the parent dashboard service.
service
string
required
Fully qualified name of the parent DashboardService (e.g., sample_superset).
displayName
string
Human-readable display name for the chart.
description
string
Description of the chart in Markdown format.
chartType
string
Type of chart visualization: Line, Bar, Area, Pie, Scatter, Table, Histogram, Other.
sourceUrl
string
URL of the chart in the source system.
owners
array
Array of owner references (users or teams) to assign to the chart.
domain
string
Fully qualified name of the domain to assign for governance purposes.
tags
array
Array of classification tags to apply to the chart.
extension
object
Custom property values defined by your organization’s metadata schema.
POST /v1/charts
from metadata.sdk import configure
from metadata.sdk.entities import Charts
from metadata.generated.schema.api.data.createChart import CreateChartRequest

configure(
    host="https://your-company.getcollate.io/api",
    jwt_token="your-jwt-token"
)

request = CreateChartRequest(
    name="114",
    displayName="# of Games That Hit 100k in Sales By Release Year",
    service="sample_superset",
    description="Bar chart showing games that hit 100k in sales by release year",
    chartType="Other",
    sourceUrl="http://localhost:808/explore/?slice_id=114"
)

chart = Charts.create(request)
print(f"Created: {chart.fullyQualifiedName}")
{
  "id": "2dde4b53-a577-424b-bbaa-18ac32eca8a9",
  "name": "114",
  "displayName": "# of Games That Hit 100k in Sales By Release Year",
  "fullyQualifiedName": "sample_superset.114",
  "description": "Bar chart showing games that hit 100k in sales by release year",
  "chartType": "Other",
  "version": 0.1,
  "updatedAt": 1769982666218,
  "updatedBy": "admin",
  "sourceUrl": "http://localhost:808/explore/?slice_id=114",
  "service": {
    "id": "b1e6a71d-7f47-4e5f-8ce0-e6e8a88ec97a",
    "type": "dashboardService",
    "name": "sample_superset",
    "fullyQualifiedName": "sample_superset",
    "deleted": false
  },
  "serviceType": "Superset",
  "href": "http://localhost:8585/api/v1/charts/2dde4b53-a577-424b-bbaa-18ac32eca8a9",
  "deleted": false,
  "owners": [],
  "tags": [],
  "followers": [],
  "votes": {
    "upVotes": 0,
    "downVotes": 0
  },
  "domains": []
}

Returns

Returns the created chart object with all specified properties and system-generated fields.

Response

id
string
Unique identifier for the chart (UUID format).
name
string
Chart name.
fullyQualifiedName
string
Fully qualified name in format service.chartName.
displayName
string
Human-readable display name.
description
string
Description of the chart in Markdown format.
chartType
string
Type of chart visualization (e.g., Line, Bar, Area, Pie, Scatter, Table, Histogram, Other).
service
object
Reference to the parent dashboard service.
sourceUrl
string
URL of the chart in the source system.
serviceType
string
Type of dashboard service (e.g., Superset, Looker, Tableau, Metabase, PowerBI).
owners
array
List of owners assigned to the chart.
domains
array
Domain assignments for governance.
tags
array
Classification tags applied to the chart.
extension
object
Custom property values defined by your organization’s metadata schema.
version
number
Version number for the entity (starts at 0.1).

Create or Update (PUT)

Use PUT /v1/charts instead of POST to perform an upsert. If a chart with the same fullyQualifiedName already exists, it will be updated; otherwise, a new chart is created. The request body is the same as POST.
curl -X PUT "{base_url}/api/v1/charts" \
  -H "Authorization: Bearer {access_token}" \
  -H "Content-Type: application/json" \
  -d '{ ... same body as POST ... }'
PUT will not return a 409 conflict error if the entity already exists — it will update the existing entity instead.

Bulk Create or Update (PUT)

Use PUT /v1/charts/bulk to create or update multiple charts in a single request. The request body is an array of create request objects.
curl -X PUT "{base_url}/api/v1/charts/bulk" \
  -H "Authorization: Bearer {access_token}" \
  -H "Content-Type: application/json" \
  -d '[
    { "name": "chart_one", "service": "sample_superset", "chartType": "Bar" },
    { "name": "chart_two", "service": "sample_superset", "chartType": "Line" }
  ]'

Error Handling

CodeError TypeDescription
400BAD_REQUESTInvalid request body or missing required fields
401UNAUTHORIZEDInvalid or missing authentication token
403FORBIDDENUser lacks permission to create charts
409ENTITY_ALREADY_EXISTSChart with same name already exists in service (POST only)