Add connection to fabric
curl --request POST \
--url https://app.prophecy.io/api/orchestration/fabric/{fabricId}/connection \
--header 'Content-Type: application/json' \
--header 'X-AUTH-TOKEN: <x-auth-token>' \
--data '
{
"name": "bigquery_connection_1",
"kind": "bigquery",
"isDefaultWarehouseConnection": false,
"properties": {
"authType": "private_key",
"dataset": "dev",
"id": "",
"projectId": "dev-project-2222",
"serviceAccountKey": {
"kind": "prophecy",
"properties": {
"id": "1234",
"name": "bq_service_account_1"
},
"subKind": "text",
"type": "secret"
}
}
}
'import requests
url = "https://app.prophecy.io/api/orchestration/fabric/{fabricId}/connection"
payload = {
"name": "bigquery_connection_1",
"kind": "bigquery",
"isDefaultWarehouseConnection": False,
"properties": {
"authType": "private_key",
"dataset": "dev",
"id": "",
"projectId": "dev-project-2222",
"serviceAccountKey": {
"kind": "prophecy",
"properties": {
"id": "1234",
"name": "bq_service_account_1"
},
"subKind": "text",
"type": "secret"
}
}
}
headers = {
"X-AUTH-TOKEN": "<x-auth-token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-AUTH-TOKEN': '<x-auth-token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'bigquery_connection_1',
kind: 'bigquery',
isDefaultWarehouseConnection: false,
properties: {
authType: 'private_key',
dataset: 'dev',
id: '',
projectId: 'dev-project-2222',
serviceAccountKey: {
kind: 'prophecy',
properties: {id: '1234', name: 'bq_service_account_1'},
subKind: 'text',
type: 'secret'
}
}
})
};
fetch('https://app.prophecy.io/api/orchestration/fabric/{fabricId}/connection', 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.prophecy.io/api/orchestration/fabric/{fabricId}/connection",
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' => 'bigquery_connection_1',
'kind' => 'bigquery',
'isDefaultWarehouseConnection' => false,
'properties' => [
'authType' => 'private_key',
'dataset' => 'dev',
'id' => '',
'projectId' => 'dev-project-2222',
'serviceAccountKey' => [
'kind' => 'prophecy',
'properties' => [
'id' => '1234',
'name' => 'bq_service_account_1'
],
'subKind' => 'text',
'type' => 'secret'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-AUTH-TOKEN: <x-auth-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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.prophecy.io/api/orchestration/fabric/{fabricId}/connection"
payload := strings.NewReader("{\n \"name\": \"bigquery_connection_1\",\n \"kind\": \"bigquery\",\n \"isDefaultWarehouseConnection\": false,\n \"properties\": {\n \"authType\": \"private_key\",\n \"dataset\": \"dev\",\n \"id\": \"\",\n \"projectId\": \"dev-project-2222\",\n \"serviceAccountKey\": {\n \"kind\": \"prophecy\",\n \"properties\": {\n \"id\": \"1234\",\n \"name\": \"bq_service_account_1\"\n },\n \"subKind\": \"text\",\n \"type\": \"secret\"\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-AUTH-TOKEN", "<x-auth-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.post("https://app.prophecy.io/api/orchestration/fabric/{fabricId}/connection")
.header("X-AUTH-TOKEN", "<x-auth-token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"bigquery_connection_1\",\n \"kind\": \"bigquery\",\n \"isDefaultWarehouseConnection\": false,\n \"properties\": {\n \"authType\": \"private_key\",\n \"dataset\": \"dev\",\n \"id\": \"\",\n \"projectId\": \"dev-project-2222\",\n \"serviceAccountKey\": {\n \"kind\": \"prophecy\",\n \"properties\": {\n \"id\": \"1234\",\n \"name\": \"bq_service_account_1\"\n },\n \"subKind\": \"text\",\n \"type\": \"secret\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.prophecy.io/api/orchestration/fabric/{fabricId}/connection")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-AUTH-TOKEN"] = '<x-auth-token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"bigquery_connection_1\",\n \"kind\": \"bigquery\",\n \"isDefaultWarehouseConnection\": false,\n \"properties\": {\n \"authType\": \"private_key\",\n \"dataset\": \"dev\",\n \"id\": \"\",\n \"projectId\": \"dev-project-2222\",\n \"serviceAccountKey\": {\n \"kind\": \"prophecy\",\n \"properties\": {\n \"id\": \"1234\",\n \"name\": \"bq_service_account_1\"\n },\n \"subKind\": \"text\",\n \"type\": \"secret\"\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"id": "<connection-id>",
"name": "bigquery_connection_1",
"kind": "bigquery",
"isDefaultWarehouseConnection": false,
"properties": {
"authType": "private_key",
"dataset": "dev",
"id": "",
"projectId": "dev-project-2222",
"serviceAccountKey": {
"kind": "prophecy",
"properties": {
"id": "1234",
"name": "bq_service_account_1"
},
"subKind": "text",
"type": "secret"
}
}
}
}Connections
Add connection to fabric
Create a new connection in a specific fabric
POST
/
api
/
orchestration
/
fabric
/
{fabricId}
/
connection
Add connection to fabric
curl --request POST \
--url https://app.prophecy.io/api/orchestration/fabric/{fabricId}/connection \
--header 'Content-Type: application/json' \
--header 'X-AUTH-TOKEN: <x-auth-token>' \
--data '
{
"name": "bigquery_connection_1",
"kind": "bigquery",
"isDefaultWarehouseConnection": false,
"properties": {
"authType": "private_key",
"dataset": "dev",
"id": "",
"projectId": "dev-project-2222",
"serviceAccountKey": {
"kind": "prophecy",
"properties": {
"id": "1234",
"name": "bq_service_account_1"
},
"subKind": "text",
"type": "secret"
}
}
}
'import requests
url = "https://app.prophecy.io/api/orchestration/fabric/{fabricId}/connection"
payload = {
"name": "bigquery_connection_1",
"kind": "bigquery",
"isDefaultWarehouseConnection": False,
"properties": {
"authType": "private_key",
"dataset": "dev",
"id": "",
"projectId": "dev-project-2222",
"serviceAccountKey": {
"kind": "prophecy",
"properties": {
"id": "1234",
"name": "bq_service_account_1"
},
"subKind": "text",
"type": "secret"
}
}
}
headers = {
"X-AUTH-TOKEN": "<x-auth-token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-AUTH-TOKEN': '<x-auth-token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'bigquery_connection_1',
kind: 'bigquery',
isDefaultWarehouseConnection: false,
properties: {
authType: 'private_key',
dataset: 'dev',
id: '',
projectId: 'dev-project-2222',
serviceAccountKey: {
kind: 'prophecy',
properties: {id: '1234', name: 'bq_service_account_1'},
subKind: 'text',
type: 'secret'
}
}
})
};
fetch('https://app.prophecy.io/api/orchestration/fabric/{fabricId}/connection', 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.prophecy.io/api/orchestration/fabric/{fabricId}/connection",
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' => 'bigquery_connection_1',
'kind' => 'bigquery',
'isDefaultWarehouseConnection' => false,
'properties' => [
'authType' => 'private_key',
'dataset' => 'dev',
'id' => '',
'projectId' => 'dev-project-2222',
'serviceAccountKey' => [
'kind' => 'prophecy',
'properties' => [
'id' => '1234',
'name' => 'bq_service_account_1'
],
'subKind' => 'text',
'type' => 'secret'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-AUTH-TOKEN: <x-auth-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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.prophecy.io/api/orchestration/fabric/{fabricId}/connection"
payload := strings.NewReader("{\n \"name\": \"bigquery_connection_1\",\n \"kind\": \"bigquery\",\n \"isDefaultWarehouseConnection\": false,\n \"properties\": {\n \"authType\": \"private_key\",\n \"dataset\": \"dev\",\n \"id\": \"\",\n \"projectId\": \"dev-project-2222\",\n \"serviceAccountKey\": {\n \"kind\": \"prophecy\",\n \"properties\": {\n \"id\": \"1234\",\n \"name\": \"bq_service_account_1\"\n },\n \"subKind\": \"text\",\n \"type\": \"secret\"\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-AUTH-TOKEN", "<x-auth-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.post("https://app.prophecy.io/api/orchestration/fabric/{fabricId}/connection")
.header("X-AUTH-TOKEN", "<x-auth-token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"bigquery_connection_1\",\n \"kind\": \"bigquery\",\n \"isDefaultWarehouseConnection\": false,\n \"properties\": {\n \"authType\": \"private_key\",\n \"dataset\": \"dev\",\n \"id\": \"\",\n \"projectId\": \"dev-project-2222\",\n \"serviceAccountKey\": {\n \"kind\": \"prophecy\",\n \"properties\": {\n \"id\": \"1234\",\n \"name\": \"bq_service_account_1\"\n },\n \"subKind\": \"text\",\n \"type\": \"secret\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.prophecy.io/api/orchestration/fabric/{fabricId}/connection")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-AUTH-TOKEN"] = '<x-auth-token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"bigquery_connection_1\",\n \"kind\": \"bigquery\",\n \"isDefaultWarehouseConnection\": false,\n \"properties\": {\n \"authType\": \"private_key\",\n \"dataset\": \"dev\",\n \"id\": \"\",\n \"projectId\": \"dev-project-2222\",\n \"serviceAccountKey\": {\n \"kind\": \"prophecy\",\n \"properties\": {\n \"id\": \"1234\",\n \"name\": \"bq_service_account_1\"\n },\n \"subKind\": \"text\",\n \"type\": \"secret\"\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"id": "<connection-id>",
"name": "bigquery_connection_1",
"kind": "bigquery",
"isDefaultWarehouseConnection": false,
"properties": {
"authType": "private_key",
"dataset": "dev",
"id": "",
"projectId": "dev-project-2222",
"serviceAccountKey": {
"kind": "prophecy",
"properties": {
"id": "1234",
"name": "bq_service_account_1"
},
"subKind": "text",
"type": "secret"
}
}
}
}The
properties object in the connection request body depends on the connection type. Find
specific properties in the Connections > Properties section of the API documentation.Headers
Prophecy authentication token. Required for all API requests.
Path Parameters
The unique ID of the parent fabric
Body
application/json
The unique name of the connection.
The type of connection.
Available options:
databricks, bigquery, synapse, snowflake, mssql, oracle, mongodb, hana, smtp, redshift, s3, salesforce, sftp, sharepoint, smartsheet, ADLS, tableau, onedrive, powerbi, GCS Connection configuration properties. The structure varies by connection kind. Find specific properties in the Connections > Properties section of the API documentation.
Whether this connection is the default SQL warehouse connection in the fabric.
This field can only be set to true for Databricks, BigQuery, and Snowflake connections.
Was this page helpful?
⌘I

