Skip to content
PATCH /daemon/{id}

Request Body

group_keystring
labelstring
lockstring
metadataRecord<string, any>

Replaces the stored object.

statusstring
Possible values:
stoppedactivestoppingstarting

Response Body

created_atstring · date-time
environment_idstring · uuid

The environment the daemon belongs to.

Example: 05daecaf-4365-42e8-8370-8127de5dd717
group_keystring

The daemon group this daemon belongs to. Runs created with a daemon_group_key go to a daemon in that group.

Example: default
idstring · uuid

The ID of the daemon.

Example: 2f0c8a5e-6f1b-4c51-9d34-1a1c3f3e9b77
labelstring

A name for the daemon.

Example: worker-1
last_active_atstring · date-time

When the daemon was last active.

lockstring

A value your daemon process can set, for example to claim the daemon. Stored as sent.

metadataRecord<string, any>

Any JSON object you want to store with the daemon.

statusstring

The daemon's status. A new daemon starts as stopped; your daemon process updates it.

Example: active
Possible values:
stoppedactivestoppingstarting
updated_atstring · date-time
curl -X PATCH 'https://api.truto.one/daemon/{id}' \
  -H 'Authorization: Bearer <your_api_token>' \
  -H 'Content-Type: application/json' \
  -d '{
  "label": "your_label",
  "group_key": "your_group_key",
  "metadata": {},
  "status": "stopped",
  "lock": "your_lock"
}'
const body = {
  "label": "your_label",
  "group_key": "your_group_key",
  "metadata": {},
  "status": "stopped",
  "lock": "your_lock"
};

const response = await fetch('https://api.truto.one/daemon/{id}', {
  method: 'PATCH',
  headers: {
    'Authorization': 'Bearer <your_api_token>',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify(body),
});

const data = await response.json();
console.log(data);
import requests

url = "https://api.truto.one/daemon/{id}"
headers = {
    "Authorization": "Bearer <your_api_token>",
    "Content-Type": "application/json",
}
params = {
}
payload = {
    "label": "your_label",
    "group_key": "your_group_key",
    "metadata": {},
    "status": "stopped",
    "lock": "your_lock"
}

response = requests.patch(url, headers=headers, params=params, json=payload)
print(response.json())