PolicyService
List API Key Policies
List API key policy templates available to the caller.
Request
curl --request GET \ \ --url 'https://api.testnet.polyester.com/v1/auth/policies/api-keys?keyId=ak_1a3c6de8153d5a5b04cd2a6529779542' \ --header 'Accept: */*' \ --header 'X-API-KEY-ID: YOUR_API_KEY_ID' \ --header 'X-API-TIMESTAMP: YOUR_API_TIMESTAMP' \ --header 'X-API-SIGNATURE: YOUR_API_SIGNATURE'
Responses
{
"policies": [
{
"actions": [
"TRADE_SPOT"
],
"createdAt": "2025-01-01T00:00:00Z",
"description": "Allow market and account data reads.",
"id": "3bWwpxoPpm",
"isTemplate": false,
"name": "Read-Only Analytics",
"revision": "1",
"sourceTemplateId": "2w1GaSoskt",
"spotMarketScope": "ALL",
"spotMarkets": [
{
"symbolId": 1
}
],
"updatedAt": "2025-01-01T00:00:00Z"
}
]
}Optional API key context for delegated administration. When omitted, only policies owned by the caller's root account are returned.
Policy identifier (opaque ID).
3bWwpxoPpmHuman-readable policy name.
Read-Only AnalyticsOptional policy description for dashboards and audits.
Allow market and account data reads.Stable numeric pair ID.
1High-level actions enabled for this API key. Up to 64 unique explicit actions may be returned.
["TRADE_SPOT"]Market-level scope for spot markets. When ALL, spot_markets is returned for display only and is not enforced.
ALLWhen true, this policy is intended to be reused as a template across multiple API keys. When false, it represents a single-key instance.
falseOptional source template this policy was copied from (opaque ID). This is audit metadata only and does not imply live linkage.
2w1GaSosktCreation time in UTC.
2025-01-01T00:00:00ZLast update time in UTC.
2025-01-01T00:00:00ZMonotonic resource revision used for conditional updates.
1| Key | Status | Error | When |
|---|---|---|---|
| unauthenticated | 401 | Unauthenticated | Authentication required. |
| permission-denied | 403 | Permission Denied | Permission denied. |
| invalid-argument | 400 | Invalid Argument | Invalid argument. |
| not-found | 404 | Not Found | Not found. |
| unavailable | 503 | Unavailable | Service unavailable. |