I have to create an automated weekly report by fetching the data using gitlab api calls. I have to fetch pipeline triggerer name for it. but I gone through gitlab docs but i couldn’t able to find an api call for it.
this is the gitlab doc link I used to find it Pipelines API | GitLab
Thanks for your kind help.
Hi @deekay5 , welcome to the GitLab Community Forum!
You can find who triggered a pipeline using Pipelines API > Get a Single Project Pipeline provided that you have the project_id
and pipeline_id
.
GET gitlab.example.com/api/v4/projects/<project_id>/pipelines/<pipeline_id>
If you don’t have the pipeline ID, you can get the pipeline IDs for a given project with Pipelines API > List Project Pipelines.
The Pipelines API returns 20 results by default. If you want or need more than that, you can get 100 results per query with &per_page=100
and/or use pagination.
I hope this answers your question. Let us know how it goes!