invoke CLI command reference
Detailed information on the invoke CLI command
Description
Invoke a method on a given Dapr application.
Supported platforms
Usage
dapr invoke [flags]
Flags
Name | Environment Variable | Default | Description |
---|---|---|---|
--app-id , -a |
APP_ID |
The application id to invoke | |
--help , -h |
Print this help message | ||
--method , -m |
The method to invoke | ||
--data , -d |
The JSON serialized data string (optional) | ||
--data-file , -f |
A file containing the JSON serialized data (optional) | ||
--verb , -v |
POST |
The HTTP verb to use |
Examples
# Invoke a sample method on target app with POST Verb
dapr invoke --app-id target --method sample --data '{"key":"value"}'
# Invoke a sample method on target app with GET Verb
dapr invoke --app-id target --method sample --verb GET
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.
Last modified May 31, 2024: Merge 61e65296a85dd35c3b7040b281b7c17caffcc144 into 27b6a61b0e1b0a30ea4e4f31bea712dfec3813b3 (525f2ab)