Create Devices From Template

02/10/2020 | Less than 1 minute to read

Info Note

API TYPE: POST
End Point: POST /template/devices/add
Description: Create Devices From Template

Request (Create Devices From Template)

02/10/2020 | 3 minutes to read



{
  "data": [
    {
      "device": {
        "attributes": [
          {
            "attributeName": "string",
            "attributeType": "string",
            "createdOn": "yyyy-MM-dd'T'HH:mm:ss*SSSZZZZ",
            "isActive": true,
            "jsonPath": "string",
            "modifiedOn": "yyyy-MM-dd'T'HH:mm:ss*SSSZZZZ",
            "noOfAttributes": 0,
            "noOfTags": 0,
            "uuid": "string"
          }
        ],
        "createdOn": "yyyy-MM-dd'T'HH:mm:ss*SSSZZZZ",
        "description": "string",
        "deviceName": "string",
        "edgeDeviceUuid": "string",
        "isActive": true,
        "isDisabled": true,
        "isTemplate": true,
        "modifiedOn": "yyyy-MM-dd'T'HH:mm:ss*SSSZZZZ",
        "noOfAttributes": 0,
        "noOfTags": 0,
        "noOfTriggers": 0,
        "organizationName": "string",
        "organizationUuid": "string",
        "tags": [
          {
            "createdOn": "yyyy-MM-dd'T'HH:mm:ss*SSSZZZZ",
            "isActive": true,
            "modifiedOn": "yyyy-MM-dd'T'HH:mm:ss*SSSZZZZ",
            "name": "string",
            "noOfAttributes": 0,
            "noOfTags": 0,
            "uuid": "string",
            "value": "string"
          }
        ],
        "timestamp": 0,
        "triggers": [
          {
            "createdOn": "yyyy-MM-dd'T'HH:mm:ss*SSSZZZZ",
            "isActive": true,
            "modifiedOn": "yyyy-MM-dd'T'HH:mm:ss*SSSZZZZ",
            "noOfAttributes": 0,
            "noOfTags": 0,
            "rules": [
              {
                "andOr": "string",
                "condition": "string",
                "createdOn": "yyyy-MM-dd'T'HH:mm:ss*SSSZZZZ",
                "isActive": true,
                "modifiedOn": "yyyy-MM-dd'T'HH:mm:ss*SSSZZZZ",
                "noOfAttributes": 0,
                "noOfTags": 0,
                "property": "string",
                "uuid": "string",
                "value": "string"
              }
            ],
            "triggerAddress": "string",
            "triggerAddressArgument": "string",
            "triggerHttpCallType": "string",
            "triggerMessage": "string",
            "triggerMessageArgument": "string",
            "triggerName": "string",
            "triggerOptions": [
              {
                "attributeName": "string",
                "attributeValue": "string",
                "createdOn": "yyyy-MM-dd'T'HH:mm:ss*SSSZZZZ",
                "isActive": true,
                "modifiedOn": "yyyy-MM-dd'T'HH:mm:ss*SSSZZZZ",
                "uuid": "string"
              }
            ],
            "triggerQueueTopic": "string",
            "triggerScript": "string",
            "triggerType": "string",
            "uuid": "string"
          }
        ],
        "userUuid": "string",
        "uuid": "string"
      },
      "deviceNumber": 0
    }
  ],
  "metadata": {
    "fileCodeUuid": "string",
    "orgUuid": "string",
    "userUuid": "string"
  }
}

Response (Create Devices From Template)

02/10/2020 | Less than 1 minute to read



{
  "data": [
    {}
  ],
  "metadata": {
    "fileCodeUuid": "string",
    "orgUuid": "string",
    "userUuid": "string"
  },
  "statusCode": "OK"
}

ErrorCode (Create Devices From Template)

02/14/2020 | 2 minutes to read

HTTP Status Code Reason
200 We received the request and created Successfully
400 CCP-HTTP-003 | Request method not supported
401 You are not authorized to view the resource
403 Accessing the resource you were trying to reach is forbidden
404 The resource you were trying to reach is not found

©2024 Developer.CSensorNet.com. All rights reserved | Powered by www.clovity.com