Hello-
Can anyone tell me if it's possible to query the API for all tasks updated in the last hour? My search will be a bit more specific, ie tasks within this portfolio and with projects with X attribute. But basically I want to look tasks updated in NOW-60 or something like that.
I am basically creating my own event notification by querying the system every 15 minutes or so and looking for changes. The reason I don't think I can use the even subscription is because I am monitoring a custom field for changes. Is that correct? Can I use the even subscription somehow?
Thanks, Mollie
Solved! Go to Solution.
Views
Replies
Total Likes
Hi @MollieSh,
Although I didn't see "h" (Hour; or Minute or Second for that matter) listed as being supported, from a quick test, running this snippet in my browser's Workfront tab's URL did appear to return only the Task that was updated within the past hour, so I invite you to try it, too:
https://yourdomain.my.workfront.com/attask/api/v15.0/task/search?lastUpdateDate=$$NOW-1h&lastUpdateDate_Mod=gt
That said, it doesn't appear to support decimals (e.g. $$NOW-0.25h), so "to the hour" might be the lowest level of granularity possible.
I look forward to hearing how you make out!
Regards,
Doug
TIP: if this solved your problem, I invite you to consider marking it as a Correct Answer to help others who might also find it of use
Hi @MollieSh,
Although I didn't see "h" (Hour; or Minute or Second for that matter) listed as being supported, from a quick test, running this snippet in my browser's Workfront tab's URL did appear to return only the Task that was updated within the past hour, so I invite you to try it, too:
https://yourdomain.my.workfront.com/attask/api/v15.0/task/search?lastUpdateDate=$$NOW-1h&lastUpdateDate_Mod=gt
That said, it doesn't appear to support decimals (e.g. $$NOW-0.25h), so "to the hour" might be the lowest level of granularity possible.
I look forward to hearing how you make out!
Regards,
Doug
TIP: if this solved your problem, I invite you to consider marking it as a Correct Answer to help others who might also find it of use
Awesome, that worked! Much appreciated. I think you may be correct about not being able to use minutes
Views
Replies
Total Likes
Hi,
using a capital M like
task/search?lastUpdateDate=$$NOW-1M&lastUpdateDate_Mod=gt&fields=lastUpdateDate
lets the whole thing break down to minutes.
Regards
Lars
Just wanted to say thank you for this post from 6 months ago. Really helped me figure out the same problem today in record time!! All hail Doug!!
Views
Replies
Total Likes
Thanks @MollieSh -- I'm glad it helped!
Also, as I looked this one up again to refresh my memory on what problem it solved, I noticed (and Liked) the follow up from @lgaertner who figured out that "M" is the magic character to use in order to check for updates within the last certain number of minutes, vs the "h" hours I'd mentioned -- thanks Lars!
Regards,
Doug
Views
Replies
Total Likes
Doug's answer is great, so I'll speak to just the event subscription piece.
You can create an event subscription for a value change on a custom field, but you have to make sure that tracking is enabled for that custom field in Setup > Interface > Update Feeds. Tracking is not available for calculated fields.
I'm sure you've seen this, but just in case here's a link to Event Subscription documentation:
https://experienceleague.adobe.com/docs/workfront/using/adobe-workfront-api/event-subscriptions/even...
Views
Replies
Total Likes
Views
Likes
Replies