Expand my Community achievements bar.

Required Help for Workfront API

Avatar

Level 1
Hi Team, I'm writing a script which will pull all the tasks with a specific title which got closed in past one year. The API call is as follows, https://xxxxx.attask-ondemand.com/attask/api/task/search?fields=project:URL,assignedTo,actualComplet... site&name_Mod=contains&status=CPL I'm getting the following error : { " error ": { " class ": " java.lang.IllegalArgumentException " ," message ": " APIModel V2_0 does not support field actualCompletionDate=2017-01-01 (Task) " } } Could anyone help me how to fix this ? I have no idea where I'm going wrong. Thanks & Regards Karthik. K Karthik Kanthaswamy
Topics

Topics help categorize Community content and increase your ability to discover relevant content.

7 Replies

Avatar

Level 10
I would start first by not using the attask-ondemand url. "https://xxxxx.attask-ondemand.com/attask/api/task/search?fields=project:URL,assignedTo,actualCompletionDate=2017-01-01&actualCompletionDate_Range=2018-01-01&actualCompletionDate_Mod=between,name&name=Remove">https://xxxxx.my.workfront.com/attask/api/task/search?name=Remove%20site&name_Mod=contains&status=CP... Polly Co

Avatar

Level 10
Hi Karthik, In your example, I think the comma after URL should be an & to separate the fields from the critera "https://xxxxx.attask-ondemand.com/attask/api/task/search?fields=project:URL,assignedTo,actualCompletionDate=2017-01-01&actualCompletionDate_Range=2018-01-01&actualCompletionDate_Mod=between,name&name=Remove">https://xxxxx.attask-ondemand.com/attask/api/task/search?fields=project:URL,assignedTo,actualComplet... site&name_Mod=contains&status=CPL By convention, I learned to put my criteria first, and the "&fields=..." part at the end (since I've made the same mistake many, many times). Regards, Doug Doug Den Hoed - AtAppStore Got Skills? Lend a hand! https://community.workfront.com/participate/unanswered-threads

Avatar

Level 10
Agree with Doug regarding with conventions. When things don't seem to work with regards to API, try to get to the simplest criteria and see if it shows you some results eg https://yourinstance.my.workfront.com/attask/api/search?name=remove%20this&name_mod=contains then you add on to your criteria if you got results. Fields come after and a * would help you see other possible things you might want to work with. Polly Co

Avatar

Level 10
Is the API version an Issue (either now or soon)? APIModel V2_0 I thought I saw something about deprecating some older versions of the API. Vic Alejandro, PMP, CSM | IT Program Manager Denver Water | t: (303-628-7262) | c: (303-319-6473) "http://www.denverwater.org/"> http://www.denverwater.org INTEGRITY | VISION | PASSION | EXCELLENCE | RESPECT

Avatar

Level 10
No, the v2 should be able to look at task name and name mod as well as actualCompletionDate, I've tested on our end without adding any version. Polly Co

Avatar

Level 10
OK Cool. Thanks. Vic Alejandro, PMP, CSM | IT Program Manager Denver Water | t: (303-628-7262) | c: (303-319-6473) "http://www.denverwater.org/"> http://www.denverwater.org INTEGRITY | VISION | PASSION | EXCELLENCE | RESPECT

Avatar

Level 10
I happened to be reviewing my notes for the release and I took a note that states API Version 2 & 3 are being deprecated with the 18.2 release (sometime later this year). So unless something changed or I took poor notes, you may want to investigate further if you're using API version 2 or 3. Just wanted to give people a heads up. Vic Alejandro, PMP, CSM | IT Program Manager Denver Water | t: (303-628-7262) | c: (303-319-6473) "http://www.denverwater.org/"> http://www.denverwater.org INTEGRITY | VISION | PASSION | EXCELLENCE | RESPECT