Hello ,
I am trying to create the worklog in tempo using the API. I followed this tempo documentation
https://apidocs.tempo.io/#tag/Worklogs/operation/createWorklog. As per the documentation it say issueId is an Integer but in our project (JIRA Number) is an Alpha numeric( Example: ABC-1234). So when i run the post command using python i am getting the 400 response. How can i resolve this issue ?
Base url for request: 'https://api.tempo.io/4/worklogs'
payload = {
"authorAccountId": "123456789",
"billableSeconds": 3600,
"description": 'TEST',
"remainingEstimateSeconds": 120,
"startDate": '2024-06-26',
"startTime": "08:00:00",
"timeSpentSeconds": 3600
}
Hi @Praveen
As mentioned in the REST API documentation you are referring to, the issueId is required. This id is always an Integer and should not be confused with the Issue key (which can be alpa numeric).
The Issue Id can be found by making a REST Call to JIRA
GET /rest/api/3/issue/{issueIdOrKey}
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issues/#api-rest-api-3-issue-issueidorkey-get
or by creating an XML export of the issue (click the "..." at the top of the right sidebar (Action) and select Export XML. In the xml file, you should see an entry similar to
<key id="20042">ABC-1234</key>
and the 20042 is the issue id you need for the Tempo REST call.
Best regards,
Susanne
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.