How to retrieve an account by its key in Tempo Accounts REST API

dualed February 16, 2015

We are currently looking into implementing a more automated interface between our accounting system and Tempo.

The only thing I could find was retrieving all existing accounts through

GET https://<<JIRA>>/rest/tempo-accounts/1/account/

However, this adds unnecessary complexity and performance impact to what could (and should) have been a really simple API mapping.

1 answer

0 votes
Heiða Dóra Jónsdóttir
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 16, 2015

Hi Edward

It is not possible to retrieve an account by it's key in Tempo Accounts REST API. However, it is possible to retrieve an account by ID. Please see below:

GET https://<<JIRA>>/rest/tempo-accounts/1/account/{id}

To view the ID number of existing accounts please hover over account in the Accounts list. The ID number will be displayed at the end of the url in a pop up that appears to the bottom left of the screen.

Information on account REST API can be found at: https://tempoplugin.jira.com/wiki/display/JTMAC/Query+Existing+Account+Data

But please note that the REST API is a work in progress and is subject to changes. Product updates may cause significant changes in function without advance warning

JIRA documentation on REST API: https://developer.atlassian.com/jiradev/api-reference/jira-rest-apis

If you wish to retrieve by key please create a new feature request for this in our Atlassian JIRA (https://tempoplugin.jira.com/browse/JTMPO).

I hope this was helpful.

Best regards,

Heiða Dóra

Tempo Team

dualed February 16, 2015

Hello! How would I get the ID from inside a 3rd party application?

Anna February 25, 2015

Hi Edward, to access the REST service you have to be an authenticated user with Browse Account permission. So to retrieve the data from 3rd party application you could authenticate your user by using curl from the command line. With the curl you would send the user name and password, the JIRA documentation on REST API (https://developer.atlassian.com/jiradev/api-reference/jira-rest-apis) uses curl in their examples and you could look at that for reference. I hope this helped. Best regards, Anna Vigdís Tempo Team

dualed March 18, 2015

@Anna Hello Anna! No it did not answer my question. I know what a REST API is and how to authenticate against it. I want to know how to get to the internal ID of an Account which I need to retrieve the details of an Account, without iterating through the whole list of accounts.

Anna March 19, 2015

Hi Edward, right now there is no good way of doing that, but we have looked at your feature request https://tempoplugin.jira.com/browse/JTMAC-174# and this will be implemented soon for accounts. Best regards, Anna Vigdís Tempo Team

dualed March 19, 2015

@Anna Hello, thank you that is great to hear!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events