JetBrains Account API

With the JetBrains Account API, you can automatically manage licenses and retrieve license usage data from your JetBrains Account.

The API methods allow you to get license info, assign or revoke licenses, and transfer them between teams. Your JetBrains Account role determines your access level to the API methods. For more information, check out the API reference.

Roles

There are three access levels for the API, which reflect the roles you may be assigned in your organization. 

  • Organization administrators can enable and disable the API, generate and regenerate tokens for themselves, and revoke access tokens from any users in the organization, including other organization administrators.
  • Team administrators can generate, regenerate, and remove access tokens for anyone in their team, including any other administrators of this team.
  • Viewers and Primary contacts can generate, regenerate, and remove access tokens for themselves. Viewer and Primary contact access tokens allow read-only access to the API.

How to enable the API

To enable the API, follow these steps. 

  1. Log in to your JetBrains Account with organization administrator credentials.
    Team administrators can't enable or disable the API.
  2. In the menu on the left, click your organization's name and then click Administration.
  3. Click Enable API.
    mceclip3.png
    This will make the API available to all organization and team administrators, as well as viewers and primary contacts. All users with assigned roles will be able to generate tokens.

How to disable the API

To disable the API, follow steps 1 and 2 as above, and then click Disable API.

mceclip2.png

This button disables the API for all administrators, viewers, and primary contacts.

How to access the API methods

To access the methods, you need two parameters. 

1. Your customer code for the X-Customer-Code parameter

The customer code is a unique Organization ID. To find your customer code, go to your JetBrains Account and look for the number next to your organization's name.

find-profile-id.png

 

Pass this value to the X-Customer-Code parameter.

 

2. Your access token for the X-Api-Key parameter

To generate the access token:

  1. Go to your JetBrains Account. 
  2. In the menu on the left, click your organization's or team's name and then click Administration.
  3. Click Generate Token.
    generate-token-screen.png
  4. The dialog that pops up will show you the token. For security reasons, you'll only see it once. Save it in a secure location before closing the dialog. Don't share your token with anyone else.
    mceclip0.png
    If you lose your token, you'll need to generate a new one. Generating a new token will invalidate the previous one.

Pass the token you obtained to the X-Api-Key parameter.

Token lifetime

If you disable and then enable the API, your access token will remain valid unless you manually generate a new one. 

Each user, even if assigned multiple roles, has exactly one token. The token remains the same as long as the user keeps at least one role. If the user loses all their roles, their access token is automatically revoked.

14 out of 28 found this helpful

Have more questions?

Submit a request