Sign in or sign up before continuing. Don't have an account yet? Register now to get started.
Register now

Support fetching last successful individual artifact from a named job with API

Proposal

The Download a single artifact file by reference name API endpoint should support the search_recent_successful_pipelines query parameter which was recently added to the Download job artifacts by reference name endpoint.

As I mention in #515864 (comment 2987389132) on #515864 (closed), I need this feature in order to generate badges from artifact JSON files describing what the badge should say, in a project where there are multiple kinds of pipelines, only some of which contain the jobs that generate the badge data.

It looks like !212882 (merged) implemented the feature only for the archive endpoint, but the same approach, using ::Ci::Build.latest_with_artifacts_for_ref() instead of latest_successful_build_for_ref!() when the flag is set, would work for the single-file endpoint.

Edited Feb 05, 2026 by 🤖 GitLab Bot 🤖
Assignee Loading
Time tracking Loading