curl --request PATCH \
--url https://api.engini.io/v1/opa-agents/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>",
"settings": {
"parallelTasks": 123,
"pullPeriodSeconds": 123,
"logLevel": "<string>"
}
}
'import requests
url = "https://api.engini.io/v1/opa-agents/{id}"
payload = {
"name": "<string>",
"description": "<string>",
"settings": {
"parallelTasks": 123,
"pullPeriodSeconds": 123,
"logLevel": "<string>"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: '<string>',
settings: {parallelTasks: 123, pullPeriodSeconds: 123, logLevel: '<string>'}
})
};
fetch('https://api.engini.io/v1/opa-agents/{id}', 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.engini.io/v1/opa-agents/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'description' => '<string>',
'settings' => [
'parallelTasks' => 123,
'pullPeriodSeconds' => 123,
'logLevel' => '<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.engini.io/v1/opa-agents/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"settings\": {\n \"parallelTasks\": 123,\n \"pullPeriodSeconds\": 123,\n \"logLevel\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.engini.io/v1/opa-agents/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"settings\": {\n \"parallelTasks\": 123,\n \"pullPeriodSeconds\": 123,\n \"logLevel\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.engini.io/v1/opa-agents/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"settings\": {\n \"parallelTasks\": 123,\n \"pullPeriodSeconds\": 123,\n \"logLevel\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"agentId": 123,
"status": "<string>",
"createdBy": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdDate": "2023-11-07T05:31:56Z",
"name": "<string>",
"description": "<string>",
"version": "<string>",
"lastSeenAt": "2023-11-07T05:31:56Z",
"updatedBy": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"updatedDate": "2023-11-07T05:31:56Z",
"settings": {
"parallelTasks": 123,
"pullPeriodSeconds": 123,
"logLevel": "<string>"
},
"appliedToAgent": true,
"dispatchedTaskIds": [
"<string>"
]
}{
"errorCode": "<string>",
"message": "<string>",
"requestId": "<string>",
"timestamp": "<string>",
"path": "<string>",
"details": [
{
"field": "<string>",
"issue": "<string>"
}
]
}{
"errorCode": "<string>",
"message": "<string>",
"requestId": "<string>",
"timestamp": "<string>",
"path": "<string>",
"details": [
{
"field": "<string>",
"issue": "<string>"
}
]
}{
"errorCode": "<string>",
"message": "<string>",
"requestId": "<string>",
"timestamp": "<string>",
"path": "<string>",
"details": [
{
"field": "<string>",
"issue": "<string>"
}
]
}{
"errorCode": "<string>",
"message": "<string>",
"requestId": "<string>",
"timestamp": "<string>",
"path": "<string>",
"details": [
{
"field": "<string>",
"issue": "<string>"
}
]
}{
"errorCode": "<string>",
"message": "<string>",
"requestId": "<string>",
"timestamp": "<string>",
"path": "<string>",
"details": [
{
"field": "<string>",
"issue": "<string>"
}
]
}{
"errorCode": "<string>",
"message": "<string>",
"requestId": "<string>",
"timestamp": "<string>",
"path": "<string>",
"details": [
{
"field": "<string>",
"issue": "<string>"
}
]
}Update an on-premise agent.
A merge, not a replace: omitted members are left unchanged - deliberately unlike PUT /v1/connections/, which replaces its whole field map.
Settings changes are dispatched to the running agent. The change is persisted either way: when the agent is not Online, or when the dispatch fails or times out, the response still reports 200 with appliedToAgent: false and an empty dispatchedTaskIds, so a caller can tell the settings are stored but the agent has not seen them yet.
Only the settings the caller actually sends are range-checked, against what this agent’s connector declares it accepts - currently parallelTasks 1-100 and pullPeriodSeconds 10-9999999, the same bounds the Engini UI enforces. An out-of-range value is a 400 naming each offending field, and persists nothing. An agent already storing a value outside those bounds can still be patched on its other fields; the stored value is carried through untouched rather than rejected.
curl --request PATCH \
--url https://api.engini.io/v1/opa-agents/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>",
"settings": {
"parallelTasks": 123,
"pullPeriodSeconds": 123,
"logLevel": "<string>"
}
}
'import requests
url = "https://api.engini.io/v1/opa-agents/{id}"
payload = {
"name": "<string>",
"description": "<string>",
"settings": {
"parallelTasks": 123,
"pullPeriodSeconds": 123,
"logLevel": "<string>"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: '<string>',
settings: {parallelTasks: 123, pullPeriodSeconds: 123, logLevel: '<string>'}
})
};
fetch('https://api.engini.io/v1/opa-agents/{id}', 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.engini.io/v1/opa-agents/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'description' => '<string>',
'settings' => [
'parallelTasks' => 123,
'pullPeriodSeconds' => 123,
'logLevel' => '<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.engini.io/v1/opa-agents/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"settings\": {\n \"parallelTasks\": 123,\n \"pullPeriodSeconds\": 123,\n \"logLevel\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.engini.io/v1/opa-agents/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"settings\": {\n \"parallelTasks\": 123,\n \"pullPeriodSeconds\": 123,\n \"logLevel\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.engini.io/v1/opa-agents/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"settings\": {\n \"parallelTasks\": 123,\n \"pullPeriodSeconds\": 123,\n \"logLevel\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"agentId": 123,
"status": "<string>",
"createdBy": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdDate": "2023-11-07T05:31:56Z",
"name": "<string>",
"description": "<string>",
"version": "<string>",
"lastSeenAt": "2023-11-07T05:31:56Z",
"updatedBy": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"updatedDate": "2023-11-07T05:31:56Z",
"settings": {
"parallelTasks": 123,
"pullPeriodSeconds": 123,
"logLevel": "<string>"
},
"appliedToAgent": true,
"dispatchedTaskIds": [
"<string>"
]
}{
"errorCode": "<string>",
"message": "<string>",
"requestId": "<string>",
"timestamp": "<string>",
"path": "<string>",
"details": [
{
"field": "<string>",
"issue": "<string>"
}
]
}{
"errorCode": "<string>",
"message": "<string>",
"requestId": "<string>",
"timestamp": "<string>",
"path": "<string>",
"details": [
{
"field": "<string>",
"issue": "<string>"
}
]
}{
"errorCode": "<string>",
"message": "<string>",
"requestId": "<string>",
"timestamp": "<string>",
"path": "<string>",
"details": [
{
"field": "<string>",
"issue": "<string>"
}
]
}{
"errorCode": "<string>",
"message": "<string>",
"requestId": "<string>",
"timestamp": "<string>",
"path": "<string>",
"details": [
{
"field": "<string>",
"issue": "<string>"
}
]
}{
"errorCode": "<string>",
"message": "<string>",
"requestId": "<string>",
"timestamp": "<string>",
"path": "<string>",
"details": [
{
"field": "<string>",
"issue": "<string>"
}
]
}{
"errorCode": "<string>",
"message": "<string>",
"requestId": "<string>",
"timestamp": "<string>",
"path": "<string>",
"details": [
{
"field": "<string>",
"issue": "<string>"
}
]
}Authorizations
Enter your JWT token
Path Parameters
The identifier of the agent to update.
Body
The members to change. Omitted members are left as they are.
Partial update for an on-premise agent. A null member is left unchanged; this is a merge, not a replace - deliberately unlike PUT /v1/connections, which replaces its whole field map.
Response
The updated agent, plus whether the settings reached the running agent.
Full detail for one on-premise agent.
Identifier of the agent.
Liveness of the agent: WaitingForConnection, Online, Offline or Disabled.
Identifier of the user who created the agent.
When the agent was created.
Display name of the agent.
Optional description of the agent.
Version the agent last self-reported. Null until it first connects.
Last heartbeat received from the agent. Null when it has never connected.
Identifier of the user who last updated the agent.
When the agent was last updated.
Runtime settings currently stored for the agent.
Show child attributes
Show child attributes
False when a settings write reached the database but not the agent, because the agent was Offline. Null on reads - only set by update responses.
Cloud task identifiers dispatched to the live agent by a settings write. Empty when offline.