메인 콘텐츠로 건너뛰기
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
}

쿼리 매개변수

agent_id
string
에이전트 ID로 필터링합니다.
page_num
integer
기본값:"1"
페이지 번호.
page_size
integer
기본값:"20"
페이지당 항목 수. 최대값: 100.

예시

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

인증

X-API-Key
string
header
필수

API key authentication. Keys are prefixed with awx_.

쿼리 매개변수

page_num
integer
기본값:1

Page number (1-indexed).

필수 범위: x >= 1
page_size
integer
기본값:20

Number of items per page.

필수 범위: 1 <= x <= 100
agent_id
string

Filter by agent ID.

응답

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.