curl --request POST \
--url https://api.decimal.ai/api/v1/agents/{agent_name}/setup/apply \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"changes": [
{}
],
"rollback_to": 123,
"note": "<string>",
"base_version": 123,
"base_fingerprint": "<string>"
}
'import requests
url = "https://api.decimal.ai/api/v1/agents/{agent_name}/setup/apply"
payload = {
"changes": [{}],
"rollback_to": 123,
"note": "<string>",
"base_version": 123,
"base_fingerprint": "<string>"
}
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({
changes: [{}],
rollback_to: 123,
note: '<string>',
base_version: 123,
base_fingerprint: '<string>'
})
};
fetch('https://api.decimal.ai/api/v1/agents/{agent_name}/setup/apply', 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.decimal.ai/api/v1/agents/{agent_name}/setup/apply",
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([
'changes' => [
[
]
],
'rollback_to' => 123,
'note' => '<string>',
'base_version' => 123,
'base_fingerprint' => '<string>'
]),
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.decimal.ai/api/v1/agents/{agent_name}/setup/apply"
payload := strings.NewReader("{\n \"changes\": [\n {}\n ],\n \"rollback_to\": 123,\n \"note\": \"<string>\",\n \"base_version\": 123,\n \"base_fingerprint\": \"<string>\"\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.decimal.ai/api/v1/agents/{agent_name}/setup/apply")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"changes\": [\n {}\n ],\n \"rollback_to\": 123,\n \"note\": \"<string>\",\n \"base_version\": 123,\n \"base_fingerprint\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.decimal.ai/api/v1/agents/{agent_name}/setup/apply")
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 \"changes\": [\n {}\n ],\n \"rollback_to\": 123,\n \"note\": \"<string>\",\n \"base_version\": 123,\n \"base_fingerprint\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Apply staged changes (or a roll back) in one transaction, as one config version
curl --request POST \
--url https://api.decimal.ai/api/v1/agents/{agent_name}/setup/apply \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"changes": [
{}
],
"rollback_to": 123,
"note": "<string>",
"base_version": 123,
"base_fingerprint": "<string>"
}
'import requests
url = "https://api.decimal.ai/api/v1/agents/{agent_name}/setup/apply"
payload = {
"changes": [{}],
"rollback_to": 123,
"note": "<string>",
"base_version": 123,
"base_fingerprint": "<string>"
}
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({
changes: [{}],
rollback_to: 123,
note: '<string>',
base_version: 123,
base_fingerprint: '<string>'
})
};
fetch('https://api.decimal.ai/api/v1/agents/{agent_name}/setup/apply', 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.decimal.ai/api/v1/agents/{agent_name}/setup/apply",
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([
'changes' => [
[
]
],
'rollback_to' => 123,
'note' => '<string>',
'base_version' => 123,
'base_fingerprint' => '<string>'
]),
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.decimal.ai/api/v1/agents/{agent_name}/setup/apply"
payload := strings.NewReader("{\n \"changes\": [\n {}\n ],\n \"rollback_to\": 123,\n \"note\": \"<string>\",\n \"base_version\": 123,\n \"base_fingerprint\": \"<string>\"\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.decimal.ai/api/v1/agents/{agent_name}/setup/apply")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"changes\": [\n {}\n ],\n \"rollback_to\": 123,\n \"note\": \"<string>\",\n \"base_version\": 123,\n \"base_fingerprint\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.decimal.ai/api/v1/agents/{agent_name}/setup/apply")
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 \"changes\": [\n {}\n ],\n \"rollback_to\": 123,\n \"note\": \"<string>\",\n \"base_version\": 123,\n \"base_fingerprint\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Enter your API key (e.g. dai_sk_test_key_001)
Path Parameters
Cookies
Body
Staged changes, or a roll back. Exactly one of changes and rollback_to.
Ops: {op: add_skill|remove_skill|set_skill_version, skill_id, version_number?}; {op: set_prompt_version, version_number (null = serve latest)}; and experiments: {op: start_holdout, skill_id, share?, detect_points?, score?: {name, source}, confirmed}, {op: start_prompt_split, version_number, share?, detect_points?, score?, confirmed}, {op: stop_experiment}.
Apply this version's setup again, as a new version.
What changed (optional), shown on Versions.
500The version the review was made against; a different current version is a 409.
The setup fingerprint the review was made against (from preview); a 409 if it moved.
Response
Successful Response
The response is of type Response Apply Config Change Api V1 Agents Agent Name Setup Apply Post · object.