Add a Device

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

Info Note

API TYPE: POST
End Point: POST /org/{orgUuid}/user/{userUuid}/device/add
Description: To add a new Device

Request (Add a Device)

02/07/2020 | 3 minutes to read



{
  "data": [
    {
      "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"
    }
  ],
  "metadata": {
    "fileCodeUuid": "string",
    "orgUuid": "string",
    "userUuid": "string"
  }
}

Response (Add a Device)

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


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

ErrorCode (Add a Device)

02/14/2020 | 2 minutes to read

HTTP Status Code Reason
200 CCP-HTTP-017 | Invalid UUID Identifier
200 CCP-DM-005 | Error while Creating/Updating device
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