The client for the unified Camunda 8 REST API.

Logging: to enable debug tracing during development, you can set DEBUG=camunda:zeebe-rest.

For production, you can pass in an instance of winston.Logger to the constructor as logger.

CAMUNDA_LOG_LEVEL in the environment or the constructor options can be used to set the log level to one of 'error', 'warn', 'info', 'http', 'verbose', 'debug', or 'silly'.

Since

8.6.0

Constructors

Properties

log: Logger
oAuthProvider: IOAuthProvider
prefixUrl: string
rest: Promise<Got>
tenantId?: string
userAgentString: string

Methods

  • Helper method to add the default tenantIds if we are not passed explicit tenantIds

    Type Parameters

    • T extends {
          tenantId?: string;
      }

    Parameters

    • request: T

    Returns T & {
        tenantId: undefined | string;
    }

  • This is a generic method to call an API endpoint. Use this method to call any REST API endpoint in the Camunda 8 cluster. TODO: This does not currently support multipart form-data, but it will.

    Type Parameters

    • T
    • V = unknown

    Parameters

    Returns Promise<V>

  • Cancel an active process instance

    Parameters

    • __namedParameters: {
          operationReference?: number;
          processInstanceKey: string;
      }
      • Optional operationReference?: number
      • processInstanceKey: string

    Returns Promise<Response<string>>

  • Returns Promise<{
        accept: string;
        authorization: string;
        content-type: string;
        user-agent: string;
    }>

  • 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 part. If both are provided, the fileName field takes precedence.

    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, GCP, in-memory (non-production), local (non-production)

    Documentation: https://docs.camunda.io/docs/apis-tools/camunda-api-rest/specifications/create-documents/

    Parameters

    • request: {
          files: ReadStream[];
          storeId?: string;
      }
      • files: ReadStream[]
      • Optional storeId?: string

        The ID of the document store to upload the documents to. Currently, only a single document store is supported per cluster. However, this attribute is included to allow for potential future support of multiple document stores.

    Returns Promise<UploadDocumentsResponse>

    Since

    8.7.0

Generated using TypeDoc