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
}
}Creates a local or cloud worker for the active organization and returns the initial tokens needed to connect to it.
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
}
}