Sidekiq queues administration API

Introduced in GitLab 12.9

Delete jobs from a Sidekiq queue that match the given metadata.

The response has three fields:

  1. deleted_jobs - the number of jobs deleted by the request.
  2. queue_size - the remaining size of the queue after processing the request.
  3. completed - whether or not the request was able to process the entire queue in time. If not, retrying with the same parameters may delete further jobs (including those added after the first request was issued).

This API endpoint is only available to administrators.

DELETE /admin/sidekiq/queues/:queue_name
AttributeTypeRequiredDescription
queue_namestringyesThe name of the queue to delete jobs from
userstringnoThe username of the user who scheduled the jobs
projectstringnoThe full path of the project where the jobs were scheduled from
root_namespacestringnoThe root namespace of the project
subscription_planstringnoThe subscription plan of the root namespace (GitLab.com only)
caller_idstringnoThe endpoint or background job that schedule the job (for example: ProjectsController#create, /api/:version/projects/:id, PostReceive)
feature_categorystringnoThe feature category of the background job (for example: team_planning or code_review)
worker_classstringnoThe class of the background job worker (for example: PostReceive or MergeWorker)

At least one attribute, other than queue_name, is required.

curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/admin/sidekiq/queues/authorized_projects?user=root"

Example response:

{
  "completed": true,
  "deleted_jobs": 7,
  "queue_size": 14
}