List of users with API tokens, creation date, last access date

we want to manage access to api tokens more carefully.
how can we list which users have API tokens, last rotation time, and access with those tokens?

  1. Hi David,

    There is currently no API to list users' API token details, however, I think we could add that. We can add the last generated dates for both account-specific and global tokens to the list of account users and a new endpoint to invalidate token for specified user. Is there anything else you need?

  2. that would be great!
    this will help our auditing process review

  3. any update?

  4. Sure, will deploy it by the end of this week. Thanks for checking on.

  5. Hi David,

    An update with new API for token expirations has been deployed.

    So, the items returned by https://ci.appveyor.com/api/account/{account}/users endpoint now include two additional (nullable) fields: accountApiTokenGenerated and userApiTokenGenerated which contain timestamps for account-specific (v1) and "global" user-specific (v2) API tokens respectively.

    Endpoints for invalidating expired tokens of users belonging to your account:

    DELETE /api/account/{account}/users/{id}/account-api-token
    DELETE /api/users/{id}/account-api-token
    
    DELETE /api/account/{account}/users/{id}/user-api-token
    DELETE /api/users/{id}/user-api-token
    

    Endpoints for invalidating expired tokens of collaborators joined to your account:

    DELETE /api/account/{account}/collaborators/{id}/account-api-token
    DELETE /api/collaborators/{id}/account-api-token
    

    Let me know if you have any questions.

  6. Feodor Fitsner closed this discussion on 01 Sep, 2021 09:03 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions