Get a chart
curl --request GET \
--url https://api.dp1.us.honeyhive.ai/v1/projects/{project_id}/charts/{chart_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.dp1.us.honeyhive.ai/v1/projects/{project_id}/charts/{chart_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.dp1.us.honeyhive.ai/v1/projects/{project_id}/charts/{chart_id}', 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.dp1.us.honeyhive.ai/v1/projects/{project_id}/charts/{chart_id}",
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.dp1.us.honeyhive.ai/v1/projects/{project_id}/charts/{chart_id}"
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.dp1.us.honeyhive.ai/v1/projects/{project_id}/charts/{chart_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.dp1.us.honeyhive.ai/v1/projects/{project_id}/charts/{chart_id}")
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{
"success": true,
"data": {
"id": "<string>",
"name": "<string>",
"description": "<string>",
"metric": "<string>",
"func": "<string>",
"groupBy": "<string>",
"bucketing": "<string>",
"dateRange": {},
"query": [
{
"field": "<string>",
"value": "<string>",
"type": "<string>",
"operator": "<string>"
}
],
"owner_id": "<string>",
"is_active": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"owner_profile": {}
}
}Charts
Get a chart
Retrieve a single chart by id.
GET
/
v1
/
projects
/
{project_id}
/
charts
/
{chart_id}
Get a chart
curl --request GET \
--url https://api.dp1.us.honeyhive.ai/v1/projects/{project_id}/charts/{chart_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.dp1.us.honeyhive.ai/v1/projects/{project_id}/charts/{chart_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.dp1.us.honeyhive.ai/v1/projects/{project_id}/charts/{chart_id}', 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.dp1.us.honeyhive.ai/v1/projects/{project_id}/charts/{chart_id}",
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.dp1.us.honeyhive.ai/v1/projects/{project_id}/charts/{chart_id}"
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.dp1.us.honeyhive.ai/v1/projects/{project_id}/charts/{chart_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.dp1.us.honeyhive.ai/v1/projects/{project_id}/charts/{chart_id}")
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{
"success": true,
"data": {
"id": "<string>",
"name": "<string>",
"description": "<string>",
"metric": "<string>",
"func": "<string>",
"groupBy": "<string>",
"bucketing": "<string>",
"dateRange": {},
"query": [
{
"field": "<string>",
"value": "<string>",
"type": "<string>",
"operator": "<string>"
}
],
"owner_id": "<string>",
"is_active": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"owner_profile": {}
}
}Authorizations
A fine-grained data plane API key (values begin with hh_fgdp_). Rooted at an organization, workspace, or project, it carries the permissions chosen when it was created, and only the operations whose paths begin with /v1/projects/{project_id}/ accept it. Create one in the HoneyHive app under the project's, workspace's, or organization's Settings → API Keys, on the Data Plane tab.
Path Parameters
The unique identifier of the project that owns the chart
The unique identifier of the chart to retrieve
Was this page helpful?