Skip to main content
GET
/
agents
List Agent Keys
curl --request GET \
  --url https://use.hoop.dev/api/agents
import requests

url = "https://use.hoop.dev/api/agents"

response = requests.get(url)

print(response.text)
const options = {method: 'GET'};

fetch('https://use.hoop.dev/api/agents', 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://use.hoop.dev/api/agents",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);

$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://use.hoop.dev/api/agents"

req, _ := http.NewRequest("GET", url, nil)

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://use.hoop.dev/api/agents")
.asString();
require 'uri'
require 'net/http'

url = URI("https://use.hoop.dev/api/agents")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
[
  {
    "compiler": "gcc",
    "goversion": "1.22.4",
    "hostname": "john.wick.local",
    "id": "8a4239fa-5116-4bbb-ad3c-ea1f294aac4a",
    "kernel_version": "Linux 9acfe93d8195 5.15.49-linuxkit",
    "machine_id": "",
    "metadata": {
      "compiler": "gcc",
      "hostname": "johnwick.local",
      "kernel-version": "Linux 9acfe93d8195 5.15.49-linuxkit",
      "machine-id": "id",
      "platform": "amd64",
      "version": "1.23.14"
    },
    "mode": "standard",
    "name": "default",
    "platform": "amd64",
    "status": "DISCONNECTED",
    "token": "<string>",
    "version": "1.23.10"
  }
]
{
"message": "the error description"
}

Query Parameters

status
string

Filter by status (CONNECTED or DISCONNECTED)

Response

OK

compiler
string
Example:

"gcc"

goversion
string
Example:

"1.22.4"

hostname
string

DEPRECATE top level metadata keys

Example:

"john.wick.local"

id
string<uuid>

Unique ID of the resource

Example:

"8a4239fa-5116-4bbb-ad3c-ea1f294aac4a"

kernel_version
string
Example:

"Linux 9acfe93d8195 5.15.49-linuxkit"

machine_id
string
Example:

""

metadata
object

Metadata contains attributes regarding the machine where the agent is being executed

  • version - Version of the agent
  • go-version - Agent build information
  • compiler - Agent build information
  • platform - The operating system architecture where the agent is running
  • machine-id - The machine id of server
  • kernel-version - The kernel version of the server
Example:
{
"compiler": "gcc",
"hostname": "johnwick.local",
"kernel-version": "Linux 9acfe93d8195 5.15.49-linuxkit",
"machine-id": "id",
"platform": "amd64",
"version": "1.23.14"
}
mode
enum<string>

Mode of execution of the agent

  • standard - Is the default mode, which is suitable to run the agent as a standalone process
  • embedded - This mode is suitable when the agent needs to be run close to another process or application
Available options:
standard,
embedded
Example:

"standard"

name
string

Unique name of the resource

Example:

"default"

platform
string
Example:

"amd64"

status
enum<string>

The status of the agent

  • CONNECTED - The agent is connected with the gateway
  • DISCONNECTED - The agent is disconnected from the gateway
Available options:
CONNECTED,
DISCONNECTED
Example:

"DISCONNECTED"

token
string

The token/key of the resource, this value is always empty for now

version
string
Example:

"1.23.10"