Integration jobs, runs, and steps
Use the Integration Registry to give operators a record of work performed by an external integration. Your scheduler, service, or script starts the work and moves data through the appropriate APIs. Hivekit records the execution, evaluates health, and displays the results in Data Imports.
Model the work
| Concept | What to record | Example |
|---|---|---|
| Job | A recurring or repeatable workflow with a stable key and a manifest. Hivekit displays it as an import. | fleet-readings |
| Execution | One attempt to run a job. Hivekit displays it as a run. It has its own ID, timestamps, and outcome. | The 09:00 attempt to import fleet readings |
| Step | A named stage declared when the execution starts. It has its own status, progress, and optional weight. | fetch, validate, publish |
| Log | A timestamped message for the execution or one of its steps, with optional structured details. | Validated readings with { "count": 42 } |
| Heartbeat | A report that an execution is still active. The Node.js SDK sends it while the execution is running. | A periodic heartbeat while a feed waits for new data |
Use the same job key for each attempt at the same workflow. Registering an updated manifest under that key preserves the job's identity, saved settings, and monitoring switch. Each new execution gets a separate run ID. Use that ID to correlate reports in Hivekit with logs from your runtime.
Declare steps for stages that an operator can understand and investigate. A step starts as pending, then moves through running to succeeded, failed, or skipped. Successful and skipped steps count as fully complete. A failed step retains its last reported progress. The execution can stay open while your code finishes other work or cleans up. Report the execution as succeeded after every declared step has succeeded or been skipped. Report failed if the run fails, including when some steps are still unfinished. A simple job can report an execution with an empty step list.
Hivekit computes overall progress as the weighted average of step progress. For example, a fetch step with weight 0.75 at 50% and a pending publish step with weight 0.25 give an overall progress of 37.5%. Use step weights to reflect how much each stage contributes to the job.
Choose how Hivekit monitors the job
| Manifest kind | How your integration runs | Monitoring settings |
|---|---|---|
scheduled | An external scheduler starts a new execution at a regular interval. | Set expectedIntervalSeconds and optionally gracePeriodSeconds. A job becomes Overdue after the interval plus grace since the latest start, or since registration before its first run. |
continuous | A long-running process keeps an execution open while it consumes a feed or performs ongoing work. | Set heartbeatTimeoutSeconds. A running execution becomes Stalled when it goes too long without a heartbeat, step update, or log. |
manual | Your tool or workflow starts an execution on demand. | Use executionTimeoutSeconds if there is a maximum expected run time. |
executionTimeoutSeconds is available for any kind and makes an active run Timed out once it exceeds the threshold. Timer values are positive integer seconds, and the grace period can also be zero. Health is evaluated when read using the current manifest's timing settings. A Stalled or Timed out execution can still have a reported status of running and can report its outcome later. Use your runtime to enforce any deadline that should actually stop work.
Separate configuration definitions from values
The manifest contains the name, kind, timing expectations, and any configuration field definitions. An operator sets values from the import's Configuration tab, or a client with update access sets them through the Registry API. Use a closed JSON Schema object to define fields, labels, defaults, and which values are required. For example, a job can define the following configuration object.
{
"type": "object",
"additionalProperties": false,
"properties": {
"sourceUrl": { "type": "string", "title": "Source URL" },
"sourceToken": { "type": "string", "title": "Source token", "x-hivekit-secret": true },
"includeArchived": { "type": "boolean", "default": false }
},
"required": ["sourceUrl", "sourceToken"]
}
The Registry accepts flat string, number, integer, and boolean fields with optional enum and default. Use root-level required for required properties. Secret fields must be strings and have no default. The original field map with per-field required and secret also works. See configuration requests and schema limits for details.
An execution starts with a resolved configuration snapshot, applying defaults to fields without an override. Set required values before starting. Hivekit records the manifest and configuration revision used by the run. Later edits apply to future executions. The runtime receives the resolved secret values when it starts the run, so keep that response and configuration object out of logs and metadata.
Give each client the access it needs
Grant permissions by stable job key in the $hkt_integration namespace. A release process can register the manifest with C. A worker that looks up its job and reports runs uses RP. Operators can view the job with R, or manage its configuration and monitoring with RU. Assign separate credentials for any reads or writes the integration performs against realm data or an upstream system.
Continue with Report an integration from Node.js, or use the Integration Registry API from another runtime.