thing.bulk.update
The thing.bulk.update command is used to update the Billing plans and VAS packages information for multiple Things in a single API call.
TR50 Request
{
"cmd": {
"command": "thing.bulk.update",
"params": {
"keys": ["thing1", "thing2"],
"varBillingPlanCode": "1010101",
"varVasPackageCode": "1234321"
}
}
}
Request Parameters
Name | Type | Required | Description |
---|---|---|---|
keys | Array | Yes* | An array of Thing keys to be updated. |
Ids | Array | An array of Thing IDs to be updated. | |
tags | Array | An array of tags defining which Things should be updated. | |
query | Array | A search query used to define which things should be updated. For example, "query": "name:*thing*" |
|
all | Bool | A flag indicating all things should be modified. | |
*One of the above parameters is required to identify the thing. If omitted, the thingKey associated with your session will be used. | |||
varBillingPlanCode | String | The billing plan code | |
varVasPackageCode | String | The VAS package code | |
unset | Array | An array that can potentially contain any of the following field names: varBillingPlanId, varBillingPlanCode, varVasPackageId, and/or varVasPackageCode. Used to unset/clear existing values. For example,"unset": ["varBillingPlanCode"] will remove the Billing plan associated to the Thing. |
TR50 Response
If the command is sent successfully a success message and the number of things per state found are returned. Otherwise, an error and error message will be returned.
{ "cmd": { "success": true } }