Skip to main content
POST
/
v1
/
workers
Create worker
curl --request POST \
  --url https://api.openworklabs.com/v1/workers \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "destination": "local",
  "description": "<string>",
  "workspacePath": "<string>",
  "sandboxBackend": "<string>",
  "imageVersion": "<string>"
}
'
{
  "worker": {
    "id": "<string>",
    "orgId": "<string>",
    "createdByUserId": "<string>",
    "isMine": true,
    "name": "<string>",
    "description": "<string>",
    "destination": "<string>",
    "status": "<string>",
    "imageVersion": "<string>",
    "workspacePath": "<string>",
    "sandboxBackend": "<string>",
    "lastHeartbeatAt": "2023-11-07T05:31:56Z",
    "lastActiveAt": "2023-11-07T05:31:56Z",
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z"
  },
  "tokens": {
    "owner": "<string>",
    "host": "<string>",
    "client": "<string>"
  },
  "instance": {
    "provider": "<string>",
    "region": "<string>",
    "url": "<string>",
    "status": "<string>",
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z"
  },
  "launch": {
    "mode": "<string>",
    "pollAfterMs": 0
  }
}

Body

application/json
name
string
required
Minimum string length: 1
destination
enum<string>
required
Available options:
local,
cloud
description
string
workspacePath
string
sandboxBackend
string
imageVersion
string

Response

Local worker created successfully.

worker
object
required
tokens
object
required
instance
object
required
launch
object
required