Skip to main content

core.medplumclient.pushtoagent

Home > @medplum/core > MedplumClient > pushToAgent

MedplumClient.pushToAgent() method

Pushes a message to an agent.

Signature:

pushToAgent(agent: Agent | Reference<Agent>, destination: Device | Reference<Device>, body: any, contentType?: string, options?: RequestInit): Promise<OperationOutcome>;

Parameters

ParameterTypeDescription
agentAgent | Reference<Agent>The agent to push to.
destinationDevice | Reference<Device>The destination device.
bodyanyThe message body.
contentTypestring(Optional) Optional message content type.
optionsRequestInit(Optional) Optional fetch options.

Returns:

Promise<OperationOutcome>

Promise to the operation outcome.