I am trying to download a directory inside of a 'release' branch of a repository from Gitlab. I am using API v4.
The branch includes is of the below structure:
- archive
- outputs
- history-2020-01-01T142535
- history-2020-01-15T142559
- history-2020-02-01T142540
I want to get the "history-2020-02-01T142540" directory.
I can get a ZIP archive of the entire branch...
https://<GITLAB_URL>/api/v4/projects/<PROJECT_ID>/repository/archive.zip?sha=<BRANCH_ID>
How do I get a ZIP archive of only a specific folder within that branch?
You can't get an archive for a specific file or folder.
But you can do something similar which might help you:
Get file from repository
List repository tree
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With