Create a Data Source
Create a Data Source
curl --request POST \
--url https://mycluster.domino.tech/api/datasource/v1/datasources \
--header 'Content-Type: application/json' \
--header 'X-Domino-Api-Key: <api-key>' \
--data '
{
"authType": "AzureBasic",
"config": {
"host": "example-host.com"
},
"credentials": {
"secretCredentials": {},
"visibleCredentials": {}
},
"dataSourceType": "ADLSConfig",
"name": "data-source-name",
"permissions": {
"isEveryone": true,
"userAndOrganizationIds": [
"<string>"
]
},
"description": "My Data Source"
}
'import requests
url = "https://mycluster.domino.tech/api/datasource/v1/datasources"
payload = {
"authType": "AzureBasic",
"config": { "host": "example-host.com" },
"credentials": {
"secretCredentials": {},
"visibleCredentials": {}
},
"dataSourceType": "ADLSConfig",
"name": "data-source-name",
"permissions": {
"isEveryone": True,
"userAndOrganizationIds": ["<string>"]
},
"description": "My Data Source"
}
headers = {
"X-Domino-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Domino-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
authType: 'AzureBasic',
config: {host: 'example-host.com'},
credentials: {secretCredentials: {}, visibleCredentials: {}},
dataSourceType: 'ADLSConfig',
name: 'data-source-name',
permissions: {isEveryone: true, userAndOrganizationIds: ['<string>']},
description: 'My Data Source'
})
};
fetch('https://mycluster.domino.tech/api/datasource/v1/datasources', 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://mycluster.domino.tech/api/datasource/v1/datasources",
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([
'authType' => 'AzureBasic',
'config' => [
'host' => 'example-host.com'
],
'credentials' => [
'secretCredentials' => [
],
'visibleCredentials' => [
]
],
'dataSourceType' => 'ADLSConfig',
'name' => 'data-source-name',
'permissions' => [
'isEveryone' => true,
'userAndOrganizationIds' => [
'<string>'
]
],
'description' => 'My Data Source'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Domino-Api-Key: <api-key>"
],
]);
$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://mycluster.domino.tech/api/datasource/v1/datasources"
payload := strings.NewReader("{\n \"authType\": \"AzureBasic\",\n \"config\": {\n \"host\": \"example-host.com\"\n },\n \"credentials\": {\n \"secretCredentials\": {},\n \"visibleCredentials\": {}\n },\n \"dataSourceType\": \"ADLSConfig\",\n \"name\": \"data-source-name\",\n \"permissions\": {\n \"isEveryone\": true,\n \"userAndOrganizationIds\": [\n \"<string>\"\n ]\n },\n \"description\": \"My Data Source\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Domino-Api-Key", "<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://mycluster.domino.tech/api/datasource/v1/datasources")
.header("X-Domino-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"authType\": \"AzureBasic\",\n \"config\": {\n \"host\": \"example-host.com\"\n },\n \"credentials\": {\n \"secretCredentials\": {},\n \"visibleCredentials\": {}\n },\n \"dataSourceType\": \"ADLSConfig\",\n \"name\": \"data-source-name\",\n \"permissions\": {\n \"isEveryone\": true,\n \"userAndOrganizationIds\": [\n \"<string>\"\n ]\n },\n \"description\": \"My Data Source\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://mycluster.domino.tech/api/datasource/v1/datasources")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Domino-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"authType\": \"AzureBasic\",\n \"config\": {\n \"host\": \"example-host.com\"\n },\n \"credentials\": {\n \"secretCredentials\": {},\n \"visibleCredentials\": {}\n },\n \"dataSourceType\": \"ADLSConfig\",\n \"name\": \"data-source-name\",\n \"permissions\": {\n \"isEveryone\": true,\n \"userAndOrganizationIds\": [\n \"<string>\"\n ]\n },\n \"description\": \"My Data Source\"\n}"
response = http.request(request)
puts response.read_body{
"authType": "AzureBasic",
"config": {
"host": "example-host.com"
},
"credentialType": "Individual",
"dataSourceType": "ADLSConfig",
"displayName": "Azure Data Lake Store",
"id": "62604702b7e5d347dbe7a909",
"lastUpdated": "2022-04-23T18:25:43.511Z",
"name": "data-source-name",
"ownerId": "62604702b7e5d347dbe7a909",
"ownerUsername": "owner-username",
"permissions": {
"isEveryone": true,
"userAndOrganizationIds": [
"<string>"
]
},
"description": "My Data Source"
}{
"error": "<string>"
}{
"code": "UNAUTHORIZED",
"message": "Authentication is required to access this resource."
}{
"code": "FORBIDDEN",
"message": "You do not have permission to perform this action."
}{
"error": "<string>"
}{
"error": "<string>"
}Authorizations
Body
Data Source to create
The type of Data Source authentication
"AzureBasic"
A map of configuration name -> value
Show child attributes
Show child attributes
{ "host": "example-host.com" }
Whether the credentials is individual to a user or shared
Individual, Shared Show child attributes
Show child attributes
The configuration type of the Data Source
"ADLSConfig"
User given name of the Data Source
"data-source-name"
Show child attributes
Show child attributes
Description of the Data Source
"My Data Source"
Response
Success
The type of Data Source authentication
"AzureBasic"
A map of configuration name -> value
Show child attributes
Show child attributes
{ "host": "example-host.com" }
Whether the credentials is individual to a user or shared
Individual, Shared The configuration type of the Data Source
"ADLSConfig"
Data Source display name
"Azure Data Lake Store"
ID of the Data Source
"62604702b7e5d347dbe7a909"
ISO 8601 formatted time of when the Data Source was last updated
"2022-04-23T18:25:43.511Z"
User given name of the Data Source
"data-source-name"
ID of the Data Source owner
"62604702b7e5d347dbe7a909"
Username of the owner of the Data Source
"owner-username"
Show child attributes
Show child attributes
Description of the Data Source
"My Data Source"
Was this page helpful?
curl --request POST \
--url https://mycluster.domino.tech/api/datasource/v1/datasources \
--header 'Content-Type: application/json' \
--header 'X-Domino-Api-Key: <api-key>' \
--data '
{
"authType": "AzureBasic",
"config": {
"host": "example-host.com"
},
"credentials": {
"secretCredentials": {},
"visibleCredentials": {}
},
"dataSourceType": "ADLSConfig",
"name": "data-source-name",
"permissions": {
"isEveryone": true,
"userAndOrganizationIds": [
"<string>"
]
},
"description": "My Data Source"
}
'import requests
url = "https://mycluster.domino.tech/api/datasource/v1/datasources"
payload = {
"authType": "AzureBasic",
"config": { "host": "example-host.com" },
"credentials": {
"secretCredentials": {},
"visibleCredentials": {}
},
"dataSourceType": "ADLSConfig",
"name": "data-source-name",
"permissions": {
"isEveryone": True,
"userAndOrganizationIds": ["<string>"]
},
"description": "My Data Source"
}
headers = {
"X-Domino-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Domino-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
authType: 'AzureBasic',
config: {host: 'example-host.com'},
credentials: {secretCredentials: {}, visibleCredentials: {}},
dataSourceType: 'ADLSConfig',
name: 'data-source-name',
permissions: {isEveryone: true, userAndOrganizationIds: ['<string>']},
description: 'My Data Source'
})
};
fetch('https://mycluster.domino.tech/api/datasource/v1/datasources', 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://mycluster.domino.tech/api/datasource/v1/datasources",
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([
'authType' => 'AzureBasic',
'config' => [
'host' => 'example-host.com'
],
'credentials' => [
'secretCredentials' => [
],
'visibleCredentials' => [
]
],
'dataSourceType' => 'ADLSConfig',
'name' => 'data-source-name',
'permissions' => [
'isEveryone' => true,
'userAndOrganizationIds' => [
'<string>'
]
],
'description' => 'My Data Source'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Domino-Api-Key: <api-key>"
],
]);
$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://mycluster.domino.tech/api/datasource/v1/datasources"
payload := strings.NewReader("{\n \"authType\": \"AzureBasic\",\n \"config\": {\n \"host\": \"example-host.com\"\n },\n \"credentials\": {\n \"secretCredentials\": {},\n \"visibleCredentials\": {}\n },\n \"dataSourceType\": \"ADLSConfig\",\n \"name\": \"data-source-name\",\n \"permissions\": {\n \"isEveryone\": true,\n \"userAndOrganizationIds\": [\n \"<string>\"\n ]\n },\n \"description\": \"My Data Source\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Domino-Api-Key", "<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://mycluster.domino.tech/api/datasource/v1/datasources")
.header("X-Domino-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"authType\": \"AzureBasic\",\n \"config\": {\n \"host\": \"example-host.com\"\n },\n \"credentials\": {\n \"secretCredentials\": {},\n \"visibleCredentials\": {}\n },\n \"dataSourceType\": \"ADLSConfig\",\n \"name\": \"data-source-name\",\n \"permissions\": {\n \"isEveryone\": true,\n \"userAndOrganizationIds\": [\n \"<string>\"\n ]\n },\n \"description\": \"My Data Source\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://mycluster.domino.tech/api/datasource/v1/datasources")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Domino-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"authType\": \"AzureBasic\",\n \"config\": {\n \"host\": \"example-host.com\"\n },\n \"credentials\": {\n \"secretCredentials\": {},\n \"visibleCredentials\": {}\n },\n \"dataSourceType\": \"ADLSConfig\",\n \"name\": \"data-source-name\",\n \"permissions\": {\n \"isEveryone\": true,\n \"userAndOrganizationIds\": [\n \"<string>\"\n ]\n },\n \"description\": \"My Data Source\"\n}"
response = http.request(request)
puts response.read_body{
"authType": "AzureBasic",
"config": {
"host": "example-host.com"
},
"credentialType": "Individual",
"dataSourceType": "ADLSConfig",
"displayName": "Azure Data Lake Store",
"id": "62604702b7e5d347dbe7a909",
"lastUpdated": "2022-04-23T18:25:43.511Z",
"name": "data-source-name",
"ownerId": "62604702b7e5d347dbe7a909",
"ownerUsername": "owner-username",
"permissions": {
"isEveryone": true,
"userAndOrganizationIds": [
"<string>"
]
},
"description": "My Data Source"
}{
"error": "<string>"
}{
"code": "UNAUTHORIZED",
"message": "Authentication is required to access this resource."
}{
"code": "FORBIDDEN",
"message": "You do not have permission to perform this action."
}{
"error": "<string>"
}{
"error": "<string>"
}