curl --request POST \
--url https://app.prophecy.io/api/orchestration/fabric \
--header 'Content-Type: application/json' \
--header 'X-AUTH-TOKEN: <x-auth-token>' \
--data '
{
"name": "API_Generated_Fabric",
"description": "This is a description of the fabric.",
"teamName": "devTeam",
"provider": "databricks",
"secret": {
"subKind": "text",
"properties": {
"name": "databricks-pat",
"value": "databricks-pat-value"
},
"kind": "prophecy"
},
"connection": {
"name": "databricks_pat_1",
"kind": "databricks",
"properties": {
"authType": "pat",
"jdbcUrl": "<databricks-jdbc>",
"catalog": "pipelinehub",
"schema": "katherine",
"token": "{{SECRET}}"
},
"isDefaultWarehouseConnection": true
}
}
'import requests
url = "https://app.prophecy.io/api/orchestration/fabric"
payload = {
"name": "API_Generated_Fabric",
"description": "This is a description of the fabric.",
"teamName": "devTeam",
"provider": "databricks",
"secret": {
"subKind": "text",
"properties": {
"name": "databricks-pat",
"value": "databricks-pat-value"
},
"kind": "prophecy"
},
"connection": {
"name": "databricks_pat_1",
"kind": "databricks",
"properties": {
"authType": "pat",
"jdbcUrl": "<databricks-jdbc>",
"catalog": "pipelinehub",
"schema": "katherine",
"token": "{{SECRET}}"
},
"isDefaultWarehouseConnection": True
}
}
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: 'API_Generated_Fabric',
description: 'This is a description of the fabric.',
teamName: 'devTeam',
provider: 'databricks',
secret: {
subKind: 'text',
properties: {name: 'databricks-pat', value: 'databricks-pat-value'},
kind: 'prophecy'
},
connection: {
name: 'databricks_pat_1',
kind: 'databricks',
properties: {
authType: 'pat',
jdbcUrl: '<databricks-jdbc>',
catalog: 'pipelinehub',
schema: 'katherine',
token: '{{SECRET}}'
},
isDefaultWarehouseConnection: true
}
})
};
fetch('https://app.prophecy.io/api/orchestration/fabric', 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",
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' => 'API_Generated_Fabric',
'description' => 'This is a description of the fabric.',
'teamName' => 'devTeam',
'provider' => 'databricks',
'secret' => [
'subKind' => 'text',
'properties' => [
'name' => 'databricks-pat',
'value' => 'databricks-pat-value'
],
'kind' => 'prophecy'
],
'connection' => [
'name' => 'databricks_pat_1',
'kind' => 'databricks',
'properties' => [
'authType' => 'pat',
'jdbcUrl' => '<databricks-jdbc>',
'catalog' => 'pipelinehub',
'schema' => 'katherine',
'token' => '{{SECRET}}'
],
'isDefaultWarehouseConnection' => true
]
]),
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"
payload := strings.NewReader("{\n \"name\": \"API_Generated_Fabric\",\n \"description\": \"This is a description of the fabric.\",\n \"teamName\": \"devTeam\",\n \"provider\": \"databricks\",\n \"secret\": {\n \"subKind\": \"text\",\n \"properties\": {\n \"name\": \"databricks-pat\",\n \"value\": \"databricks-pat-value\"\n },\n \"kind\": \"prophecy\"\n },\n \"connection\": {\n \"name\": \"databricks_pat_1\",\n \"kind\": \"databricks\",\n \"properties\": {\n \"authType\": \"pat\",\n \"jdbcUrl\": \"<databricks-jdbc>\",\n \"catalog\": \"pipelinehub\",\n \"schema\": \"katherine\",\n \"token\": \"{{SECRET}}\"\n },\n \"isDefaultWarehouseConnection\": true\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")
.header("X-AUTH-TOKEN", "<x-auth-token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"API_Generated_Fabric\",\n \"description\": \"This is a description of the fabric.\",\n \"teamName\": \"devTeam\",\n \"provider\": \"databricks\",\n \"secret\": {\n \"subKind\": \"text\",\n \"properties\": {\n \"name\": \"databricks-pat\",\n \"value\": \"databricks-pat-value\"\n },\n \"kind\": \"prophecy\"\n },\n \"connection\": {\n \"name\": \"databricks_pat_1\",\n \"kind\": \"databricks\",\n \"properties\": {\n \"authType\": \"pat\",\n \"jdbcUrl\": \"<databricks-jdbc>\",\n \"catalog\": \"pipelinehub\",\n \"schema\": \"katherine\",\n \"token\": \"{{SECRET}}\"\n },\n \"isDefaultWarehouseConnection\": true\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.prophecy.io/api/orchestration/fabric")
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\": \"API_Generated_Fabric\",\n \"description\": \"This is a description of the fabric.\",\n \"teamName\": \"devTeam\",\n \"provider\": \"databricks\",\n \"secret\": {\n \"subKind\": \"text\",\n \"properties\": {\n \"name\": \"databricks-pat\",\n \"value\": \"databricks-pat-value\"\n },\n \"kind\": \"prophecy\"\n },\n \"connection\": {\n \"name\": \"databricks_pat_1\",\n \"kind\": \"databricks\",\n \"properties\": {\n \"authType\": \"pat\",\n \"jdbcUrl\": \"<databricks-jdbc>\",\n \"catalog\": \"pipelinehub\",\n \"schema\": \"katherine\",\n \"token\": \"{{SECRET}}\"\n },\n \"isDefaultWarehouseConnection\": true\n }\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"id": "10740"
}
}{
"success": false,
"message": "Fabric creation failed due to : Fabric with name `API_fabric_test` already exists in the team"
}Create a new fabric
Create a Prophecy fabric with optional secret and connection
curl --request POST \
--url https://app.prophecy.io/api/orchestration/fabric \
--header 'Content-Type: application/json' \
--header 'X-AUTH-TOKEN: <x-auth-token>' \
--data '
{
"name": "API_Generated_Fabric",
"description": "This is a description of the fabric.",
"teamName": "devTeam",
"provider": "databricks",
"secret": {
"subKind": "text",
"properties": {
"name": "databricks-pat",
"value": "databricks-pat-value"
},
"kind": "prophecy"
},
"connection": {
"name": "databricks_pat_1",
"kind": "databricks",
"properties": {
"authType": "pat",
"jdbcUrl": "<databricks-jdbc>",
"catalog": "pipelinehub",
"schema": "katherine",
"token": "{{SECRET}}"
},
"isDefaultWarehouseConnection": true
}
}
'import requests
url = "https://app.prophecy.io/api/orchestration/fabric"
payload = {
"name": "API_Generated_Fabric",
"description": "This is a description of the fabric.",
"teamName": "devTeam",
"provider": "databricks",
"secret": {
"subKind": "text",
"properties": {
"name": "databricks-pat",
"value": "databricks-pat-value"
},
"kind": "prophecy"
},
"connection": {
"name": "databricks_pat_1",
"kind": "databricks",
"properties": {
"authType": "pat",
"jdbcUrl": "<databricks-jdbc>",
"catalog": "pipelinehub",
"schema": "katherine",
"token": "{{SECRET}}"
},
"isDefaultWarehouseConnection": True
}
}
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: 'API_Generated_Fabric',
description: 'This is a description of the fabric.',
teamName: 'devTeam',
provider: 'databricks',
secret: {
subKind: 'text',
properties: {name: 'databricks-pat', value: 'databricks-pat-value'},
kind: 'prophecy'
},
connection: {
name: 'databricks_pat_1',
kind: 'databricks',
properties: {
authType: 'pat',
jdbcUrl: '<databricks-jdbc>',
catalog: 'pipelinehub',
schema: 'katherine',
token: '{{SECRET}}'
},
isDefaultWarehouseConnection: true
}
})
};
fetch('https://app.prophecy.io/api/orchestration/fabric', 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",
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' => 'API_Generated_Fabric',
'description' => 'This is a description of the fabric.',
'teamName' => 'devTeam',
'provider' => 'databricks',
'secret' => [
'subKind' => 'text',
'properties' => [
'name' => 'databricks-pat',
'value' => 'databricks-pat-value'
],
'kind' => 'prophecy'
],
'connection' => [
'name' => 'databricks_pat_1',
'kind' => 'databricks',
'properties' => [
'authType' => 'pat',
'jdbcUrl' => '<databricks-jdbc>',
'catalog' => 'pipelinehub',
'schema' => 'katherine',
'token' => '{{SECRET}}'
],
'isDefaultWarehouseConnection' => true
]
]),
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"
payload := strings.NewReader("{\n \"name\": \"API_Generated_Fabric\",\n \"description\": \"This is a description of the fabric.\",\n \"teamName\": \"devTeam\",\n \"provider\": \"databricks\",\n \"secret\": {\n \"subKind\": \"text\",\n \"properties\": {\n \"name\": \"databricks-pat\",\n \"value\": \"databricks-pat-value\"\n },\n \"kind\": \"prophecy\"\n },\n \"connection\": {\n \"name\": \"databricks_pat_1\",\n \"kind\": \"databricks\",\n \"properties\": {\n \"authType\": \"pat\",\n \"jdbcUrl\": \"<databricks-jdbc>\",\n \"catalog\": \"pipelinehub\",\n \"schema\": \"katherine\",\n \"token\": \"{{SECRET}}\"\n },\n \"isDefaultWarehouseConnection\": true\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")
.header("X-AUTH-TOKEN", "<x-auth-token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"API_Generated_Fabric\",\n \"description\": \"This is a description of the fabric.\",\n \"teamName\": \"devTeam\",\n \"provider\": \"databricks\",\n \"secret\": {\n \"subKind\": \"text\",\n \"properties\": {\n \"name\": \"databricks-pat\",\n \"value\": \"databricks-pat-value\"\n },\n \"kind\": \"prophecy\"\n },\n \"connection\": {\n \"name\": \"databricks_pat_1\",\n \"kind\": \"databricks\",\n \"properties\": {\n \"authType\": \"pat\",\n \"jdbcUrl\": \"<databricks-jdbc>\",\n \"catalog\": \"pipelinehub\",\n \"schema\": \"katherine\",\n \"token\": \"{{SECRET}}\"\n },\n \"isDefaultWarehouseConnection\": true\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.prophecy.io/api/orchestration/fabric")
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\": \"API_Generated_Fabric\",\n \"description\": \"This is a description of the fabric.\",\n \"teamName\": \"devTeam\",\n \"provider\": \"databricks\",\n \"secret\": {\n \"subKind\": \"text\",\n \"properties\": {\n \"name\": \"databricks-pat\",\n \"value\": \"databricks-pat-value\"\n },\n \"kind\": \"prophecy\"\n },\n \"connection\": {\n \"name\": \"databricks_pat_1\",\n \"kind\": \"databricks\",\n \"properties\": {\n \"authType\": \"pat\",\n \"jdbcUrl\": \"<databricks-jdbc>\",\n \"catalog\": \"pipelinehub\",\n \"schema\": \"katherine\",\n \"token\": \"{{SECRET}}\"\n },\n \"isDefaultWarehouseConnection\": true\n }\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"id": "10740"
}
}{
"success": false,
"message": "Fabric creation failed due to : Fabric with name `API_fabric_test` already exists in the team"
}connection.properties object and secret.properties object depend on the connection type and secret type. Find specific properties in the following API documentation sections:- Connections > Properties
- Secrets > Properties
Headers
Prophecy authentication token. Required for all API requests.
Body
Name of the fabric to be created.
Name of the team that will own the fabric.
SQL warehouse provider for the fabric.
databricks, bigquery, ProphecyManaged Short description of the fabric.
Specific dataplane URL for the fabric. This is usually not needed and will be automatically set by Prophecy.
Optional secret to be created with the fabric. Only one secret can be added per request.
Show child attributes
Show child attributes
Optional connection to be created with the fabric. Only one connection can be added per request.
It often makes sense to create the connection for your SQL warehouse when creating the fabric. This means you would set isDefaultWarehouseConnection to true.
Show child attributes
Show child attributes
Was this page helpful?

