curl --request PUT \
--url https://app.prophecy.io/api/orchestration/fabric/{fabricId}/connection/name/{connectionName} \
--header 'Content-Type: application/json' \
--header 'X-AUTH-TOKEN: <x-auth-token>' \
--data '
{
"name": "bigquery_api_test",
"kind": "bigquery",
"isDefaultWarehouseConnection": false,
"properties": {
"authType": "private_key",
"dataset": "kw_dev_api",
"id": "",
"projectId": "product-internal-463917",
"serviceAccountKey": {
"kind": "prophecy",
"properties": {
"id": "4657",
"name": "bq_service_account_2"
},
"subKind": "text",
"type": "secret"
}
}
}
'import requests
url = "https://app.prophecy.io/api/orchestration/fabric/{fabricId}/connection/name/{connectionName}"
payload = {
"name": "bigquery_api_test",
"kind": "bigquery",
"isDefaultWarehouseConnection": False,
"properties": {
"authType": "private_key",
"dataset": "kw_dev_api",
"id": "",
"projectId": "product-internal-463917",
"serviceAccountKey": {
"kind": "prophecy",
"properties": {
"id": "4657",
"name": "bq_service_account_2"
},
"subKind": "text",
"type": "secret"
}
}
}
headers = {
"X-AUTH-TOKEN": "<x-auth-token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'X-AUTH-TOKEN': '<x-auth-token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'bigquery_api_test',
kind: 'bigquery',
isDefaultWarehouseConnection: false,
properties: {
authType: 'private_key',
dataset: 'kw_dev_api',
id: '',
projectId: 'product-internal-463917',
serviceAccountKey: {
kind: 'prophecy',
properties: {id: '4657', name: 'bq_service_account_2'},
subKind: 'text',
type: 'secret'
}
}
})
};
fetch('https://app.prophecy.io/api/orchestration/fabric/{fabricId}/connection/name/{connectionName}', 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/name/{connectionName}",
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' => 'bigquery_api_test',
'kind' => 'bigquery',
'isDefaultWarehouseConnection' => false,
'properties' => [
'authType' => 'private_key',
'dataset' => 'kw_dev_api',
'id' => '',
'projectId' => 'product-internal-463917',
'serviceAccountKey' => [
'kind' => 'prophecy',
'properties' => [
'id' => '4657',
'name' => 'bq_service_account_2'
],
'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/name/{connectionName}"
payload := strings.NewReader("{\n \"name\": \"bigquery_api_test\",\n \"kind\": \"bigquery\",\n \"isDefaultWarehouseConnection\": false,\n \"properties\": {\n \"authType\": \"private_key\",\n \"dataset\": \"kw_dev_api\",\n \"id\": \"\",\n \"projectId\": \"product-internal-463917\",\n \"serviceAccountKey\": {\n \"kind\": \"prophecy\",\n \"properties\": {\n \"id\": \"4657\",\n \"name\": \"bq_service_account_2\"\n },\n \"subKind\": \"text\",\n \"type\": \"secret\"\n }\n }\n}")
req, _ := http.NewRequest("PUT", 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.put("https://app.prophecy.io/api/orchestration/fabric/{fabricId}/connection/name/{connectionName}")
.header("X-AUTH-TOKEN", "<x-auth-token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"bigquery_api_test\",\n \"kind\": \"bigquery\",\n \"isDefaultWarehouseConnection\": false,\n \"properties\": {\n \"authType\": \"private_key\",\n \"dataset\": \"kw_dev_api\",\n \"id\": \"\",\n \"projectId\": \"product-internal-463917\",\n \"serviceAccountKey\": {\n \"kind\": \"prophecy\",\n \"properties\": {\n \"id\": \"4657\",\n \"name\": \"bq_service_account_2\"\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/name/{connectionName}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-AUTH-TOKEN"] = '<x-auth-token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"bigquery_api_test\",\n \"kind\": \"bigquery\",\n \"isDefaultWarehouseConnection\": false,\n \"properties\": {\n \"authType\": \"private_key\",\n \"dataset\": \"kw_dev_api\",\n \"id\": \"\",\n \"projectId\": \"product-internal-463917\",\n \"serviceAccountKey\": {\n \"kind\": \"prophecy\",\n \"properties\": {\n \"id\": \"4657\",\n \"name\": \"bq_service_account_2\"\n },\n \"subKind\": \"text\",\n \"type\": \"secret\"\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"id": "d0ef2f82-5b66-4a17-b238-cc04c6f1cb3e",
"name": "bigquery_api_test",
"kind": "bigquery",
"isDefaultWarehouseConnection": false,
"properties": {
"authType": "private_key",
"dataset": "kw_dev_api",
"id": "",
"projectId": "product-internal-463917",
"serviceAccountKey": {
"kind": "prophecy",
"properties": {
"id": "4657",
"name": "bq_service_account_2"
},
"subKind": "text",
"type": "secret"
}
}
},
"message": "List(), List()"
}{
"success": false,
"message": "Update connection failed due to : No connection found for fabric 10740 and connection id bigquery_api_test_update"
}Update connection
Update the properties of a specific connection
curl --request PUT \
--url https://app.prophecy.io/api/orchestration/fabric/{fabricId}/connection/name/{connectionName} \
--header 'Content-Type: application/json' \
--header 'X-AUTH-TOKEN: <x-auth-token>' \
--data '
{
"name": "bigquery_api_test",
"kind": "bigquery",
"isDefaultWarehouseConnection": false,
"properties": {
"authType": "private_key",
"dataset": "kw_dev_api",
"id": "",
"projectId": "product-internal-463917",
"serviceAccountKey": {
"kind": "prophecy",
"properties": {
"id": "4657",
"name": "bq_service_account_2"
},
"subKind": "text",
"type": "secret"
}
}
}
'import requests
url = "https://app.prophecy.io/api/orchestration/fabric/{fabricId}/connection/name/{connectionName}"
payload = {
"name": "bigquery_api_test",
"kind": "bigquery",
"isDefaultWarehouseConnection": False,
"properties": {
"authType": "private_key",
"dataset": "kw_dev_api",
"id": "",
"projectId": "product-internal-463917",
"serviceAccountKey": {
"kind": "prophecy",
"properties": {
"id": "4657",
"name": "bq_service_account_2"
},
"subKind": "text",
"type": "secret"
}
}
}
headers = {
"X-AUTH-TOKEN": "<x-auth-token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'X-AUTH-TOKEN': '<x-auth-token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'bigquery_api_test',
kind: 'bigquery',
isDefaultWarehouseConnection: false,
properties: {
authType: 'private_key',
dataset: 'kw_dev_api',
id: '',
projectId: 'product-internal-463917',
serviceAccountKey: {
kind: 'prophecy',
properties: {id: '4657', name: 'bq_service_account_2'},
subKind: 'text',
type: 'secret'
}
}
})
};
fetch('https://app.prophecy.io/api/orchestration/fabric/{fabricId}/connection/name/{connectionName}', 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/name/{connectionName}",
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' => 'bigquery_api_test',
'kind' => 'bigquery',
'isDefaultWarehouseConnection' => false,
'properties' => [
'authType' => 'private_key',
'dataset' => 'kw_dev_api',
'id' => '',
'projectId' => 'product-internal-463917',
'serviceAccountKey' => [
'kind' => 'prophecy',
'properties' => [
'id' => '4657',
'name' => 'bq_service_account_2'
],
'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/name/{connectionName}"
payload := strings.NewReader("{\n \"name\": \"bigquery_api_test\",\n \"kind\": \"bigquery\",\n \"isDefaultWarehouseConnection\": false,\n \"properties\": {\n \"authType\": \"private_key\",\n \"dataset\": \"kw_dev_api\",\n \"id\": \"\",\n \"projectId\": \"product-internal-463917\",\n \"serviceAccountKey\": {\n \"kind\": \"prophecy\",\n \"properties\": {\n \"id\": \"4657\",\n \"name\": \"bq_service_account_2\"\n },\n \"subKind\": \"text\",\n \"type\": \"secret\"\n }\n }\n}")
req, _ := http.NewRequest("PUT", 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.put("https://app.prophecy.io/api/orchestration/fabric/{fabricId}/connection/name/{connectionName}")
.header("X-AUTH-TOKEN", "<x-auth-token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"bigquery_api_test\",\n \"kind\": \"bigquery\",\n \"isDefaultWarehouseConnection\": false,\n \"properties\": {\n \"authType\": \"private_key\",\n \"dataset\": \"kw_dev_api\",\n \"id\": \"\",\n \"projectId\": \"product-internal-463917\",\n \"serviceAccountKey\": {\n \"kind\": \"prophecy\",\n \"properties\": {\n \"id\": \"4657\",\n \"name\": \"bq_service_account_2\"\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/name/{connectionName}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-AUTH-TOKEN"] = '<x-auth-token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"bigquery_api_test\",\n \"kind\": \"bigquery\",\n \"isDefaultWarehouseConnection\": false,\n \"properties\": {\n \"authType\": \"private_key\",\n \"dataset\": \"kw_dev_api\",\n \"id\": \"\",\n \"projectId\": \"product-internal-463917\",\n \"serviceAccountKey\": {\n \"kind\": \"prophecy\",\n \"properties\": {\n \"id\": \"4657\",\n \"name\": \"bq_service_account_2\"\n },\n \"subKind\": \"text\",\n \"type\": \"secret\"\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"id": "d0ef2f82-5b66-4a17-b238-cc04c6f1cb3e",
"name": "bigquery_api_test",
"kind": "bigquery",
"isDefaultWarehouseConnection": false,
"properties": {
"authType": "private_key",
"dataset": "kw_dev_api",
"id": "",
"projectId": "product-internal-463917",
"serviceAccountKey": {
"kind": "prophecy",
"properties": {
"id": "4657",
"name": "bq_service_account_2"
},
"subKind": "text",
"type": "secret"
}
}
},
"message": "List(), List()"
}{
"success": false,
"message": "Update connection failed due to : No connection found for fabric 10740 and connection id bigquery_api_test_update"
}Headers
Prophecy authentication token. Required for all API requests.
Path Parameters
The unique ID of the parent fabric
The unique name of the connection
Body
The connection name. Must match the connection name specified in the endpoint URL path parameter. This value cannot be changed.
The type of connection. This value cannot be changed.
Whether this connection is the default warehouse connection. This value cannot be changed.
Connection configuration properties. All required properties for the connection type must be included. Only certain properties can be updated. Check the Prophecy UI to see which properties can be updated.
Find specific properties in the Connections > Properties section of the API documentation.
Was this page helpful?

