curl --request GET \
--url https://{organization}.data.credibledata.com/api/v0/environments/{environmentName}/packages/{packageName}/notebooks/{path} \
--header 'Authorization: Bearer <token>'import requests
url = "https://{organization}.data.credibledata.com/api/v0/environments/{environmentName}/packages/{packageName}/notebooks/{path}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{organization}.data.credibledata.com/api/v0/environments/{environmentName}/packages/{packageName}/notebooks/{path}', 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://{organization}.data.credibledata.com/api/v0/environments/{environmentName}/packages/{packageName}/notebooks/{path}",
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://{organization}.data.credibledata.com/api/v0/environments/{environmentName}/packages/{packageName}/notebooks/{path}"
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://{organization}.data.credibledata.com/api/v0/environments/{environmentName}/packages/{packageName}/notebooks/{path}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{organization}.data.credibledata.com/api/v0/environments/{environmentName}/packages/{packageName}/notebooks/{path}")
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{
"resource": "<string>",
"packageName": "<string>",
"path": "<string>",
"malloyVersion": "<string>",
"notebookCells": [
{
"type": "markdown",
"text": "<string>",
"newSources": [
"<string>"
],
"queryInfo": "<string>"
}
],
"annotations": [
"<string>"
],
"sources": [
{
"name": "<string>",
"annotations": [
"<string>"
],
"views": [
{
"name": "<string>",
"annotations": [
"<string>"
]
}
],
"filters": [
{
"name": "<string>",
"dimension": "<string>",
"type": "equal",
"implicit": true,
"required": true,
"dimensionType": "<string>"
}
],
"givens": [
{
"name": "<string>",
"type": "<string>",
"annotations": [
"<string>"
],
"default": "<string>"
}
],
"authorize": [
"<string>"
]
}
]
}{
"message": "<string>",
"details": "<string>"
}{
"message": "<string>",
"details": "<string>"
}{
"message": "<string>",
"details": "<string>"
}{
"message": "<string>",
"details": "<string>"
}Get Malloy notebook cells
Retrieves a Malloy notebook with its raw cell contents (markdown and code). Cell execution should be done separately via the execute-notebook-cell endpoint.
curl --request GET \
--url https://{organization}.data.credibledata.com/api/v0/environments/{environmentName}/packages/{packageName}/notebooks/{path} \
--header 'Authorization: Bearer <token>'import requests
url = "https://{organization}.data.credibledata.com/api/v0/environments/{environmentName}/packages/{packageName}/notebooks/{path}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{organization}.data.credibledata.com/api/v0/environments/{environmentName}/packages/{packageName}/notebooks/{path}', 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://{organization}.data.credibledata.com/api/v0/environments/{environmentName}/packages/{packageName}/notebooks/{path}",
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://{organization}.data.credibledata.com/api/v0/environments/{environmentName}/packages/{packageName}/notebooks/{path}"
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://{organization}.data.credibledata.com/api/v0/environments/{environmentName}/packages/{packageName}/notebooks/{path}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{organization}.data.credibledata.com/api/v0/environments/{environmentName}/packages/{packageName}/notebooks/{path}")
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{
"resource": "<string>",
"packageName": "<string>",
"path": "<string>",
"malloyVersion": "<string>",
"notebookCells": [
{
"type": "markdown",
"text": "<string>",
"newSources": [
"<string>"
],
"queryInfo": "<string>"
}
],
"annotations": [
"<string>"
],
"sources": [
{
"name": "<string>",
"annotations": [
"<string>"
],
"views": [
{
"name": "<string>",
"annotations": [
"<string>"
]
}
],
"filters": [
{
"name": "<string>",
"dimension": "<string>",
"type": "equal",
"implicit": true,
"required": true,
"dimensionType": "<string>"
}
],
"givens": [
{
"name": "<string>",
"type": "<string>",
"annotations": [
"<string>"
],
"default": "<string>"
}
],
"authorize": [
"<string>"
]
}
]
}{
"message": "<string>",
"details": "<string>"
}{
"message": "<string>",
"details": "<string>"
}{
"message": "<string>",
"details": "<string>"
}{
"message": "<string>",
"details": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Name of the environment Standard identifier pattern for resource names
^[a-zA-Z0-9_-]+$Name of the package
Path to notebook within the package.
Query Parameters
Version identifier for the package Version identifier pattern supporting dots and dashes
^[a-zA-Z0-9_.-]+$Response
A Malloy notebook with raw cell contents.
Raw Malloy notebook with unexecuted cell contents
Resource path to the notebook
Name of the package containing this notebook
Relative path to the notebook file within its package directory
Version of the Malloy compiler used to generate the notebook data
Array of notebook cells containing raw markdown and code content
Show child attributes
Show child attributes
Array of file-level (##) annotations attached to the notebook
Sources defined in the notebook's model
Show child attributes
Show child attributes
Was this page helpful?