Using the GitLab API (version 8.x) it is possible to access project snippets via GET /projects/:id/snippets
(see project snippets docs).
The Python request for snippet 4
of the project pr
in the group gr
would look like (with 2%F
= /
):
r = requests.get(url='https://gitlab.domain.com/api/v3/projects/gr2%Fpr/snippets/4')
But I can't figure out a way to access a snippet, which is not associated with any project, something like https://gitlab.com/snippets/14383, although the web interface can create and display those snippets. Is there a way to do that via the API?
Further information:
I have a public snipped on a self hosted GitLab server, which leads to a 500 Server Error
somehow and I want to delete this snippet via the API.
I confirm (Feb. 2016) this API does not seem to exist at the moment (in the GitLab API doc).
There was an old 2013 suggestion for public snippet API in 2013, but that issue has not been reported in the current GitLab.org/GitLab Community Edition project.
So... PR are welcome.
Update June 2016:
The OP bastelflp adds in the comments: