Return the API token policy of the current organization as it applies to the caller: the lifetime the console offers for a new token, the longest lifetime a token or a replaced secret may have (separately for tokens that may make security changes), whether a new token must name the networks it is accepted from, after how many days without use a token is disabled (0 means never), and whether the longest lifetime also applies to tokens issued before it was set. Every member can read it. The installation defaults are 30, 90, 7 and 30 days. Administrators change the values on PUT /organizations/{id}/policy.
Returns effective lifetime, idle-disable and allowed_networks rules. API tokens need allow_token_management.
Responses
OK
APITokenPolicyResponse · 6 fields
Lifetime the console offers for a new token.
Longest lifetime of a new token or a replaced secret.
Longest lifetime of a token issued with allow_security_changes. Never more than max_lifetime_days.
A new token must name the networks it is accepted from.
Days without use after which the periodic check disables a token. 0 turns the check off.
The longest lifetime also applies to tokens issued before it was set.
Unauthorized: no console session or API token
Forbidden: the caller is not a member of the organization
Common errors: 429 504. They mean the same for every operation, see Errors.