Create a new fabric
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"
}Fabrics
Create a new fabric
Create a Prophecy fabric with optional secret and connection
POST
/
api
/
orchestration
/
fabric
Create a new fabric
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"
}You can only add one secret and one connection in the same request. In most cases, the connection
will require a secret, so these will be created together.
The
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
Body
application/json
SQL warehouse provider for the fabric. Use ProphecyManaged for a Prophecy In Memory fabric, which runs on DuckDB and creates its own default warehouse connection. databricks and bigquery fabrics also need a warehouse connection.
Available options:
databricks, bigquery, ProphecyManaged Was this page helpful?

