> ## Documentation Index
> Fetch the complete documentation index at: https://docs.open-metadata.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a Chart

> Create a new chart within a dashboard service

# 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, for example `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.

**properties**

**id** `string`

UUID of the owner entity.

**type** `string`

Type of owner entity, for example `user`, `team`.

**name** `string`

Name of the owner entity.

**domains** `array`

Fully qualified names of the domains to assign for governance purposes.

**tags** `array`

Array of classification tags to apply to the chart.

**properties**

**tagFQN** `string` *required*

Fully qualified name of the tag.

**labelType** `string`

Type of label, for example `Manual`, `Derived`, `Propagated`.

**state** `string`

State of the tag, for example `Suggested`, `Confirmed`.

**extension** `object`

Custom property values defined by your organization's metadata schema.

```python POST /v1/charts theme={null}
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.open-metadata.org/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.root}")
```

```java POST /v1/charts theme={null}
import org.openmetadata.schema.api.data.CreateChart;
import org.openmetadata.schema.entity.data.Chart;
import org.openmetadata.schema.type.ChartType;

// client is an initialized OpenMetadataClient.

CreateChart request = new CreateChart()
    .withName("114")
    .withDisplayName("# of Games That Hit 100k in Sales By Release Year")
    .withService("sample_superset")
    .withDescription("Bar chart showing games that hit 100k in sales by release year")
    .withChartType(ChartType.Other)
    .withSourceUrl("http://localhost:808/explore/?slice_id=114");

Chart chart = client.charts().create(request);
```

```bash POST /v1/charts theme={null}
curl -X POST "{base_url}/api/v1/charts" \
  -H "Authorization: Bearer {access_token}" \
  -H "Content-Type: application/json" \
  -d '{
    "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"
  }'
```

```json Response theme={null}
{
  "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, for example Line, Bar, Area, Pie, Scatter, Table, Histogram, Other.

**service** `object`

Reference to the parent dashboard service.

**properties**

**id** `string`

UUID of the dashboard service.

**type** `string`

Type of entity (always `dashboardService`).

**name** `string`

Name of the dashboard service.

**fullyQualifiedName** `string`

Fully qualified name of the dashboard service.

**sourceUrl** `string`

URL of the chart in the source system.

**serviceType** `string`

Type of dashboard service, for example Superset, Looker, Tableau, Metabase, PowerBI.

**owners** `array`

List of owners assigned to the chart.

**properties**

**id** `string`

UUID of the owner entity.

**type** `string`

Type of owner entity, for example `user`, `team`.

**name** `string`

Name of the owner entity.

**domains** `array`

Domain assignments for governance.

**tags** `array`

Classification tags applied to the chart.

**properties**

**tagFQN** `string`

Fully qualified name of the tag.

**labelType** `string`

Type of label, for example `Manual`, `Derived`, `Propagated`.

**state** `string`

State of the tag, for example `Suggested`, `Confirmed`.

**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`.

```bash theme={null}
curl -X PUT "{base_url}/api/v1/charts" \
  -H "Authorization: Bearer {access_token}" \
  -H "Content-Type: application/json" \
  -d '{ ... same body as POST ... }'
```

> [!NOTE]
>
> `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.

```bash theme={null}
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

| Code | Error Type | Description |
| - | - | - |
| `400` | `BAD_REQUEST` | Invalid request body or missing required fields |
| `401` | `UNAUTHORIZED` | Invalid or missing authentication token |
| `403` | `FORBIDDEN` | User lacks permission to create charts |
| `409` | `ENTITY_ALREADY_EXISTS` | Chart with same name already exists in service (POST only) |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.