This is an old revision of the document!
With the given gitlab api many things are possible, for example the exploration of projects and groups as well as triggering pipelines.
Unlike other web-sources the api refers to project- and group-IDs. These IDs are shown in the gitlab web-UI.
To have project access with api a Token is necessary. To create a Token, go to project (or group) “Settings” → “Access Tokens”. For full access select “api”.
Tokens have an expiration date, but with leaving it blank, no expiration date is set.
Tokens can not be seen after creation so save it locally!
For a better overview and prettier output Postman is used.
cURL example to access project root
curl --location --request GET 'https://gitsrv.schnuerle.com:8443/api/v4/projects/82/repository/files/.gitlab-ci.yml/raw?ref=main&access_token=YourPipelineToken'
First go to project settings → “CI/CD” → “Pipeline triggers”
After enabling pipeline triggers for a project the given token is used as variable in the trigger request.
As you can see after creating this token, cURL examples
With Postman we also have a better overview about the sent variables. These can also be seen in the created pipeline, as seen below.
It is also possible to overwrite Gitlab CI variables, these are only set in this running job.