Queues

Create a queue

A queue, running unless sent paused: records added by workflows (and syncs) wait in it until its flush rules send them to its consumer workflow. Send the status, rate limit and strategy of a queue read with GET to copy it. Send an Idempotency-Key to retry safely.

post/v1/workspaces/{workspace_id}/queues

Request

  • Base URL
    https://api.stacksync.com
  • URL
    https://api.stacksync.com/v1/workspaces/{workspace_id}/queues
  • Auth
    HTTP bearer

Path parameters

workspace_idinteger required

The workspace. List the ones your key can reach with GET /v1/workspaces.

Query parameters

region'besg' | 'usnv' required

Region of the resource: besg (Europe) or usnv (United States), as GET /v1/regions lists them

Headers

Idempotency-Keystring nullable

Makes the create retry-safe for 24 hours: a retry with the same key answers the resource the first call created, with the Idempotent-Replayed: true header, and creates nothing. 1 to 255 visible ASCII characters. The same key with a different request answers 422; while the first call still runs, 409.

Request body

queue_namestring required
queue_resource_idstring nullable

The id workflow steps name the queue by; generated from the name when absent

flush_batch_sizeinteger required
flush_record_max_ageinteger required
parent_folder_idstring nullable

The folder to create the queue in, the root when absent

status'running' | 'paused'
flush_rate_limit_max_flush_countinteger nullable

10 when absent

flush_rate_limit_time_windowinteger nullable

1 second when absent

flush_strategy'fifo' | 'lifo'
validate_onlyboolean

Run every check of the write and answer 204 without writing: a refused write answers the error the write would

Response

Created

queue_idstring required
queue_namestring required
queue_resource_idstring required
status'running' | 'paused' required
consumer_workflow_idstring nullable required

The workflow that receives the flushed records, if any

flush_batch_sizeinteger required

Records sent to the consumer workflow per flush

flush_record_max_ageinteger nullable required

Seconds a record may wait before the queue flushes

flush_rate_limit_max_flush_countinteger nullable required

Maximum flushes per rate limit window

flush_rate_limit_time_windowinteger nullable required

The rate limit window, in seconds

flush_strategy'fifo' | 'lifo' required
parent_folder_idstring nullable required
created_timestring date-time required
last_modified_timestring date-time required
region'besg' | 'usnv' required

Changes

No recorded changes to this operation across all 1 revision of this API.