I am trying to write a simple script that posts worklogs for users based at data in another system. So we have an app that I read from each morning. Each record pertains to a user so I want to post a worklog item for those users daily. I'm using the API and a python script. Following the examples, I have it posting for me, but I can't get it to post for others. The documentation says it can, but I can't seem to find the right structure for the payload
payload = json.dumps( {
"timeSpentSeconds": 10000,
"author": {"name":"John Smith"},
"comment": {
"type": "doc",
"version": 1,
"content": [
{
"type": "paragraph",
"content": [
{
"text": "I did no work for this.",
"type": "text"
}
]
}
]
},
"started": "2022-04-22T18:34:00.000+0000"
} )
No matter what format I use for author name it ignores the element and posts as me. What am I doing wrong?