Skip to main content

Post Records

Purpose   

To add new entities to a module.

Endpoints

CopiedPOST/{module_api_name}

Request Details   
 

Request URL   

{api-domain}/iot/{version}/{module_api_name}

 

Supported Modules 

Devices, Assets, Locations, Alarms, Datapoints, Products, Manufacturers, Vendors, Certificates, Policies, Commands, Users.

 

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 '{{api-domain}}/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"
        }
    ]
}