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

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

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

Tempo Timesheets REST API invalid user error

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

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

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}"
}
}
}

Hi Gleb,

have you checked how the payload looks like in runtime? 

BR

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"
}
}
}

Hi Gleb,

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

username_userkey.jpg

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Jira Service Management

Why upgrade to Jira Service Management Premium?

We often have questions from folks using Jira Service Management about the benefits to using Premium. Check out this video to learn how you can unlock even more value in our Premium plan.  &nb...

165 views 0 4
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