v4

latestSwagger 2.02026-07-1333110154.1 KB

Creates or updates a worker.

Creates or updates a worker.

patch/routing/workers/{workerId}

Path parameters

workerIdstring required

Id of a worker.

Query parameters

api-versionstring required

The API version to use for this operation.

Headers

If-Matchstring

The request should only proceed if an entity matches this string.

If-Unmodified-Sincestring date-time-rfc7231

The request should only proceed if the entity was not modified after this time.

Response

The request has succeeded.

etagstring required

The ETag (or entity tag) HTTP response header is an identifier for a specific version of a resource. It lets caches be more efficient and save bandwidth, as a web server does not need to resend a full response if the content was not changed.

It is a string of ASCII characters placed between double quotes, like "675af34563dc-tr34".

idstring required

Id of a worker.

state'active' | 'draining' | 'inactive'

Enums for worker states.

queuesstring[]

Collection of queue(s) that this worker can receive work from.

capacityinteger

The total capacity score this worker has to manage multiple concurrent jobs.

labelsobject

A set of key/value pairs that are identifying attributes used by the rules engines to make decisions. Values must be primitive values - number, string, boolean.

tagsobject

A set of non-identifying attributes attached to this worker. Values must be primitive values - number, string, boolean.

loadRationumber double

A value indicating the workers capacity. A value of '1' means all capacity is consumed. A value of '0' means no capacity is currently consumed.

availableForOffersboolean

A flag indicating this worker is open to receive offers or not.

maxConcurrentOffersinteger

If this is set, the worker will only receive up to this many new offers at a time.