Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
dev:git:gitlab:api:examples [2022/05/18 07:21] mbdev:git:gitlab:api:examples [2022/05/18 08:45] (current) mb
Line 20: Line 20:
 With this snippet we can get the file ".gitlab-ci.yml". With a URL like this, files from private projects can be included in e.g. the project gitlab-ci file. \\ With this snippet we can get the file ".gitlab-ci.yml". With a URL like this, files from private projects can be included in e.g. the project gitlab-ci file. \\
 The project tags can be shown as well, see example below. \\ The project tags can be shown as well, see example below. \\
-{{:dev:git:gitlab:api:api_project1.png?direct&600|}}+{{ :dev:git:gitlab:api:api_project1.png?direct&600 |}} 
 +<wrap hi>highlighted</wrap> \\ 
 +With this api call, all project tags as well as more information about the tag, like creation date and user. \\
 ==== Trigger a pipeline via API ==== ==== Trigger a pipeline via API ====
 First go to project settings -> "CI/CD" -> "Pipeline triggers" 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  +After enabling pipeline triggers for a project the given token is used as variable in the trigger request. Unlike previous used api calls, a <wrap hi>**post**</wrap> request is used. \\ 
-\\ {{:dev:git:gitlab:api:api_pipetrigger3.png?direct&600|}} \\+ As you can see after creating this token, cURL examples  
 +\\ {{ :dev:git:gitlab:api:api_pipetrigger3.png?direct&600 |}} \\
 With Postman we also have a better overview about the sent variables. These can also be seen in the created pipeline, as seen below. \\  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.  It is also possible to overwrite Gitlab CI variables, these are only set in this running job. 
-{{:dev:git:gitlab:api:api_pipetrigger2.png?direct&600|}}+{{ :dev:git:gitlab:api:api_pipetrigger2.png?direct&600 |}}