Forums

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

Tempo Timesheets REST API invalid user error

Gleb Kartashov
Contributor
October 16, 2020

Hi. REST API returns user invalid error with some users when creating worklog

  • What is a valid user ?
  • How do I check if a user is valid ?
  • How do I make a user valid?

{
"errors": {
"worker": "User is invalid"
},
"errorMessages": [],
"reasons": [
"VALIDATION_FAILED"
]
}

 

1 answer

0 votes
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 16, 2020

Hi Gleb,

can you confirm that the REST API call is working for other users? 

Can you please confirm which endpoint you are exactly using and how your payload looks like?

Thanks

Gleb Kartashov
Contributor
October 16, 2020

Endpoint is /rest/tempo-timesheets/4/worklogs

Request is

{
"worker": "${usr}",
"comment": "${comment}",
"started": "${startFormatted}",
"endDate": "${endFormatted}",
"timeSpentSeconds": "${duration}",
"originTaskId":"${issue}",
"includeNonWorkingDays":"false",
"attributes" : {
"Worktype" : {
"value" : "${workType}"
}
}
}
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 20, 2020

Hi Gleb,

have you checked how the payload looks like in runtime? 

BR

Gleb Kartashov
Contributor
October 20, 2020

Of course. Looks normal

{
"worker": "glebk",
"comment": "Automated Log Work",
"started": "2020-10-20",
"endDate": "2020-10-20",
"timeSpentSeconds": "189",
"originTaskId":"SD-137148",
"includeNonWorkingDays":"false",
"attributes" : {
"_Видработ_" : {
"value" : "test"
}
}
}
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 21, 2020

Hi Gleb,

have you confirmed the username/userkey against the Jira REST API?

username_userkey.jpg

Like # people like this
Adrian Fox
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!
July 1, 2022

I am facing this issue also. 

I can confirm the username/userkey REST call you show above is working correctly.

Also the results of rest/tempo-timesheets/4/worklogs/search do not seem to include my manually added worklogs,  even though I am only supplying from/to dates.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events