Resolved: Get all files from gitlab snippets using curl


Is there a way to get all files embedded in gitlab snippets using curl command?
Using the following command I only get the first file.
curl -O ""
Since the snippet gathers 3 files I would like to download them all.


Use the snippets API to get the list of all the files and URLs.
curl "$SNIPPET_ID" | jq -r .files[].raw_url
You could pipe that output to xargs and curl them as well, if you wanted.
If you were open to using something other than curl snippets work mostly like any other repository and can be cloned with HTTPS/SSH.
git clone

If you have better answer, please add a comment about this, thank you!