Skip to content
MACHHUB MACHHUB MACHHUB
Contribute to this page

Invoking processes

Once a Process is deployed, you can run it on demand from your application, or let its triggers run it automatically.

const result = await sdk.processes.execute('computeAverage', { window: '1h' });

See SDK → Processes for the full client API (getProcesses, changeTriggers).

Two HTTP forms are available:

POST /machhub/processes/execute
Authorization: Bearer <token>
Content-Type: application/json
{ "name": "computeAverage", "input": { "window": "1h" } }

The Bearer token is read from localStorage['machhub_token'] in browser clients.

For a process with an HTTP trigger, you can also call its slug endpoint directly, with the JSON body merged into the process inputs:

POST /process/<slug>
Content-Type: application/json
{ "window": "1h" }

Processes can be exported and imported as JSON (snake_case keys). Runtime-managed fields such as enabled, log_enabled, version, id, and domain_id are not part of the exported definition.

Each domain’s worker has its own dependency set. Add the pip (Python) or npm (TypeScript) packages your process code needs, per domain.