Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to get the last worklog on a ticket using REST API

FMassaro March 6, 2019

Hi everyone,

I am trying to get worklog entries from Jira REST API for a specific, at the moment I am using the rest/api/latest/issue/{{issue__key}}/worklog method, but if I still get multiple entries, whereas I would like to get only the most recent one.

Is there a filter I can appli to the GET to only get the most recent one? Should I use a different method?

Is there any way to get the start time of the time entry?

1 answer

1 vote
Earl McCutcheon
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 7, 2019

Hi Francesco,

You would need to script something to pull out the work log ID's, but once you get them you can call the individual ID in the query with the format:

GET rest/api/latest/issue/{{issue__key}}/worklog/{{Worklog_id}}

The worklog ID can be pulled from the URL in the <"worklogs": [{"self": "self"> section of the rest/api/latest/issue/{{issue__key}}/worklog/ output per issue.

Regards,
Earl

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, loom, loom for training, loom for teaching, video training, async learning, online education, screen recording, loom tutorials, loom use cases, atlassian learning, team training tools, instructional video, virtual training tools

🛗 Elevate Your Training and Enablement with Loom

Join us June 26, 11am PT for a webinar with Atlassian Champion Robert Hean & Loom’s Brittany Soinski. Hear tips, stories, and get your burning questions answered. Learn how Loom makes training and enablement easier. Don’t miss it!

Register today
AUG Leaders

Atlassian Community Events