Queues
Flush a queue
Send the next record_count waiting records to the queue's consumer workflow now, whatever its flush rules. A queue without a consumer workflow is refused with 409: nothing could receive the records. With validate_only, the same checks run and 204 answers, nothing is requested.
Authorization
AuthorizationstringheaderrequiredBearer <key>, where <key> is a workspace API key or a user API key. See Authentication.
workspace_id*integerThe workspace. List the ones your key can reach with GET /v1/workspaces.
workflows_app_queue_id*stringThe queue.
uuidregion*RegionsRegion of the resource: besg (Europe) or usnv (United States), as GET /v1/regions lists them
"besg""usnv"application/json- body
record_count*Record CountWaiting records to send to the consumer now
1 <= value <= 10000validate_only?Validate OnlyRun every check of the write and answer 204 without writing: a refused write answers the error the write would
falseOK
application/json- response
queue_id*Queue Idqueue_name*Queue Namequeue_resource_id*Queue Resource Idstatus*QueueStatus"running""paused"consumer_workflow_id*|The workflow that receives the flushed records, if any
flush_batch_size*Flush Batch SizeRecords sent to the consumer workflow per flush
flush_record_max_age*|Seconds a record may wait before the queue flushes
flush_rate_limit_max_flush_count*|Maximum flushes per rate limit window
flush_rate_limit_time_window*|The rate limit window, in seconds
flush_strategy*AppQueueFlushStrategyfifo sends the oldest records first, lifo the newest
"fifo""lifo"parent_folder_id*string|nullcreated_time*Created Timedate-timelast_modified_time*Last Modified Timedate-timeregion*Regions"besg""usnv"flush_requested_record_count*Flush Requested Record Countcurl -X POST 'https://api.stacksync.com/v1/workspaces/0/queues/497f6eca-6276-4993-bfeb-53cbbbba6f08/flush?region=besg' \ -H 'Content-Type: application/json' \ -d '{ "record_count": 1}'{ "queue_id": "<queue_id>", "queue_name": "<queue_name>", "queue_resource_id": "<queue_resource_id>", "status": "running", "consumer_workflow_id": "<consumer_workflow_id>", "flush_batch_size": 0, "flush_record_max_age": 0, "flush_rate_limit_max_flush_count": 0, "flush_rate_limit_time_window": 0, "flush_strategy": "fifo", "parent_folder_id": "<parent_folder_id>", "created_time": "2027-01-15T09:00:00Z", "last_modified_time": "2027-01-15T09:00:00Z", "region": "besg", "flush_requested_record_count": 0}