Move every flag matching a filter as a background job
POST/flags/bulk-jobs
Snapshots the oldest min(expectedCount, 2000) flags matching filter, whose single source status is filter["data.status"].eq, and moves them to targetStatus in the background in chunks. Returns 202 with the RUNNING job; poll GET /flags/bulk-jobs/{id}. A flag whose status changed after the snapshot is not moved and is counted as skipped. The transition and the caller's permission for it are checked once; the list's needsVerification and internal-flag-type visibility rules are applied to the filter. One running job per tenant.
Request
Responses
- 202
- 400
- 403
- 409
- 503
The job, RUNNING
filter missing, attested not true, expectedCount below 1, no single data.status eq in filter (SOURCE_STATUS_REQUIRED), unknown targetStatus, or no flag matches (NO_MATCHING_FLAGS)
The caller lacks the permission for this source-to-target transition, or cannot see needsVerification flags
INVALID_TRANSITION (no such transition, including from closed) or BULK_JOB_ALREADY_ACTIVE (the tenant already has a running job)
BULK_JOB_DISABLED: bulk flag jobs are turned off by configuration