Get rate and currency of a worklog via RESTful API

Niklas Erdmann September 13, 2017

Hi community,

I tried to get the rate of my JIRA worklogs with a python script. I have the Tempo Timesheet plugin with API for base, timesheets, accounts and teams. Everything is up to date. This is my prefered process:

1. Get worklogs

/rest/api/latest/worklogs?[params]

2. Get account key of worklog over the issue

/rest/api/latest/issue/[issue_key]

3. Get account data

/rest/tempo-accounts/1/account/key/[account_key]

4. Get member role

/rest/tempo-teams/2/team/1/member

(loop beans and search for member of the worklog)

5. Now I have the account key and the member role id. Which API call helps me to get the related rate and currency?

In the docs is written, that the call

/rest/tempo-accounts/1/account/key/[account_key]

should response the ratetable id:

https://tempo.io/doc/accounts/api/rest/latest/#1463521625

 

With this information, I could extract everything from

/rest/tempo-accounts/1/ratetable/global/

In my case, this doens't work. There is no ratetable entry in the account response. Could this be a permission issue? Does anyone of you know a smarter way to get the rate and currency of a worklog?

Thank you,
Niklas

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events