List all available environments
curl --request GET \
--url https://{organization}.data.credibledata.com/api/v0/environments \
--header 'Authorization: Bearer <token>'import requests
url = "https://{organization}.data.credibledata.com/api/v0/environments"
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', 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",
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"
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")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{organization}.data.credibledata.com/api/v0/environments")
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>",
"name": "<string>",
"readme": "<string>",
"location": "<string>",
"connections": [
{
"resource": "<string>",
"name": "<string>",
"fingerprint": "<string>",
"attributes": {
"dialectName": "<string>",
"isPool": true,
"canPersist": true,
"canStream": true
},
"proxy": {
"type": "ssh",
"ssh": {
"host": "<string>",
"port": 22,
"username": "<string>",
"privateKey": "<string>",
"privateKeyPass": "<string>",
"hostKey": "<string>"
}
},
"postgresConnection": {
"host": "<string>",
"port": 123,
"databaseName": "<string>",
"userName": "<string>",
"password": "<string>",
"connectionString": "<string>"
},
"bigqueryConnection": {
"defaultProjectId": "<string>",
"billingProjectId": "<string>",
"location": "<string>",
"serviceAccountKeyJson": "<string>",
"maximumBytesBilled": "<string>",
"queryTimeoutMilliseconds": "<string>"
},
"snowflakeConnection": {
"account": "<string>",
"username": "<string>",
"password": "<string>",
"privateKey": "<string>",
"privateKeyPass": "<string>",
"warehouse": "<string>",
"database": "<string>",
"schema": "<string>",
"role": "<string>",
"responseTimeoutMilliseconds": 123
},
"trinoConnection": {
"server": "<string>",
"port": 123,
"catalog": "<string>",
"schema": "<string>",
"user": "<string>",
"password": "<string>",
"peakaKey": "<string>"
},
"databricksConnection": {
"host": "<string>",
"path": "<string>",
"token": "<string>",
"oauthClientId": "<string>",
"oauthClientSecret": "<string>",
"defaultCatalog": "<string>",
"defaultSchema": "<string>",
"setupSQL": "<string>"
},
"mysqlConnection": {
"host": "<string>",
"port": 123,
"database": "<string>",
"user": "<string>",
"password": "<string>"
},
"duckdbConnection": {
"attachedDatabases": [
{
"name": "test_connection, _connection, test_connection_1",
"attributes": {
"dialectName": "<string>",
"isPool": true,
"canPersist": true,
"canStream": true
},
"bigqueryConnection": {
"defaultProjectId": "<string>",
"billingProjectId": "<string>",
"location": "<string>",
"serviceAccountKeyJson": "<string>",
"maximumBytesBilled": "<string>",
"queryTimeoutMilliseconds": "<string>"
},
"snowflakeConnection": {
"account": "<string>",
"username": "<string>",
"password": "<string>",
"privateKey": "<string>",
"privateKeyPass": "<string>",
"warehouse": "<string>",
"database": "<string>",
"schema": "<string>",
"role": "<string>",
"responseTimeoutMilliseconds": 123
},
"postgresConnection": {
"host": "<string>",
"port": 123,
"databaseName": "<string>",
"userName": "<string>",
"password": "<string>",
"connectionString": "<string>"
},
"gcsConnection": {
"keyId": "<string>",
"secret": "<string>"
},
"s3Connection": {
"accessKeyId": "<string>",
"secretAccessKey": "<string>",
"region": "us-east-1",
"endpoint": "<string>",
"sessionToken": "<string>"
},
"azureConnection": {
"sasUrl": "<string>",
"tenantId": "<string>",
"clientId": "<string>",
"clientSecret": "<string>",
"accountName": "<string>",
"fileUrl": "<string>"
}
}
]
},
"motherduckConnection": {
"accessToken": "<string>",
"database": "<string>"
},
"ducklakeConnection": {
"storage": {
"bucketUrl": "<string>",
"s3Connection": {
"accessKeyId": "<string>",
"secretAccessKey": "<string>",
"region": "us-east-1",
"endpoint": "<string>",
"sessionToken": "<string>"
},
"gcsConnection": {
"keyId": "<string>",
"secret": "<string>"
}
},
"catalog": {
"postgresConnection": {
"host": "<string>",
"port": 123,
"databaseName": "<string>",
"userName": "<string>",
"password": "<string>",
"connectionString": "<string>"
}
}
},
"publisherConnection": {
"connectionUri": "<string>",
"accessToken": "<string>"
}
}
],
"packages": [
{
"resource": "<string>",
"name": "<string>",
"description": "<string>",
"location": "<string>",
"explores": [
"<string>"
],
"exploresWarnings": [
"<string>"
],
"warnings": [
{
"model": "<string>",
"target": "<string>",
"message": "<string>"
}
],
"manifestLocation": "<string>",
"materialization": {
"schedule": "<string>",
"freshness": {
"window": "<string>"
}
},
"manifestEntryCount": 123,
"boundManifestUri": "<string>",
"buildPlan": {
"graphs": [
{
"connectionName": "<string>",
"nodes": [
[
{
"sourceID": "<string>",
"dependsOn": [
"<string>"
]
}
]
]
}
],
"sources": {}
}
}
]
}
]{
"message": "<string>",
"details": "<string>"
}{
"message": "<string>",
"details": "<string>"
}{
"message": "<string>",
"details": "<string>"
}environments
List all available environments
Retrieves a list of all environments currently hosted on this Malloy Publisher server. Each environment contains metadata about its packages, connections, and configuration. This endpoint is typically used to discover available environments and their basic information.
GET
/
environments
List all available environments
curl --request GET \
--url https://{organization}.data.credibledata.com/api/v0/environments \
--header 'Authorization: Bearer <token>'import requests
url = "https://{organization}.data.credibledata.com/api/v0/environments"
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', 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",
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"
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")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{organization}.data.credibledata.com/api/v0/environments")
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>",
"name": "<string>",
"readme": "<string>",
"location": "<string>",
"connections": [
{
"resource": "<string>",
"name": "<string>",
"fingerprint": "<string>",
"attributes": {
"dialectName": "<string>",
"isPool": true,
"canPersist": true,
"canStream": true
},
"proxy": {
"type": "ssh",
"ssh": {
"host": "<string>",
"port": 22,
"username": "<string>",
"privateKey": "<string>",
"privateKeyPass": "<string>",
"hostKey": "<string>"
}
},
"postgresConnection": {
"host": "<string>",
"port": 123,
"databaseName": "<string>",
"userName": "<string>",
"password": "<string>",
"connectionString": "<string>"
},
"bigqueryConnection": {
"defaultProjectId": "<string>",
"billingProjectId": "<string>",
"location": "<string>",
"serviceAccountKeyJson": "<string>",
"maximumBytesBilled": "<string>",
"queryTimeoutMilliseconds": "<string>"
},
"snowflakeConnection": {
"account": "<string>",
"username": "<string>",
"password": "<string>",
"privateKey": "<string>",
"privateKeyPass": "<string>",
"warehouse": "<string>",
"database": "<string>",
"schema": "<string>",
"role": "<string>",
"responseTimeoutMilliseconds": 123
},
"trinoConnection": {
"server": "<string>",
"port": 123,
"catalog": "<string>",
"schema": "<string>",
"user": "<string>",
"password": "<string>",
"peakaKey": "<string>"
},
"databricksConnection": {
"host": "<string>",
"path": "<string>",
"token": "<string>",
"oauthClientId": "<string>",
"oauthClientSecret": "<string>",
"defaultCatalog": "<string>",
"defaultSchema": "<string>",
"setupSQL": "<string>"
},
"mysqlConnection": {
"host": "<string>",
"port": 123,
"database": "<string>",
"user": "<string>",
"password": "<string>"
},
"duckdbConnection": {
"attachedDatabases": [
{
"name": "test_connection, _connection, test_connection_1",
"attributes": {
"dialectName": "<string>",
"isPool": true,
"canPersist": true,
"canStream": true
},
"bigqueryConnection": {
"defaultProjectId": "<string>",
"billingProjectId": "<string>",
"location": "<string>",
"serviceAccountKeyJson": "<string>",
"maximumBytesBilled": "<string>",
"queryTimeoutMilliseconds": "<string>"
},
"snowflakeConnection": {
"account": "<string>",
"username": "<string>",
"password": "<string>",
"privateKey": "<string>",
"privateKeyPass": "<string>",
"warehouse": "<string>",
"database": "<string>",
"schema": "<string>",
"role": "<string>",
"responseTimeoutMilliseconds": 123
},
"postgresConnection": {
"host": "<string>",
"port": 123,
"databaseName": "<string>",
"userName": "<string>",
"password": "<string>",
"connectionString": "<string>"
},
"gcsConnection": {
"keyId": "<string>",
"secret": "<string>"
},
"s3Connection": {
"accessKeyId": "<string>",
"secretAccessKey": "<string>",
"region": "us-east-1",
"endpoint": "<string>",
"sessionToken": "<string>"
},
"azureConnection": {
"sasUrl": "<string>",
"tenantId": "<string>",
"clientId": "<string>",
"clientSecret": "<string>",
"accountName": "<string>",
"fileUrl": "<string>"
}
}
]
},
"motherduckConnection": {
"accessToken": "<string>",
"database": "<string>"
},
"ducklakeConnection": {
"storage": {
"bucketUrl": "<string>",
"s3Connection": {
"accessKeyId": "<string>",
"secretAccessKey": "<string>",
"region": "us-east-1",
"endpoint": "<string>",
"sessionToken": "<string>"
},
"gcsConnection": {
"keyId": "<string>",
"secret": "<string>"
}
},
"catalog": {
"postgresConnection": {
"host": "<string>",
"port": 123,
"databaseName": "<string>",
"userName": "<string>",
"password": "<string>",
"connectionString": "<string>"
}
}
},
"publisherConnection": {
"connectionUri": "<string>",
"accessToken": "<string>"
}
}
],
"packages": [
{
"resource": "<string>",
"name": "<string>",
"description": "<string>",
"location": "<string>",
"explores": [
"<string>"
],
"exploresWarnings": [
"<string>"
],
"warnings": [
{
"model": "<string>",
"target": "<string>",
"message": "<string>"
}
],
"manifestLocation": "<string>",
"materialization": {
"schedule": "<string>",
"freshness": {
"window": "<string>"
}
},
"manifestEntryCount": 123,
"boundManifestUri": "<string>",
"buildPlan": {
"graphs": [
{
"connectionName": "<string>",
"nodes": [
[
{
"sourceID": "<string>",
"dependsOn": [
"<string>"
]
}
]
]
}
],
"sources": {}
}
}
]
}
]{
"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.
Response
A list of all available environments
Resource path to the environment
Environment name
Environment README content
Environment location, can be an absolute path or URI (e.g. github, s3, gcs, etc.)
List of database connections configured for this environment
Show child attributes
Show child attributes
List of Malloy packages in this environment
Show child attributes
Show child attributes
Was this page helpful?
⌘I