Archive agent
curl --request POST \
--url https://api.omnara.com/v1/orgs/{orgID}/projects/{projectID}/agents/{agentID}/archive \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.omnara.com/v1/orgs/{orgID}/projects/{projectID}/agents/{agentID}/archive"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.omnara.com/v1/orgs/{orgID}/projects/{projectID}/agents/{agentID}/archive', 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}/agents/{agentID}/archive",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <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"
"net/http"
"io"
)
func main() {
url := "https://api.omnara.com/v1/orgs/{orgID}/projects/{projectID}/agents/{agentID}/archive"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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}/agents/{agentID}/archive")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.omnara.com/v1/orgs/{orgID}/projects/{projectID}/agents/{agentID}/archive")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"agent": {
"id": "<string>",
"org_id": "<string>",
"project_id": "<string>",
"state": "active",
"name": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"agent_profile_id": "<string>",
"integration_target": {
"provider": "<string>",
"provider_ref": "<string>",
"provider_ref_kind": "<string>",
"display_name": "<string>",
"provider_uri": "<string>"
},
"current_config_id": "<string>",
"model": {
"provider_config": "<string>",
"name": "<string>"
},
"archived_at": "2023-11-07T05:31:56Z"
}
}{
"error": "<string>",
"code": "invalid_request"
}{
"error": "<string>",
"code": "invalid_request"
}{
"error": "<string>",
"code": "invalid_request"
}{
"error": "<string>",
"code": "invalid_request"
}{
"error": "<string>",
"code": "invalid_request"
}{
"error": "<string>",
"code": "invalid_request"
}{
"error": "<string>",
"code": "internal_error"
}Agents
Archive agent
Archives the agent: requests cancellation of its active runtime, cancels queued inputs and affected processes, removes its pending wakeup, releases explicit machine bindings, deletes pooled machines created for the agent, and deletes cron triggers targeting the agent. The agent and its full event history stay readable by id; archived agents leave listings. The agent’s profile and configuration are retained, as are explicitly attached BYO machines. Archiving an already-archived agent is a no-op that returns the agent unchanged.
POST
/
orgs
/
{orgID}
/
projects
/
{projectID}
/
agents
/
{agentID}
/
archive
Archive agent
curl --request POST \
--url https://api.omnara.com/v1/orgs/{orgID}/projects/{projectID}/agents/{agentID}/archive \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.omnara.com/v1/orgs/{orgID}/projects/{projectID}/agents/{agentID}/archive"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.omnara.com/v1/orgs/{orgID}/projects/{projectID}/agents/{agentID}/archive', 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}/agents/{agentID}/archive",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <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"
"net/http"
"io"
)
func main() {
url := "https://api.omnara.com/v1/orgs/{orgID}/projects/{projectID}/agents/{agentID}/archive"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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}/agents/{agentID}/archive")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.omnara.com/v1/orgs/{orgID}/projects/{projectID}/agents/{agentID}/archive")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"agent": {
"id": "<string>",
"org_id": "<string>",
"project_id": "<string>",
"state": "active",
"name": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"agent_profile_id": "<string>",
"integration_target": {
"provider": "<string>",
"provider_ref": "<string>",
"provider_ref_kind": "<string>",
"display_name": "<string>",
"provider_uri": "<string>"
},
"current_config_id": "<string>",
"model": {
"provider_config": "<string>",
"name": "<string>"
},
"archived_at": "2023-11-07T05:31:56Z"
}
}{
"error": "<string>",
"code": "invalid_request"
}{
"error": "<string>",
"code": "invalid_request"
}{
"error": "<string>",
"code": "invalid_request"
}{
"error": "<string>",
"code": "invalid_request"
}{
"error": "<string>",
"code": "invalid_request"
}{
"error": "<string>",
"code": "invalid_request"
}{
"error": "<string>",
"code": "internal_error"
}Authorizations
bearerAuthbrowserSessionCookie & csrfHeader
An opaque Omnara personal or organization bearer token.
Path Parameters
Pattern:
^org_[a-z2-7]{26}$Pattern:
^proj_[a-z2-7]{26}$Pattern:
^agt_[a-z2-7]{26}$Response
The archived agent.
Show child attributes
Show child attributes
⌘I