Since API tokens have a maximum lifetime of 365 days, we’d like to incorporate token rotation into our credential-rotation process and renew tokens before they expire.
Is there an API available to rotate these API tokens programmatically?
Additionally, for reporting and monitoring purposes, is there an API or other method to retrieve a token’s expiration date? Tokens may be created by different users, including service accounts, and we may not know their creation dates, making it difficult to determine when they will expire.
Hello @Victor La
List/Read API Tokens Definitely so Retrieve Expiration date should be doable.
curl --request GET \ --url 'https://api.atlassian.com/admin/api-access/v1/orgs/{orgId}/api-tokens' \
Rotate - I don´t think so at the moment.
Best,
Arek🤠
@Arkadiusz Wroblewski, thank you for getting back to me! I have a follow up question.
Based on the documentation, it looks like this endpoint requires an organization-level API key rather than an API token? I assume there isn't a way with the API token?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Victor La
In this case "key" and "token" are essentially the same thing. The difference is that the process needs Organization Admin level access to see all the API token names and expiration dates across all accounts in the Organization. The only way to get a "token" that has Organization Admin level access is to generate it from the Admin Hub > Organization Settings > API Keys. That can be done only by an Organization Admin.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.