Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
Level
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Tempo Timesheets REST API -

Trying to use the Tempo Timesheets REST API to pull info using Google Apps Script. Getting a 404 error for this rather simple code.

var baseURL = "https://xxx.atlassian.net/rest/tempo-timesheets/4/worklogs?dateFrom=2020-01-01&dateTo=2020-02-02";

var username = "xxx@xxxyyy.com";
var password = "zzzzzzzzzzzzzzzzz";
var encCred = Utilities.base64Encode(username + ":" + password);

var options = {
contentType: "application/json",
headers: {"Authorization":"Basic "+ encCred},
muteHttpExceptions : true
};

var response = UrlFetchApp.fetch(baseURL, options);
Logger.log(response);

Looking at this everything seems alright. https://www.tempo.io/server-api-documentation/timesheets#operation/searchWorklogs

 

Any help would be much appreciated.

 

1 answer

1 accepted

0 votes
Answer accepted
Andy Heinzer Atlassian Team Mar 20, 2020

Hi,

I understand you're using a Jira Cloud site, and want to be able to get some Tempo worklog via the REST API.  However the documentation link you included is actually for the Server version of Tempo.  I am afraid that the authorization needed in Cloud is a bit different. 

Check out https://tempo-io.github.io/tempo-api-docs/ it has some details on how to authorize there.

You can use the REST API to interact with the data your permissions give you access to. To do so, you will need to generate a Tempo OAuth 2.0 token.

Please note that an OAuth 2 token is not the same kind of token as Atlassian Cloud API Tokens.  However there are steps in the Tempo guide you can follow to be able to make such REST API requests of that data. 

I hope this helps.

Andy

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Marketplace Apps & Integrations

New Cloud Apps Roundup - Spring 2021

Atlassian's marketplace partners have had a very productive start to 2021! Since our last roundup, our developer community has added over 160 new cloud apps to the Atlassian Marketplace to help you...

182 views 3 19
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you