Publishing API

API description and procedures for publishing charts to ChartSQL.com

Overview

You can publish your charts to ChartSQL Cloud to share and create dashboards. ChartSQL Studio provides all of the capabilities for publishing, but you may also use the API if you are doing your own automations.

This document describes the API calls for publishing charts to ChartSQL.com

Publisher Authentication

In order to publish charts, you need to be an approved Publisher for a Package. You will need a ChartSQL Cloud account.

If you are not the creator/owner of a Package on ChartSQL Cloud, the Package owner needs to give your user Publisher access.

Publishing Key

From your ChartSQL Cloud account settings, go to Packages. From there you can create a new Publisher Key. A Publisher Key is a unique password that gives you API access to publish to the Package. Do not share your Publishing Key with anyone else, it is like a password, and it is tied to your ChartSQL Cloud account.

Publishing Keys are securely stored and cannot be recovered. If you forget or lose your key, you will need to create another.

Publishing Key Format

Typically you will not need to do this encoding yourself. The Publishing Key format is a base64 encoded string of your Publisher Id and its password. When you created your publishing key in the ChartSQL Cloud UI, you will have received your base64 encoded string.

toBase64("{{publisherId}}:{{password}}")

The publishing key allows ChartSQL Cloud to identify the account by publisherId and verify access by comparing the salted and hashed value of the password.

Base URL

http://api.chartsql.com/Publisher/{{publishingKey}}/

Endpoints

Publish Chart

POST http://api.chartsql.com/Publisher/{{publishingKey}}/publishDashChart.json

Fields

NameRequiredDescription

sql

yes

The SQL content of the chart

fileName

yes

The local file system name of the chart

Update Chart

POST http://api.chartsql.com/Publisher/{{publishingKey}}/updateDashChart.json

Fields

NameRequiredDescription

sql

yes

The SQL content of the chart

fileName

yes

The local file system name of the chart

dashId

yes

The @dash-id that uniquely identifies the already published chart.

Verify/Stats

POST http://api.chartsql.com/Publisher/{{publishingKey}}/stats.json

You use the /stats endpoint to verify access to the Publisher. If the publishing key fails, an error will be returned.

Last updated

Support

DiscordX

ChartSQL