How do I generate an API token under a Service Account for Atlassian Compass?

As per the title. It’s not clear at all how to get an API token to call the Compass APIs with via a Service Account user.

Currently we have some automation that is using an individual person’s access token, but this is no good if they were to leave the company for example.

The Directory in Atlassian Admin allows me to create Service Users, which looks ideal, but when I get to generating an API token for the service user I can only select scopes relating to Jira or Confluence.

The documentation seems non-existent, and generally ‘all over the place’ when it comes to API tokens, users, service accounts, and Compass API use.

Hello @SeanD

If you read the documentation for the Compass REST API, you’d see it only supports Basic Auth, not OAuth, so you can’t use scoped API tokens with that API, which means you must use ‘traditional’ un-scoped API tokens associated with a ‘normal’ User Account.

As it so happens, I did read the REST API documentation, but it links through to creating tokens under a standard user’s profile. Not a service account.

I specifically don’t want to have a human user account hosting API tokens. What happens if I were to generate a classic API token for use with Compass automation, and then a few months later I leave organization, my account is disabled and all of a sudden automation starts breaking?

I guess what I’m trying to clarify here is - do I really only have the option to generate a classic token for Compass, or is there actually a way to do it using Atlassian Directory created ‘Service Accounts’?

When I look through the options for API tokens under Service Accounts, I can choose ‘classic’ or ‘granular’, and under ‘App’ I can choose Jira, Confluence, or Atlassian. Filtering down between these, all the actions are ‘scoped’ actions, and none have anything to do with Compass by their description.

It can be a little disorientating trying to navigate the maze of atlassian apps, legacy and new methods of doing things, and the documentation around all of it.

1 Like

I’m trying to post metrics to Compass from CI. This is where a service or project level API token/user rather than a specific user account would make sense.

If there’s no way to do that, then I won’t be able to really use Compass metrics.