Add secret to fabric
curl --request POST \
--url https://app.prophecy.io/api/orchestration/fabric/{fabricId}/secret \
--header 'Content-Type: application/json' \
--header 'X-AUTH-TOKEN: <x-auth-token>' \
--data '
{
"subKind": "text",
"properties": {
"name": "your-secret-name",
"value": "your-secret-value"
},
"kind": "prophecy"
}
'import requests
url = "https://app.prophecy.io/api/orchestration/fabric/{fabricId}/secret"
payload = {
"subKind": "text",
"properties": {
"name": "your-secret-name",
"value": "your-secret-value"
},
"kind": "prophecy"
}
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({
subKind: 'text',
properties: {name: 'your-secret-name', value: 'your-secret-value'},
kind: 'prophecy'
})
};
fetch('https://app.prophecy.io/api/orchestration/fabric/{fabricId}/secret', 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}/secret",
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([
'subKind' => 'text',
'properties' => [
'name' => 'your-secret-name',
'value' => 'your-secret-value'
],
'kind' => 'prophecy'
]),
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}/secret"
payload := strings.NewReader("{\n \"subKind\": \"text\",\n \"properties\": {\n \"name\": \"your-secret-name\",\n \"value\": \"your-secret-value\"\n },\n \"kind\": \"prophecy\"\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}/secret")
.header("X-AUTH-TOKEN", "<x-auth-token>")
.header("Content-Type", "application/json")
.body("{\n \"subKind\": \"text\",\n \"properties\": {\n \"name\": \"your-secret-name\",\n \"value\": \"your-secret-value\"\n },\n \"kind\": \"prophecy\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.prophecy.io/api/orchestration/fabric/{fabricId}/secret")
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 \"subKind\": \"text\",\n \"properties\": {\n \"name\": \"your-secret-name\",\n \"value\": \"your-secret-value\"\n },\n \"kind\": \"prophecy\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"id": "4657"
}
}Secrets
Add secret to fabric
Create a new secret in a specific fabric
POST
/
api
/
orchestration
/
fabric
/
{fabricId}
/
secret
Add secret to fabric
curl --request POST \
--url https://app.prophecy.io/api/orchestration/fabric/{fabricId}/secret \
--header 'Content-Type: application/json' \
--header 'X-AUTH-TOKEN: <x-auth-token>' \
--data '
{
"subKind": "text",
"properties": {
"name": "your-secret-name",
"value": "your-secret-value"
},
"kind": "prophecy"
}
'import requests
url = "https://app.prophecy.io/api/orchestration/fabric/{fabricId}/secret"
payload = {
"subKind": "text",
"properties": {
"name": "your-secret-name",
"value": "your-secret-value"
},
"kind": "prophecy"
}
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({
subKind: 'text',
properties: {name: 'your-secret-name', value: 'your-secret-value'},
kind: 'prophecy'
})
};
fetch('https://app.prophecy.io/api/orchestration/fabric/{fabricId}/secret', 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}/secret",
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([
'subKind' => 'text',
'properties' => [
'name' => 'your-secret-name',
'value' => 'your-secret-value'
],
'kind' => 'prophecy'
]),
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}/secret"
payload := strings.NewReader("{\n \"subKind\": \"text\",\n \"properties\": {\n \"name\": \"your-secret-name\",\n \"value\": \"your-secret-value\"\n },\n \"kind\": \"prophecy\"\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}/secret")
.header("X-AUTH-TOKEN", "<x-auth-token>")
.header("Content-Type", "application/json")
.body("{\n \"subKind\": \"text\",\n \"properties\": {\n \"name\": \"your-secret-name\",\n \"value\": \"your-secret-value\"\n },\n \"kind\": \"prophecy\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.prophecy.io/api/orchestration/fabric/{fabricId}/secret")
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 \"subKind\": \"text\",\n \"properties\": {\n \"name\": \"your-secret-name\",\n \"value\": \"your-secret-value\"\n },\n \"kind\": \"prophecy\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"id": "4657"
}
}Headers
Prophecy authentication token. Required for all API requests.
Path Parameters
The unique ID of the parent fabric
Body
application/json
Secret object to be created. Properties vary by subKind.
Secret management provider
Available options:
prophecy Secret sub-type
Available options:
text, binary, username_password, m2m_oauth Secret properties that vary by subKind.
Find specific properties in the Secrets > Properties section of the API documentation.
Was this page helpful?
⌘I

