Digital Twin - Invoke Component Command

Invoke a digital twin command.

POST https://fully-qualified-iothubname.azure-devices.net/digitaltwins/{id}/components/{componentPath}/commands/{commandName}?api-version=2021-04-12
POST https://fully-qualified-iothubname.azure-devices.net/digitaltwins/{id}/components/{componentPath}/commands/{commandName}?api-version=2021-04-12&connectTimeoutInSeconds={connectTimeoutInSeconds}&responseTimeoutInSeconds={responseTimeoutInSeconds}

URI Parameters

Name In Required Type Description
commandName
path True

string

componentPath
path True

string

id
path True

string

api-version
query True

string

Version of the Api.

connectTimeoutInSeconds
query

integer

int32

Maximum interval of time, in seconds, that the digital twin command will wait for the answer.

responseTimeoutInSeconds
query

integer

int32

Maximum interval of time, in seconds, that the digital twin command will wait for the answer.

Request Body

Name Type Description
payload

object

Responses

Name Type Description
200 OK

object

Returns the digital twin command response payload

Headers

  • x-ms-command-statuscode: integer
  • x-ms-request-id: string