Get Raw BRK
curl --request POST \
--url https://api.example.com/raw_brx \
--header 'Content-Type: application/json' \
--data '
{
"brxId": "<string>"
}
'import requests
url = "https://api.example.com/raw_brx"
payload = { "brxId": "<string>" }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({brxId: '<string>'})
};
fetch('https://api.example.com/raw_brx', 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://api.example.com/raw_brx",
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([
'brxId' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$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://api.example.com/raw_brx"
payload := strings.NewReader("{\n \"brxId\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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://api.example.com/raw_brx")
.header("Content-Type", "application/json")
.body("{\n \"brxId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/raw_brx")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"brxId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"400": {},
"401": {},
"403": {},
"404": {},
"500": {},
"brx": {
"brxId": "<string>",
"brxName": "<string>",
"description": "<string>",
"prompt": {
"prompt": {}
},
"processParams": {
"processType": 123
},
"dependantBrxIds": {}
},
"schema": {
"schemaFields": {
"fieldValueDataType": "<string>",
"fieldValue": "<string>"
},
"brxName": "<string>",
"brxId": "<string>"
},
"editorJSON": {},
"conf": {},
"ops": {}
}BRK Management
Get Raw BRK
Retrieves the raw data for a BRK
POST
/
raw_brx
Get Raw BRK
curl --request POST \
--url https://api.example.com/raw_brx \
--header 'Content-Type: application/json' \
--data '
{
"brxId": "<string>"
}
'import requests
url = "https://api.example.com/raw_brx"
payload = { "brxId": "<string>" }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({brxId: '<string>'})
};
fetch('https://api.example.com/raw_brx', 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://api.example.com/raw_brx",
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([
'brxId' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$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://api.example.com/raw_brx"
payload := strings.NewReader("{\n \"brxId\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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://api.example.com/raw_brx")
.header("Content-Type", "application/json")
.body("{\n \"brxId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/raw_brx")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"brxId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"400": {},
"401": {},
"403": {},
"404": {},
"500": {},
"brx": {
"brxId": "<string>",
"brxName": "<string>",
"description": "<string>",
"prompt": {
"prompt": {}
},
"processParams": {
"processType": 123
},
"dependantBrxIds": {}
},
"schema": {
"schemaFields": {
"fieldValueDataType": "<string>",
"fieldValue": "<string>"
},
"brxName": "<string>",
"brxId": "<string>"
},
"editorJSON": {},
"conf": {},
"ops": {}
}This endpoint retrieves the raw data for a BRK, including the complete BRK definition, schema, editor JSON, configuration, and operations. This endpoint is useful for advanced use cases where you need access to the internal structure of a BRK. You must have at least editor permissions for the BRK to access its raw data.
Request
string
required
The ID of the BRK to get raw data for
Example Request
{
"brxId": "brk-12345678-90ab-cdef-1234-567890abcdef"
}
Response
object
The complete BRK definition
Show properties
Show properties
string
The unique identifier of the BRK
string
The name of the BRK
string
The description of the BRK
object
The prompt template for the BRK
Show properties
Show properties
object
Map of prompt template names to template strings
object
Map of schema linker to BRK ID for dependencies
object
object
Editor-specific JSON data for the BRK
object
Configuration parameters for the BRK
object
Operations data for the BRK
Example Response
{
"brx": {
"brxId": "brk-12345678-90ab-cdef-1234-567890abcdef",
"brxName": "Example BRK",
"description": "An example BRK for documentation",
"prompt": {
"prompt": {
"main": "This is the main prompt template with {{variable}}"
}
},
"processParams": {
"processType": 0
},
"dependantBrxIds": {
"main_brx_entry_schema": "brk-12345678-90ab-cdef-1234-567890abcdef"
}
},
"schema": {
"schemaFields": {
"variable": {
"fieldValueDataType": "string",
"fieldValue": ""
}
},
"brxName": "Example BRK",
"brxId": "brk-12345678-90ab-cdef-1234-567890abcdef"
},
"editorJSON": {
"layout": {
"nodes": [
{
"id": "node1",
"position": {
"x": 100,
"y": 100
}
}
],
"edges": []
}
},
"conf": {
"maxTokens": 1000,
"temperature": 0.7,
"topP": 0.9
},
"ops": {
"lastOperation": "UPDATE",
"operationTimestamp": "2023-01-01T00:00:00.000Z"
}
}
Error Codes
object
Bad Request - The request was malformed or missing required parameters
object
Unauthorized - Authentication credentials are missing or invalid
object
Forbidden - The authenticated user does not have permission to access the raw data for the requested BRK
object
Not Found - The requested BRK does not exist
object
Internal Server Error - An unexpected error occurred on the server
Notes
- This endpoint returns the complete internal structure of a BRK, which can be useful for debugging or advanced use cases.
- You must have at least editor permissions for the BRK to access its raw data.
- The response includes the BRK definition, schema, editor JSON, configuration, and operations data.
- The
editorJSONfield contains layout information and other editor-specific metadata. - The
conffield contains configuration parameters for the BRK, such as model parameters. - The
opsfield contains information about operations performed on the BRK, such as the last operation and timestamp.