Get Agent by Name
curl --request GET \
--url https://{api-address}.org.machina.gg/agent/{name} \
--header 'x-api-token: <api-key>'import requests
url = "https://{api-address}.org.machina.gg/agent/{name}"
headers = {"x-api-token": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-token': '<api-key>'}};
fetch('https://{api-address}.org.machina.gg/agent/{name}', 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-address}.org.machina.gg/agent/{name}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-token: <api-key>"
],
]);
$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-address}.org.machina.gg/agent/{name}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-token", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{api-address}.org.machina.gg/agent/{name}")
.header("x-api-token", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{api-address}.org.machina.gg/agent/{name}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-token"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"_id": "67e09cb441dc71ef8db3992f",
"name": "my-new-agent",
"title": "My New Agent",
"description": "Your agent description",
"status": "inactive",
"context": {
"config-frequency": 0.04
},
"workflows": [
{
"name": "sync-nba-embeds",
"description": "sync-nba-embeds",
"inputs": {
"event_code": "$.get('event_code') or None"
},
"outputs": {
"sync-nba-embeds-status": "$.get('workflow-status', False)"
}
}
],
"created": "Sun, 23 Mar 2025 23:43:48 GMT",
"updated": "Mon, 24 Mar 2025 00:21:10 GMT",
"last_execution": "Mon, 24 Mar 2025 00:21:10 GMT",
"processing": false,
"scheduled": false
},
"status": true
}Agents
Get Agent by Name
Retrieve an agent by its unique name.
GET
/
agent
/
{name}
Get Agent by Name
curl --request GET \
--url https://{api-address}.org.machina.gg/agent/{name} \
--header 'x-api-token: <api-key>'import requests
url = "https://{api-address}.org.machina.gg/agent/{name}"
headers = {"x-api-token": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-token': '<api-key>'}};
fetch('https://{api-address}.org.machina.gg/agent/{name}', 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-address}.org.machina.gg/agent/{name}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-token: <api-key>"
],
]);
$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-address}.org.machina.gg/agent/{name}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-token", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{api-address}.org.machina.gg/agent/{name}")
.header("x-api-token", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{api-address}.org.machina.gg/agent/{name}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-token"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"_id": "67e09cb441dc71ef8db3992f",
"name": "my-new-agent",
"title": "My New Agent",
"description": "Your agent description",
"status": "inactive",
"context": {
"config-frequency": 0.04
},
"workflows": [
{
"name": "sync-nba-embeds",
"description": "sync-nba-embeds",
"inputs": {
"event_code": "$.get('event_code') or None"
},
"outputs": {
"sync-nba-embeds-status": "$.get('workflow-status', False)"
}
}
],
"created": "Sun, 23 Mar 2025 23:43:48 GMT",
"updated": "Mon, 24 Mar 2025 00:21:10 GMT",
"last_execution": "Mon, 24 Mar 2025 00:21:10 GMT",
"processing": false,
"scheduled": false
},
"status": true
}⌘I

