Skip to main content
POST
/
external-task
/
{id}
/
lock
cURL
curl --request POST \
  --url http://{host}:{port}/{contextPath}/external-task/{id}/lock \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --data '{
  "workerId": "anId",
  "lockDuration": 100000
}'
This response does not have an example.

Authorizations

Authorization
string
header
required

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.

Path Parameters

id
string
required

The id of the external task.

Body

application/json
lockDuration
integer

The duration to lock the external task for in milliseconds. Note: Attempting to lock an already locked external task with the same workerId will succeed and a new lock duration will be set, starting from the current moment.

workerId
string

Mandatory. The ID of the worker who is performing the operation on the external task. If the task is already locked, must match the id of the worker who has most recently locked the task.

Response

Request successful.