Skip to content

Jobs API - Filter on name

Description

Right now the Jobs API is pretty limited in the queries it will accept. For example if I want to fetch project jobs I can filter by scope but that's about it. I work on a project where we create hundreds of jobs every day. I want to fetch all artifacts created in the past month from all jobs that have a certain name. Right now I have to download thousands of records to find the id's of a handful that match the name I'm looking for.

Proposal

Add a name attribute to the query string for fetching project jobs so I could do:

curl --header "PRIVATE-TOKEN: <private-token-here>" 'https://gitlab.example.com/api/v4/projects/1/jobs?name=job-name'

Links / references

Jobs API Documentation

gitlab-ee~2975006

Edited by Allison Browne