FIRST, every branch in our workflow submitted is always submit_xxxx which is merged into master. Our master branch is ALWAYS working because it’s locked down so only circleCI can push to origin/master. This means, no query params of branch=xxxx for downloading artifacts because we don’t know the branch.
This means our artifacts in circleCI are in submit_dean/somebranch1 and submit_matt/somebranch2, etc. etc. We ONLY want the latest artifacts each time so we use v1.1 api to do this
This works great. Is there no way to do this in v2?
BUT it only has download with version number. This works in V2
curl -X GET “https://circleci.com/api/v2/project/github/OrderlyHealth/orderly/523/artifacts?circle-token=$CIRCLE_TOKEN2” -H ‘Accept: application/json’
but this does not
curl -X GET “https://circleci.com/api/v2/project/github/OrderlyHealth/orderly/latest/artifacts?circle-token=$CIRCLE_TOKEN2” -H ‘Accept: application/json’