Post

2 followers Follow
0
Avatar

Is there a way to get all successors

Is there a way to get all successors(children and grandchildren and so on)  of a work item with one REST API call? I tried the successors relation but it returns an empty set.

Bo Gao Answered

Please sign in to leave a comment.

4 comments

0
Avatar

Hi Bo,

Successors and Predecessors represent specific dependencies explicitly set up as such (i.e. Add related -> successors or Add related -> predecessors).

If you need the work item's children use the Children relation (recursively as Children will return direct children only). 

You can also use workitemRecursiveQuery service, this may be exactly what you're looking for.

Hope this helps,

Ophir

Ophir Kenig 0 votes
Comment actions Permalink
0
Avatar

Hi Bo,

It may not appear in the main page of the REST API documentation, but it still works. Use the link I sent in my previous post for the documentation.

Hope this helps,

Ophir

 

Ophir Kenig 0 votes
Comment actions Permalink