Chuyển đến nội dung chính
GET
/
api
/
v1
/
policies
List Policies
curl --request GET \
  --url https://api.agentwallex.com/api/v1/policies \
  --header 'X-API-Key: <api-key>'
{
  "data": [
    {
      "id": "<string>",
      "agent_id": "<string>",
      "type": "spending_limit",
      "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
}

Tham số truy vấn

agent_id
string
Lọc theo ID agent.
page_num
integer
mặc định:"1"
Số trang.
page_size
integer
mặc định:"20"
Số mục mỗi trang. Tối đa: 100.

Ví dụ

curl -X GET "https://api.agentwallex.com/api/v1/policies?agent_id=agent_abc123" \
  -H "X-API-Key: awx_your_api_key"

Ủy quyền

X-API-Key
string
header
bắt buộc

API key authentication. Keys are prefixed with awx_.

Tham số truy vấn

page_num
integer
mặc định:1

Page number (1-indexed).

Phạm vi bắt buộc: x >= 1
page_size
integer
mặc định:20

Number of items per page.

Phạm vi bắt buộc: 1 <= x <= 100
agent_id
string

Filter by agent ID.

Phản hồi

Paginated list of policies.

Standard paginated response wrapper.

data
object[]

Array of resource objects.

total
integer

Total number of items matching the query.

has_more
boolean

Whether more pages are available.