Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

API - plans with jobs

Steven Rankin March 13, 2016

So using the API i can pull back all builds for a plan , something like this (from memory):

plan_key?expand=result[0:10].results #gets the last 10 build results

But this doesn't bring back job information and a build plan may have one or more jobs.

Do you know is it possible to bring back the job information too for each build?

Currently I am having to make another call to the API to get the job information for a particular build, but it would be great to get all the information I need in one call.

 

So this is the second set of API calls I am making to get a plans job info~(again from memory). Not ideal

plan_key-job1?expand=result[0:10].results
plan_key-job2?expand=result[0:10].results
plan_key-job3?expand=result[0:10].results

 

Thanks

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

1 vote
Answer accepted
Steven Rankin March 13, 2016

Looks like this works:

 

?expand=results[0:10].result.stages.stage.results.result

 

I should note that if you want to bring back more, you will need to add

&max-results=

as the limit seems to be 25 using the example above.  So to bring back the last 100 results:

?expand=results[0:100].result.stages.stage.results.result&max-results=100
 

 

TAGS
AUG Leaders

Atlassian Community Events