Tempo API Documentation is Extra confusing

Zoltán Rak March 25, 2024

Hi All,

Can somebody please lighten me up what is the difference between

https://apidocs.tempo.io 

https://www.tempo.io/server-api-documentation

I understand the first one is the equivalent for the core functionalities, however there is as well a core sub page on the second link.

  1. In a nutshell my problem is that we would like to implement an automatic day-off registration tool with tempo and for that we need the tempo timesheets api on the second link (to log time automatically for multiple users) however that seems not to work with the API integration token which is working well for the rest api documented on the first link.
  2. The second link as well it seems that the json examples for the api responses are slightly outdated.
  3. Authorisation also says for the second link endpoints basicAuth but that is not true, if you just steal the Bearer token from a normal web browser session it works, but if you try to use your API integration token is is producing an http 401.

So question is, how really the second (third) link endpoints correlate to the first officially linked documentation and whether and how you can use API integration token. Or do you need maybe to implement an oauth flow to retrieve a bearer like that with an application so that might be the problem and a simple generation of integration api token is not enough?

Thanks, Best

Zoltan

1 answer

1 accepted

0 votes
Answer accepted
Susanne March 25, 2024

Hi @Zoltán Rak

Only the first link you provided is for the Cloud version.
The other two links are for the Server/ Datacenter version and can not be used on Cloud. 

Best regards
Susanne

Zoltán Rak March 25, 2024

Hi Susanne,

Thanks a lot for the quick answer, but still I have a big concern, that our main use case with this synchro app and its technical user is to be able to log time for others as we are synching their official leave times and we were only be able to identify for this endpoint

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

the ability to create a worklog "on behalf of" a specified user id with the "worker" param.

I really hope you are not saying that in Cloud version there is no such option to create worklogs on behalf on anohter user, or how it is possible then through the browser?

Thanks, Best,

Zoltan

 

Susanne March 25, 2024

Hi @Zoltán Rak 

To create worklogs for other users, you need to have the permission to do this. 

This permission can either be given on team level (Manage Worklogs, https://help.tempo.io/timesheets/latest/tempo-team-permissions) or on Project level (Log work for others, https://help.tempo.io/timesheets/latest/project-permissions). 

It is then possible to select other users in the Log Time dialog (in the User field) and create worklogs for others via REST API.

The API to use is 
POST https://api.tempo.io/4/worklogs (https://apidocs.tempo.io/#tag/Worklogs/operation/createWorklog)


An example how the request body can look like

{
     "issueId": "12588",
     "timeSpentSeconds": 3600,
     "billableSeconds": 5200,
     "startDate": "2023-09-15",
     "startTime": "10:06:00",
     "description": "Creating a worklog via REST API",
     "authorAccountId": "557058:1878e103-4b49-40f9-bd1b-12345678908",
     "remainingEstimateSeconds": 18800,
     "attributes": [
    {
            "key": "_AccountWorkAttribute_",
            "value": "100402"
     }
  ]
}

Best regards, 
Susanne 
Zoltán Rak March 25, 2024

Great 👍🏻 thanks a lot Susanne!

Suggest an answer

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

Atlassian Community Events