Post Records
Purpose
To add new entities to a module.
Endpoints
CopiedPOST/{module_api_name}Request Details
Request URL
https://www.zohoapis.com/iot/{version}/{module_api_name}
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, Certificates, Policies, Commands, Users, and Custom Modules (user-defined modules created based on specific business requirements).
Headers
Authorization: Zoho-oauthtoken {{oauth}}
Body raw (json)
{
"assets": {
"name": "DG_Dataflow",
"Time": "1688471523",
"model_id": "331000000133728"
}
}
Scope
scope=ZohoIOT.modules.{module_name}.{operation_type}
Possible module api names
devices, assets, locations, alarms, datapoints, products, manufacturers, vendors, certificates, policies, commands, users.
Possible operation types
ALL - Full access to the record
CREATE - Post records in the module
System defined mandatory field for each module
While inserting records there are a few system-defined mandatory fields that you need to mention. To successfully insert records in Zoho IoT, make sure you enter user-defined mandatory fields too.
Sample Request: First API Call
Copiedcurl --location -g 'https://www.zohoapis.com/iot/v1/devices' \
--header 'Authorization: Zoho-oauthtoken {{oauth}}' \
--header 'Content-Type: application/json' \
--data
"devices": {
"name": "tt",
"description": "",
"authentication_security": "Security Token with TLS",
"model_id": "469000000187101"
}
}
Sample Response
Copied{
"devices": [
{
"Modified_Time": "2023-10-12T18:30:36",
"code": "SUCCESS",
"registration_details": {
"device_id": 469000000217007,
},
"$type": "mqtt",
"name": "tt",
"id": "469000000217007",
"Created_By": {
"id": "469000000161019"
},
"status": "success"
}
]
}