URL for downloading a tarball for a particular commit hash on gitlab.gnome.org

I am trying to download a source tarball of a repository on gitlab.gnome.org.

I don’t see any specific documentation for the web API anywhere on gnome.org and using the upstream docs doesn’t seem to work for GNOME’s gitlab instance: Repositories API | GitLab

For instance, the following attempt fails (404 error):

 % wget -N 'https://gitlab.gnome.org/api/v4/projects/gexiv2/repository/archive?sha=dd7fe2f9899d7f914946a20d8bf224248196725c'
--2023-08-17 09:06:16--  https://gitlab.gnome.org/api/v4/projects/gexiv2/repository/archive?sha=dd7fe2f9899d7f914946a20d8bf224248196725c
Resolving gitlab.gnome.org (gitlab.gnome.org)... 151.101.1.91, 151.101.65.91, 151.101.129.91, ...
Connecting to gitlab.gnome.org (gitlab.gnome.org)|151.101.1.91|:443... connected.
HTTP request sent, awaiting response... 404 Not Found
2023-08-17 09:06:17 ERROR 404: Not Found.

You possibly want something like this:

wget -N "https://gitlab.gnome.org/api/v4/projects/GNOME%2Fgexiv2/repository/archive\?sha\=dd7fe2f9899d7f914946a20d8bf224248196725c"

Thanks, that worked.

The part I missed is documented (via link) in the description of the id attribute on the gitlab docs page, specifically URL-encoded path of the project.