3

we have scheduled pipeline executed once every day. With this setup, i would like to know if its possible to get job id[successful] of the project which was executed 4 days ago through GitLab API

enter image description here

sathiya
  • 279
  • 1
  • 5
  • 17
  • I mean. You can [list all pipelines](https://docs.gitlab.com/ee/api/pipelines.html#list-project-pipelines) for a project then [list all jobs for a pipeline](https://docs.gitlab.com/ee/api/jobs.html#list-pipeline-jobs) and find which ones are successful, sure. Would that work? – sytech Sep 01 '22 at 05:50

2 Answers2

1

Apparently not: the GitLab Pipeline API only list, for a single pipeline, its latest state.

It does not list past execution occurrences.
And no audit events would reflect those past executions either.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
1

From documentation: In GitLab 13.9 and later, pipeline API endpoint can include retried jobs in the response with include_retried set to true.

Mitar
  • 6,756
  • 5
  • 54
  • 86