Edit agent configs
curl --request POST \
--url https://api.omnara.com/v1/orgs/{orgID}/projects/{projectID}/agent-configs/edit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"targets": [
{
"type": "profile",
"agent_profile_id": "<string>",
"apply_to_profile": true,
"apply_to_instances": false
}
],
"edits": [
{
"type": "set",
"path": "<string>",
"value": "<unknown>"
}
],
"on_failed_edit": "continue"
}
'import requests
url = "https://api.omnara.com/v1/orgs/{orgID}/projects/{projectID}/agent-configs/edit"
payload = {
"targets": [
{
"type": "profile",
"agent_profile_id": "<string>",
"apply_to_profile": True,
"apply_to_instances": False
}
],
"edits": [
{
"type": "set",
"path": "<string>",
"value": "<unknown>"
}
],
"on_failed_edit": "continue"
}
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({
targets: [
{
type: 'profile',
agent_profile_id: '<string>',
apply_to_profile: true,
apply_to_instances: false
}
],
edits: [{type: 'set', path: '<string>', value: '<unknown>'}],
on_failed_edit: 'continue'
})
};
fetch('https://api.omnara.com/v1/orgs/{orgID}/projects/{projectID}/agent-configs/edit', 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.omnara.com/v1/orgs/{orgID}/projects/{projectID}/agent-configs/edit",
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([
'targets' => [
[
'type' => 'profile',
'agent_profile_id' => '<string>',
'apply_to_profile' => true,
'apply_to_instances' => false
]
],
'edits' => [
[
'type' => 'set',
'path' => '<string>',
'value' => '<unknown>'
]
],
'on_failed_edit' => 'continue'
]),
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.omnara.com/v1/orgs/{orgID}/projects/{projectID}/agent-configs/edit"
payload := strings.NewReader("{\n \"targets\": [\n {\n \"type\": \"profile\",\n \"agent_profile_id\": \"<string>\",\n \"apply_to_profile\": true,\n \"apply_to_instances\": false\n }\n ],\n \"edits\": [\n {\n \"type\": \"set\",\n \"path\": \"<string>\",\n \"value\": \"<unknown>\"\n }\n ],\n \"on_failed_edit\": \"continue\"\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.omnara.com/v1/orgs/{orgID}/projects/{projectID}/agent-configs/edit")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"targets\": [\n {\n \"type\": \"profile\",\n \"agent_profile_id\": \"<string>\",\n \"apply_to_profile\": true,\n \"apply_to_instances\": false\n }\n ],\n \"edits\": [\n {\n \"type\": \"set\",\n \"path\": \"<string>\",\n \"value\": \"<unknown>\"\n }\n ],\n \"on_failed_edit\": \"continue\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.omnara.com/v1/orgs/{orgID}/projects/{projectID}/agent-configs/edit")
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 \"targets\": [\n {\n \"type\": \"profile\",\n \"agent_profile_id\": \"<string>\",\n \"apply_to_profile\": true,\n \"apply_to_instances\": false\n }\n ],\n \"edits\": [\n {\n \"type\": \"set\",\n \"path\": \"<string>\",\n \"value\": \"<unknown>\"\n }\n ],\n \"on_failed_edit\": \"continue\"\n}"
response = http.request(request)
puts response.read_body{
"data": [
{
"target": {
"type": "profile",
"agent_profile_id": "<string>",
"apply_to_profile": true,
"apply_to_instances": false
},
"status": "updated",
"previous_config_id": "<string>",
"current_config_id": "<string>",
"current_generation": 123,
"edits": [
"applied"
],
"code": "invalid_request",
"error": "<string>"
}
]
}{
"error": "<string>",
"code": "<string>",
"current_digest": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>",
"line": 2,
"column": 2
}
]
}{
"error": "<string>",
"code": "<string>",
"current_digest": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>",
"line": 2,
"column": 2
}
]
}{
"error": "<string>",
"code": "<string>",
"current_digest": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>",
"line": 2,
"column": 2
}
]
}{
"error": "<string>",
"code": "<string>",
"current_digest": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>",
"line": 2,
"column": 2
}
]
}{
"error": "<string>",
"code": "<string>",
"current_digest": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>",
"line": 2,
"column": 2
}
]
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}Configs and Profiles
Edit agent configs
Applies the same edits to agent profiles and agents, at most 500 after profile targets expand into their agents. Each target reports its own result, and on_failed_edit decides what happens to the others when one fails. Results come back in this order: profiles, then listed agents, then each profile’s instances oldest first. Agents launched during the request may be skipped. YAML sources keep their text outside the changed entries when possible. Reusing an Idempotency-Key returns earlier results for targets it already edited, even with a different body.
POST
/
orgs
/
{orgID}
/
projects
/
{projectID}
/
agent-configs
/
edit
Edit agent configs
curl --request POST \
--url https://api.omnara.com/v1/orgs/{orgID}/projects/{projectID}/agent-configs/edit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"targets": [
{
"type": "profile",
"agent_profile_id": "<string>",
"apply_to_profile": true,
"apply_to_instances": false
}
],
"edits": [
{
"type": "set",
"path": "<string>",
"value": "<unknown>"
}
],
"on_failed_edit": "continue"
}
'import requests
url = "https://api.omnara.com/v1/orgs/{orgID}/projects/{projectID}/agent-configs/edit"
payload = {
"targets": [
{
"type": "profile",
"agent_profile_id": "<string>",
"apply_to_profile": True,
"apply_to_instances": False
}
],
"edits": [
{
"type": "set",
"path": "<string>",
"value": "<unknown>"
}
],
"on_failed_edit": "continue"
}
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({
targets: [
{
type: 'profile',
agent_profile_id: '<string>',
apply_to_profile: true,
apply_to_instances: false
}
],
edits: [{type: 'set', path: '<string>', value: '<unknown>'}],
on_failed_edit: 'continue'
})
};
fetch('https://api.omnara.com/v1/orgs/{orgID}/projects/{projectID}/agent-configs/edit', 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.omnara.com/v1/orgs/{orgID}/projects/{projectID}/agent-configs/edit",
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([
'targets' => [
[
'type' => 'profile',
'agent_profile_id' => '<string>',
'apply_to_profile' => true,
'apply_to_instances' => false
]
],
'edits' => [
[
'type' => 'set',
'path' => '<string>',
'value' => '<unknown>'
]
],
'on_failed_edit' => 'continue'
]),
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.omnara.com/v1/orgs/{orgID}/projects/{projectID}/agent-configs/edit"
payload := strings.NewReader("{\n \"targets\": [\n {\n \"type\": \"profile\",\n \"agent_profile_id\": \"<string>\",\n \"apply_to_profile\": true,\n \"apply_to_instances\": false\n }\n ],\n \"edits\": [\n {\n \"type\": \"set\",\n \"path\": \"<string>\",\n \"value\": \"<unknown>\"\n }\n ],\n \"on_failed_edit\": \"continue\"\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.omnara.com/v1/orgs/{orgID}/projects/{projectID}/agent-configs/edit")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"targets\": [\n {\n \"type\": \"profile\",\n \"agent_profile_id\": \"<string>\",\n \"apply_to_profile\": true,\n \"apply_to_instances\": false\n }\n ],\n \"edits\": [\n {\n \"type\": \"set\",\n \"path\": \"<string>\",\n \"value\": \"<unknown>\"\n }\n ],\n \"on_failed_edit\": \"continue\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.omnara.com/v1/orgs/{orgID}/projects/{projectID}/agent-configs/edit")
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 \"targets\": [\n {\n \"type\": \"profile\",\n \"agent_profile_id\": \"<string>\",\n \"apply_to_profile\": true,\n \"apply_to_instances\": false\n }\n ],\n \"edits\": [\n {\n \"type\": \"set\",\n \"path\": \"<string>\",\n \"value\": \"<unknown>\"\n }\n ],\n \"on_failed_edit\": \"continue\"\n}"
response = http.request(request)
puts response.read_body{
"data": [
{
"target": {
"type": "profile",
"agent_profile_id": "<string>",
"apply_to_profile": true,
"apply_to_instances": false
},
"status": "updated",
"previous_config_id": "<string>",
"current_config_id": "<string>",
"current_generation": 123,
"edits": [
"applied"
],
"code": "invalid_request",
"error": "<string>"
}
]
}{
"error": "<string>",
"code": "<string>",
"current_digest": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>",
"line": 2,
"column": 2
}
]
}{
"error": "<string>",
"code": "<string>",
"current_digest": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>",
"line": 2,
"column": 2
}
]
}{
"error": "<string>",
"code": "<string>",
"current_digest": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>",
"line": 2,
"column": 2
}
]
}{
"error": "<string>",
"code": "<string>",
"current_digest": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>",
"line": 2,
"column": 2
}
]
}{
"error": "<string>",
"code": "<string>",
"current_digest": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>",
"line": 2,
"column": 2
}
]
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}Authorizations
bearerAuthbrowserSessionCookie & csrfHeader
Headers
Path Parameters
Body
application/json