Skip to main content
GET
/
chart
/
share
/
{share_string}
cURL
curl --request GET \
  --url https://api.chartbrew.com/chart/share/{share_string} \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://api.chartbrew.com/chart/share/{share_string}"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://api.chartbrew.com/chart/share/{share_string}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.chartbrew.com/chart/share/{share_string}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://api.chartbrew.com/chart/share/{share_string}"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("Authorization", "Bearer <token>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://api.chartbrew.com/chart/share/{share_string}")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.chartbrew.com/chart/share/{share_string}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
{
  "id": "<string>",
  "name": "<string>",
  "subType": "<string>",
  "chartData": {},
  "chartDataUpdated": "2023-11-07T05:31:56Z",
  "project_id": "<string>",
  "public": true,
  "shareable": true,
  "ChartDatasetConfigs": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "chart_id": 123,
      "dataset_id": 123,
      "xAxis": "<string>",
      "xAxisOperation": "<string>",
      "yAxis": "<string>",
      "yAxisOperation": "<string>",
      "dateField": "<string>",
      "dateFormat": "<string>",
      "conditions": [
        {
          "id": "<string>",
          "field": "<string>",
          "value": "<string>",
          "displayValues": true
        }
      ],
      "formula": "<string>",
      "datasetColor": "<string>",
      "fillColor": "<string>",
      "fill": false,
      "multiFill": false,
      "legend": "<string>",
      "pointRadius": 123,
      "excludedFields": [
        "<string>"
      ],
      "sort": "<string>",
      "columnsOrder": [
        "<string>"
      ],
      "order": 0,
      "maxRecords": 123,
      "goal": 123,
      "configuration": {
        "variables": [
          {
            "name": "<string>",
            "value": "<string>"
          }
        ]
      }
    }
  ]
}
This endpoint returns chart data optimized for sharing.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

share_string
string
required

Share policy's share_string

Query Parameters

token
string

Access token generated from the SharePolicy

theme
enum<string>

Theme for the embedded chart (light, dark, os)

Available options:
light,
dark,
os

Response

Chart data

id
string
name
string
type
enum<string>
Available options:
line,
bar,
pie,
doughnut,
radar,
polar,
table,
kpi,
avg,
gauge,
matrix,
markdown
subType
string
chartData
object
chartDataUpdated
string<date-time>
project_id
string
public
boolean
shareable
boolean
ChartDatasetConfigs
object[]