invoke CLI command reference

Detailed information on the invoke CLI command

Description

Invoke a method on a given Dapr application.

Supported platforms

Usage

  1. dapr invoke [flags]

Flags

NameEnvironment VariableDefaultDescription
—app-id, -aThe application id to invoke
—help, -hPrint this help message
—method, -mThe method to invoke
—data, -dThe JSON serialized data string (optional)
—data-file, -fA file containing the JSON serialized data (optional)
—verb, -vPOSTThe HTTP verb to use

Examples

Invoke a sample method on target app with POST Verb

  1. dapr invoke --app-id target --method sample --data '{"key":"value"}'

Invoke a sample method on target app with GET Verb

  1. dapr invoke --app-id target --method sample --verb GET

Last modified September 20, 2021 : Merge pull request #1800 from greenie-msft/gRPC_proxying_video (36dff3c)