Transition multiple flags to a new status in one call
PUT/flags/update-status-bulk/:status
Transitions a list of flags to the given target status in a single request, evaluating each flag independently against its own current status and the caller's permissions. Use this instead of calling PUT /flags/{id}/update-status/{status} once per flag; per-flag failures do not abort the batch. Two selection modes are supported: the default "ids" mode, where the JSON body or multipart form supplies flagIds directly, plus optional comment and/or files applied to every successfully transitioned flag; and a JSON-only "filter" mode (set type to "filter"), where filter selects all matching flags server-side and expectedCount is the client's snapshot count used to detect drift — the request is rejected with 409 if the live count no longer matches. Filter-based selection can be disabled by configuration, in which case it returns 503. The status path parameter accepts the same canonical wire values and aliases as PUT /flags/{id}/update-status/{status} (case-insensitive). The caller must hold at least one of the listed per-transition permissions to pass the outer authorization gate; each flag is then re-checked individually against the specific transition it requires. Always returns HTTP 200, even when every flag in the batch fails — inspect the response body's successful/failed arrays and successCount/failureCount for the actual outcome. An empty or omitted flagIds list returns 200 with totalCount, successCount, and failureCount all zero.
Request
Responses
- 200
- 400
- 401
- 403
- 409
- 500
- 503
Bulk update completed. successful/failed are arrays of {flagId, flagResponse} or {flagId, errorMessage, errorCode} respectively — errorCode is the stringified HTTP status code for that flag's failure (e.g. "409"). Each flagResponse omits the internal tenantProviderId and hash columns. totalCount, successCount, and failureCount summarize the batch.
Bad Request - the status path parameter does not match any known status or alias, the tenant-id header is missing, or (filter mode) filter or expectedCount was omitted
Unauthorized - authentication is required; the JWT is missing or invalid
Forbidden - the caller lacks any of the per-transition permissions required to use this endpoint at all (individual flags a caller can't transition are instead reported in the failed array with errorCode 403)
Conflict - filter mode only: the expectedCount submitted by the client no longer matches the live count of flags matching filter; retry with currentCount from the response body as the new expectedCount
Internal server error - an unexpected error occurred while processing the request
Service Unavailable - filter mode only: filter-based Select All is currently disabled by configuration; fall back to submitting explicit flagIds