Using API to establish links between project and account

We're using JIRA Server (on premises) with Tempo Accounts and Tempo Timesheets. I'm using the Tempo REST API to extract data about work logs, projects and accounts, to feed into some custom reports. 

I cannot figure out how to discover which account a project is linked to, through the REST API'S

I've reviewed as much of the API documentation as I can find, and the closest I can find is an undocumented 'link' endpoint which some Answers mention. But when I tried this on our installation it couldn't be found. Please can someone confirm the exact URL for this endpoint? Is this the only way in the API to establish this relationship? I'd be happy if I can derive the account either at the project level or the issue level, but at the moment it's not clear to me how to do either?

2 answers

Hi, in my organization I use REST API (JIRA and Tempo) to assign projects to accounts

And this method: works fine for me.

To discover which account the project is linked to I'm afraid you forced to get all links and on your side filter to ones you need.


Also, check this method:

It returns linked account by project id


Tempo API is not full and in beta stage.

Hi @Alex Suslin - thanks so much for your response. The good news is that I've tried out the "/rest/tempo-accounts/1/link/picker/" endpoint that's mentioned in the last URL you sent me, and I'm getting a JSON response, however I'm struggling to understand and interpret that response.

I get a series of 19 objects back in the JSON, looking very much like this example below:

    "name":"An example project name",

The only thing which varies between these objects is the 'scope' number and the 'name' string. It looks like these objects are a list of projects, but all of the accountId's are set to '0'. 

We have 7 Accounts defined in our system, of which 3 accounts have projects linked to them. There are 19 projects in our installation, so that would seem to confirm that the 19 JSON objects each represent a project, but I'm wondering if there's something more I need to do to ensure the Account Id's are populated in this API result?

I agree, that's weird. However you have scopeType: Project and that mean that scope field (nnnnn in your example) contains id of a linked project.

And once you know project id you can call:

link/project/projectId/ just change projectId to your actual number project id and tempo will return you JSON with key and filled accountid

probably there is a bug in tempo api, that's why accountId is always 0

I'm going to raise the AccountId = 0 thing as a bug with Tempo to see if it's a known issue. 

For the record, I'm using

  • JIRA version 7.1.9 Build 71013
  • Tempo Accounts 3.0.2
  • Tempo Timesheets 8.1.2

yep, share please a link here I will vote for sure.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Feb 07, 2019 in Marketplace Apps

A Timeless Love Story

It started as any story starts, on a normal, rainy day.   Admin meets App, and her name was Klok2, and like any first relationship we were both trying to make it work but neither one knew what...

466 views 8 27
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you