Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Power tip - creating predecessor links via the API

Avatar

Level 10
Hi, I just worked this out today and thought others might find it useful in two ways: This specific example shows how to link two predecessors to a successor task. For more than two predecessors, just add more following the same format. I've highlighted the bits you need to edit in yellow . Applying this API query structure allows you to write other collection type sub-objects within another object. E.g. Adding PTO against a User etc. https:// yourhostname .my.workfront.com/attask/api/v9.0/TASK?apiKey= InsertYourAPIKey &method=PUT&updates=[{"ID":" InsertSuccessorTaskID ","predecessors":[{"objCode":"PRED","predecessorID":" InsertPredeccessorTaskAID ","predecessorType":"fs"},{"objCode":"PRED","predecessorID":" InsertPredeccessorTaskBID ","predecessorType":"fs"}]}] Hope this helps someone. We really need a master place to store this stuff..... Regards, David Cornwell
0 Replies

Avatar

Level 3
Hi David, I know you are also using azuqua. Did you use an HTTP get card or use the search records to pull the predecessor list? I am having trouble pulling any of the properties underneath the PRED object list. Any direction you can provide is appreciated. Thanks Dale Whitchurch Arthrex Inc

Avatar

Level 10
Hi Dale, I haven't actually used this via Azuqua yet, but just through a REST client on my PC. Having said that, it should work the same. One thing I neglected to mention is that the query method is a PUT, so in Azuqua you would need to use a HTTP PUT card. This query is for creating the predecessor relationships on a task. If you just wanted to read the existing predecessors from a task via an HTTP GET card, you need to include in the fields section, for example: ...&fields=predecessors:predecessor:* This will return all fields from each predecessor of the task. Let me know if any other queries. Regards, David Cornwell