Which fields are essential when posting a worklog entry to JIRA?

POSTing worklog data to JIRA via the API results in 400 errors. What required fields should be included? For example:

{
  "note": "example entry",
  "startTime": "2020-01-01T12:00:00-0500",
  "duration": "60s"
}

hey, i found that besides note,startTime,duration, jira also needs timeSpentSeconds in many cases. rough experiments showed missing that field caused issues. so double-check your api version docs.

I encountered similar issues when working with worklog entries. My investigation revealed that getting the exact timestamp format correct was key. In my case, even though I was including the usual fields, I was failing to strictly conform to the ISO 8601 format for the start time. This subtle discrepancy led to repeated errors. I eventually discovered that validating both the structure and the precision of time fields, as well as strictly following the API documentation for date formats, resolved the problem. It is essential to ensure every detail aligns with what the API expects.

In my experience posting worklogs to JIRA, ensuring that all required fields match the API’s expectations is essential. I faced similar 400 errors until I realized that in addition to submitting note, startTime, and duration, the API expected a correctly formatted timeSpentSeconds. In my case, the timestamp format had to be strictly ISO 8601 compliant, and the duration needed explicit conversion. I recommend reviewing the API documentation carefully and testing with both string and integer representations, which ultimately resolved the errors.