Skip to Content
Xeonr Developer Docs

Set API Key Policy

POST
/xeonr.auth.api.v1.ApiKeysService/SetApiKeyPolicy

Sets the calling application's key limits. A zero field restores the platform default; max_lifetime_days -1 sets no lifetime cap. Existing keys are not touched.

Service accounts only.

Required scopes: auth:api-keys:manage

Authorization

AuthorizationBearer <token>

JWT access token obtained via OAuth2 flow or service account

In: header

Header Parameters

Connect-Protocol-Version?number

Define the version of the Connect protocol

Connect-Timeout-Ms?number

Define the timeout, in ms

Request Body

application/json

policy*

Per-application limits. A zero field means the platform default. max_lifetime_days also takes -1: no lifetime cap for this application, whatever the platform default (AUTH-443).

[key: string]?never

Response Body

application/json

application/json

curl -X POST "https://auth.xeonr.io/xeonr.auth.api.v1.ApiKeysService/SetApiKeyPolicy" \  -H "Connect-Protocol-Version: 1" \  -H "Connect-Timeout-Ms: 1000" \  -H "Content-Type: application/json" \  -d '{    "policy": {}  }'
{
  "policy": {
    "maxBindingsPerKey": 0,
    "maxLiveKeysPerOwner": 0,
    "maxLifetimeDays": -1,
    "requireExpiry": true
  },
  "effective": {
    "maxBindingsPerKey": 0,
    "maxLiveKeysPerOwner": 0,
    "maxLifetimeDays": -1,
    "requireExpiry": true
  }
}