Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

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

GetWorklog API call not working today April Fools Joke

We have the following code that has been working.   Today it has stopped.


Getting a 404 Not Found Error


Any help would be appreciated.   


 domainAddress = ""
    apiOptions = "&baseUrl="


timeSheetURL = domainAddress & "?dateFrom=" & Format(startDate, "yyyy-mm-dd") & "&dateTo=" & Format(midDate, "yyyy-mm-dd") & apiOptions
        Application.StatusBar = "Downloading Timesheet Data " & Format(startDate, "yyyy-mm-dd") & " To " & Format(midDate, "yyyy-mm-dd") & "..."
        xmlDoc.Load (timeSheetURL)

3 answers

1 accepted

0 votes
Answer accepted

This is how I ended up doing it. Looping through all the tempo entries saving the data I need from each row in an array, then doing a jira api search with all the tasks to get the account information which I store in a map. Converting the rest of the code after that was trivial.


$worklogs = array(); // All data from tempo worklog api
$accountDetails = array(); // Key = task, value = account information
$url = "" . $start . "&to=" . $end . "&limit=1000";
while (true){
$response = Unirest\Request::get($url,$headers);
if($response->code > 204){
print "ERROR: ";
print $url;
$tasklist = "";
foreach ($result as $row){
$task = $row->issue->key;
if(!isset($accountDetails[$task])) {
$accountDetails[$task] = "pending";
$tasklist .= "$task,";
$worklogs = saveRequiredFields($worklogs, $row);
// Now get account info from Jira
$tasklist = rtrim($tasklist, ','); // Remove final ','

$jurl = "";
Unirest\Request::auth($login, $apikey);

$startAt = 0;
while (true){
$custombody = str_replace("XXXXX", "$tasklist", $jbody);
$custombody = str_replace("STARTAT", "$startAt", $custombody);
$jresponse = Unirest\Request::post($jurl, $jheaders, str_replace("XXXXX", "$tasklist", $custombody));
$jresult = $jresponse->body;
if(sizeof($jresult->issues) == 0) break;
foreach ($jresult->issues as $row){
$fields = array();

// Save the account info I need in a map
$fields["project_name"] = $row->fields->project->name;
$fields["id"] = $row->fields->customfield_11810->id;
$fields["account_id"] = $row->fields->customfield_11810->id;
$fields["name"] = $row->fields->customfield_11810->properties->name;
$fields["project_key"] = $row->fields->project->key;
$fields["categoryname"] = $row->fields->customfield_11810->properties->category->name;
$fields["category"] = $row->fields->customfield_11810->properties->category->name;
$fields["category_code"] = $row->fields->customfield_11810->properties->category->key;
$accountDetails[$row->key] = $fields;


if(!isset($result->next)) break;
$url = $result->next;




function saveRequiredFields($worklogs, $result){
  $row = array();
$row["key"] = trim((string) $result->issue->key);
$row["displayName"] = trim((string) $result->author->displayName);
$row["full_name"] = trim((string) $result->author->displayName);
$row["accountId"] = $result->author->accountId;
$row["userAccountId"] = $result->author->accountId;
$row["startDate"] = $result->startDate;
$row["work_date"] = $result->startDate;
$row["hours"] = (float) ($result->timeSpentSeconds / 3600);


array_push($worklogs, $row);
return $worklogs;

Awesome Tim,

and thanks for sharing the code to the community. It is much appreciated!

Happy Easter and stay safe!

Hi Ken,

Today we decommissioned the Servlet API in order to align with Atlassian's security requirements for Cloud applications.  This change was originally announced early 2019, and we have done our best to communicate this to our customers with several announcements since then, as well as reaching out directly via email to our contacts.

I'm very sorry if this has caught you by surprise. Here is our lates announcement which includes links to documentation and knowledge base articles about how to transition to using the more secure REST API.

I recommend watching the Tempo Cloud announcement page to get notification when we make important changes to our cloud products.

Kind regards,

Hlynur Johnsen

Group Product Manager - Tempo for Jira 

I was also taken by surprise by this yesterday. And now to my dismay, it looks like the REST API can not provide the information that is essential to my reporting.


I HAVE to get the billing category and account code per worklog but it does not look like that is possible. This is a biiiig problem for me!


Please tell me there is a workaround



We are in the same boat.   Billing information associated to the Tempo time.  Not sure how to get it.


please refer to this article on the alternative REST endpoints to use instead.

Thanks and regards



I have read that article and still don't have a clear idea on how to get the billing and user data.

Hi Ken,

  1. The user properties are available from the Jira API .
  2. The account information is NOT returned from the worklog REST API. But there is an endpoint to get all worklogs tight to an account ({accountKey})

Hope that helps

Please confirm my understanding:


I have to retrieve the worklogs I want and then query the Jira API with each task from that list to get the account information?


Is that correct?

Suggest an answer

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

🤺 Atlympic Event: Partnerships

Hello Community!  Quick disclaimer: We are running a contest on Community (The Atlympics!) from July 23rd - August 8th of 2021. If you are interested in participating in this contest (prizes! ...

149 views 2 6
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