curl --request POST \
--url https://api.engini.io/v1/opa-agents/{id}/enable \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.engini.io/v1/opa-agents/{id}/enable"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.engini.io/v1/opa-agents/{id}/enable', 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}/enable",
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.engini.io/v1/opa-agents/{id}/enable"
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.engini.io/v1/opa-agents/{id}/enable")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.engini.io/v1/opa-agents/{id}/enable")
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{
"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>"
}
]
}Enable a disabled on-premise agent.
Moves the agent back to WaitingForConnection so it can register on its next poll. A no-op on an agent that is not disabled - it keeps whatever liveness it already reported.
curl --request POST \
--url https://api.engini.io/v1/opa-agents/{id}/enable \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.engini.io/v1/opa-agents/{id}/enable"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.engini.io/v1/opa-agents/{id}/enable', 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}/enable",
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.engini.io/v1/opa-agents/{id}/enable"
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.engini.io/v1/opa-agents/{id}/enable")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.engini.io/v1/opa-agents/{id}/enable")
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{
"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 enable.
Response
The agent after the change.
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.