Reputation: 4510
I have API call which was giving all the jobs within one project.
https://localhost:3423/api/25/project/project_name/jobs/export?authtoken=asndkajsnfkjareeknfkjsafaksd
But how could anyone tell me how I can select a few specific jobs with the same project, I read the official doc but it is not that much clear.
from the official document: link
The following parameters can also be used to narrow down the result set.
idlist: specify a comma-separated list of Job IDs to include
I tried with following GET but nothings workout:
https://localhost:3423/api/25/project/project_name/job/34d9ac3b-e6d0-4e43-ad68-0b0faa71ebf8/export?authtoken=asndkajsnfkjareeknfkjsafaksd
https://localhost:3423/api/25/project/project_name/job/['34d9ac3b-e6d0-4e43-ad68-0b0faa71ebf8','b284aba1-81b2-4b0f-ba33-dd6e37589fbf']/export?authtoken=asndkajsnfkjareeknfkjsafaksd
Upvotes: 0
Views: 1815
Reputation: 11465
The idlist
is a parameter to put at the end of the URL, in your case:
https://localhost:3423/api/25/project/project_name/jobs/export?authtoken=asndkajsnfkjareeknfkjsafaksd&idlist=aaaa-cc-ddd,xxxx-yy-zzzz
Upvotes: 1
Reputation: 4380
That's works for me:
curl -G -s -H "Accept: application/xml" -H "X-RunDeck-Auth-Token:YOURIDTOKEN" http://YOURHOSTNAME:4440/api/14/jobs?idlist=ID1,ID2,ID3 -d project=YOURPROJECT | grep "<name>"
Upvotes: 0