Skip to main content

core.medplumclient.executebot

Home > @medplum/core > MedplumClient > executeBot

MedplumClient.executeBot() method

Executes a bot by ID or Identifier.

Signature:

executeBot(idOrIdentifier: string | Identifier, body: any, contentType?: string, options?: MedplumRequestOptions): Promise<any>;

Parameters

ParameterTypeDescription
idOrIdentifierstring | IdentifierThe Bot ID or Identifier.
bodyanyThe content body. Strings and File objects are passed directly. Other objects are converted to JSON.
contentTypestring(Optional) The content type to be included in the "Content-Type" header.
optionsMedplumRequestOptions(Optional) Optional fetch options.

Returns:

Promise<any>

The Bot return value.