curl --request DELETE \
--url https://{organization}.data.credibledata.com/api/v0/environments/{environmentName} \
--header 'Authorization: Bearer <token>'import requests
url = "https://{organization}.data.credibledata.com/api/v0/environments/{environmentName}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{organization}.data.credibledata.com/api/v0/environments/{environmentName}', 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}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
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}"
req, _ := http.NewRequest("DELETE", 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.delete("https://{organization}.data.credibledata.com/api/v0/environments/{environmentName}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{organization}.data.credibledata.com/api/v0/environments/{environmentName}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.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>"
}{
"message": "<string>",
"details": "<string>"
}Delete an environment
Permanently deletes an environment and all its associated resources including packages, connections, and metadata. This operation cannot be undone, so use with caution. The environment must exist and be accessible for deletion.
curl --request DELETE \
--url https://{organization}.data.credibledata.com/api/v0/environments/{environmentName} \
--header 'Authorization: Bearer <token>'import requests
url = "https://{organization}.data.credibledata.com/api/v0/environments/{environmentName}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{organization}.data.credibledata.com/api/v0/environments/{environmentName}', 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}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
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}"
req, _ := http.NewRequest("DELETE", 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.delete("https://{organization}.data.credibledata.com/api/v0/environments/{environmentName}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{organization}.data.credibledata.com/api/v0/environments/{environmentName}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.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>"
}{
"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_-]+$Response
Returns the environment deleted
Represents a Malloy environment containing packages, connections, and other resources
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?