Hi,
I am using REST api to pull the worklog IDs. I have this endpoint to get the updated worklog Ids but i want to pull IDs for only those work log which got updated within last 24 hrs. I don't know how to pass date parameters. Can anyone help me out in this ?
I did this to get updated worklogs
but i want to pass date parameter to get the ids for last 24 hrs.
Hi @aagnihotri
Try the following:
https://koxaras.atlassian.net/rest/api/3/worklog/updated?expand=values&since=1672713311000
You have to replace the last value 1672713311000 to your desired timestamp. In order to find this timestamp use this link https://www.epochconverter.com/ or a similar converter.
Let me know if you got this thing working!
Thanks @Alex Koxaras -Relational- for the reply. From the above snap it seems that if i want to pull the updated work logs since last 24 hours then i have to pass the yesterday time and date in millisecond in since parameter. My time zone is India means UTC+5:30 so if i want to pull the data since yesterday then i can pass 1674671400000 but this would be static . Is there any way to pass the value to since like Today's time -1 to keep it dynamic all time ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Alex Koxaras -Relational- No worries . I will search about that and when i get a solution then i will post that solution in comment. Thanks for your help :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @aagnihotri
You would need to write a script that would calculate the start datetime of the last month, transform it into Unix timestamp format and pass it as a parameter to your query. Should be doable in every environment, .NET comes to mind as a possible solution.
Sadly I'm not skilled in these things to write a script for you, but I hope I managed to point you in the right direction.
Cheers
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.