Data Sources
Create a data source
POST
/
api
/
v1
/
data_sources
Create a data source
curl --request POST \
--url https://app.datafold.com/api/v1/data_sources \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"type": "<string>",
"accessible": true,
"catalog_exclude_list": "<string>",
"catalog_include_list": "<string>",
"created_from": "<string>",
"data_retention_days": 123,
"disable_profiling": false,
"disable_schema_indexing": false,
"float_tolerance": 0,
"group_ids": [
123
],
"groups": {},
"hidden": false,
"id": 123,
"is_paused": false,
"last_test": {
"results": [
{
"result": null
}
],
"tested_at": "2023-11-07T05:31:56Z"
},
"lineage_schedule": "<string>",
"max_allowed_connections": 123,
"oauth_dwh_active": true,
"options": {
"jsonKeyFile": "<string>",
"projectId": "<string>",
"extraProjectsToIndex": "project1\nproject2",
"jsonOAuthKeyFile": "<string>",
"location": "US",
"totalMBytesProcessedLimit": 123,
"useStandardSql": true,
"userDefinedFunctionResourceUri": "gs://bucket/date_utils.js"
},
"profile_exclude_list": "<string>",
"profile_include_list": "<string>",
"profile_schedule": "<string>",
"queue_name": "<string>",
"scheduled_queue_name": "<string>",
"schema_indexing_schedule": "<string>",
"schema_max_age_s": 123,
"secret_id": 123,
"source": "<string>",
"temp_schema": "<string>",
"view_only": false
}
'import requests
url = "https://app.datafold.com/api/v1/data_sources"
payload = {
"name": "<string>",
"type": "<string>",
"accessible": True,
"catalog_exclude_list": "<string>",
"catalog_include_list": "<string>",
"created_from": "<string>",
"data_retention_days": 123,
"disable_profiling": False,
"disable_schema_indexing": False,
"float_tolerance": 0,
"group_ids": [123],
"groups": {},
"hidden": False,
"id": 123,
"is_paused": False,
"last_test": {
"results": [{ "result": None }],
"tested_at": "2023-11-07T05:31:56Z"
},
"lineage_schedule": "<string>",
"max_allowed_connections": 123,
"oauth_dwh_active": True,
"options": {
"jsonKeyFile": "<string>",
"projectId": "<string>",
"extraProjectsToIndex": "project1
project2",
"jsonOAuthKeyFile": "<string>",
"location": "US",
"totalMBytesProcessedLimit": 123,
"useStandardSql": True,
"userDefinedFunctionResourceUri": "gs://bucket/date_utils.js"
},
"profile_exclude_list": "<string>",
"profile_include_list": "<string>",
"profile_schedule": "<string>",
"queue_name": "<string>",
"scheduled_queue_name": "<string>",
"schema_indexing_schedule": "<string>",
"schema_max_age_s": 123,
"secret_id": 123,
"source": "<string>",
"temp_schema": "<string>",
"view_only": False
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
type: '<string>',
accessible: true,
catalog_exclude_list: '<string>',
catalog_include_list: '<string>',
created_from: '<string>',
data_retention_days: 123,
disable_profiling: false,
disable_schema_indexing: false,
float_tolerance: 0,
group_ids: [123],
groups: {},
hidden: false,
id: 123,
is_paused: false,
last_test: {results: [{result: null}], tested_at: '2023-11-07T05:31:56Z'},
lineage_schedule: '<string>',
max_allowed_connections: 123,
oauth_dwh_active: true,
options: {
jsonKeyFile: '<string>',
projectId: '<string>',
extraProjectsToIndex: 'project1\nproject2',
jsonOAuthKeyFile: '<string>',
location: 'US',
totalMBytesProcessedLimit: 123,
useStandardSql: true,
userDefinedFunctionResourceUri: 'gs://bucket/date_utils.js'
},
profile_exclude_list: '<string>',
profile_include_list: '<string>',
profile_schedule: '<string>',
queue_name: '<string>',
scheduled_queue_name: '<string>',
schema_indexing_schedule: '<string>',
schema_max_age_s: 123,
secret_id: 123,
source: '<string>',
temp_schema: '<string>',
view_only: false
})
};
fetch('https://app.datafold.com/api/v1/data_sources', 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://app.datafold.com/api/v1/data_sources",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'type' => '<string>',
'accessible' => true,
'catalog_exclude_list' => '<string>',
'catalog_include_list' => '<string>',
'created_from' => '<string>',
'data_retention_days' => 123,
'disable_profiling' => false,
'disable_schema_indexing' => false,
'float_tolerance' => 0,
'group_ids' => [
123
],
'groups' => [
],
'hidden' => false,
'id' => 123,
'is_paused' => false,
'last_test' => [
'results' => [
[
'result' => null
]
],
'tested_at' => '2023-11-07T05:31:56Z'
],
'lineage_schedule' => '<string>',
'max_allowed_connections' => 123,
'oauth_dwh_active' => true,
'options' => [
'jsonKeyFile' => '<string>',
'projectId' => '<string>',
'extraProjectsToIndex' => 'project1
project2',
'jsonOAuthKeyFile' => '<string>',
'location' => 'US',
'totalMBytesProcessedLimit' => 123,
'useStandardSql' => true,
'userDefinedFunctionResourceUri' => 'gs://bucket/date_utils.js'
],
'profile_exclude_list' => '<string>',
'profile_include_list' => '<string>',
'profile_schedule' => '<string>',
'queue_name' => '<string>',
'scheduled_queue_name' => '<string>',
'schema_indexing_schedule' => '<string>',
'schema_max_age_s' => 123,
'secret_id' => 123,
'source' => '<string>',
'temp_schema' => '<string>',
'view_only' => false
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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://app.datafold.com/api/v1/data_sources"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"type\": \"<string>\",\n \"accessible\": true,\n \"catalog_exclude_list\": \"<string>\",\n \"catalog_include_list\": \"<string>\",\n \"created_from\": \"<string>\",\n \"data_retention_days\": 123,\n \"disable_profiling\": false,\n \"disable_schema_indexing\": false,\n \"float_tolerance\": 0,\n \"group_ids\": [\n 123\n ],\n \"groups\": {},\n \"hidden\": false,\n \"id\": 123,\n \"is_paused\": false,\n \"last_test\": {\n \"results\": [\n {\n \"result\": null\n }\n ],\n \"tested_at\": \"2023-11-07T05:31:56Z\"\n },\n \"lineage_schedule\": \"<string>\",\n \"max_allowed_connections\": 123,\n \"oauth_dwh_active\": true,\n \"options\": {\n \"jsonKeyFile\": \"<string>\",\n \"projectId\": \"<string>\",\n \"extraProjectsToIndex\": \"project1\\nproject2\",\n \"jsonOAuthKeyFile\": \"<string>\",\n \"location\": \"US\",\n \"totalMBytesProcessedLimit\": 123,\n \"useStandardSql\": true,\n \"userDefinedFunctionResourceUri\": \"gs://bucket/date_utils.js\"\n },\n \"profile_exclude_list\": \"<string>\",\n \"profile_include_list\": \"<string>\",\n \"profile_schedule\": \"<string>\",\n \"queue_name\": \"<string>\",\n \"scheduled_queue_name\": \"<string>\",\n \"schema_indexing_schedule\": \"<string>\",\n \"schema_max_age_s\": 123,\n \"secret_id\": 123,\n \"source\": \"<string>\",\n \"temp_schema\": \"<string>\",\n \"view_only\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
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.post("https://app.datafold.com/api/v1/data_sources")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"type\": \"<string>\",\n \"accessible\": true,\n \"catalog_exclude_list\": \"<string>\",\n \"catalog_include_list\": \"<string>\",\n \"created_from\": \"<string>\",\n \"data_retention_days\": 123,\n \"disable_profiling\": false,\n \"disable_schema_indexing\": false,\n \"float_tolerance\": 0,\n \"group_ids\": [\n 123\n ],\n \"groups\": {},\n \"hidden\": false,\n \"id\": 123,\n \"is_paused\": false,\n \"last_test\": {\n \"results\": [\n {\n \"result\": null\n }\n ],\n \"tested_at\": \"2023-11-07T05:31:56Z\"\n },\n \"lineage_schedule\": \"<string>\",\n \"max_allowed_connections\": 123,\n \"oauth_dwh_active\": true,\n \"options\": {\n \"jsonKeyFile\": \"<string>\",\n \"projectId\": \"<string>\",\n \"extraProjectsToIndex\": \"project1\\nproject2\",\n \"jsonOAuthKeyFile\": \"<string>\",\n \"location\": \"US\",\n \"totalMBytesProcessedLimit\": 123,\n \"useStandardSql\": true,\n \"userDefinedFunctionResourceUri\": \"gs://bucket/date_utils.js\"\n },\n \"profile_exclude_list\": \"<string>\",\n \"profile_include_list\": \"<string>\",\n \"profile_schedule\": \"<string>\",\n \"queue_name\": \"<string>\",\n \"scheduled_queue_name\": \"<string>\",\n \"schema_indexing_schedule\": \"<string>\",\n \"schema_max_age_s\": 123,\n \"secret_id\": 123,\n \"source\": \"<string>\",\n \"temp_schema\": \"<string>\",\n \"view_only\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.datafold.com/api/v1/data_sources")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"type\": \"<string>\",\n \"accessible\": true,\n \"catalog_exclude_list\": \"<string>\",\n \"catalog_include_list\": \"<string>\",\n \"created_from\": \"<string>\",\n \"data_retention_days\": 123,\n \"disable_profiling\": false,\n \"disable_schema_indexing\": false,\n \"float_tolerance\": 0,\n \"group_ids\": [\n 123\n ],\n \"groups\": {},\n \"hidden\": false,\n \"id\": 123,\n \"is_paused\": false,\n \"last_test\": {\n \"results\": [\n {\n \"result\": null\n }\n ],\n \"tested_at\": \"2023-11-07T05:31:56Z\"\n },\n \"lineage_schedule\": \"<string>\",\n \"max_allowed_connections\": 123,\n \"oauth_dwh_active\": true,\n \"options\": {\n \"jsonKeyFile\": \"<string>\",\n \"projectId\": \"<string>\",\n \"extraProjectsToIndex\": \"project1\\nproject2\",\n \"jsonOAuthKeyFile\": \"<string>\",\n \"location\": \"US\",\n \"totalMBytesProcessedLimit\": 123,\n \"useStandardSql\": true,\n \"userDefinedFunctionResourceUri\": \"gs://bucket/date_utils.js\"\n },\n \"profile_exclude_list\": \"<string>\",\n \"profile_include_list\": \"<string>\",\n \"profile_schedule\": \"<string>\",\n \"queue_name\": \"<string>\",\n \"scheduled_queue_name\": \"<string>\",\n \"schema_indexing_schedule\": \"<string>\",\n \"schema_max_age_s\": 123,\n \"secret_id\": 123,\n \"source\": \"<string>\",\n \"temp_schema\": \"<string>\",\n \"view_only\": false\n}"
response = http.request(request)
puts response.read_body{
"name": "<string>",
"type": "<string>",
"accessible": true,
"catalog_exclude_list": "<string>",
"catalog_include_list": "<string>",
"created_from": "<string>",
"data_retention_days": 123,
"disable_profiling": false,
"disable_schema_indexing": false,
"float_tolerance": 0,
"group_ids": [
123
],
"groups": {},
"hidden": false,
"id": 123,
"is_paused": false,
"last_test": {
"results": [
{
"result": null
}
],
"tested_at": "2023-11-07T05:31:56Z"
},
"lineage_schedule": "<string>",
"max_allowed_connections": 123,
"oauth_dwh_active": true,
"options": {
"projectId": "<string>",
"extraProjectsToIndex": "project1\nproject2",
"jsonOAuthKeyFile": "<string>",
"location": "US",
"totalMBytesProcessedLimit": 123,
"useStandardSql": true,
"userDefinedFunctionResourceUri": "gs://bucket/date_utils.js"
},
"profile_exclude_list": "<string>",
"profile_include_list": "<string>",
"profile_schedule": "<string>",
"queue_name": "<string>",
"scheduled_queue_name": "<string>",
"schema_indexing_schedule": "<string>",
"schema_max_age_s": 123,
"secret_id": 123,
"source": "<string>",
"temp_schema": "<string>",
"view_only": false
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}Authorizations
Use the 'Authorization' header with the format 'Key '
Body
application/json
- ApiDataSourceBigQuery
- ApiDataSourceDatabricks
- ApiDataSourceDuckDB
- ApiDataSourceMongoDB
- ApiDataSourceMySQL
- ApiDataSourceMariaDB
- ApiDataSourceMSSQL
- ApiDataSourceOracle
- ApiDataSourcePostgres
- ApiDataSourcePostgresAurora
- ApiDataSourcePostgresRds
- ApiDataSourceRedshift
- ApiDataSourceTeradata
- ApiDataSourceSapHana
- ApiDataSourceDB2
- ApiDataSourceAwsAthena
- ApiDataSourceSnowflake
- ApiDataSourceDremio
- ApiDataSourceStarburst
- ApiDataSourceNetezza
- ApiDataSourceAzureDataLake
- ApiDataSourceGCS
- ApiDataSourceS3
- ApiDataSourceAzureSynapse
- ApiDataSourceMicrosoftFabric
- ApiDataSourceVertica
- ApiDataSourceTrino
Allowed value:
"bigquery"Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Response
Successful Response
- ApiDataSourceBigQuery
- ApiDataSourceDatabricks
- ApiDataSourceDuckDB
- ApiDataSourceMongoDB
- ApiDataSourceMySQL
- ApiDataSourceMariaDB
- ApiDataSourceMSSQL
- ApiDataSourceOracle
- ApiDataSourcePostgres
- ApiDataSourcePostgresAurora
- ApiDataSourcePostgresRds
- ApiDataSourceRedshift
- ApiDataSourceTeradata
- ApiDataSourceSapHana
- ApiDataSourceDB2
- ApiDataSourceAwsAthena
- ApiDataSourceSnowflake
- ApiDataSourceDremio
- ApiDataSourceStarburst
- ApiDataSourceNetezza
- ApiDataSourceAzureDataLake
- ApiDataSourceGCS
- ApiDataSourceS3
- ApiDataSourceAzureSynapse
- ApiDataSourceMicrosoftFabric
- ApiDataSourceVertica
- ApiDataSourceTrino
Allowed value:
"bigquery"Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
⌘I
Create a data source
curl --request POST \
--url https://app.datafold.com/api/v1/data_sources \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"type": "<string>",
"accessible": true,
"catalog_exclude_list": "<string>",
"catalog_include_list": "<string>",
"created_from": "<string>",
"data_retention_days": 123,
"disable_profiling": false,
"disable_schema_indexing": false,
"float_tolerance": 0,
"group_ids": [
123
],
"groups": {},
"hidden": false,
"id": 123,
"is_paused": false,
"last_test": {
"results": [
{
"result": null
}
],
"tested_at": "2023-11-07T05:31:56Z"
},
"lineage_schedule": "<string>",
"max_allowed_connections": 123,
"oauth_dwh_active": true,
"options": {
"jsonKeyFile": "<string>",
"projectId": "<string>",
"extraProjectsToIndex": "project1\nproject2",
"jsonOAuthKeyFile": "<string>",
"location": "US",
"totalMBytesProcessedLimit": 123,
"useStandardSql": true,
"userDefinedFunctionResourceUri": "gs://bucket/date_utils.js"
},
"profile_exclude_list": "<string>",
"profile_include_list": "<string>",
"profile_schedule": "<string>",
"queue_name": "<string>",
"scheduled_queue_name": "<string>",
"schema_indexing_schedule": "<string>",
"schema_max_age_s": 123,
"secret_id": 123,
"source": "<string>",
"temp_schema": "<string>",
"view_only": false
}
'import requests
url = "https://app.datafold.com/api/v1/data_sources"
payload = {
"name": "<string>",
"type": "<string>",
"accessible": True,
"catalog_exclude_list": "<string>",
"catalog_include_list": "<string>",
"created_from": "<string>",
"data_retention_days": 123,
"disable_profiling": False,
"disable_schema_indexing": False,
"float_tolerance": 0,
"group_ids": [123],
"groups": {},
"hidden": False,
"id": 123,
"is_paused": False,
"last_test": {
"results": [{ "result": None }],
"tested_at": "2023-11-07T05:31:56Z"
},
"lineage_schedule": "<string>",
"max_allowed_connections": 123,
"oauth_dwh_active": True,
"options": {
"jsonKeyFile": "<string>",
"projectId": "<string>",
"extraProjectsToIndex": "project1
project2",
"jsonOAuthKeyFile": "<string>",
"location": "US",
"totalMBytesProcessedLimit": 123,
"useStandardSql": True,
"userDefinedFunctionResourceUri": "gs://bucket/date_utils.js"
},
"profile_exclude_list": "<string>",
"profile_include_list": "<string>",
"profile_schedule": "<string>",
"queue_name": "<string>",
"scheduled_queue_name": "<string>",
"schema_indexing_schedule": "<string>",
"schema_max_age_s": 123,
"secret_id": 123,
"source": "<string>",
"temp_schema": "<string>",
"view_only": False
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
type: '<string>',
accessible: true,
catalog_exclude_list: '<string>',
catalog_include_list: '<string>',
created_from: '<string>',
data_retention_days: 123,
disable_profiling: false,
disable_schema_indexing: false,
float_tolerance: 0,
group_ids: [123],
groups: {},
hidden: false,
id: 123,
is_paused: false,
last_test: {results: [{result: null}], tested_at: '2023-11-07T05:31:56Z'},
lineage_schedule: '<string>',
max_allowed_connections: 123,
oauth_dwh_active: true,
options: {
jsonKeyFile: '<string>',
projectId: '<string>',
extraProjectsToIndex: 'project1\nproject2',
jsonOAuthKeyFile: '<string>',
location: 'US',
totalMBytesProcessedLimit: 123,
useStandardSql: true,
userDefinedFunctionResourceUri: 'gs://bucket/date_utils.js'
},
profile_exclude_list: '<string>',
profile_include_list: '<string>',
profile_schedule: '<string>',
queue_name: '<string>',
scheduled_queue_name: '<string>',
schema_indexing_schedule: '<string>',
schema_max_age_s: 123,
secret_id: 123,
source: '<string>',
temp_schema: '<string>',
view_only: false
})
};
fetch('https://app.datafold.com/api/v1/data_sources', 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://app.datafold.com/api/v1/data_sources",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'type' => '<string>',
'accessible' => true,
'catalog_exclude_list' => '<string>',
'catalog_include_list' => '<string>',
'created_from' => '<string>',
'data_retention_days' => 123,
'disable_profiling' => false,
'disable_schema_indexing' => false,
'float_tolerance' => 0,
'group_ids' => [
123
],
'groups' => [
],
'hidden' => false,
'id' => 123,
'is_paused' => false,
'last_test' => [
'results' => [
[
'result' => null
]
],
'tested_at' => '2023-11-07T05:31:56Z'
],
'lineage_schedule' => '<string>',
'max_allowed_connections' => 123,
'oauth_dwh_active' => true,
'options' => [
'jsonKeyFile' => '<string>',
'projectId' => '<string>',
'extraProjectsToIndex' => 'project1
project2',
'jsonOAuthKeyFile' => '<string>',
'location' => 'US',
'totalMBytesProcessedLimit' => 123,
'useStandardSql' => true,
'userDefinedFunctionResourceUri' => 'gs://bucket/date_utils.js'
],
'profile_exclude_list' => '<string>',
'profile_include_list' => '<string>',
'profile_schedule' => '<string>',
'queue_name' => '<string>',
'scheduled_queue_name' => '<string>',
'schema_indexing_schedule' => '<string>',
'schema_max_age_s' => 123,
'secret_id' => 123,
'source' => '<string>',
'temp_schema' => '<string>',
'view_only' => false
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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://app.datafold.com/api/v1/data_sources"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"type\": \"<string>\",\n \"accessible\": true,\n \"catalog_exclude_list\": \"<string>\",\n \"catalog_include_list\": \"<string>\",\n \"created_from\": \"<string>\",\n \"data_retention_days\": 123,\n \"disable_profiling\": false,\n \"disable_schema_indexing\": false,\n \"float_tolerance\": 0,\n \"group_ids\": [\n 123\n ],\n \"groups\": {},\n \"hidden\": false,\n \"id\": 123,\n \"is_paused\": false,\n \"last_test\": {\n \"results\": [\n {\n \"result\": null\n }\n ],\n \"tested_at\": \"2023-11-07T05:31:56Z\"\n },\n \"lineage_schedule\": \"<string>\",\n \"max_allowed_connections\": 123,\n \"oauth_dwh_active\": true,\n \"options\": {\n \"jsonKeyFile\": \"<string>\",\n \"projectId\": \"<string>\",\n \"extraProjectsToIndex\": \"project1\\nproject2\",\n \"jsonOAuthKeyFile\": \"<string>\",\n \"location\": \"US\",\n \"totalMBytesProcessedLimit\": 123,\n \"useStandardSql\": true,\n \"userDefinedFunctionResourceUri\": \"gs://bucket/date_utils.js\"\n },\n \"profile_exclude_list\": \"<string>\",\n \"profile_include_list\": \"<string>\",\n \"profile_schedule\": \"<string>\",\n \"queue_name\": \"<string>\",\n \"scheduled_queue_name\": \"<string>\",\n \"schema_indexing_schedule\": \"<string>\",\n \"schema_max_age_s\": 123,\n \"secret_id\": 123,\n \"source\": \"<string>\",\n \"temp_schema\": \"<string>\",\n \"view_only\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
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.post("https://app.datafold.com/api/v1/data_sources")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"type\": \"<string>\",\n \"accessible\": true,\n \"catalog_exclude_list\": \"<string>\",\n \"catalog_include_list\": \"<string>\",\n \"created_from\": \"<string>\",\n \"data_retention_days\": 123,\n \"disable_profiling\": false,\n \"disable_schema_indexing\": false,\n \"float_tolerance\": 0,\n \"group_ids\": [\n 123\n ],\n \"groups\": {},\n \"hidden\": false,\n \"id\": 123,\n \"is_paused\": false,\n \"last_test\": {\n \"results\": [\n {\n \"result\": null\n }\n ],\n \"tested_at\": \"2023-11-07T05:31:56Z\"\n },\n \"lineage_schedule\": \"<string>\",\n \"max_allowed_connections\": 123,\n \"oauth_dwh_active\": true,\n \"options\": {\n \"jsonKeyFile\": \"<string>\",\n \"projectId\": \"<string>\",\n \"extraProjectsToIndex\": \"project1\\nproject2\",\n \"jsonOAuthKeyFile\": \"<string>\",\n \"location\": \"US\",\n \"totalMBytesProcessedLimit\": 123,\n \"useStandardSql\": true,\n \"userDefinedFunctionResourceUri\": \"gs://bucket/date_utils.js\"\n },\n \"profile_exclude_list\": \"<string>\",\n \"profile_include_list\": \"<string>\",\n \"profile_schedule\": \"<string>\",\n \"queue_name\": \"<string>\",\n \"scheduled_queue_name\": \"<string>\",\n \"schema_indexing_schedule\": \"<string>\",\n \"schema_max_age_s\": 123,\n \"secret_id\": 123,\n \"source\": \"<string>\",\n \"temp_schema\": \"<string>\",\n \"view_only\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.datafold.com/api/v1/data_sources")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"type\": \"<string>\",\n \"accessible\": true,\n \"catalog_exclude_list\": \"<string>\",\n \"catalog_include_list\": \"<string>\",\n \"created_from\": \"<string>\",\n \"data_retention_days\": 123,\n \"disable_profiling\": false,\n \"disable_schema_indexing\": false,\n \"float_tolerance\": 0,\n \"group_ids\": [\n 123\n ],\n \"groups\": {},\n \"hidden\": false,\n \"id\": 123,\n \"is_paused\": false,\n \"last_test\": {\n \"results\": [\n {\n \"result\": null\n }\n ],\n \"tested_at\": \"2023-11-07T05:31:56Z\"\n },\n \"lineage_schedule\": \"<string>\",\n \"max_allowed_connections\": 123,\n \"oauth_dwh_active\": true,\n \"options\": {\n \"jsonKeyFile\": \"<string>\",\n \"projectId\": \"<string>\",\n \"extraProjectsToIndex\": \"project1\\nproject2\",\n \"jsonOAuthKeyFile\": \"<string>\",\n \"location\": \"US\",\n \"totalMBytesProcessedLimit\": 123,\n \"useStandardSql\": true,\n \"userDefinedFunctionResourceUri\": \"gs://bucket/date_utils.js\"\n },\n \"profile_exclude_list\": \"<string>\",\n \"profile_include_list\": \"<string>\",\n \"profile_schedule\": \"<string>\",\n \"queue_name\": \"<string>\",\n \"scheduled_queue_name\": \"<string>\",\n \"schema_indexing_schedule\": \"<string>\",\n \"schema_max_age_s\": 123,\n \"secret_id\": 123,\n \"source\": \"<string>\",\n \"temp_schema\": \"<string>\",\n \"view_only\": false\n}"
response = http.request(request)
puts response.read_body{
"name": "<string>",
"type": "<string>",
"accessible": true,
"catalog_exclude_list": "<string>",
"catalog_include_list": "<string>",
"created_from": "<string>",
"data_retention_days": 123,
"disable_profiling": false,
"disable_schema_indexing": false,
"float_tolerance": 0,
"group_ids": [
123
],
"groups": {},
"hidden": false,
"id": 123,
"is_paused": false,
"last_test": {
"results": [
{
"result": null
}
],
"tested_at": "2023-11-07T05:31:56Z"
},
"lineage_schedule": "<string>",
"max_allowed_connections": 123,
"oauth_dwh_active": true,
"options": {
"projectId": "<string>",
"extraProjectsToIndex": "project1\nproject2",
"jsonOAuthKeyFile": "<string>",
"location": "US",
"totalMBytesProcessedLimit": 123,
"useStandardSql": true,
"userDefinedFunctionResourceUri": "gs://bucket/date_utils.js"
},
"profile_exclude_list": "<string>",
"profile_include_list": "<string>",
"profile_schedule": "<string>",
"queue_name": "<string>",
"scheduled_queue_name": "<string>",
"schema_indexing_schedule": "<string>",
"schema_max_age_s": 123,
"secret_id": 123,
"source": "<string>",
"temp_schema": "<string>",
"view_only": false
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}