Get Related Records Count
Purpose
To fetch the count of related records.
Endpoints
CopiedGET {module_api_name}/{record_id}/{related_module}/actions/count
Request Details
Request URL
https://www.zohoapis.com/iot/{version}/{module_api_name}/{record_id}/{related_modulename}/actions/count
Note: "zohoapis.com" refers to the constant domain address used in Zoho IoT apis to fetch records from the registered application in the authorization process.
Replace your location's Base API URI (.in, .eu, .sa, or .au) instead of .com.
Supported Modules
Devices, Assets, Locations, Alarms, Datapoints, Products, Manufacturers, Vendors, and Custom Modules (user-defined modules created based on specific business requirements).
Headers
Authorization: Zoho-oauthtoken {{oauth}}
Scope
scope=ZohoIOT.modules.{module_name}.{operation_type}
Possible module api names
devices, assets, locations, alarms, datapoints, products, manufacturers, vendors.
Possible operation types
ALL - Full access to the record
READ - Get records count from the module
Parameters
Param name, type, mandatory,
module id - int, mandatory
To get the records count based on related module.
Possible values: Positive integer values only.
module - string, option
To get the records count based on module.
Possible values: assets, devices, etc.
Sample Request: First API Call
Copiedcurl --location -g 'https://www.zohoapis.com/iot/v1/devices/2000000083006/assets/actions/count' \
--header 'Authorization: Zoho-oauthtoken {{oauth}}'
Sample Response
Copied{"count":12}