@camunda8/orchestration-cluster-api
    Preparing search index...

    Class CamundaClientBase

    The Camunda client's operation methods. Create clients with createCamundaClient or CamundaClient, which add .paginate(...) to every search operation.

    Hierarchy

    • CamundaCore
      • CamundaClientBase
    Index
    _getSupportLogger _invokeWithRetry activateAdHocSubProcessActivities activateJobs assignClientToGroup assignClientToTenant assignGroupToTenant assignMappingRuleToGroup assignMappingRuleToTenant assignProcessInstanceBusinessId assignRoleToClient assignRoleToGroup assignRoleToMappingRule assignRoleToTenant assignRoleToUser assignUserTask assignUserToGroup assignUserToTenant broadcastSignal cancelBatchOperation cancelClusterRebalance cancelProcessInstance cancelProcessInstancesBatchOperation changeClusterMode changeClusterModeAsClusterAdmin clearAuthCache completeJob completeUserTask configure correlateMessage createAdminUser createAgentInstance createAuthorization createDeployment createDocument createDocumentLink createDocuments createElementInstanceVariables createGlobalClusterVariable createGlobalTaskListener createGroup createJobWorker createMappingRule createProcessInstance createRole createTenant createTenantClusterVariable createThreadedJobWorker createUser deleteAuthorization deleteDecisionInstance deleteDecisionInstancesBatchOperation deleteDocument deleteGlobalClusterVariable deleteGlobalTaskListener deleteGroup deleteHistoryBackup deleteHistoryBackupAsClusterAdmin deleteMappingRule deleteProcessInstance deleteProcessInstancesBatchOperation deleteResource deleteRole deleteRuntimeBackup deleteRuntimeBackupAsClusterAdmin deleteRuntimeBackupState deleteRuntimeBackupStateAsClusterAdmin deleteTenant deleteTenantClusterVariable deleteUser deployResourcesFromFiles emitSupportLogPreamble evaluateConditionals evaluateDecision evaluateExpression failJob forceAuthRefresh getAgentDefinition getAgentInstance getAuditLog getAuthentication getAuthHeaders getAuthorization getBackpressureState getBatchOperation getClusterExportingStatus getClusterRebalance getClusterStatus getClusterTopology getClusterUpgradeStatus getConfig getDecisionDefinition getDecisionDefinitionXml getDecisionInstance getDecisionRequirements getDecisionRequirementsXml getDocument getElementInstance getErrorMode getExportingStatus getFormByKey getGlobalClusterVariable getGlobalJobStatistics getGlobalTaskListener getGroup getHistoryBackup getHistoryBackupAsClusterAdmin getIncident getJobErrorStatistics getJobTimeSeriesStatistics getJobTypeStatistics getJobWorkerStatistics getLicense getMappingRule getProcessDefinition getProcessDefinitionInstanceStatistics getProcessDefinitionInstanceVersionStatistics getProcessDefinitionMessageSubscriptionStatistics getProcessDefinitionStatistics getProcessDefinitionXml getProcessInstance getProcessInstanceCallHierarchy getProcessInstanceSequenceFlows getProcessInstanceStatistics getProcessInstanceStatisticsByDefinition getProcessInstanceStatisticsByError getProcessInstanceWaitStateStatistics getResource getResourceContent getResourceContentBinary getRestoreStatus getRole getRuntimeBackup getRuntimeBackupAsClusterAdmin getRuntimeBackupState getRuntimeBackupStateAsClusterAdmin getStartProcessForm getStatus getSystemConfiguration getTenant getTenantClusterVariable getTopology getUsageMetrics getUser getUserTask getUserTaskForm getVariable getWorkers listHistoryBackups listHistoryBackupsAsClusterAdmin listRuntimeBackups listRuntimeBackupsAsClusterAdmin listSecrets logger migrateProcessInstance migrateProcessInstancesBatchOperation modifyProcessInstance modifyProcessInstancesBatchOperation onAuthHeaders pauseClusterExporting pauseExporting pinClock publishMessage resetClock resolveIncident resolveIncidentsBatchOperation resolveProcessInstanceIncidents resolveSecrets restore restoreAsClusterAdmin resumeBatchOperation resumeClusterExporting resumeExporting resumeProcessInstance resumeProcessInstancesBatchOperation searchAgentDefinitions searchAgentInstanceHistory searchAgentInstances searchAuditLogs searchAuthorizations searchBatchOperationItems searchBatchOperations searchClientsForGroup searchClientsForRole searchClientsForTenant searchClusterVariables searchCorrelatedMessageSubscriptions searchDecisionDefinitions searchDecisionInstances searchDecisionRequirements searchElementInstanceIncidents searchElementInstances searchElementInstanceWaitStates searchGlobalTaskListeners searchGroupIdsForTenant searchGroups searchGroupsForRole searchIncidents searchJobs searchMappingRule searchMappingRulesForGroup searchMappingRulesForRole searchMappingRulesForTenant searchMessageSubscriptions searchOwnAuthorizations searchProcessDefinitions searchProcessDefinitionVariableNames searchProcessInstanceIncidents searchProcessInstances searchResources searchRoles searchRolesForGroup searchRolesForTenant searchTenants searchUsers searchUsersForGroup searchUsersForRole searchUsersForTenant searchUserTaskAuditLogs searchUserTaskEffectiveVariables searchUserTasks searchUserTaskVariables searchVariables searchVariablesAsDto stopAllWorkers suspendBatchOperation suspendProcessInstance suspendProcessInstancesBatchOperation syncRuntimeBackupState syncRuntimeBackupStateAsClusterAdmin takeHistoryBackup takeHistoryBackupAsClusterAdmin takeRuntimeBackup takeRuntimeBackupAsClusterAdmin throwJobError triggerClusterRebalance unassignClientFromGroup unassignClientFromTenant unassignGroupFromTenant unassignMappingRuleFromGroup unassignMappingRuleFromTenant unassignRoleFromClient unassignRoleFromGroup unassignRoleFromMappingRule unassignRoleFromTenant unassignRoleFromUser unassignUserFromGroup unassignUserFromTenant unassignUserTask updateAgentInstance updateAuthorization updateGlobalClusterVariable updateGlobalTaskListener updateGroup updateJob updateJobsBatchOperation updateMappingRule updateRole updateTenant updateTenantClusterVariable updateUser updateUserTask withCorrelation
    • Internal invocation helper to apply global backpressure gating + retry + normalization

      Type Parameters

      • T

      Parameters

      • op: () => Promise<T>
      • opts: {
            classify?: (e: any) => { reason: string; retryable: boolean };
            exempt?: boolean;
            opId: string;
            retryOverride?: false | Partial<HttpRetryPolicy>;
        }

      Returns Promise<T>

    • Activate activities within an ad-hoc sub-process

      Activates selected activities within an ad-hoc sub-process identified by element ID. The provided element IDs must exist within the ad-hoc sub-process instance identified by the provided adHocSubProcessInstanceKey.

      Parameters

      Returns CancelablePromise<void>

      async function activateAdHocSubProcessActivitiesExample(
      adHocSubProcessInstanceKey: ElementInstanceKey,
      elementId: ElementId
      ) {
      const camunda = createCamundaClient();

      await camunda.activateAdHocSubProcessActivities({
      adHocSubProcessInstanceKey,
      elements: [{ elementId }],
      });
      }

      activateAdHocSubProcessActivities

      Ad-hoc sub-process

    • Assign a client to a group

      Assigns a client to a group, making it a member of the group. Members of the group inherit the group authorizations, roles, and tenant assignments.

      Parameters

      Returns CancelablePromise<void>

      async function assignClientToGroupExample(groupId: GroupId, clientId: ClientId) {
      const camunda = createCamundaClient();

      await camunda.assignClientToGroup({
      groupId,
      clientId,
      });
      }

      assignClientToGroup

      Group

    • Assign business id to process instance

      Assigns a business id to an already-running process instance that currently has none.

      The assignment is single and irreversible: only artifacts created after the assignment (for example future jobs, user tasks, decision instances, and message subscriptions) carry the business id, while existing artifacts are not retroactively enriched. Re-sending the same business id succeeds as a no-op. This endpoint is only useful while business id uniqueness enforcement is disabled; when it is enabled, the request is rejected with a 409 response.

      Parameters

      Returns CancelablePromise<void>

      async function assignProcessInstanceBusinessIdExample(
      processInstanceKey: ProcessInstanceKey,
      businessId: BusinessId
      ) {
      const camunda = createCamundaClient();

      await camunda.assignProcessInstanceBusinessId({
      processInstanceKey,
      businessId,
      });
      }

      assignProcessInstanceBusinessId

      Process instance

    • Assign a role to a group

      Assigns the specified role to the group. Every member of the group (user or client) will inherit the authorizations associated with this role. *

      Parameters

      Returns CancelablePromise<void>

      async function assignRoleToGroupExample(roleId: RoleId, groupId: GroupId) {
      const camunda = createCamundaClient();

      await camunda.assignRoleToGroup({
      roleId,
      groupId,
      });
      }

      assignRoleToGroup

      Role

    • Assign a role to a tenant

      Assigns a role to a specified tenant. Users, Clients or Groups, that have the role assigned, will get access to the tenant's data and can perform actions according to their authorizations.

      Parameters

      Returns CancelablePromise<void>

      async function assignRoleToTenantExample(tenantId: TenantId, roleId: RoleId) {
      const camunda = createCamundaClient();

      await camunda.assignRoleToTenant({
      tenantId,
      roleId,
      });
      }

      assignRoleToTenant

      Tenant

    • Assign user task

      Assigns a user task with the given key to the given assignee. Assignment waits for blocking task listeners on this lifecycle transition. If listener processing is delayed beyond the request timeout, this endpoint can return 504. Other gateway timeout causes are also possible. Retry with backoff and inspect listener worker availability and logs when this repeats.

      Parameters

      Returns CancelablePromise<void>

      async function assignUserTaskExample(userTaskKey: UserTaskKey) {
      const camunda = createCamundaClient();

      await camunda.assignUserTask({
      userTaskKey,
      assignee: 'alice',
      allowOverride: true,
      });
      }

      assignUserTask

      User task

    • Assign a user to a group

      Assigns a user to a group, making the user a member of the group. Group members inherit the group authorizations, roles, and tenant assignments.

      Parameters

      Returns CancelablePromise<void>

      async function assignUserToGroupExample(groupId: GroupId, username: Username) {
      const camunda = createCamundaClient();

      await camunda.assignUserToGroup({
      groupId,
      username,
      });
      }

      assignUserToGroup

      Group

    • Cancel Batch operation

      Cancels a running batch operation. This is done asynchronously, the progress can be tracked using the batch operation status endpoint (/batch-operations/{batchOperationKey}).

      Parameters

      Returns CancelablePromise<void>

      async function cancelBatchOperationExample(batchOperationKey: BatchOperationKey) {
      const camunda = createCamundaClient();

      await camunda.cancelBatchOperation({ batchOperationKey });
      }

      cancelBatchOperation

      Batch operation

    • Stop the running rebalance

      Asks the running rebalance to stop once the transfer in flight has finished. Partitions already transferred keep their new leaders, and those the rebalance had not yet reached keep their current ones.

      Cancellation requests are idempotent and always accepted. The wasRunning response field can be used to distinguish a cancellation that found a running rebalance from one that did not.

      Requires the cluster-admin security chain. Although this operation lists bearerAuth / basicAuth like the rest of the Orchestration Cluster API, it does not accept an Orchestration Cluster user's credentials — only the separate cluster-admin credentials are valid here. *

      Parameters

      Returns CancelablePromise<RebalanceCancellationResponse>

      async function cancelClusterRebalanceExample() {
      const camunda = createCamundaClient();

      const result = await camunda.cancelClusterRebalance();

      console.log(`Cancel requested; was a rebalance running? ${result.wasRunning}`);
      }

      cancelClusterRebalance

      Cluster

    • Cancel process instance

      Cancels a running process instance. As a cancellation includes more than just the removal of the process instance resource, the cancellation resource must be posted. Cancellation can wait on listener-related processing; when that processing does not complete in time, this endpoint can return 504. Other gateway timeout causes are also possible. Retry with backoff and inspect listener worker availability and logs when this repeats.

      Parameters

      • input: { operationReference?: number } & { processInstanceKey: string }
      • Optionaloptions: OperationOptions

      Returns CancelablePromise<void>

      async function cancelProcessInstanceExample(processDefinitionId: ProcessDefinitionId) {
      const camunda = createCamundaClient();

      // Create a process instance and get its key from the response
      const created = await camunda.createProcessInstance({
      processDefinitionId,
      });

      // Cancel the process instance using the key from the creation response
      await camunda.cancelProcessInstance({
      processInstanceKey: created.processInstanceKey,
      });
      }

      cancelProcessInstance

      Process instance

    • Cancel process instances (batch)

      Cancels multiple active or suspended process instances. Only ACTIVE and SUSPENDED root instances can be cancelled. A state filter narrows the batch to the given states. Requesting any state other than ACTIVE or SUSPENDED through the $eq or $in operators is rejected. Other state operators ($neq, $exists, $like) are applied as given, and the batch remains limited to ACTIVE and SUSPENDED instances. Without a state filter, both ACTIVE and SUSPENDED instances are selected. Any given filter for parentProcessInstanceKey is ignored and overridden during this batch operation. This is done asynchronously, the progress can be tracked using the batchOperationKey from the response and the batch operation status endpoint (/batch-operations/{batchOperationKey}).

      Returns CancelablePromise<BatchOperationCreatedResult>

      async function cancelProcessInstancesBatchOperationExample(
      processDefinitionKey: ProcessDefinitionKey
      ) {
      const camunda = createCamundaClient();

      const result = await camunda.cancelProcessInstancesBatchOperation({
      filter: {
      processDefinitionKey,
      },
      });

      console.log(`Batch operation key: ${result.batchOperationKey}`);
      }

      cancelProcessInstancesBatchOperation

      Process instance

    • Change cluster mode

      Transitions the cluster between processing and recovery mode. This is a non-blocking operation: the request is acknowledged once the change has been accepted, before the transition itself has completed. Entering recovery mode deactivates all partitions so that only a restricted set of read-only operations remains available; exiting recovery mode returns the cluster to normal processing. Returns the planned cluster change so its progress can be monitored via the topology. *

      Parameters

      Returns CancelablePromise<ClusterModeChangeResponse>

      async function changeClusterModeExample() {
      const camunda = createCamundaClient();

      // Transition the cluster into recovery mode. Pass `dryRun: true` to validate
      // the request and inspect the resulting plan without applying it. Omit it (or
      // set it to false) to actually trigger the transition.
      const change = await camunda.changeClusterMode({
      mode: 'RECOVERING',
      dryRun: true,
      });

      // Operations are grouped by physical tenant; a null tenant means the operation
      // is not scoped to one, such as a broker lifecycle operation.
      console.log(`Cluster change ${change.changeId}:`);
      for (const group of change.plannedChanges) {
      console.log(` ${group.physicalTenantId ?? 'cluster-wide'}:`);
      for (const op of group.operations) {
      console.log(` ${op.operation}${op.mode ? ` -> ${op.mode}` : ''}`);
      }
      }
      }

      changeClusterMode

      Recovery

    • Change the cluster mode of one or every physical tenant

      Transitions physical tenants between processing and recovery mode.

      If the physicalTenantId parameter is not provided, all available physical tenants are transitioned individually.

      Requires the cluster-admin security chain. Although this operation lists bearerAuth / basicAuth like the rest of the Orchestration Cluster API, it does not accept an Orchestration Cluster user's credentials — only the separate cluster-admin credentials are valid here. *

      Parameters

      Returns CancelablePromise<ClusterModeChangeResponse>

      async function changeClusterModeAsClusterAdminExample() {
      const camunda = createCamundaClient();

      // The cluster-admin variant can target a single physical tenant. Omit
      // `physicalTenantId` to apply the change to every physical tenant.
      const change = await camunda.changeClusterModeAsClusterAdmin({
      mode: 'RECOVERING',
      physicalTenantId: 'default',
      dryRun: true,
      });

      console.log(`Cluster change ${change.changeId}:`);
      for (const group of change.plannedChanges) {
      console.log(` ${group.physicalTenantId ?? 'cluster-wide'}:`);
      for (const op of group.operations) {
      console.log(` ${op.operation}${op.mode ? ` -> ${op.mode}` : ''}`);
      }
      }
      }

      changeClusterModeAsClusterAdmin

      Recovery

    • Parameters

      • Optionalopts: { disk?: boolean; memory?: boolean }

      Returns void

    • Complete user task

      Completes a user task with the given key. Completion waits for blocking task listeners on this lifecycle transition. If listener processing is delayed beyond the request timeout, this endpoint can return 504. Other gateway timeout causes are also possible. Retry with backoff and inspect listener worker availability and logs when this repeats.

      Parameters

      Returns CancelablePromise<void>

      async function completeUserTaskExample(userTaskKey: UserTaskKey) {
      const camunda = createCamundaClient();

      await camunda.completeUserTask({
      userTaskKey,
      variables: {
      approved: true,
      comment: 'Looks good',
      },
      });
      }

      completeUserTask

      User task

    • Correlate message

      Publishes a message and correlates it to a subscription. If correlation is successful it will return the first process instance key the message correlated with. The message is not buffered. Use the publish message endpoint to send messages that can be buffered.

      Parameters

      Returns CancelablePromise<MessageCorrelationResult>

      async function correlateMessageExample() {
      const camunda = createCamundaClient();

      const result = await camunda.correlateMessage({
      name: 'order-payment-received',
      correlationKey: 'ORD-12345',
      variables: {
      paymentId: 'PAY-123',
      amount: 99.95,
      },
      });

      console.log(`Message correlated to: ${result.processInstanceKey}`);
      }

      correlateMessage

      Message

    • Create admin user

      Creates a new user and assigns the admin role to it. This endpoint is only usable when users are managed in the Orchestration Cluster and while no user is assigned to the admin role. *

      Parameters

      Returns CancelablePromise<UserCreateResult>

      async function createAdminUserExample(username: Username) {
      const camunda = createCamundaClient();

      const result = await camunda.createAdminUser({
      username,
      name: 'Admin User',
      email: 'admin@example.com',
      password: 'admin-password-123',
      });

      console.log(`Created admin user: ${result.username}`);
      }

      createAdminUser

      Setup

    • Create agent instance

      Creates a new agent instance. The returned key identifies the instance and must be used in subsequent update and query calls.

      Parameters

      Returns CancelablePromise<AgentInstanceCreationResult>

      async function createAgentInstanceExample(
      elementInstanceKey: ElementInstanceKey,
      jobKey: JobKey,
      jobLeaseToken: JobLeaseToken
      ) {
      const camunda = createCamundaClient();

      // The batch must open with a CONFIGURATION item; it establishes the model,
      // provider and system prompt for the instance.
      const result = await camunda.createAgentInstance({
      elementInstanceKey,
      jobKey,
      jobLeaseToken,
      history: [
      {
      historyItemId: HistoryItemId.assumeExists('configuration-1'),
      loopIteration: 1,
      role: 'CONFIGURATION',
      content: [],
      producedAt: new Date().toISOString(),
      model: 'gpt-4o',
      provider: 'openai',
      systemPrompt: [{ contentType: 'TEXT', text: 'You are a helpful assistant.' }],
      },
      ],
      });

      console.log(`Created agent instance: ${result.agentInstanceKey}`);
      }

      createAgentInstance

      Agent instance

    • Deploy resources

      Deploys one or more resources, including BPMN processes, DMN decision models, forms, RPA resources, and generic files. A deployment can contain any file type. Files that are not interpreted as BPMN, DMN, form, or RPA resources are stored as deployable generic resources in the engine. This is an atomic call, i.e. either all resources are deployed or none of them are.

      Parameters

      Returns CancelablePromise<ExtendedDeploymentResult>

      Enriched deployment result with typed arrays (processes, decisions, decisionRequirements, forms, resources).

      async function deployResourcesFromFilesExample() {
      const camunda = createCamundaClient();

      // Node.js only: deploy directly from file paths
      const result = await camunda.deployResourcesFromFiles(['./process.bpmn', './decision.dmn']);

      console.log(`Deployment key: ${result.deploymentKey}`);
      }

      createDeployment

      Resource

    • Upload document

      Upload a document to the Camunda 8 cluster.

      Note that this is currently supported for document stores of type: AWS, Azure, GCP, in-memory (non-production), local (non-production)

      Parameters

      Returns CancelablePromise<DocumentReference>

      async function createDocumentExample() {
      const camunda = createCamundaClient();

      const file = new Blob(['Hello, world!'], { type: 'text/plain' });

      const result = await camunda.createDocument({
      file,
      metadata: { fileName: 'hello.txt' },
      });

      console.log(`Document ID: ${result.documentId}`);
      }

      createDocument

      Document

    • Upload multiple documents

      Upload multiple documents to the Camunda 8 cluster.

      The caller must provide a file name for each document, which will be used in case of a multi-status response to identify which documents failed to upload. The file name can be provided in the Content-Disposition header of the file part or in the fileName field of the metadata. You can add a parallel array of metadata objects. These are matched with the files based on index, and must have the same length as the files array. To pass homogenous metadata for all files, spread the metadata over the metadata array. A filename value provided explicitly via the metadata array in the request overrides the Content-Disposition header of the file part.

      In case of a multi-status response, the response body will contain a list of DocumentBatchProblemDetail objects, each of which contains the file name of the document that failed to upload and the reason for the failure. The client can choose to retry the whole batch or individual documents based on the response.

      Note that this is currently supported for document stores of type: AWS, Azure, GCP, in-memory (non-production), local (non-production)

      Parameters

      Returns CancelablePromise<DocumentCreationBatchResponse>

      async function createDocumentsExample() {
      const camunda = createCamundaClient();

      const file1 = new Blob(['File one'], { type: 'text/plain' });
      const file2 = new Blob(['File two'], { type: 'text/plain' });

      const result = await camunda.createDocuments({
      files: [file1, file2],
      metadataList: [{ fileName: 'one.txt' }, { fileName: 'two.txt' }],
      });

      for (const doc of result.createdDocuments ?? []) {
      console.log(`Created: ${doc.documentId}`);
      }
      }

      createDocuments

      Document

    • Update element instance variables

      Updates all the variables of a particular scope (for example, process instance, element instance) with the given variable data. Specify the element instance in the elementInstanceKey parameter. Variable updates can be delayed by listener-related processing; if processing exceeds the request timeout, this endpoint can return 504. Other gateway timeout causes are also possible. Retry with backoff and inspect listener worker availability and logs when this repeats.

      Parameters

      Returns CancelablePromise<void>

      async function createElementInstanceVariablesExample(elementInstanceKey: ElementInstanceKey) {
      const camunda = createCamundaClient();

      await camunda.createElementInstanceVariables({
      elementInstanceKey,
      variables: { orderId: 'ORD-12345', status: 'processing' },
      });
      }

      createElementInstanceVariables

      Element instance

    • Create group

      Create a new group.

      The supplied groupId is validated against ^[a-zA-Z0-9_~@.+-]+$ (max 256 characters) by IdentifierValidator.validateId in the runtime. This strict validation applies wherever the Groups API is available: in OIDC deployments that set camunda.security.authentication.oidc.groupsClaim the Groups API (including this endpoint) is disabled entirely, so group CRUD never sees externally-minted IdP IDs. The BYOG relaxation only loosens validation when a group is referenced as a member of a role or tenant (assignRoleToGroup, assignGroupToTenant); group CRUD itself always uses the strict default-id regex. The constraint is not advertised on the GroupId schema so that the same schema can be reused at member-reference sites without falsely rejecting externally-minted IdP group IDs there.

      Parameters

      Returns CancelablePromise<GroupCreateResult>

      async function createGroupExample(groupId: GroupId) {
      const camunda = createCamundaClient();

      const result = await camunda.createGroup({
      groupId,
      name: 'Engineering Team',
      });

      console.log(`Created group: ${result.groupId}`);
      }

      createGroup

      Group

    • Create a job worker that activates and processes jobs of the given type.

      Worker configuration fields inherit global defaults resolved via the unified configuration (environment variables or equivalent CAMUNDA_WORKER_* keys provided via CamundaOptions.config) when not explicitly set on the config object.

      Type Parameters

      • In extends ZodTypeAny<unknown, unknown, $ZodTypeInternals<unknown, unknown>> = any
      • Out extends ZodTypeAny<unknown, unknown, $ZodTypeInternals<unknown, unknown>> = any
      • Headers extends ZodTypeAny<unknown, unknown, $ZodTypeInternals<unknown, unknown>> = any

      Parameters

      Returns JobWorker

      async function createJobWorkerExample() {
      const camunda = createCamundaClient();

      const _worker = camunda.createJobWorker({
      jobType: 'payment-processing',
      jobTimeoutMs: 30000,
      maxParallelJobs: 5,
      jobHandler: async (job): Promise<JobActionReceipt> => {
      console.log(`Processing job ${job.jobKey}`);
      return job.complete({ processed: true });
      },
      });

      // Workers run continuously until closed
      // worker.close();
      }
      async function jobWorkerWithErrorHandlingExample() {
      const camunda = createCamundaClient();

      const worker = camunda.createJobWorker({
      jobType: 'email-sending',
      jobTimeoutMs: 60000,
      maxParallelJobs: 10,
      pollIntervalMs: 300,
      jobHandler: async (job): Promise<JobActionReceipt> => {
      try {
      console.log(`Sending email for job ${job.jobKey}`);
      return job.complete({ sent: true });
      } catch (err) {
      return job.fail({
      errorMessage: String(err),
      retries: (job.retries ?? 1) - 1,
      });
      }
      },
      });

      void worker;
      }
    • Create process instance

      Creates and starts an instance of the specified process. The process definition to use to create the instance can be specified either using its unique key (as returned by Deploy resources), or using the BPMN process id and a version. If only the process definition id is given, the latest ACTIVE version is used. If no ACTIVE version exists, the request is rejected as not found.

      Waits for the completion of the process instance before returning a result when awaitCompletion is enabled.

      Returns CancelablePromise<CreateProcessInstanceResult>

      async function createProcessInstanceByIdExample(processDefinitionId: ProcessDefinitionId) {
      const camunda = createCamundaClient();

      const result = await camunda.createProcessInstance({
      processDefinitionId,
      variables: {
      orderId: 'ORD-12345',
      amount: 99.95,
      },
      });

      console.log(`Started process instance: ${result.processInstanceKey}`);
      }
      async function createProcessInstanceByKeyExample(processDefinitionKey: ProcessDefinitionKey) {
      const camunda = createCamundaClient();

      // Key from a previous API response (e.g. deployment)
      const result = await camunda.createProcessInstance({
      processDefinitionKey,
      variables: {
      orderId: 'ORD-12345',
      amount: 99.95,
      },
      });

      console.log(`Started process instance: ${result.processInstanceKey}`);
      }

      createProcessInstance

      Process instance

    • Create a threaded job worker that runs handler logic in a pool of worker threads. The handler must be a separate module file that exports a default function with signature (job, client) => Promise<JobActionReceipt>.

      This keeps the main event loop free for polling and I/O, dramatically improving throughput for CPU-bound job handlers.

      Worker configuration fields inherit global defaults resolved via the unified configuration (environment variables or equivalent CAMUNDA_WORKER_* keys provided via CamundaOptions.config) when not explicitly set on the config object.

      Type Parameters

      • In extends ZodTypeAny<unknown, unknown, $ZodTypeInternals<unknown, unknown>> = any
      • Out extends ZodTypeAny<unknown, unknown, $ZodTypeInternals<unknown, unknown>> = any
      • Headers extends ZodTypeAny<unknown, unknown, $ZodTypeInternals<unknown, unknown>> = any

      Parameters

      Returns ThreadedJobWorker

      const worker = client.createThreadedJobWorker({
      jobType: 'cpu-heavy-task',
      handlerModule: './my-handler.js',
      maxParallelJobs: 32,
      jobTimeoutMs: 30000,
      })
    • Delete decision instance

      Delete all associated decision evaluations based on provided key. *

      Parameters

      • input: { operationReference?: number } & { decisionEvaluationKey: string }
      • Optionaloptions: OperationOptions

      Returns CancelablePromise<void>

      async function deleteDecisionInstanceExample(decisionEvaluationKey: DecisionEvaluationKey) {
      const camunda = createCamundaClient();

      await camunda.deleteDecisionInstance({ decisionEvaluationKey });
      }

      deleteDecisionInstance

      Decision instance

    • Delete document

      Delete a document from the Camunda 8 cluster.

      Note that this is currently supported for document stores of type: AWS, Azure, GCP, in-memory (non-production), local (non-production)

      Parameters

      Returns CancelablePromise<void>

      async function deleteDocumentExample(documentId: DocumentId) {
      const camunda = createCamundaClient();

      await camunda.deleteDocument({ documentId });
      }

      deleteDocument

      Document

    • Delete a history backup across physical tenants

      Deletes the history backup with the given id from every physical tenant of the cluster, or from the one named by physicalTenantId. A tenant that does not hold the backup has already reached the requested end state, so it counts as deleted rather than as a failure.

      The request is all-or-nothing: a physical tenant the backup cannot be deleted from fails the whole request, and the deletions that already succeeded on other tenants are not undone. Narrow the request with physicalTenantId to delete from the tenants that can still be reached.

      Requires the cluster-admin security chain. Although this operation lists bearerAuth / basicAuth like the rest of the Orchestration Cluster API, it does not accept an Orchestration Cluster user's credentials — only the separate cluster-admin credentials are valid here. Only available on clusters whose secondary storage is Elasticsearch or OpenSearch. Use DELETE /v2/backups/history/{backupId} to act as a single physical tenant. *

      Parameters

      Returns CancelablePromise<void>

      async function deleteHistoryBackupAsClusterAdminExample() {
      const camunda = createCamundaClient();

      // Deletion fans out to every physical tenant (or a single one when
      // `physicalTenantId` is given) and is not undone if a later tenant fails.
      await camunda.deleteHistoryBackupAsClusterAdmin({ backupId: 100 });
      }

      deleteHistoryBackupAsClusterAdmin

      Backup

    • Delete process instance

      Deletes a process instance. Only instances that are completed or terminated can be deleted. *

      Parameters

      • input: { operationReference?: number } & { processInstanceKey: string }
      • Optionaloptions: OperationOptions

      Returns CancelablePromise<void>

      async function deleteProcessInstanceExample(processInstanceKey: ProcessInstanceKey) {
      const camunda = createCamundaClient();

      await camunda.deleteProcessInstance({ processInstanceKey });
      }

      deleteProcessInstance

      Process instance

    • Delete process instances (batch)

      Delete multiple process instances. This will delete the historic data from secondary storage. Only process instances in a final state (COMPLETED or TERMINATED) can be deleted. This is done asynchronously, the progress can be tracked using the batchOperationKey from the response and the batch operation status endpoint (/batch-operations/{batchOperationKey}).

      Returns CancelablePromise<BatchOperationCreatedResult>

      async function deleteProcessInstancesBatchOperationExample(
      processDefinitionKey: ProcessDefinitionKey
      ) {
      const camunda = createCamundaClient();

      const result = await camunda.deleteProcessInstancesBatchOperation({
      filter: {
      processDefinitionKey,
      },
      });

      console.log(`Batch operation key: ${result.batchOperationKey}`);
      }

      deleteProcessInstancesBatchOperation

      Process instance

    • Delete resource

      Deletes a deployed resource. This can be a process definition, decision requirements definition, or form definition deployed using the deploy resources endpoint. Specify the resource you want to delete in the resourceKey parameter.

      Once a resource has been deleted it cannot be recovered. If the resource needs to be available again, a new deployment of the resource is required.

      By default, only the resource itself is deleted from the runtime state. To also delete the historic data associated with a resource, set the deleteHistory flag in the request body to true. History deletion is supported for process definitions and decision requirements definitions; for other resource types (forms, generic resources) the flag is ignored and no history is deleted.

      The two supported types differ in how the history is removed. For a decision requirements definition the history is deleted asynchronously via a batch operation whose details are returned in the batchOperation field of the response. For a process definition that still exists in the runtime state, the definition first drains its running instances and its history is deleted asynchronously once the definition is fully removed cluster-wide; no batch operation is returned in the response. If the process definition has already been removed from the runtime state and the deletion is later re-triggered with deleteHistory set to true, a batch operation is created immediately and returned in the batchOperation field. *

      Parameters

      • input: { deleteHistory?: boolean; operationReference?: number } & {
            resourceKey: string;
        }
        • OptionaldeleteHistory?: boolean

          Indicates if the historic data associated with the resource should also be deleted asynchronously.

          This flag is effective for process definitions and decision requirements definitions. For other resource types (forms, generic resources) it is ignored and no history is deleted. For a decision requirements definition the batchOperation field in the response carries the created batch operation. For a process definition the history is deleted as part of the definition's draining/deletion lifecycle and no batch operation is returned.

        • OptionaloperationReference?: number
        • resourceKey: string
      • Optionaloptions: OperationOptions

      Returns CancelablePromise<DeleteResourceResponse>

      async function deleteResourceExample(resourceKey: ProcessDefinitionKey) {
      const camunda = createCamundaClient();

      // Use a process definition key as a resource key for deletion
      await camunda.deleteResource({
      resourceKey,
      });
      }

      deleteResource

      Resource

    • Delete a runtime backup across physical tenants

      Deletes the runtime backup with the given id from every physical tenant of the cluster, or from the one named by physicalTenantId. A tenant that does not hold the backup has already reached the requested end state, so it counts as deleted rather than as a failure — the same as deleting an unknown backup id through the per-physical-tenant endpoint.

      The request is all-or-nothing: a physical tenant the backup cannot be deleted from fails the whole request, and the deletions that already succeeded on other tenants are not undone. Narrow the request with physicalTenantId to delete from the tenants that can still be reached.

      Requires the cluster-admin security chain. Although this operation lists bearerAuth / basicAuth like the rest of the Orchestration Cluster API, it does not accept an Orchestration Cluster user's credentials — only the separate cluster-admin credentials are valid here. Use DELETE /v2/backups/runtime/{backupId} to act as a single physical tenant. *

      Parameters

      Returns CancelablePromise<void>

      async function deleteRuntimeBackupAsClusterAdminExample() {
      const camunda = createCamundaClient();

      // Deletion fans out to every physical tenant (or a single one when
      // `physicalTenantId` is given) and is not undone if a later tenant fails.
      await camunda.deleteRuntimeBackupAsClusterAdmin({ backupId: 100 });
      }

      deleteRuntimeBackupAsClusterAdmin

      Backup

    • Delete runtime backup state

      Resets the runtime backup state of every partition of the physical tenant, clearing all checkpoint info, backup info, checkpoint metadata, and backup ranges. Used when switching backup stores.

      Parameters

      Returns CancelablePromise<void>

      async function deleteRuntimeBackupStateExample() {
      const camunda = createCamundaClient();

      // Clears all checkpoint info, backup info, checkpoint metadata, and backup
      // ranges on every partition. Used when switching backup stores.
      await camunda.deleteRuntimeBackupState();
      }

      deleteRuntimeBackupState

      Backup

    • Delete runtime backup state across physical tenants

      Resets the runtime backup state of every partition of every physical tenant of the cluster, or of the one named by physicalTenantId, clearing all checkpoint info, backup info, checkpoint metadata, and backup ranges. Used when switching backup stores.

      The request is all-or-nothing: a physical tenant whose state cannot be reset fails the whole request, and the resets that already succeeded on other tenants are not undone. Narrow the request with physicalTenantId to reset the tenants that can still be reached.

      Requires the cluster-admin security chain. Although this operation lists bearerAuth / basicAuth like the rest of the Orchestration Cluster API, it does not accept an Orchestration Cluster user's credentials — only the separate cluster-admin credentials are valid here. Use DELETE /v2/backups/runtime/state to act as a single physical tenant. *

      Returns CancelablePromise<void>

      async function deleteRuntimeBackupStateAsClusterAdminExample() {
      const camunda = createCamundaClient();

      // Clears all checkpoint info, backup info, checkpoint metadata, and backup
      // ranges on every partition of every targeted physical tenant (or a single one
      // when `physicalTenantId` is given). Used when switching backup stores.
      await camunda.deleteRuntimeBackupStateAsClusterAdmin({});
      }

      deleteRuntimeBackupStateAsClusterAdmin

      Backup

    • Emit the standard support log preamble & redacted configuration to the current support logger. Safe to call multiple times; subsequent calls are ignored (idempotent). Useful when a custom supportLogger was injected and you still want the canonical header & config dump.

      Returns void

    • Evaluate root level conditional start events

      Evaluates root-level conditional start events for process definitions. If the evaluation is successful, it will return the keys of all created process instances, along with their associated process definition key. Multiple root-level conditional start events of the same process definition can trigger if their conditions evaluate to true.

      Parameters

      Returns CancelablePromise<EvaluateConditionalResult>

      async function evaluateConditionalsExample(tenantId: TenantId) {
      const camunda = createCamundaClient();

      const result = await camunda.evaluateConditionals({
      variables: { orderReady: true },
      tenantId,
      });

      console.log(`Evaluated conditionals: ${JSON.stringify(result)}`);
      }

      evaluateConditionals

      Conditional

    • Evaluate decision

      Evaluates a decision. You specify the decision to evaluate either by using its unique key (as returned by DeployResource), or using the decision ID. When using the decision ID, the latest deployed version of the decision is used.

      Returns CancelablePromise<EvaluateDecisionResult>

      async function evaluateDecisionByIdExample(decisionDefinitionId: DecisionDefinitionId) {
      const camunda = createCamundaClient();

      const result = await camunda.evaluateDecision({
      decisionDefinitionId,
      variables: {
      amount: 1000,
      invoiceCategory: 'Misc',
      },
      });

      console.log(`Decision: ${result.decisionDefinitionId}`);
      console.log(`Output: ${result.output}`);
      }
      async function evaluateDecisionByKeyExample(decisionDefinitionKey: DecisionDefinitionKey) {
      const camunda = createCamundaClient();

      const result = await camunda.evaluateDecision({
      decisionDefinitionKey,
      variables: {
      amount: 1000,
      invoiceCategory: 'Misc',
      },
      });

      console.log(`Decision output: ${result.output}`);
      }

      evaluateDecision

      Decision definition

    • Returns Promise<string | undefined>

    • Returns Promise<Record<string, string>>

    • Public accessor for current backpressure adaptive limiter state (stable)

      Returns
          | {
              backoffMs: number;
              consecutive: number;
              permitsCurrent: number;
              permitsMax: number
              | null;
              severity: BackpressureSeverity;
              waiters: number;
          }
          | {
              consecutive: number;
              permitsCurrent: number;
              permitsMax: null;
              severity: string;
              waiters: number;
          }

    • Get exporting status of the whole cluster

      Returns the exporting status of the whole cluster, folded over the exporting status of every physical tenant. Only PAUSED and SOFT_PAUSED confirm that exporting is paused cluster-wide; every other value means at least one physical tenant is not paused, so callers should keep polling. A physical tenant that itself reports MIXED makes the whole cluster MIXED.

      Requires the cluster-admin security chain. Although this operation lists bearerAuth / basicAuth like the rest of the Orchestration Cluster API, it does not accept an Orchestration Cluster user's credentials — only the separate cluster-admin credentials are valid here. *

      Parameters

      Returns CancelablePromise<ExportingStatusResponse>

      async function getClusterExportingStatusExample() {
      const camunda = createCamundaClient();

      // Reports the aggregated exporting status of the whole cluster — useful to
      // confirm exporting has paused everywhere before taking a cluster-wide backup.
      const { status } = await camunda.getClusterExportingStatus();
      console.log(`Cluster exporting status: ${status}`);
      }

      getClusterExportingStatus

      Exporting

    • Report the cluster's current leadership balance

      Reports whether the cluster is currently balanced, the current leadership state of every partition, and what became of the last rebalance to finish. The last completed rebalance is held in memory by the coordinating broker, so none will be reported if the coordinator has moved or restarted since the last rebalance.

      Requires the cluster-admin security chain. Although this operation lists bearerAuth / basicAuth like the rest of the Orchestration Cluster API, it does not accept an Orchestration Cluster user's credentials — only the separate cluster-admin credentials are valid here. *

      Parameters

      Returns CancelablePromise<ClusterBalanceResponse>

      async function getClusterRebalanceExample() {
      const camunda = createCamundaClient();

      const balance = await camunda.getClusterRebalance();

      console.log(`Cluster balance state: ${balance.state}`);
      for (const partition of balance.partitions) {
      console.log(
      ` Partition ${partition.partitionId}: state=${partition.state}, currentLeader=${partition.currentLeader}, desiredLeader=${partition.desiredLeader}`
      );
      }
      if (balance.runningRebalance) {
      console.log(`Running rebalance id=${balance.runningRebalance.rebalanceId}`);
      }
      }

      getClusterRebalance

      Cluster

    • Get the status of the whole cluster

      Checks the health status of the whole cluster, aggregated over all physical tenants. Returns HEALTHY when every physical tenant is healthy, DOWN when no physical tenant can process work, and DEGRADED in every other case. No per-tenant detail is reported; use GET /cluster/v2/topology for that.

      This endpoint is public and requires no authentication, unlike PATCH /cluster/v2/mode below, which needs cluster-admin credentials. *

      Parameters

      Returns CancelablePromise<ClusterStatusResponse>

      async function getClusterStatusExample() {
      const camunda = createCamundaClient();

      const status = await camunda.getClusterStatus();

      console.log(`Cluster status: ${status.status}`);
      }

      getClusterStatus

      Cluster

    • Get the topology of the whole cluster

      Obtains the topology of the whole cluster, aggregated over all physical tenants. Cluster-level information is reported once; partition layout, replication and per-partition role, health and state are reported per physical tenant.

      Requires the cluster-admin security chain. Although this operation lists bearerAuth / basicAuth like the rest of the Orchestration Cluster API, it does not accept an Orchestration Cluster user's credentials — only the separate cluster-admin credentials are valid here. Use GET /v2/topology for the topology of a single physical tenant. *

      Parameters

      Returns CancelablePromise<ClusterTopologyResponse>

      async function getClusterTopologyExample() {
      const camunda = createCamundaClient();

      // Returns the full cluster topology: brokers, physical tenants (in a
      // multi-tenant cluster), cluster size, and gateway version.
      const topology = await camunda.getClusterTopology();

      console.log(
      `Cluster ${topology.clusterId} — ${topology.clusterSize} broker(s), gateway ${topology.gatewayVersion}`
      );
      for (const broker of topology.brokers) {
      console.log(` Broker ${broker.brokerId}: ${broker.host}:${broker.port} (${broker.version})`);
      }
      for (const tenant of topology.physicalTenants) {
      console.log(
      ` Physical tenant ${tenant.physicalTenantId}: ${tenant.partitionsCount} partition(s), replication ${tenant.replicationFactor}`
      );
      }
      }

      getClusterTopology

      Cluster

    • Get the upgrade-readiness status of the whole cluster

      Reports one overall upgrade-readiness status for the whole cluster, folded over every physical tenant and condition. MIGRATED only once every known condition has migrated for every known physical tenant; MIGRATION_IN_PROGRESS when at least one is confirmed not yet migrated; UNKNOWN otherwise (including before anything has been reported yet). No per-tenant or per-condition detail is reported here; see the upgradeReadiness actuator endpoint for that. *

      Parameters

      Returns CancelablePromise<ClusterUpgradeStatusResponse>

      async function getClusterUpgradeStatusExample() {
      const camunda = createCamundaClient();

      const upgradeStatus = await camunda.getClusterUpgradeStatus();

      console.log(`Cluster upgrade-readiness status: ${upgradeStatus.status}`);
      }

      getClusterUpgradeStatus

      Cluster

    • Download document

      Download a document from the Camunda 8 cluster.

      Note that this is currently supported for document stores of type: AWS, Azure, GCP, in-memory (non-production), local (non-production)

      Parameters

      Returns CancelablePromise<Blob>

      async function getDocumentExample(documentId: DocumentId) {
      const camunda = createCamundaClient();

      await camunda.getDocument({ documentId });

      console.log(`Downloaded document: ${documentId}`);
      }

      getDocument

      Document

    • Internal accessor (read-only) for eventual consistency error mode.

      Returns "throw" | "result"

    • Get exporting status

      Returns the exporting status of the physical tenant, aggregated over every replica of every one of its partitions.

      Because pause and resume are applied to all replicas, the status is only a single phase if every replica reports that phase; otherwise it is MIXED, which means a pause or resume is still in flight or was only partially applied. Backup tooling should treat only PAUSED and SOFT_PAUSED as confirmation that exporting is paused.

      Parameters

      Returns CancelablePromise<ExportingStatusResponse>

      async function getExportingStatusExample() {
      const camunda = createCamundaClient();

      // Reports the aggregated exporting status of the physical tenant — useful to
      // confirm exporting has actually paused before taking a backup, and that it
      // has resumed afterwards.
      const { status } = await camunda.getExportingStatus();
      console.log(`Exporting status: ${status}`);
      }

      getExportingStatus

      Exporting

    • Get a history backup across physical tenants

      Reports what every physical tenant of the cluster, or the one named by physicalTenantId, holds for the given backup id. There is no aggregated cluster-level state: a tenant that was reached and does not hold this backup reports NOT_FOUND, which is a successful observation rather than a failure.

      The request is all-or-nothing: a physical tenant whose state cannot be read fails the whole request. Narrow the request with physicalTenantId to read the tenants that can still be reached.

      Requires the cluster-admin security chain. Although this operation lists bearerAuth / basicAuth like the rest of the Orchestration Cluster API, it does not accept an Orchestration Cluster user's credentials — only the separate cluster-admin credentials are valid here. Only available on clusters whose secondary storage is Elasticsearch or OpenSearch. Use GET /v2/backups/history/{backupId} to act as a single physical tenant. *

      Parameters

      Returns CancelablePromise<ClusterHistoryBackupInfo>

      async function getHistoryBackupAsClusterAdminExample() {
      const camunda = createCamundaClient();

      // Looking a backup id up directly lists every targeted physical tenant,
      // including the ones reporting `NOT_FOUND` — a backup that only some tenants
      // hold is a supported outcome.
      const backup = await camunda.getHistoryBackupAsClusterAdmin({ backupId: 100 });

      console.log(`Cluster history backup ${backup.backupId}:`);
      for (const tenant of backup.physicalTenants) {
      console.log(` [${tenant.physicalTenantId}] ${tenant.state}`);
      }
      }

      getHistoryBackupAsClusterAdmin

      Backup

    • Get resource

      Returns a deployed resource. :::info This endpoint does not return BPMN process definitions, DMN decision definitions, or form resources. To query BPMN process definitions or DMN decision definitions, use their respective APIs. :::

      Parameters

      Returns CancelablePromise<ResourceResult>

      async function getResourceExample(resourceKey: ProcessDefinitionKey) {
      const camunda = createCamundaClient();

      const resource = await camunda.getResource(
      {
      resourceKey,
      },
      { consistency: { waitUpToMs: 0 } }
      );

      console.log(`Resource: ${resource.resourceName} (${resource.resourceId})`);
      }

      getResource

      Resource

      eventual - this endpoint is backed by data that is eventually consistent with the system state.

    • Get RPA resource content (deprecated)

      Deprecated — use /resources/{resourceKey}/content/binary instead, which supports all resource types and returns content as binary (octet-stream).

      Returns the content of a deployed RPA resource as JSON. :::info This endpoint only supports RPA resources. For generic resource content in binary format, use the /resources/{resourceKey}/content/binary endpoint. :::

      Parameters

      Returns CancelablePromise<{ [key: string]: unknown }>

      async function getResourceContentExample(resourceKey: ProcessDefinitionKey) {
      const camunda = createCamundaClient();

      const content = await camunda.getResourceContent(
      {
      resourceKey,
      },
      { consistency: { waitUpToMs: 0 } }
      );

      console.log(`Content retrieved (type: ${typeof content})`);
      }

      getResourceContent

      Resource

      eventual - this endpoint is backed by data that is eventually consistent with the system state.

    • Get resource content as binary

      Returns the content of a deployed resource in binary format (octet-stream). :::info This endpoint does not return BPMN process definitions, DMN decision definitions, or form resources. To query BPMN process definitions or DMN decision definitions, use their respective APIs. :::

      Parameters

      Returns CancelablePromise<Blob>

      async function getResourceContentBinaryExample(resourceKey: ProcessDefinitionKey) {
      const camunda = createCamundaClient();

      const content = await camunda.getResourceContentBinary(
      {
      resourceKey,
      },
      { consistency: { waitUpToMs: 0 } }
      );

      console.log(`Binary content retrieved (type: ${typeof content})`);
      }

      getResourceContentBinary

      Resource

      eventual - this endpoint is backed by data that is eventually consistent with the system state.

    • Get the status of the restore that is currently in progress

      Returns the status of the restore that is currently in progress, reported per broker and per partition. There is at most one restore in flight at any time. Once the restore has finished this endpoint returns 404; the per-partition detail is not retained after completion. *

      Parameters

      Returns CancelablePromise<RestoreStatusResponse>

      async function getRestoreStatusExample() {
      const camunda = createCamundaClient();

      const status = await camunda.getRestoreStatus();

      console.log(`Restore status: ${status.status} (change ${status.changeId})`);
      for (const broker of status.brokers) {
      console.log(
      ` Broker ${broker.brokerId}: ${broker.partitionsRestored}/${broker.partitionsToRestore} partitions restored`
      );
      }
      }

      getRestoreStatus

      Recovery

    • Get a runtime backup across physical tenants

      Reports what every physical tenant of the cluster, or the one named by physicalTenantId, holds for the given backup id, plus the state aggregated over all of them. A tenant that was reached and does not hold this backup reports DOES_NOT_EXIST, which is a successful observation rather than a failure — so a backup only some tenants hold aggregates to INCOMPLETE, the same way a backup only some partitions hold does within one tenant.

      The request is all-or-nothing: a physical tenant whose state cannot be read fails the whole request. Narrow the request with physicalTenantId to read the tenants that can still be reached.

      Requires the cluster-admin security chain. Although this operation lists bearerAuth / basicAuth like the rest of the Orchestration Cluster API, it does not accept an Orchestration Cluster user's credentials — only the separate cluster-admin credentials are valid here. Use GET /v2/backups/runtime/{backupId} to act as a single physical tenant. *

      Parameters

      Returns CancelablePromise<ClusterRuntimeBackupInfo>

      async function getRuntimeBackupAsClusterAdminExample() {
      const camunda = createCamundaClient();

      // Looking a backup id up directly lists every targeted physical tenant,
      // including the ones reporting `DOES_NOT_EXIST` — a backup that only some
      // tenants hold is a supported outcome.
      const backup = await camunda.getRuntimeBackupAsClusterAdmin({ backupId: 100 });

      console.log(`Cluster runtime backup ${backup.backupId}: ${backup.state}`);
      for (const tenant of backup.physicalTenants) {
      console.log(` [${tenant.physicalTenantId}] ${tenant.state}`);
      }
      }

      getRuntimeBackupAsClusterAdmin

      Backup

    • Get runtime backup state

      Returns the current checkpoint and backup state of every partition of the physical tenant. Unlike the backupRuntime actuator, this fails the whole request if the checkpoint state or the backup ranges cannot be retrieved from any partition, instead of silently returning an empty section.

      Parameters

      Returns CancelablePromise<RuntimeBackupState>

      async function getRuntimeBackupStateExample() {
      const camunda = createCamundaClient();

      const state = await camunda.getRuntimeBackupState();

      for (const checkpoint of state.checkpointStates) {
      console.log(
      `Partition ${checkpoint.partitionId} checkpoint ${checkpoint.checkpointId} (${checkpoint.checkpointType})`
      );
      }
      for (const range of state.ranges) {
      console.log(
      `Partition ${range.partitionId} range: ${range.start?.checkpointId} -> ${range.end?.checkpointId}`
      );
      }
      }

      getRuntimeBackupState

      Backup

    • Get runtime backup state across physical tenants

      Reports the checkpoint and backup state of every partition of every physical tenant of the cluster, or of the one named by physicalTenantId, grouped by physical tenant. Checkpoint ids and log positions only mean anything within one physical tenant's partitions, so nothing is aggregated across tenants.

      The request is all-or-nothing: a physical tenant whose state cannot be read fails the whole request rather than contributing an empty section, which an operator making a delete or restore decision could not tell apart from "nothing to report yet". Narrow the request with physicalTenantId to read the tenants that can still be reached.

      Requires the cluster-admin security chain. Although this operation lists bearerAuth / basicAuth like the rest of the Orchestration Cluster API, it does not accept an Orchestration Cluster user's credentials — only the separate cluster-admin credentials are valid here. Use GET /v2/backups/runtime/state to act as a single physical tenant. *

      Returns CancelablePromise<ClusterRuntimeBackupState>

      async function getRuntimeBackupStateAsClusterAdminExample() {
      const camunda = createCamundaClient();

      // Returns the checkpoint and backup state of every targeted physical tenant.
      // Nothing is aggregated across tenants — checkpoint ids and log positions only
      // mean anything within one tenant's partitions.
      const clusterState = await camunda.getRuntimeBackupStateAsClusterAdmin({});

      for (const tenant of clusterState.physicalTenants) {
      console.log(`[${tenant.physicalTenantId}] ${tenant.state.checkpointStates.length} checkpoints`);
      }
      }

      getRuntimeBackupStateAsClusterAdmin

      Backup

    • Get physical tenant status

      Checks the health status of the default physical tenant by verifying if there's at least one partition of its group with a healthy leader. This endpoint is scoped to the default physical tenant only: it is available unprefixed and at /physical-tenants/default/v2/status, but not for any other physical tenant id (/physical-tenants/{id}/v2/status returns 404 for every other id, whether or not a physical tenant with that id exists). On a cluster with only the default physical tenant this endpoint answers the same question as /cluster/v2/status, though not with the same response: /cluster/v2/status reports its status in a body and so also distinguishes a degraded tenant from a healthy one. Use /cluster/v2/status for the aggregated status of the whole cluster, or /physical-tenants/{id}/v2/topology for the health of a specific physical tenant's partitions. *

      Parameters

      Returns CancelablePromise<void>

      async function getStatusExample() {
      const camunda = createCamundaClient();

      await camunda.getStatus();

      console.log('Cluster is healthy');
      }

      getStatus

      Cluster

    • System configuration (alpha)

      Returns the current system configuration. The response is an envelope that groups settings by feature area.

      This endpoint is an alpha feature and may be subject to change in future releases.

      Parameters

      Returns CancelablePromise<SystemConfigurationResponse>

      async function getSystemConfigurationExample() {
      const camunda = createCamundaClient();

      const config = await camunda.getSystemConfiguration();

      console.log(`Configuration loaded: ${JSON.stringify(config)}`);
      }

      getSystemConfiguration

      System

    • Get cluster topology

      Obtains the current topology of the cluster the gateway is part of. *

      Parameters

      Returns CancelablePromise<TopologyResponse>

      async function getTopologyExample() {
      const camunda = createCamundaClient();

      const topology = await camunda.getTopology();

      console.log(`Cluster size: ${topology.clusterSize}`);
      console.log(`Partitions: ${topology.partitionsCount}`);
      for (const broker of topology.brokers ?? []) {
      console.log(` Broker ${broker.nodeId}: ${broker.host}:${broker.port}`);
      }
      }

      getTopology

      Cluster

    • Get variable

      Get a variable by its key.

      This endpoint returns both process-level and local (element-scoped) variables. The variable's scopeKey indicates whether it's a process-level variable or scoped to a specific element instance. *

      Parameters

      Returns CancelablePromise<VariableResult>

      async function getVariableExample(variableKey: VariableKey) {
      const camunda = createCamundaClient();

      const variable = await camunda.getVariable(
      { variableKey },
      { consistency: { waitUpToMs: 5000 } }
      );

      console.log(`${variable.name} = ${variable.value}`);
      }

      getVariable

      Variable

      eventual - this endpoint is backed by data that is eventually consistent with the system state.

    • Return a read-only snapshot of currently registered job workers.

      Returns any[]

    • List history backups

      Returns a list of all available history backups of the physical tenant, with their state and additional info, most recent first by snapshot start time.

      Only available on clusters whose secondary storage is Elasticsearch or OpenSearch.

      Parameters

      Returns CancelablePromise<HistoryBackupInfo[]>

      async function listHistoryBackupsExample() {
      const camunda = createCamundaClient();

      // `prefix` must end in a single '*'. Omit it to list every history backup.
      const backups = await camunda.listHistoryBackups({ prefix: '10*' });

      for (const backup of backups) {
      console.log(`History backup ${backup.backupId}: ${backup.state}`);
      }
      }

      listHistoryBackups

      Backup

    • List history backups across physical tenants

      Lists the history backups of every physical tenant of the cluster, or of the one named by physicalTenantId, grouped by backup id. A backup id that only some physical tenants hold is a supported outcome rather than a degraded one, so only the tenants that hold it are listed under it.

      The request is all-or-nothing: a physical tenant whose backups cannot be read fails the whole request rather than silently dropping out of the listing. Narrow the request with physicalTenantId to list the backups of the tenants that can still be read.

      Requires the cluster-admin security chain. Although this operation lists bearerAuth / basicAuth like the rest of the Orchestration Cluster API, it does not accept an Orchestration Cluster user's credentials — only the separate cluster-admin credentials are valid here. Only available on clusters whose secondary storage is Elasticsearch or OpenSearch. Use GET /v2/backups/history to act as a single physical tenant. *

      Parameters

      Returns CancelablePromise<ClusterHistoryBackupInfo[]>

      async function listHistoryBackupsAsClusterAdminExample() {
      const camunda = createCamundaClient();

      // `prefix` must end in a single '*'. Omit `physicalTenantId` to span every
      // physical tenant of the cluster — results are grouped by backup id, and each
      // group lists only the tenants that hold that id.
      const backups = await camunda.listHistoryBackupsAsClusterAdmin({ prefix: '10*' });

      for (const backup of backups) {
      console.log(`Cluster history backup ${backup.backupId}:`);
      for (const tenant of backup.physicalTenants) {
      console.log(` [${tenant.physicalTenantId}] ${tenant.state}`);
      }
      }
      }

      listHistoryBackupsAsClusterAdmin

      Backup

    • List runtime backups

      Returns a list of all available runtime backups of the physical tenant, with their state and additional info, sorted in descending order of backupId.

      Parameters

      Returns CancelablePromise<BackupInfo[]>

      async function listRuntimeBackupsExample() {
      const camunda = createCamundaClient();

      // `prefix` must end in a single '*'. Omit it to list every backup.
      const backups = await camunda.listRuntimeBackups({ prefix: '10*' });

      for (const backup of backups) {
      console.log(`Backup ${backup.backupId}: ${backup.state}`);
      }
      }

      listRuntimeBackups

      Backup

    • List runtime backups across physical tenants

      Lists the runtime backups of every physical tenant of the cluster, or of the one named by physicalTenantId, grouped by backup id. Every group reports every targeted tenant, including the ones holding nothing for that id, so a backup only some tenants hold aggregates to INCOMPLETE here exactly as it does when looked up directly — the state of a listed group can be trusted to say whether the cluster can be restored from it. A backup id that only some physical tenants hold is a supported outcome rather than a degraded one; tenants that generate their own backup ids never share one, so in that mode each backup forms its own group and the other tenants report DOES_NOT_EXIST under it.

      The request is all-or-nothing: a physical tenant whose backups cannot be read fails the whole request rather than silently dropping out of the listing. Narrow the request with physicalTenantId to list the backups of the tenants that can still be read.

      Requires the cluster-admin security chain. Although this operation lists bearerAuth / basicAuth like the rest of the Orchestration Cluster API, it does not accept an Orchestration Cluster user's credentials — only the separate cluster-admin credentials are valid here. Use GET /v2/backups/runtime to act as a single physical tenant. *

      Parameters

      Returns CancelablePromise<ClusterRuntimeBackupInfo[]>

      async function listRuntimeBackupsAsClusterAdminExample() {
      const camunda = createCamundaClient();

      // `prefix` must end in a single '*'. Omit `physicalTenantId` to span every
      // physical tenant — results are grouped by backup id, and each group reports
      // every targeted tenant, including ones holding nothing for that id (reported
      // as `DOES_NOT_EXIST`).
      const backups = await camunda.listRuntimeBackupsAsClusterAdmin({ prefix: '10*' });

      for (const backup of backups) {
      console.log(`Cluster runtime backup ${backup.backupId}: ${backup.state}`);
      for (const tenant of backup.physicalTenants) {
      console.log(` [${tenant.physicalTenantId}] ${tenant.state}`);
      }
      }
      }

      listRuntimeBackupsAsClusterAdmin

      Backup

    • List secrets

      List the camunda.secrets.* references known for the caller's physical tenant.

      Only references the caller holds SECRET:READ on are returned. This endpoint never returns secret values, only the reference names.

      The references are read from the secret stores configured for the caller's physical tenant. A store may hold names outside the reference name charset (for example one containing a dot); those are omitted, since /secrets/resolve would reject them and no permission can be granted on them.

      A returned reference is usable verbatim with /secrets/resolve. In a FEEL expression, however, a name that is not a bare identifier has to be backtick-escaped, since FEEL reads a bare dash as the minus operator: a listed camunda.secrets.db-password is written =camunda.secrets.`db-password` in a BPMN input mapping.

      Parameters

      Returns CancelablePromise<SecretListResult>

      async function listSecretsExample() {
      const camunda = createCamundaClient();

      // The request body is reserved for future filtering options and currently
      // takes no properties.
      const result = await camunda.listSecrets({});

      // Only the references are returned — never the secret values. Use
      // `resolveSecrets` to fetch a value when one is actually needed.
      for (const reference of result.references) {
      console.log(`Secret available: ${reference}`);
      }
      }

      listSecrets

      Secret

    • Access a scoped logger (internal & future user emission).

      Parameters

      • Optionalscope: string

      Returns Logger

    • Migrate process instance

      Migrates a process instance to a new process definition. This request can contain multiple mapping instructions to define mapping between the active process instance's elements and target process definition elements.

      Use this to upgrade a process instance to a new version of a process or to a different process definition, e.g. to keep your running instances up-to-date with the latest process improvements.

      Parameters

      Returns CancelablePromise<void>

      async function migrateProcessInstanceExample(
      processInstanceKey: ProcessInstanceKey,
      targetProcessDefinitionKey: ProcessDefinitionKey,
      sourceElementId: ElementId,
      targetElementId: ElementId
      ) {
      const camunda = createCamundaClient();

      await camunda.migrateProcessInstance({
      processInstanceKey,
      targetProcessDefinitionKey,
      mappingInstructions: [
      {
      sourceElementId,
      targetElementId,
      },
      ],
      });
      }

      migrateProcessInstance

      Process instance

    • Migrate process instances (batch)

      Migrate multiple process instances. Since only process instances with ACTIVE state can be migrated, any given filters for state are ignored and overridden during this batch operation. This is done asynchronously, the progress can be tracked using the batchOperationKey from the response and the batch operation status endpoint (/batch-operations/{batchOperationKey}).

      Returns CancelablePromise<BatchOperationCreatedResult>

      async function migrateProcessInstancesBatchOperationExample(
      processDefinitionKey: ProcessDefinitionKey,
      targetProcessDefinitionKey: ProcessDefinitionKey,
      sourceElementId: ElementId,
      targetElementId: ElementId
      ) {
      const camunda = createCamundaClient();

      const result = await camunda.migrateProcessInstancesBatchOperation({
      filter: {
      processDefinitionKey,
      },
      migrationPlan: {
      targetProcessDefinitionKey,
      mappingInstructions: [
      {
      sourceElementId,
      targetElementId,
      },
      ],
      },
      });

      console.log(`Batch operation key: ${result.batchOperationKey}`);
      }

      migrateProcessInstancesBatchOperation

      Process instance

    • Modify process instance

      Modifies a running process instance. This request can contain multiple instructions to activate an element of the process or to terminate an active instance of an element.

      Use this to repair a process instance that is stuck on an element or took an unintended path. For example, because an external system is not available or doesn't respond as expected.

      Parameters

      Returns CancelablePromise<void>

      async function modifyProcessInstanceExample(
      processInstanceKey: ProcessInstanceKey,
      elementId: ElementId,
      elementInstanceKey: ElementInstanceKey
      ) {
      const camunda = createCamundaClient();

      await camunda.modifyProcessInstance({
      processInstanceKey,
      activateInstructions: [{ elementId }],
      terminateInstructions: [{ elementInstanceKey }],
      });
      }

      modifyProcessInstance

      Process instance

    • Modify process instances (batch)

      Modify multiple process instances. Since only process instances with ACTIVE state can be modified, any given filters for state are ignored and overridden during this batch operation. In contrast to single modification operation, it is not possible to add variable instructions or modify by element key. It is only possible to use the element id of the source and target. This is done asynchronously, the progress can be tracked using the batchOperationKey from the response and the batch operation status endpoint (/batch-operations/{batchOperationKey}).

      Returns CancelablePromise<BatchOperationCreatedResult>

      async function modifyProcessInstancesBatchOperationExample(
      processDefinitionKey: ProcessDefinitionKey,
      sourceElementId: ElementId,
      targetElementId: ElementId
      ) {
      const camunda = createCamundaClient();

      const result = await camunda.modifyProcessInstancesBatchOperation({
      filter: {
      processDefinitionKey,
      },
      moveInstructions: [
      {
      sourceElementId,
      targetElementId,
      },
      ],
      });

      console.log(`Batch operation key: ${result.batchOperationKey}`);
      }

      modifyProcessInstancesBatchOperation

      Process instance

    • Parameters

      • h: (
            headers: Record<string, string>,
        ) => Record<string, string> | Promise<Record<string, string>>

      Returns void

    • Pause exporting across the whole cluster

      Pauses exporting on every physical tenant of the cluster in one call. With soft=true, every physical tenant is soft-paused instead.

      Requires the cluster-admin security chain. Although this operation lists bearerAuth / basicAuth like the rest of the Orchestration Cluster API, it does not accept an Orchestration Cluster user's credentials — only the separate cluster-admin credentials are valid here. *

      Parameters

      Returns CancelablePromise<void>

      async function pauseClusterExportingExample() {
      const camunda = createCamundaClient();

      // Cluster-admin variant: pauses exporting on every physical tenant of the
      // cluster. With `soft: true` exporting keeps running but its position is not
      // committed, so the log is still not compacted.
      await camunda.pauseClusterExporting({ soft: true });
      }

      pauseClusterExporting

      Exporting

    • Pause exporting

      Pauses exporting on all partitions of the physical tenant. While paused, exported records are not committed, so the log is not compacted for the affected partitions.

      With soft=true, exporting continues to run but its position is not committed, so the state after resuming is identical to a hard pause; use this variant when exporting must keep progressing (e.g. to avoid falling behind) while still preventing log compaction, such as during a backup.

      Parameters

      Returns CancelablePromise<void>

      async function pauseExportingExample() {
      const camunda = createCamundaClient();

      // With `soft: true` exporting keeps running but its position is not committed,
      // so the log is still not compacted — use it when exporting must keep
      // progressing, for example while a backup is taken.
      await camunda.pauseExporting({ soft: true });
      }

      pauseExporting

      Exporting

    • Pin internal clock (alpha)

      Set a precise, static time for the Zeebe engine's internal clock. When the clock is pinned, it remains at the specified time and does not advance. To change the time, the clock must be pinned again with a new timestamp.

      This endpoint is an alpha feature and may be subject to change in future releases.

      Parameters

      Returns CancelablePromise<void>

      async function pinClockExample() {
      const camunda = createCamundaClient();

      await camunda.pinClock({
      timestamp: 1735689599000,
      });

      console.log('Clock pinned');
      }

      pinClock

      Clock

    • Reset internal clock (alpha)

      Resets the Zeebe engine's internal clock to the current system time, enabling it to tick in real-time. This operation is useful for returning the clock to normal behavior after it has been pinned to a specific time.

      This endpoint is an alpha feature and may be subject to change in future releases.

      Parameters

      Returns CancelablePromise<void>

      async function resetClockExample() {
      const camunda = createCamundaClient();

      await camunda.resetClock();

      console.log('Clock reset');
      }

      resetClock

      Clock

    • Resolve secrets

      Resolve a deduplicated batch of camunda.secrets.* references for the caller's physical tenant in a single round-trip.

      Each reference is authorized and resolved independently. For valid requests, the endpoint always responds with HTTP 200: successfully resolved references are returned in resolved, while references that could not be resolved (for example not found, malformed or over-long, or the caller lacks SECRET:REVEAL on that reference) are returned in errors. A failure of one reference never fails the others. Only structurally invalid requests are rejected with HTTP 400: a missing or non-array references field, more than 20 references, or a null entry.

      References are resolved against the secret stores configured for the caller's physical tenant, served from the gateway's secret cache when the value is already cached and read from the store otherwise.

      Parameters

      Returns CancelablePromise<SecretResolveResult>

      async function resolveSecretsExample() {
      const camunda = createCamundaClient();

      const result = await camunda.resolveSecrets({
      references: ['camunda.secrets.myApiToken', 'camunda.secrets.dbPassword'],
      });

      // Successfully resolved references are returned in `resolved`; references that
      // could not be resolved are returned in `errors`, each with a typed error code.
      // Never log a resolved value — it holds secret material. Pass it straight to the
      // consumer that needs it (HTTP client, DB driver, ...) instead.
      for (const resolved of result.resolved) {
      console.log(`Resolved ${resolved.reference} (value redacted)`);
      useSecret(resolved.value);
      }

      for (const error of result.errors) {
      console.log(`Failed to resolve ${error.reference}: ${error.code} - ${error.message}`);
      }
      }

      // Hands the resolved secret to whatever needs it, without logging it.
      function useSecret(_value: string) {}

      resolveSecrets

      Secret

    • Restore from a backup

      Restores the cluster from a backup. The restore is described either by a single backup ID or by a time range (from/to) that selects the backups to restore. This endpoint is only accessible while the cluster is in recovery mode; requests are rejected otherwise. The request is validated and acknowledged, but the restore itself is performed asynchronously. *

      Parameters

      Returns CancelablePromise<ClusterRestoreResponse>

      async function restoreExample() {
      const camunda = createCamundaClient();

      // The cluster must be in recovery mode before a restore is accepted. Provide
      // either a list of backup IDs (one per partition) or a time range (`from`/`to`)
      // that selects the backups to restore, but not both.
      const change = await camunda.restore({
      backupIds: [100, 101],
      });

      console.log(`Cluster change ${change.changeId}:`);
      for (const group of change.plannedChanges) {
      console.log(` ${group.physicalTenantId ?? 'cluster-wide'}:`);
      for (const op of group.operations) {
      const mode = 'mode' in op ? op.mode : undefined;
      console.log(` ${op.operation}${mode ? ` -> ${mode}` : ''}`);
      }
      }
      }

      restore

      Recovery

    • Restore one or every physical tenant from a backup

      Restores physical tenants from backups. The restore is described either by a list of backup IDs or by a time range (from/to) that selects the backups to restore. Restores are only accepted while the targeted physical tenants are in recovery mode; requests are rejected otherwise. The request is validated and acknowledged, but the restore itself is performed asynchronously.

      If the physicalTenantId parameter is provided, only that physical tenant is restored and overrides must be omitted.

      If it is not provided, every physical tenant of the cluster is restored: those named in overrides with their own backup selection, all others with the selection at the top level of the request body.

      Requires the cluster-admin security chain. Although this operation lists bearerAuth / basicAuth like the rest of the Orchestration Cluster API, it does not accept an Orchestration Cluster user's credentials — only the separate cluster-admin credentials are valid here. *

      Parameters

      Returns CancelablePromise<ClusterRestoreResponse>

      async function restoreAsClusterAdminExample() {
      const camunda = createCamundaClient();

      // The cluster-admin variant can target a specific physical tenant and supports
      // per-tenant overrides. Omit `physicalTenantId` to restore every physical
      // tenant. Provide either backup IDs (one per partition) or a time range
      // (`from`/`to`), but not both.
      const change = await camunda.restoreAsClusterAdmin({
      backupIds: [200, 201],
      physicalTenantId: 'default',
      dryRun: true,
      });

      console.log(`Cluster change ${change.changeId}:`);
      for (const group of change.plannedChanges) {
      console.log(` ${group.physicalTenantId ?? 'cluster-wide'}:`);
      for (const op of group.operations) {
      const mode = 'mode' in op ? op.mode : undefined;
      console.log(` ${op.operation}${mode ? ` -> ${mode}` : ''}`);
      }
      }
      }

      restoreAsClusterAdmin

      Recovery

    • Resume Batch operation

      Resumes a suspended batch operation. This is done asynchronously, the progress can be tracked using the batch operation status endpoint (/batch-operations/{batchOperationKey}).

      Parameters

      Returns CancelablePromise<void>

      async function resumeBatchOperationExample(batchOperationKey: BatchOperationKey) {
      const camunda = createCamundaClient();

      await camunda.resumeBatchOperation({ batchOperationKey });
      }

      resumeBatchOperation

      Batch operation

    • Resume exporting across the whole cluster

      Resumes exporting on every physical tenant of the cluster in one call, after a pause or soft pause.

      Requires the cluster-admin security chain. Although this operation lists bearerAuth / basicAuth like the rest of the Orchestration Cluster API, it does not accept an Orchestration Cluster user's credentials — only the separate cluster-admin credentials are valid here. *

      Parameters

      Returns CancelablePromise<void>

      async function resumeClusterExportingExample() {
      const camunda = createCamundaClient();

      await camunda.resumeClusterExporting();
      }

      resumeClusterExporting

      Exporting

    • Resume exporting

      Resumes exporting on all partitions of the physical tenant after a pause or soft pause.

      Parameters

      Returns CancelablePromise<void>

      async function resumeExportingExample() {
      const camunda = createCamundaClient();

      await camunda.resumeExporting();
      }

      resumeExporting

      Exporting

    • Resume process instance

      Resumes a suspended process instance, returning it to the ACTIVE state and continuing processing. Only process instances in the SUSPENDED state can be resumed. A child process instance can be resumed independently of its parent or root process instance; resumption does not cascade to or from related instances.

      Parameters

      • input: { operationReference?: number } & { processInstanceKey: string }
      • Optionaloptions: OperationOptions

      Returns CancelablePromise<void>

      async function resumeProcessInstanceExample(processInstanceKey: ProcessInstanceKey) {
      const camunda = createCamundaClient();

      await camunda.resumeProcessInstance({ processInstanceKey });
      }

      resumeProcessInstance

      Process instance

    • Resume process instances (batch)

      Resumes multiple suspended process instances. Any given filter for state or parentProcessInstanceKey is ignored and overridden, as only SUSPENDED process instances can be resumed and resumption does not cascade between parent and child instances, so child instances are resumed independently of their parent or root instance. This is done asynchronously, the progress can be tracked using the batchOperationKey from the response and the batch operation status endpoint (/batch-operations/{batchOperationKey}).

      Returns CancelablePromise<BatchOperationCreatedResult>

      async function resumeProcessInstancesBatchOperationExample(
      processDefinitionKey: ProcessDefinitionKey
      ) {
      const camunda = createCamundaClient();

      const result = await camunda.resumeProcessInstancesBatchOperation({
      filter: {
      processDefinitionKey,
      },
      });

      console.log(`Batch operation key: ${result.batchOperationKey}`);
      }

      resumeProcessInstancesBatchOperation

      Process instance

    • Search for incidents of a specific element instance

      Search for incidents caused by the specified element instance, including incidents of any child instances created from this element instance.

      Although the elementInstanceKey is provided as a path parameter to indicate the root element instance, you may also include an elementInstanceKey within the filter object to narrow results to specific child element instances. This is useful, for example, if you want to isolate incidents associated with nested or subordinate elements within the given element instance while excluding incidents directly tied to the root element itself.

      Returns CancelablePromise<IncidentSearchQueryResult>

      async function searchElementInstanceIncidentsExample(elementInstanceKey: ElementInstanceKey) {
      const camunda = createCamundaClient();

      const result = await camunda.searchElementInstanceIncidents(
      { elementInstanceKey },
      { consistency: { waitUpToMs: 5000 } }
      );

      for (const incident of result.items ?? []) {
      console.log(`Incident: ${incident.errorType}`);
      }
      }

      searchElementInstanceIncidents

      Element instance

      eventual - this endpoint is backed by data that is eventually consistent with the system state.

    • Search element instance wait states

      Returns the wait states for element instances matching the given filter.

      Parameters

      Returns CancelablePromise<ElementInstanceWaitStateQueryResult>

      async function searchElementInstanceWaitStatesExample(processInstanceKey: ProcessInstanceKey) {
      const camunda = createCamundaClient();

      const result = await camunda.searchElementInstanceWaitStates(
      {
      filter: {
      processInstanceKey,
      },
      page: { limit: 10 },
      },
      { consistency: { waitUpToMs: 5000 } }
      );

      for (const waitState of result.items ?? []) {
      const { details } = waitState;
      let description: string;
      if (details.waitStateType === 'JOB') {
      description = `waiting on job '${details.jobType}'`;
      } else if (details.waitStateType === 'MESSAGE') {
      description = `waiting for message '${details.messageName}'`;
      } else {
      description = `waiting (${details.waitStateType})`;
      }
      console.log(`${waitState.elementId}: ${description}`);
      }
      }

      searchElementInstanceWaitStates

      Element instance

      eventual - this endpoint is backed by data that is eventually consistent with the system state.

    • Search message subscriptions

      Search for message subscriptions based on given criteria.

      By default, both start and intermediate event subscriptions are returned. Use the messageSubscriptionType filter to restrict results to a single type.

      Version notes:

      • Start event subscriptions are only captured for deployments made with 8.10 or later.
      • The messageSubscriptionType field is only populated for data created with Camunda 8.10 or later. For pre-8.10 data, intermediate event entries have no messageSubscriptionType value stored. For convenience, the API returns PROCESS_EVENT as a default for such search results, though.
      • Searching for intermediate event subscriptions including legacy data can be achieved by filtering for messageSubscriptionType not matching START_EVENT.

      Parameters

      Returns CancelablePromise<MessageSubscriptionSearchQueryResult>

      async function searchMessageSubscriptionsExample() {
      const camunda = createCamundaClient();

      const result = await camunda.searchMessageSubscriptions(
      {
      page: { limit: 10 },
      },
      { consistency: { waitUpToMs: 5000 } }
      );

      for (const sub of result.items ?? []) {
      console.log(`Subscription: ${sub.messageName}`);
      }
      }

      searchMessageSubscriptions

      Message subscription

      eventual - this endpoint is backed by data that is eventually consistent with the system state.

    • Search related incidents

      Search for incidents caused by the process instance or any of its called process or decision instances.

      Although the processInstanceKey is provided as a path parameter to indicate the root process instance, you may also include a processInstanceKey within the filter object to narrow results to specific child process instances. This is useful, for example, if you want to isolate incidents associated with subprocesses or called processes under the root instance while excluding incidents directly tied to the root.

      Returns CancelablePromise<IncidentSearchQueryResult>

      async function searchProcessInstanceIncidentsExample(processInstanceKey: ProcessInstanceKey) {
      const camunda = createCamundaClient();

      const result = await camunda.searchProcessInstanceIncidents(
      {
      processInstanceKey,
      },
      { consistency: { waitUpToMs: 5000 } }
      );

      for (const incident of result.items ?? []) {
      console.log(`Incident: ${incident.errorType} - ${incident.errorMessage}`);
      }
      }

      searchProcessInstanceIncidents

      Process instance

      eventual - this endpoint is backed by data that is eventually consistent with the system state.

    • Search resources

      Search for deployed resources based on given criteria. :::info This endpoint does not return BPMN process definitions, DMN decision definitions, or form resources. To query BPMN process definitions or DMN decision definitions, use their respective search APIs. :::

      Parameters

      Returns CancelablePromise<ResourceSearchQueryResult>

      async function searchResourcesExample() {
      const camunda = createCamundaClient();

      const result = await camunda.searchResources(
      { page: { limit: 10 } },
      { consistency: { waitUpToMs: 5000 } }
      );

      for (const resource of result.items ?? []) {
      console.log(`Resource: ${resource.resourceName}`);
      }
      }

      searchResources

      Resource

      eventual - this endpoint is backed by data that is eventually consistent with the system state.

    • Search user task effective variables

      Search for the effective variables of a user task. This endpoint returns deduplicated variables where each variable name appears at most once. When the same variable name exists at multiple scope levels in the scope hierarchy, the value from the innermost scope (closest to the user task) takes precedence. This is useful for retrieving the actual runtime state of variables as seen by the user task. By default, long variable values in the response are truncated.

      Returns CancelablePromise<VariableSearchQueryResult>

      async function searchUserTaskEffectiveVariablesExample(userTaskKey: UserTaskKey) {
      const camunda = createCamundaClient();

      const result = await camunda.searchUserTaskEffectiveVariables(
      { userTaskKey },
      { consistency: { waitUpToMs: 5000 } }
      );

      for (const variable of result.items ?? []) {
      console.log(`${variable.name} = ${variable.value}`);
      }
      }

      searchUserTaskEffectiveVariables

      User task

      eventual - this endpoint is backed by data that is eventually consistent with the system state.

    • Search user task variables

      Search for user task variables based on given criteria. This endpoint returns all variable documents visible from the user task's scope, including variables from parent scopes in the scope hierarchy. If the same variable name exists at multiple scope levels, each scope's variable is returned as a separate result. Use the /user-tasks/{userTaskKey}/effective-variables/search endpoint to get deduplicated variables where the innermost scope takes precedence. By default, long variable values in the response are truncated.

      Parameters

      Returns CancelablePromise<VariableSearchQueryResult>

      async function searchUserTaskVariablesExample(userTaskKey: UserTaskKey) {
      const camunda = createCamundaClient();

      const result = await camunda.searchUserTaskVariables(
      { userTaskKey },
      { consistency: { waitUpToMs: 5000 } }
      );

      for (const variable of result.items ?? []) {
      console.log(`${variable.name} = ${variable.value}`);
      }
      }

      searchUserTaskVariables

      User task

      eventual - this endpoint is backed by data that is eventually consistent with the system state.

    • Search variables

      Search for variables based on given criteria.

      This endpoint returns variables that exist directly at the specified scopes - it does not include variables from parent scopes that would be visible through the scope hierarchy.

      Variables can be process-level (scoped to the process instance) or local (scoped to specific BPMN elements like tasks, subprocesses, etc.).

      By default, long variable values in the response are truncated. *

      Parameters

      Returns CancelablePromise<VariableSearchQueryResult>

      async function searchVariablesExample(processInstanceKey: ProcessInstanceKey) {
      const camunda = createCamundaClient();

      const result = await camunda.searchVariables(
      {
      filter: {
      processInstanceKey,
      },
      page: { limit: 10 },
      },
      { consistency: { waitUpToMs: 5000 } }
      );

      for (const variable of result.items ?? []) {
      console.log(`${variable.name} = ${variable.value}`);
      }
      }

      searchVariables

      Variable

      eventual - this endpoint is backed by data that is eventually consistent with the system state.

    • Search for process variables and bind them to a Zod schema (the DTO).

      The schema's keys are the exact variable names to fetch; its shape drives validation. Only those declared variables are queried (via a name $in [...] filter), so memory stays bound by the DTO shape rather than the total number of variables on the instance. Results are paged internally until every declared variable is found or the result set is exhausted.

      Returns a VariableMap offering lenient access (has / get) and a strict validate() that parses the collected values against the schema — returning a fully-typed object or throwing a ZodError when a required variable is missing or malformed.

      Type Parameters

      Parameters

      • schema: TSchema

        A Zod object schema declaring the variables to fetch.

      • options: {
            consistency?: { pollIntervalMs?: number; waitUpToMs: number };
            pageSize?: number;
            processInstanceKey: ProcessInstanceKey;
            scopeKey?: ScopeKey;
            tenantId?: TenantId;
        }

        Query scope. processInstanceKey is required; scopeKey narrows to a single element-instance scope, tenantId filters by tenant, and pageSize tunes the page limit. consistency controls eventual-consistency tolerance for the underlying searchVariables calls: it defaults to { waitUpToMs: 0 } (no waiting), but a non-zero waitUpToMs makes the paging calls poll until the data is consistent, avoiding intermittent missing variables / ZodError on a freshly-updated instance.

      Returns CancelablePromise<VariableMap<TSchema>>

      when a declared variable is found at more than one scope and no scopeKey was provided to disambiguate.

      when a variable's value is not valid JSON.

      import { z } from 'zod';
      const OrderVariables = z.object({ orderId: z.string(), amount: z.number().optional() });
      const map = await client.searchVariablesAsDto(OrderVariables, { processInstanceKey });
      if (map.has('amount')) console.log(map.get('amount'));
      const order = map.validate(); // { orderId: string; amount?: number }
    • Stop all registered job workers (best-effort) and terminate the shared thread pool.

      Returns void

    • Suspend Batch operation

      Suspends a running batch operation. This is done asynchronously, the progress can be tracked using the batch operation status endpoint (/batch-operations/{batchOperationKey}).

      Parameters

      Returns CancelablePromise<void>

      async function suspendBatchOperationExample(batchOperationKey: BatchOperationKey) {
      const camunda = createCamundaClient();

      await camunda.suspendBatchOperation({ batchOperationKey });
      }

      suspendBatchOperation

      Batch operation

    • Suspend process instance

      Suspends a running process instance, pausing further processing until it is resumed. Only process instances in the ACTIVE state can be suspended. A child process instance can be suspended independently of its parent or root process instance; suspension does not cascade to or from related instances.

      Parameters

      • input: { operationReference?: number } & { processInstanceKey: string }
      • Optionaloptions: OperationOptions

      Returns CancelablePromise<void>

      async function suspendProcessInstanceExample(processInstanceKey: ProcessInstanceKey) {
      const camunda = createCamundaClient();

      await camunda.suspendProcessInstance({ processInstanceKey });
      }

      suspendProcessInstance

      Process instance

    • Suspend process instances (batch)

      Suspends multiple running process instances. Any given filter for state or parentProcessInstanceKey is ignored and overridden, as only ACTIVE process instances can be suspended and suspension does not cascade between parent and child instances, so child instances are suspended independently of their parent or root instance. This is done asynchronously, the progress can be tracked using the batchOperationKey from the response and the batch operation status endpoint (/batch-operations/{batchOperationKey}).

      Returns CancelablePromise<BatchOperationCreatedResult>

      async function suspendProcessInstancesBatchOperationExample(
      processDefinitionKey: ProcessDefinitionKey
      ) {
      const camunda = createCamundaClient();

      const result = await camunda.suspendProcessInstancesBatchOperation({
      filter: {
      processDefinitionKey,
      },
      });

      console.log(`Batch operation key: ${result.batchOperationKey}`);
      }

      suspendProcessInstancesBatchOperation

      Process instance

    • Force-write runtime backup state

      Force-writes the checkpoint and backup metadata of every partition of the physical tenant to the backup store, independent of any backup being taken or confirmed, and returns the updated state.

      Parameters

      Returns CancelablePromise<RuntimeBackupState>

      async function syncRuntimeBackupStateExample() {
      const camunda = createCamundaClient();

      // Force-writes checkpoint and backup metadata of every partition to the backup
      // store, independent of any backup being taken, and returns the updated state.
      const state = await camunda.syncRuntimeBackupState();

      console.log(`Synced ${state.backupStates.length} partition backup states`);
      }

      syncRuntimeBackupState

      Backup

    • Force-write runtime backup state across physical tenants

      Force-writes the checkpoint and backup metadata of every partition of every physical tenant of the cluster, or of the one named by physicalTenantId, to that tenant's backup store, independent of any backup being taken or confirmed, and returns the updated state per physical tenant.

      The request is all-or-nothing: a physical tenant whose metadata cannot be written fails the whole request, and the writes that already succeeded on other tenants are not undone. The operation is idempotent, so retrying the same call is the correct remedy. Narrow the request with physicalTenantId to write the tenants that can still be reached.

      Requires the cluster-admin security chain. Although this operation lists bearerAuth / basicAuth like the rest of the Orchestration Cluster API, it does not accept an Orchestration Cluster user's credentials — only the separate cluster-admin credentials are valid here. Use POST /v2/backups/runtime/state/sync to act as a single physical tenant. *

      Returns CancelablePromise<ClusterRuntimeBackupState>

      async function syncRuntimeBackupStateAsClusterAdminExample() {
      const camunda = createCamundaClient();

      // Force-writes checkpoint and backup metadata of every partition to the backup
      // store on every targeted physical tenant, independent of any backup being
      // taken, and returns the updated per-tenant state.
      const clusterState = await camunda.syncRuntimeBackupStateAsClusterAdmin({});

      console.log(`Synced ${clusterState.physicalTenants.length} physical tenants`);
      }

      syncRuntimeBackupStateAsClusterAdmin

      Backup

    • Take a history backup

      Triggers a backup of the physical tenant's history, by scheduling a snapshot of every secondary storage index it owns.

      Unlike runtime backups, history backups have no generated-id mode: backupId is always required.

      Only available on clusters whose secondary storage is Elasticsearch or OpenSearch.

      Parameters

      Returns CancelablePromise<TakeHistoryBackupResponse>

      async function takeHistoryBackupExample() {
      const camunda = createCamundaClient();

      // Backups are logically ordered by id, so each successive backup must use a
      // higher id than the previous one.
      const backup = await camunda.takeHistoryBackup({ backupId: 100 });

      console.log(`Scheduled history backup ${backup.backupId}`);
      for (const snapshot of backup.scheduledSnapshots) {
      console.log(` ${snapshot}`);
      }
      }

      takeHistoryBackup

      Backup

    • Take a history backup on one or every physical tenant

      Triggers a history backup on every physical tenant of the cluster, or on the one named by physicalTenantId. Every targeted tenant uses the same caller-supplied backupId, but the backups are independent: they are neither coordinated nor rolled back together.

      The request is all-or-nothing: the backupId is checked on every targeted tenant before any snapshot is scheduled, so a tenant that already holds this id, or that cannot be reached, fails the whole request and no backup is started anywhere. There is no aggregated cluster-level state in the response.

      Requires the cluster-admin security chain. Although this operation lists bearerAuth / basicAuth like the rest of the Orchestration Cluster API, it does not accept an Orchestration Cluster user's credentials — only the separate cluster-admin credentials are valid here. Only available on clusters whose secondary storage is Elasticsearch or OpenSearch. Use POST /v2/backups/history to act as a single physical tenant. *

      Parameters

      Returns CancelablePromise<ClusterTakeHistoryBackupResponse>

      async function takeHistoryBackupAsClusterAdminExample() {
      const camunda = createCamundaClient();

      // Cluster-admin variant: fans the backup out to every physical tenant of the
      // cluster (or a single one when `physicalTenantId` is given). Requires a
      // separate cluster-admin security chain — Orchestration Cluster user
      // credentials are NOT accepted. Each backup must use a higher id than the last.
      const backup = await camunda.takeHistoryBackupAsClusterAdmin({ backupId: 100 });

      console.log(`Scheduled cluster history backup ${backup.backupId}`);
      for (const tenant of backup.physicalTenants) {
      console.log(
      ` [${tenant.physicalTenantId}] scheduled ${tenant.scheduledSnapshots.length} snapshots`
      );
      }
      }

      takeHistoryBackupAsClusterAdmin

      Backup

    • Take a runtime backup

      Triggers a backup of runtime data on all partitions of the physical tenant.

      The backupId must be omitted if continuous backups and/or a backup or checkpoint schedule is enabled for the physical tenant, as the id is generated automatically. Otherwise, backupId is required.

      Parameters

      Returns CancelablePromise<TakeRuntimeBackupResponse>

      async function takeRuntimeBackupExample() {
      const camunda = createCamundaClient();

      // Omit `backupId` when continuous backups or a backup/checkpoint schedule is
      // enabled for the physical tenant — the id is then generated by the cluster.
      // Otherwise `backupId` is required and must be higher than any existing one.
      const backup = await camunda.takeRuntimeBackup({ backupId: 100 });

      console.log(`Scheduled backup ${backup.backupId}`);
      }

      takeRuntimeBackup

      Backup

    • Take a runtime backup on one or every physical tenant

      Triggers a runtime backup on every physical tenant of the cluster, or on the one named by physicalTenantId. A cluster-wide backup is a set of independent per-tenant backups, not an atomic snapshot of the cluster: they are neither coordinated nor rolled back together, and each tenant stores its own, so the same backupId can be used for all of them.

      Every targeted physical tenant must be in the same backup-id mode. backupId must be omitted when every targeted tenant generates its own ids (because continuous backups and/or a backup or checkpoint schedule is enabled for it), and is required when none of them does. A cluster whose targeted tenants mix the two modes is rejected with 400 and has to be driven one tenant at a time through POST /v2/backups/runtime. In generated-id mode each tenant generates its own id, so the response reports an id per physical tenant rather than one for the cluster.

      The trigger is all-or-error, and never silent about a partial trigger: if any targeted tenant cannot be triggered the response carries an error status, but its body still lists every targeted tenant — which ones were triggered, under which backupId to monitor or delete them, and why the others failed. Nothing is rolled back, so the backups that were triggered keep running and have to be deleted explicitly. A request rejected before any tenant was triggered answers with a problem detail instead, and nothing is running.

      Requires the cluster-admin security chain. Although this operation lists bearerAuth / basicAuth like the rest of the Orchestration Cluster API, it does not accept an Orchestration Cluster user's credentials — only the separate cluster-admin credentials are valid here. Use POST /v2/backups/runtime to act as a single physical tenant. *

      Parameters

      Returns CancelablePromise<ClusterTakeRuntimeBackupResponse>

      async function takeRuntimeBackupAsClusterAdminExample() {
      const camunda = createCamundaClient();

      // Cluster-admin variant: triggers a runtime backup on every physical tenant of
      // the cluster (or a single one when `physicalTenantId` is given). Requires the
      // separate cluster-admin security chain — Orchestration Cluster user
      // credentials are NOT accepted. Passing an explicit `backupId` is manual-id
      // mode: every targeted tenant must share that id (omit it for generated-id
      // mode, where each tenant generates its own). Either way the response lists the
      // outcome per physical tenant rather than cluster-wide.
      const backup = await camunda.takeRuntimeBackupAsClusterAdmin({ backupId: 100 });

      for (const tenant of backup.physicalTenants) {
      console.log(`[${tenant.physicalTenantId}] ${tenant.outcome} (backupId ${tenant.backupId})`);
      }
      }

      takeRuntimeBackupAsClusterAdmin

      Backup

    • Trigger a cluster-wide leadership rebalance

      Transfers leadership of every partition that is not led by its highest-priority replica towards that replica, one partition at a time. Returns as soon as the rebalance has been accepted (poll GET /cluster/v2/rebalance to monitor progress).

      Each rebalance can specify overrides for the configured rebalance settings (e.g. maximum replication lag to allow). An absent request body means "use the configured settings".

      Requires the cluster-admin security chain. Although this operation lists bearerAuth / basicAuth like the rest of the Orchestration Cluster API, it does not accept an Orchestration Cluster user's credentials — only the separate cluster-admin credentials are valid here. *

      Parameters

      Returns CancelablePromise<ClusterBalanceResponse>

      async function triggerClusterRebalanceExample() {
      const camunda = createCamundaClient();

      const balance = await camunda.triggerClusterRebalance({
      replicationLagThreshold: 10_000_000,
      maxTransferAttempts: 3,
      });

      console.log(`Cluster balance state: ${balance.state}`);
      if (balance.runningRebalance) {
      console.log(`Rebalance started: id=${balance.runningRebalance.rebalanceId}`);
      }
      }

      triggerClusterRebalance

      Cluster

    • Unassign a client from a group

      Unassigns a client from a group. The client is removed as a group member, with associated authorizations, roles, and tenant assignments no longer applied.

      Parameters

      Returns CancelablePromise<void>

      async function unassignClientFromGroupExample(groupId: GroupId, clientId: ClientId) {
      const camunda = createCamundaClient();

      await camunda.unassignClientFromGroup({
      groupId,
      clientId,
      });
      }

      unassignClientFromGroup

      Group

    • Unassign a group from a tenant

      Unassigns a group from a specified tenant. Members of the group (users, clients) will no longer have access to the tenant's data - except they are assigned directly to the tenant.

      Parameters

      Returns CancelablePromise<void>

      async function unassignGroupFromTenantExample(tenantId: TenantId, groupId: GroupId) {
      const camunda = createCamundaClient();

      await camunda.unassignGroupFromTenant({
      tenantId,
      groupId,
      });
      }

      unassignGroupFromTenant

      Tenant

    • Unassign a role from a tenant

      Unassigns a role from a specified tenant. Users, Clients or Groups, that have the role assigned, will no longer have access to the tenant's data - unless they are assigned directly to the tenant.

      Parameters

      Returns CancelablePromise<void>

      async function unassignRoleFromTenantExample(tenantId: TenantId, roleId: RoleId) {
      const camunda = createCamundaClient();

      await camunda.unassignRoleFromTenant({
      tenantId,
      roleId,
      });
      }

      unassignRoleFromTenant

      Tenant

    • Unassign a user from a group

      Unassigns a user from a group. The user is removed as a group member, with associated authorizations, roles, and tenant assignments no longer applied.

      Parameters

      Returns CancelablePromise<void>

      async function unassignUserFromGroupExample(groupId: GroupId, username: Username) {
      const camunda = createCamundaClient();

      await camunda.unassignUserFromGroup({
      groupId,
      username,
      });
      }

      unassignUserFromGroup

      Group

    • Unassign user task

      Removes the assignee of a task with the given key. Unassignment waits for blocking task listeners on this lifecycle transition. If listener processing is delayed beyond the request timeout, this endpoint can return 504. Other gateway timeout causes are also possible. Retry with backoff and inspect listener worker availability and logs when this repeats.

      Parameters

      Returns CancelablePromise<void>

      async function unassignUserTaskExample(userTaskKey: UserTaskKey) {
      const camunda = createCamundaClient();

      await camunda.unassignUserTask({ userTaskKey });
      }

      unassignUserTask

      User task

    • Update agent instance

      Updates the status of an agent instance and appends a batch of history items to its conversation history. Each history item created for this request is echoed back in the response.

      Parameters

      Returns CancelablePromise<AgentInstanceUpdateResult>

      async function updateAgentInstanceExample(
      agentInstanceKey: AgentInstanceKey,
      elementInstanceKey: ElementInstanceKey,
      jobKey: JobKey,
      jobLeaseToken: JobLeaseToken
      ) {
      const camunda = createCamundaClient();

      await camunda.updateAgentInstance({
      agentInstanceKey,
      elementInstanceKey,
      jobKey,
      jobLeaseToken,
      status: 'THINKING',
      history: [
      {
      historyItemId: HistoryItemId.assumeExists('assistant-1'),
      loopIteration: 1,
      role: 'ASSISTANT',
      content: [{ contentType: 'TEXT', text: 'How can I help you?' }],
      producedAt: new Date().toISOString(),
      metrics: { inputTokens: 150, outputTokens: 50, durationMs: 820 },
      },
      ],
      });

      console.log(`Updated agent instance: ${agentInstanceKey}`);
      }

      updateAgentInstance

      Agent instance

    • Update authorization

      Update the authorization with the given key. *

      Parameters

      Returns CancelablePromise<void>

      async function updateAuthorizationExample(authorizationKey: AuthorizationKey) {
      const camunda = createCamundaClient();

      await camunda.updateAuthorization({
      authorizationKey,
      ownerId: 'user-123',
      ownerType: 'USER',
      resourceId: 'order-process',
      resourceType: 'PROCESS_DEFINITION',
      permissionTypes: [
      'CREATE_PROCESS_INSTANCE',
      'READ_PROCESS_INSTANCE',
      'DELETE_PROCESS_INSTANCE',
      ],
      });
      }

      updateAuthorization

      Authorization

    • Update jobs (batch)

      Creates a batch operation to update jobs matching the given filter. At least one changeset field must be non-null. This is done asynchronously; the progress can be tracked using the batchOperationKey from the response and the batch operation status endpoint (/batch-operations/{batchOperationKey}).

      Parameters

      Returns CancelablePromise<BatchOperationCreatedResult>

      async function updateJobsBatchOperationExample() {
      const camunda = createCamundaClient();

      const result = await camunda.updateJobsBatchOperation({
      filter: {
      type: 'payment-processing',
      hasFailedWithRetriesLeft: false,
      },
      changeset: {
      retries: 3,
      },
      });

      console.log(`Batch operation key: ${result.batchOperationKey}`);
      }

      updateJobsBatchOperation

      Job

    • Update user task

      Update a user task with the given key. Updates wait for blocking task listeners on this lifecycle transition. If listener processing is delayed beyond the request timeout, this endpoint can return 504. Other gateway timeout causes are also possible. Retry with backoff and inspect listener worker availability and logs when this repeats.

      Parameters

      Returns CancelablePromise<void>

      async function updateUserTaskExample(userTaskKey: UserTaskKey) {
      const camunda = createCamundaClient();

      await camunda.updateUserTask({
      userTaskKey,
      changeset: {
      candidateUsers: ['alice', 'bob'],
      dueDate: '2025-12-31T23:59:59Z',
      priority: 80,
      },
      });
      }

      updateUserTask

      User task

    • Type Parameters

      • T

      Parameters

      • id: string
      • fn: () => T | Promise<T>

      Returns Promise<T>