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
Community showcase
Posted Thursday in Marketplace Apps

You + one app + a desert island...

Hi all! My name is Miles and I work on the Marketplace team. We’re looking for better ways to recommend and suggest apps that are truly crowd favorites, so of course we wanted to poll the Community. ...

1,806 views 4 6
Join discussion

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