Update Model
Purpose
To update a model.
Request Details
Request URL
{api-domain}/iot/{version}/settings/models/{model id}?module={module_api_name}
Request Method
PUT
Note: "api-domain" must be replaced with your application domain e.g. "app1234xxxx.zohoiot.in"
Supported modules
Devices, Assets, Locations.
Headers
Authorization: Zoho-oauthtoken {{oauth}}
Scope
scope=ZohoIOT.modules.{module_name}.{operation_type}
or
scope=ZohoIOT.modules.UPDATE
Parameters
Param - module, mandatory
module - string, mandatory (api name of the module)
Possible values: devices, assets, locations.
Sample Request: First API Call
Copiedcurl --location -g --request PUT '{api-domain}/iot/v1/settings/models/2260000000239001?module=devices' \
--header 'Authorization: Zoho-oauthtoken {{oauth}}' \
--header 'Content-Type: application/json' \
--data '
{
"models": {
"name": "DeviceModel1",
"id": "2260000000239001",
"display_name": "DeviceModel1"
}
}
Note: "api-domain" must be replaced with your application domain e.g. "app1234xxxx.zohoiot.in"
"oauth" must be replaced with your oauth token.
Response to the First API Call
Copied{
"models": {
"code": "UPDATED",
"icon": "device",
"type": {
"api_name": "device",
"name": "Device",
"icon": "device",
"description": "Device",
"id": "2260000000186001",
"enabled": true
},
"column_count": 2,
"enable_geo_tracking": false,
"id": "2260000000319410",
"image": "pmcqz14f8b1905a8b42bc9b63fb9a49bd8947",
"visible": true,
"message": "updated successfully",
"display_name": "DeviceModel",
"discriminator": "Devices",
"tab_traversal": 2,
"quick_create": true,
"name": "DeviceModel",
"status": "Active"
}
}