Tempo API: worklogs POST failing with 'User is invalid' (GET is OK)

I'm trying to create a worklog via the Tempo 'worklogs' API, without success.

curl -D- -u myuser:mupassword -X POST -d @worklog.post -H "Content-Type: application/json" 'https://mydomain.atlassian.net/rest/tempo-timesheets/3/worklogs/'

 This is my JSON in the 'worklog.post' file:

{ "issue": 
    "comment":"This is a comment",

It fails with 

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

I don't believe it's an authentication problem because I can make a GET request without any problem.

I'm under the impression that this is the right documentation, but maybe I'm wrong.

  • How do I define a "worker" that might be valid?
  • How do I define a "startDate", and how is it different from "dateStarted"?

It's all a bit of a mystery!

Thanks heaps.

PS: adding ?tempoApiToken to the URL makes no difference

0 answers

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Bridget Sauer
Published Apr 10, 2018 in Marketplace Apps

Learn about how Stefan K. built one of the *first ever* Marketplace apps

In this post you will discover more about the evolution of K15t software, some big topics they're currently focusing on in the app space, and a rare (not not funny!) photo of founders Mike Cannon-Bro...

12,644 views 11 24
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you