Calls multiple device services at the same time.

Usage notes

This operation can only be called asynchronously.

QPS limits

Each Alibaba Cloud account can run up to 10 queries per second (QPS).

Note The RAM users of an Alibaba Cloud account share the quota of the Alibaba Cloud account.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes InvokeThingsService

The operation that you want to perform. Set the value to InvokeThingsService.

Args String Yes {"param1":1}

The input parameter of the service. The value is a JSON string. Example: Args={"param1": 1}.

If you do not need to specify this parameter, set the value to Args={}.

DeviceName.N RepeatList Yes device1

The name of the device whose service is called. You can specify a maximum of 100 devices.

Identifier String Yes Set

The identifier of the service.

To view a service identifier in the IoT Platform console, go to the Define Feature tab of the Product Details page. You can also call the QueryThingModel operation and view the service identifier in the returned TSL data.

Note If a service named testService belongs to a custom module named testFb, you can set this parameter to testFb:testService. The custom module is not the default module.
ProductKey String Yes a1BwAGV****

The ProductKey of the product to which the device belongs.

IotInstanceId String No iot_instc_pu****_c*-v64********

The ID of the instance. You can view the ID of the instance on the Overview page in the IoT Platform console.

Notice
  • If your instance has an ID, you must specify the ID for this parameter. Otherwise, the call fails.
  • If no Overview page or instance ID appears in the console, you do not need to configure this parameter.

For more information, see Overview.

In addition to the preceding operation-specific request parameters, you must specify common request parameters when you call this operation. For more information, see Common parameters.

Response parameters

Parameter Type Example Description
Code String iot.system.SystemException

The error code returned if the call fails. For more information, see Error codes.

ErrorMessage String A system exception occurred.

The error message returned if the request fails.

RequestId String E55E50B7-40EE-4B6B-8BBE-D3ED55CCF565

The ID of the request.

Success Boolean true

Indicates whether the call was successful.

  • true: The call was successful. However, this result does not indicate that the service is implemented. To obtain the implementation result, view the logs of the device.
  • false: The call failed.

Examples

Sample requests

https://iot.cn-shanghai.aliyuncs.com/?Action=InvokeThingsService
&Args=%7B%20%20%20%20%20%22walk%22%3A%22a~z%22%2C%20%20%20%20%20%22city%22%3A%22shanghai%22%20%7D
&DeviceName.1=1102andriod02
&DeviceName.2=1102android01
&Identifier=TimeReset
&ProductKey=a1hWjHD****
&<Common request parameters>

Sample success responses

XML format

<InvokeThingsServiceResponse>
  <RequestId>059C3274-6197-4BEC-95E4-49A076330E57</RequestId>
  <Success>true</Success>
</InvokeThingsServiceResponse>

JSON format

{
  "RequestId": "059C3274-6197-4BEC-95E4-49A076330E57",
  "Success": true
}