consumers
List consumers
Returns a paginated list of consumers in a gateway.
GET
/
v1
/
gateways
/
{gateway_id}
/
consumers
List consumers
curl --request GET \
--url https://agentgateway-admin.dev.neuraltrust.ai/v1/gateways/{gateway_id}/consumers \
--header 'Authorization: <api-key>'import requests
url = "https://agentgateway-admin.dev.neuraltrust.ai/v1/gateways/{gateway_id}/consumers"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://agentgateway-admin.dev.neuraltrust.ai/v1/gateways/{gateway_id}/consumers', 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://agentgateway-admin.dev.neuraltrust.ai/v1/gateways/{gateway_id}/consumers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <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://agentgateway-admin.dev.neuraltrust.ai/v1/gateways/{gateway_id}/consumers"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<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://agentgateway-admin.dev.neuraltrust.ai/v1/gateways/{gateway_id}/consumers")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://agentgateway-admin.dev.neuraltrust.ai/v1/gateways/{gateway_id}/consumers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"items": [
{
"active": true,
"auth_ids": [
"<string>"
],
"created_at": "<string>",
"fail_mode": "<string>",
"fallback": {
"budget": {
"max_attempts": 123,
"max_total_latency_ms": 123
},
"chain": [
"<string>"
],
"enabled": true,
"triggers": [
"<string>"
]
},
"gateway_id": "<string>",
"headers": {},
"id": "<string>",
"lb_config": {
"algorithm": "<string>",
"embedding_config": {
"auth": {
"api_key": "<string>",
"header_name": "<string>",
"header_value": "<string>",
"param_location": "<string>",
"param_name": "<string>",
"param_value": "<string>"
},
"model": "<string>",
"provider": "<string>"
},
"enabled": true,
"members": [
{
"models": [
"<string>"
],
"registry_id": "<string>"
}
],
"pool_alias": "<string>"
},
"model_policies": [
{
"allowed": [
"<string>"
],
"default": "<string>",
"registry_id": "<string>"
}
],
"name": "<string>",
"registry_ids": [
"<string>"
],
"registry_weights": [
{
"registry_id": "<string>",
"weight": 123
}
],
"role_ids": [
"<string>"
],
"routing_mode": "<string>",
"slug": "<string>",
"toolkit": [
{
"expose_as": "<string>",
"prompt": "<string>",
"registry_id": "<string>",
"resource": "<string>",
"tool": "<string>"
}
],
"type": "<string>",
"updated_at": "<string>"
}
],
"page": 123,
"size": 123,
"total": 123
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}⌘I
List consumers
curl --request GET \
--url https://agentgateway-admin.dev.neuraltrust.ai/v1/gateways/{gateway_id}/consumers \
--header 'Authorization: <api-key>'import requests
url = "https://agentgateway-admin.dev.neuraltrust.ai/v1/gateways/{gateway_id}/consumers"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://agentgateway-admin.dev.neuraltrust.ai/v1/gateways/{gateway_id}/consumers', 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://agentgateway-admin.dev.neuraltrust.ai/v1/gateways/{gateway_id}/consumers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <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://agentgateway-admin.dev.neuraltrust.ai/v1/gateways/{gateway_id}/consumers"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<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://agentgateway-admin.dev.neuraltrust.ai/v1/gateways/{gateway_id}/consumers")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://agentgateway-admin.dev.neuraltrust.ai/v1/gateways/{gateway_id}/consumers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"items": [
{
"active": true,
"auth_ids": [
"<string>"
],
"created_at": "<string>",
"fail_mode": "<string>",
"fallback": {
"budget": {
"max_attempts": 123,
"max_total_latency_ms": 123
},
"chain": [
"<string>"
],
"enabled": true,
"triggers": [
"<string>"
]
},
"gateway_id": "<string>",
"headers": {},
"id": "<string>",
"lb_config": {
"algorithm": "<string>",
"embedding_config": {
"auth": {
"api_key": "<string>",
"header_name": "<string>",
"header_value": "<string>",
"param_location": "<string>",
"param_name": "<string>",
"param_value": "<string>"
},
"model": "<string>",
"provider": "<string>"
},
"enabled": true,
"members": [
{
"models": [
"<string>"
],
"registry_id": "<string>"
}
],
"pool_alias": "<string>"
},
"model_policies": [
{
"allowed": [
"<string>"
],
"default": "<string>",
"registry_id": "<string>"
}
],
"name": "<string>",
"registry_ids": [
"<string>"
],
"registry_weights": [
{
"registry_id": "<string>",
"weight": 123
}
],
"role_ids": [
"<string>"
],
"routing_mode": "<string>",
"slug": "<string>",
"toolkit": [
{
"expose_as": "<string>",
"prompt": "<string>",
"registry_id": "<string>",
"resource": "<string>",
"tool": "<string>"
}
],
"type": "<string>",
"updated_at": "<string>"
}
],
"page": 123,
"size": 123,
"total": 123
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}