Skip to main content
PUT
/
api
/
orchestration
/
fabric
/
{fabricId}
Update an existing fabric
curl --request PUT \
  --url https://app.prophecy.io/api/orchestration/fabric/{fabricId} \
  --header 'Content-Type: application/json' \
  --header 'X-AUTH-TOKEN: <x-auth-token>' \
  --data '
{
  "name": "API_fabric_test_update"
}
'
import requests

url = "https://app.prophecy.io/api/orchestration/fabric/{fabricId}"

payload = { "name": "API_fabric_test_update" }
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: 'API_fabric_test_update'})
};

fetch('https://app.prophecy.io/api/orchestration/fabric/{fabricId}', 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}",
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' => 'API_fabric_test_update'
]),
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}"

payload := strings.NewReader("{\n \"name\": \"API_fabric_test_update\"\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}")
.header("X-AUTH-TOKEN", "<x-auth-token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"API_fabric_test_update\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://app.prophecy.io/api/orchestration/fabric/{fabricId}")

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\": \"API_fabric_test_update\"\n}"

response = http.request(request)
puts response.read_body
{
  "success": true,
  "data": {
    "id": "10740"
  }
}
Only the name and description of the fabric can be updated.

Headers

X-AUTH-TOKEN
string
required

Prophecy authentication token. Required for all API requests.

Path Parameters

fabricId
string
required

The unique ID of the fabric

Body

application/json

Fabric object with updated fields. Only name and description can be modified.

name
string

The name of the fabric.

description
string

The description of the fabric.

Response

200 - application/json

Fabric updated successfully

success
enum<boolean>
required

Indicates the request was successful.

Available options:
true
data
object
required

Response data containing the fabric ID.