Preview a change to an object type's settings
curl --request POST \
--url https://api.journeybee.io/v1/schema/objects/{key}/preview \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"expected_schema_version": 4503599627370495,
"enabled_features": []
}
'import requests
url = "https://api.journeybee.io/v1/schema/objects/{key}/preview"
payload = {
"expected_schema_version": 4503599627370495,
"enabled_features": []
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({expected_schema_version: 4503599627370495, enabled_features: []})
};
fetch('https://api.journeybee.io/v1/schema/objects/{key}/preview', 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.journeybee.io/v1/schema/objects/{key}/preview",
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([
'expected_schema_version' => 4503599627370495,
'enabled_features' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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.journeybee.io/v1/schema/objects/{key}/preview"
payload := strings.NewReader("{\n \"expected_schema_version\": 4503599627370495,\n \"enabled_features\": []\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <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://api.journeybee.io/v1/schema/objects/{key}/preview")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"expected_schema_version\": 4503599627370495,\n \"enabled_features\": []\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.journeybee.io/v1/schema/objects/{key}/preview")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"expected_schema_version\": 4503599627370495,\n \"enabled_features\": []\n}"
response = http.request(request)
puts response.read_body{
"definition": {
"uuid": "<string>",
"key": "<string>",
"singular_label": "<string>",
"plural_label": "<string>",
"schema_version": 4503599627370495,
"is_partner_type": true,
"archived": true,
"enabled_features": [
"notes"
]
},
"enabled_features": [
"notes"
],
"changes": [
{
"feature": "notes",
"enabled": true,
"affected_records": 4503599627370495
}
]
}Objects
Preview a change to an object type's settings
Takes the same body as updateObjectDefinition and returns what it would do, without saving anything: the definition as it is now, the feature set that would result and, for each feature switched on or off, how many live records it reaches. It refuses what the update would refuse (409 for a stale expected_schema_version, 400 with reason partner_type_feature_required or not_available_yet). The answer is never cached for an idempotent replay. Needs a company admin.
POST
/
schema
/
objects
/
{key}
/
preview
Preview a change to an object type's settings
curl --request POST \
--url https://api.journeybee.io/v1/schema/objects/{key}/preview \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"expected_schema_version": 4503599627370495,
"enabled_features": []
}
'import requests
url = "https://api.journeybee.io/v1/schema/objects/{key}/preview"
payload = {
"expected_schema_version": 4503599627370495,
"enabled_features": []
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({expected_schema_version: 4503599627370495, enabled_features: []})
};
fetch('https://api.journeybee.io/v1/schema/objects/{key}/preview', 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.journeybee.io/v1/schema/objects/{key}/preview",
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([
'expected_schema_version' => 4503599627370495,
'enabled_features' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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.journeybee.io/v1/schema/objects/{key}/preview"
payload := strings.NewReader("{\n \"expected_schema_version\": 4503599627370495,\n \"enabled_features\": []\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <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://api.journeybee.io/v1/schema/objects/{key}/preview")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"expected_schema_version\": 4503599627370495,\n \"enabled_features\": []\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.journeybee.io/v1/schema/objects/{key}/preview")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"expected_schema_version\": 4503599627370495,\n \"enabled_features\": []\n}"
response = http.request(request)
puts response.read_body{
"definition": {
"uuid": "<string>",
"key": "<string>",
"singular_label": "<string>",
"plural_label": "<string>",
"schema_version": 4503599627370495,
"is_partner_type": true,
"archived": true,
"enabled_features": [
"notes"
]
},
"enabled_features": [
"notes"
],
"changes": [
{
"feature": "notes",
"enabled": true,
"affected_records": 4503599627370495
}
]
}Authorizations
Body
application/json
The full set of record features switched on (notes, files, tasks, history, assigned_users, tags, stages). Duplicates are dropped. A partner type always keeps tags and stages.
Maximum array length:
28Available options:
notes, files, tasks, history, assigned_users, tags, stages