Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to create tempo worklog entry using request to API using JS or Postman?

Jan Lubiejewski
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 15, 2023

So the URL that appear when I open our tempoo on Jira to log work hours is:
https://XXX.atlassian.net/

When I look up:
https://www.tempo.io/server-api-
documentation/timesheets#tag/Worklogs/operation/createWorklog

It says I should use the following URL:
https://XXX.atlassian.net/rest/tempo-timesheets/4/worklogs/

But when I do that I get an response 404 not found.

So I've tried to use the URL that appears in the Browser Console under Network tab when I log the hour manually on:

https://XXX.atlassian.net/plugins/servlet/ac/io.tempo.jira/tempo-app#!/my-work/week?type=TIME

and use the exact same JSON that is in payload.

https://app.tempo.io/rest/tempo-timesheets/4/worklogs/

JSON:

{
  "attributes": {},
  "billableSeconds"3600,
  "comment""Testing: Writing Jira work log",
  "originTaskId""KF-5322",
  "remainingEstimate"0,
  "started""2023-03-16",
  "timeSpentSeconds"3600,
  "workerId"XYZ"
}

But then I get response 401 unautorhized, even though I provide the API Token generated under:
https://id.atlassian.com/manage-profile/security/api-tokens

And input it in the Postman as Bearer Token/API Key/Basic Auth (where I give my user-email as login and Api Token as password) and every time I get 401 unauthorized.

So I don't get it how I suppose to do that. What I want to achieve is to send and HTTP Post Request to log an given hours for given tasks on given day, based on some information given in JSON.


1 answer

0 votes
Tempo Support
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.
March 15, 2023

Hello Jan,

For API inquiry we invite you to join our developer community here:
https://www.tempo.io/developers

You can also create an support ticket via:

https://tempo-io.atlassian.net/servicedesk/customer/portal/6

Best Regards,

Steven

Tempo Support Team

Manoj Gnanaseelan August 22, 2023

@Jan Lubiejewski Did you manage to submit ticket and get response on this issue?

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events