List Policies
curl --request GET \
--url https://api.agentwallex.com/api/v1/policies \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.agentwallex.com/api/v1/policies"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.agentwallex.com/api/v1/policies', 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.agentwallex.com/api/v1/policies",
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-Key: <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.agentwallex.com/api/v1/policies"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<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.agentwallex.com/api/v1/policies")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.agentwallex.com/api/v1/policies")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "<string>",
"agent_id": "<string>",
"rules": {
"max_transaction_amount": "<string>",
"daily_limit": "<string>",
"monthly_limit": "<string>",
"allowed_addresses": [
"<string>"
],
"blocked_addresses": [
"<string>"
],
"allowed_tokens": [
"<string>"
],
"max_count": 123,
"window_seconds": 123,
"timezone": "<string>",
"allowed_hours": {
"start": 11,
"end": 11
},
"allowed_days": [
4
],
"threshold": "<string>",
"timeout_seconds": 123,
"approvers": [
"jsmith@example.com"
]
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"total": 123,
"has_more": true
}{
"code": "invalid_request",
"type": "invalid_request_error",
"message": "The request body is missing required fields."
}{
"code": "authentication_failed",
"type": "authentication_error",
"message": "The provided API key is invalid or expired."
}{
"code": "insufficient_permissions",
"type": "authorization_error",
"message": "You do not have permission to perform this action."
}{
"code": "rate_limit_exceeded",
"type": "rate_limit_error",
"message": "Too many requests. Please retry after a short delay."
}{
"code": "server_error",
"type": "internal_error",
"message": "An unexpected error occurred. Please try again later."
}Políticas
Listar políticas
Obtenga todas las políticas, con filtro opcional por agente.
GET
/
api
/
v1
/
policies
List Policies
curl --request GET \
--url https://api.agentwallex.com/api/v1/policies \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.agentwallex.com/api/v1/policies"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.agentwallex.com/api/v1/policies', 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.agentwallex.com/api/v1/policies",
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-Key: <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.agentwallex.com/api/v1/policies"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<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.agentwallex.com/api/v1/policies")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.agentwallex.com/api/v1/policies")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "<string>",
"agent_id": "<string>",
"rules": {
"max_transaction_amount": "<string>",
"daily_limit": "<string>",
"monthly_limit": "<string>",
"allowed_addresses": [
"<string>"
],
"blocked_addresses": [
"<string>"
],
"allowed_tokens": [
"<string>"
],
"max_count": 123,
"window_seconds": 123,
"timezone": "<string>",
"allowed_hours": {
"start": 11,
"end": 11
},
"allowed_days": [
4
],
"threshold": "<string>",
"timeout_seconds": 123,
"approvers": [
"jsmith@example.com"
]
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"total": 123,
"has_more": true
}{
"code": "invalid_request",
"type": "invalid_request_error",
"message": "The request body is missing required fields."
}{
"code": "authentication_failed",
"type": "authentication_error",
"message": "The provided API key is invalid or expired."
}{
"code": "insufficient_permissions",
"type": "authorization_error",
"message": "You do not have permission to perform this action."
}{
"code": "rate_limit_exceeded",
"type": "rate_limit_error",
"message": "Too many requests. Please retry after a short delay."
}{
"code": "server_error",
"type": "internal_error",
"message": "An unexpected error occurred. Please try again later."
}Parámetros de consulta
string
Filtrar por ID de agente.
integer
predeterminado:"1"
Número de página.
integer
predeterminado:"20"
Elementos por página. Máximo: 100.
Ejemplo
curl -X GET "https://api.agentwallex.com/api/v1/policies?agent_id=agent_abc123" \
-H "X-API-Key: awx_your_api_key"
Autorizaciones
ApiKeyAuthBearerAuth
API key authentication. Keys are prefixed with awx_.
Parámetros de consulta
Page number (1-indexed).
Rango requerido:
x >= 1Number of items per page.
Rango requerido:
1 <= x <= 100Filter by agent ID.
⌘I