CI API builds : "scope" issue
Hi,
This issue is related to this API : http://docs.gitlab.com/ce/api/builds.html#list-project-builds According to the API, it's possible to provide an array for the "scope" parameter (in order to get pending and running builds for example).
The scope of builds to show, one or array of: pending, running, failed, success, canceled; showing all builds if none provided"
Single value for scope works fine. However, I'm unable to make it work with an array.
Some tests:
-
curl -H "PRIVATE-TOKEN: ***" -X GET https://git.*.com/api/v3/projects/12/builds?scope=pending
WORKS -
curl -H "PRIVATE-TOKEN: ***" -X GET https://git.*.com/api/v3/projects/12/builds?scope=running
WORKS -
curl -H "PRIVATE-TOKEN: ***" -X GET -d 'scope[]=pending' -d 'scope[]=running' https://git.*.com/api/v3/projects/12/builds
BROKEN -
curl -H "PRIVATE-TOKEN: ***" -X GET -F 'scope[]=pending' -F 'scope[]=running' https://git.*.com/api/v3/projects/12/builds
BROKEN
It looks like I'm not the only one facing this issue (https://forum.gitlab.com/t/api-getting-the-list-of-pending-and-running-builds/3280).
Thanks you