curl --request PUT \
--url https://api.example.com/assets/data/{resource_uri} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>",
"status_message": "<string>",
"tags": [
"<string>"
],
"database_config": {
"host": "<string>",
"port": 123,
"database": "<string>",
"auth_type": "basic",
"ssl_mode": "disable",
"selected_tables": [
{
"database_name": "<string>",
"schemas": [
{
"schema_name": "<string>",
"tables": [
"<string>"
],
"views": []
}
]
}
],
"options": {}
},
"storage_config": {
"provider": "<string>",
"bucket": "<string>",
"region": "<string>",
"endpoint_url": "<string>"
},
"filesystem_config": {
"path": "<string>",
"protocol": "<string>",
"auth_required": false
},
"credentials": {}
}
'import requests
url = "https://api.example.com/assets/data/{resource_uri}"
payload = {
"name": "<string>",
"description": "<string>",
"status_message": "<string>",
"tags": ["<string>"],
"database_config": {
"host": "<string>",
"port": 123,
"database": "<string>",
"auth_type": "basic",
"ssl_mode": "disable",
"selected_tables": [
{
"database_name": "<string>",
"schemas": [
{
"schema_name": "<string>",
"tables": ["<string>"],
"views": []
}
]
}
],
"options": {}
},
"storage_config": {
"provider": "<string>",
"bucket": "<string>",
"region": "<string>",
"endpoint_url": "<string>"
},
"filesystem_config": {
"path": "<string>",
"protocol": "<string>",
"auth_required": False
},
"credentials": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: '<string>',
status_message: '<string>',
tags: ['<string>'],
database_config: {
host: '<string>',
port: 123,
database: '<string>',
auth_type: 'basic',
ssl_mode: 'disable',
selected_tables: [
{
database_name: '<string>',
schemas: [{schema_name: '<string>', tables: ['<string>'], views: []}]
}
],
options: {}
},
storage_config: {
provider: '<string>',
bucket: '<string>',
region: '<string>',
endpoint_url: '<string>'
},
filesystem_config: {path: '<string>', protocol: '<string>', auth_required: false},
credentials: {}
})
};
fetch('https://api.example.com/assets/data/{resource_uri}', 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.example.com/assets/data/{resource_uri}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'description' => '<string>',
'status_message' => '<string>',
'tags' => [
'<string>'
],
'database_config' => [
'host' => '<string>',
'port' => 123,
'database' => '<string>',
'auth_type' => 'basic',
'ssl_mode' => 'disable',
'selected_tables' => [
[
'database_name' => '<string>',
'schemas' => [
[
'schema_name' => '<string>',
'tables' => [
'<string>'
],
'views' => [
]
]
]
]
],
'options' => [
]
],
'storage_config' => [
'provider' => '<string>',
'bucket' => '<string>',
'region' => '<string>',
'endpoint_url' => '<string>'
],
'filesystem_config' => [
'path' => '<string>',
'protocol' => '<string>',
'auth_required' => false
],
'credentials' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/assets/data/{resource_uri}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"status_message\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"database_config\": {\n \"host\": \"<string>\",\n \"port\": 123,\n \"database\": \"<string>\",\n \"auth_type\": \"basic\",\n \"ssl_mode\": \"disable\",\n \"selected_tables\": [\n {\n \"database_name\": \"<string>\",\n \"schemas\": [\n {\n \"schema_name\": \"<string>\",\n \"tables\": [\n \"<string>\"\n ],\n \"views\": []\n }\n ]\n }\n ],\n \"options\": {}\n },\n \"storage_config\": {\n \"provider\": \"<string>\",\n \"bucket\": \"<string>\",\n \"region\": \"<string>\",\n \"endpoint_url\": \"<string>\"\n },\n \"filesystem_config\": {\n \"path\": \"<string>\",\n \"protocol\": \"<string>\",\n \"auth_required\": false\n },\n \"credentials\": {}\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.example.com/assets/data/{resource_uri}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"status_message\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"database_config\": {\n \"host\": \"<string>\",\n \"port\": 123,\n \"database\": \"<string>\",\n \"auth_type\": \"basic\",\n \"ssl_mode\": \"disable\",\n \"selected_tables\": [\n {\n \"database_name\": \"<string>\",\n \"schemas\": [\n {\n \"schema_name\": \"<string>\",\n \"tables\": [\n \"<string>\"\n ],\n \"views\": []\n }\n ]\n }\n ],\n \"options\": {}\n },\n \"storage_config\": {\n \"provider\": \"<string>\",\n \"bucket\": \"<string>\",\n \"region\": \"<string>\",\n \"endpoint_url\": \"<string>\"\n },\n \"filesystem_config\": {\n \"path\": \"<string>\",\n \"protocol\": \"<string>\",\n \"auth_required\": false\n },\n \"credentials\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/assets/data/{resource_uri}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"status_message\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"database_config\": {\n \"host\": \"<string>\",\n \"port\": 123,\n \"database\": \"<string>\",\n \"auth_type\": \"basic\",\n \"ssl_mode\": \"disable\",\n \"selected_tables\": [\n {\n \"database_name\": \"<string>\",\n \"schemas\": [\n {\n \"schema_name\": \"<string>\",\n \"tables\": [\n \"<string>\"\n ],\n \"views\": []\n }\n ]\n }\n ],\n \"options\": {}\n },\n \"storage_config\": {\n \"provider\": \"<string>\",\n \"bucket\": \"<string>\",\n \"region\": \"<string>\",\n \"endpoint_url\": \"<string>\"\n },\n \"filesystem_config\": {\n \"path\": \"<string>\",\n \"protocol\": \"<string>\",\n \"auth_required\": false\n },\n \"credentials\": {}\n}"
response = http.request(request)
puts response.read_body{
"resource_uri": "<string>",
"name": "<string>",
"organization_id": "<string>",
"project_id": "<string>",
"owner_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"updated_by": "<string>",
"type": "data",
"status_message": "<string>",
"description": "<string>",
"tags": [],
"database_config": {
"host": "<string>",
"port": 123,
"database": "<string>",
"auth_type": "basic",
"ssl_mode": "disable",
"selected_tables": [
{
"database_name": "<string>",
"schemas": [
{
"schema_name": "<string>",
"tables": [
"<string>"
],
"views": []
}
]
}
],
"options": {}
},
"storage_config": {
"provider": "<string>",
"bucket": "<string>",
"region": "<string>",
"endpoint_url": "<string>"
},
"filesystem_config": {
"path": "<string>",
"protocol": "<string>",
"auth_required": false
},
"secret_names": []
}{
"error": {
"message": "<string>",
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"details": {}
}
}{
"error": {
"message": "<string>",
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"details": {}
}
}{
"error": {
"message": "<string>",
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"details": {}
}
}{
"error": {
"message": "<string>",
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"details": {}
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}{
"error": {
"message": "<string>",
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"details": {}
}
}Update Data Connection
Update data connection
curl --request PUT \
--url https://api.example.com/assets/data/{resource_uri} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>",
"status_message": "<string>",
"tags": [
"<string>"
],
"database_config": {
"host": "<string>",
"port": 123,
"database": "<string>",
"auth_type": "basic",
"ssl_mode": "disable",
"selected_tables": [
{
"database_name": "<string>",
"schemas": [
{
"schema_name": "<string>",
"tables": [
"<string>"
],
"views": []
}
]
}
],
"options": {}
},
"storage_config": {
"provider": "<string>",
"bucket": "<string>",
"region": "<string>",
"endpoint_url": "<string>"
},
"filesystem_config": {
"path": "<string>",
"protocol": "<string>",
"auth_required": false
},
"credentials": {}
}
'import requests
url = "https://api.example.com/assets/data/{resource_uri}"
payload = {
"name": "<string>",
"description": "<string>",
"status_message": "<string>",
"tags": ["<string>"],
"database_config": {
"host": "<string>",
"port": 123,
"database": "<string>",
"auth_type": "basic",
"ssl_mode": "disable",
"selected_tables": [
{
"database_name": "<string>",
"schemas": [
{
"schema_name": "<string>",
"tables": ["<string>"],
"views": []
}
]
}
],
"options": {}
},
"storage_config": {
"provider": "<string>",
"bucket": "<string>",
"region": "<string>",
"endpoint_url": "<string>"
},
"filesystem_config": {
"path": "<string>",
"protocol": "<string>",
"auth_required": False
},
"credentials": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: '<string>',
status_message: '<string>',
tags: ['<string>'],
database_config: {
host: '<string>',
port: 123,
database: '<string>',
auth_type: 'basic',
ssl_mode: 'disable',
selected_tables: [
{
database_name: '<string>',
schemas: [{schema_name: '<string>', tables: ['<string>'], views: []}]
}
],
options: {}
},
storage_config: {
provider: '<string>',
bucket: '<string>',
region: '<string>',
endpoint_url: '<string>'
},
filesystem_config: {path: '<string>', protocol: '<string>', auth_required: false},
credentials: {}
})
};
fetch('https://api.example.com/assets/data/{resource_uri}', 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.example.com/assets/data/{resource_uri}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'description' => '<string>',
'status_message' => '<string>',
'tags' => [
'<string>'
],
'database_config' => [
'host' => '<string>',
'port' => 123,
'database' => '<string>',
'auth_type' => 'basic',
'ssl_mode' => 'disable',
'selected_tables' => [
[
'database_name' => '<string>',
'schemas' => [
[
'schema_name' => '<string>',
'tables' => [
'<string>'
],
'views' => [
]
]
]
]
],
'options' => [
]
],
'storage_config' => [
'provider' => '<string>',
'bucket' => '<string>',
'region' => '<string>',
'endpoint_url' => '<string>'
],
'filesystem_config' => [
'path' => '<string>',
'protocol' => '<string>',
'auth_required' => false
],
'credentials' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/assets/data/{resource_uri}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"status_message\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"database_config\": {\n \"host\": \"<string>\",\n \"port\": 123,\n \"database\": \"<string>\",\n \"auth_type\": \"basic\",\n \"ssl_mode\": \"disable\",\n \"selected_tables\": [\n {\n \"database_name\": \"<string>\",\n \"schemas\": [\n {\n \"schema_name\": \"<string>\",\n \"tables\": [\n \"<string>\"\n ],\n \"views\": []\n }\n ]\n }\n ],\n \"options\": {}\n },\n \"storage_config\": {\n \"provider\": \"<string>\",\n \"bucket\": \"<string>\",\n \"region\": \"<string>\",\n \"endpoint_url\": \"<string>\"\n },\n \"filesystem_config\": {\n \"path\": \"<string>\",\n \"protocol\": \"<string>\",\n \"auth_required\": false\n },\n \"credentials\": {}\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.example.com/assets/data/{resource_uri}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"status_message\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"database_config\": {\n \"host\": \"<string>\",\n \"port\": 123,\n \"database\": \"<string>\",\n \"auth_type\": \"basic\",\n \"ssl_mode\": \"disable\",\n \"selected_tables\": [\n {\n \"database_name\": \"<string>\",\n \"schemas\": [\n {\n \"schema_name\": \"<string>\",\n \"tables\": [\n \"<string>\"\n ],\n \"views\": []\n }\n ]\n }\n ],\n \"options\": {}\n },\n \"storage_config\": {\n \"provider\": \"<string>\",\n \"bucket\": \"<string>\",\n \"region\": \"<string>\",\n \"endpoint_url\": \"<string>\"\n },\n \"filesystem_config\": {\n \"path\": \"<string>\",\n \"protocol\": \"<string>\",\n \"auth_required\": false\n },\n \"credentials\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/assets/data/{resource_uri}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"status_message\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"database_config\": {\n \"host\": \"<string>\",\n \"port\": 123,\n \"database\": \"<string>\",\n \"auth_type\": \"basic\",\n \"ssl_mode\": \"disable\",\n \"selected_tables\": [\n {\n \"database_name\": \"<string>\",\n \"schemas\": [\n {\n \"schema_name\": \"<string>\",\n \"tables\": [\n \"<string>\"\n ],\n \"views\": []\n }\n ]\n }\n ],\n \"options\": {}\n },\n \"storage_config\": {\n \"provider\": \"<string>\",\n \"bucket\": \"<string>\",\n \"region\": \"<string>\",\n \"endpoint_url\": \"<string>\"\n },\n \"filesystem_config\": {\n \"path\": \"<string>\",\n \"protocol\": \"<string>\",\n \"auth_required\": false\n },\n \"credentials\": {}\n}"
response = http.request(request)
puts response.read_body{
"resource_uri": "<string>",
"name": "<string>",
"organization_id": "<string>",
"project_id": "<string>",
"owner_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"updated_by": "<string>",
"type": "data",
"status_message": "<string>",
"description": "<string>",
"tags": [],
"database_config": {
"host": "<string>",
"port": 123,
"database": "<string>",
"auth_type": "basic",
"ssl_mode": "disable",
"selected_tables": [
{
"database_name": "<string>",
"schemas": [
{
"schema_name": "<string>",
"tables": [
"<string>"
],
"views": []
}
]
}
],
"options": {}
},
"storage_config": {
"provider": "<string>",
"bucket": "<string>",
"region": "<string>",
"endpoint_url": "<string>"
},
"filesystem_config": {
"path": "<string>",
"protocol": "<string>",
"auth_required": false
},
"secret_names": []
}{
"error": {
"message": "<string>",
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"details": {}
}
}{
"error": {
"message": "<string>",
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"details": {}
}
}{
"error": {
"message": "<string>",
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"details": {}
}
}{
"error": {
"message": "<string>",
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"details": {}
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}{
"error": {
"message": "<string>",
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"details": {}
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Path Parameters
Data connection resource URI
Body
Request body for updating a data connection.
Note: resource_uri cannot be changed (it's part of the primary key). Credentials can be updated by providing new credential values.
1 - 255^[a-zA-Z0-9][a-zA-Z0-9 _.:-]*$1000Connection status
PENDING, ACTIVE, ERROR, DISABLED Context about current status
1000Configuration for database connections.
Show child attributes
Show child attributes
Configuration for object storage connections.
Show child attributes
Show child attributes
Configuration for file system connections.
Show child attributes
Show child attributes
Updated credentials (optional). If provided, will replace existing credentials.
Show child attributes
Show child attributes
Response
Successful Response
Full data connection representation.
Data connection types.
postgres, redshift, mysql, bigquery, snowflake, databricks, couchbase, oracle, hive, mongodb, s3, gcs, minio, nfs, smb Status of a data connection.
PENDING, ACTIVE, ERROR, DISABLED Deprecated: use created_by instead. Will be removed in a future release.
Configuration for database connections.
Show child attributes
Show child attributes
Configuration for object storage connections.
Show child attributes
Show child attributes
Configuration for file system connections.
Show child attributes
Show child attributes
Was this page helpful?

