Forums

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

PostPlan with Rest API Tempo Planner

sjvisschers October 13, 2020

I'm trying to post a plan via the Rest API Tempo Planner. I use the createPlan (postPlan) endpoint, but I continuously get a 'VALIDATION_FAILED' error.

I tested the authentication header I use with other API endpoints (such as getAllPlans) and there it works.

As request body I use the following. As assigneeKey I use the JIRA username, is this correct?

 {  "assigneeKey": "firstname.lastname",  "description": "Working hard on this issue",  "start": "2020-11-04",  "startTime": "09:00",  "end": "2020-11-04",  "day": "2020-11-04",  "planItemType": "ISSUE",  "planItemId": "4401",  "secondsPerDay": 3600,  "includeNonWorkingDays": false,  "partialUpdate": true}

 What can I check to get this working?

2 answers

1 accepted

0 votes
Answer accepted
Alexander Eck [Tempo]
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.
October 13, 2020

Hi,

as you already noticed the Tempo endpoint only accepts the userkey and not the username. You get the matching userkey from the username by calling the Jira REST API.

username_userkey.jpg

sjvisschers October 13, 2020

Thanks for your reply. It helped me a lot.

Like Alexander Eck [Tempo] likes this
0 votes
sjvisschers October 13, 2020

It seems that Tempo Planner API uses a different key to identify the Jira User. 
Jira and the Tempo Timesheet API use the field "key" to identify the User.

Tempo Planner API uses the field "Userkey" to identify the User.
In most cases this will be the same, but in some cases it seems to be a historical value.

I have filed a bugreport with Tempo. Hopefully the will changed it soon.

In the meanwhile, does anyone know how to get the "userkey" from JIRA?

Suggest an answer

Log in or Sign up to answer