create Device

Create a device under a registry

POSThttps://api.korewireless.com/omnicore/subscriptions/{subscriptionId}/registries/{registryId}/devices
Path parameters
subscriptionId*string

Subscription ID

registryId*string

Registry ID

Body

application/json

id*string
namestring
numIdstring
parentstring
registrystring
blockedboolean
capresentboolean
subscriptionstring
createdOnstring
updatedOnstring
credentialsarray of DeviceCredential (object)
gatewayarray of string
gatewayConfigGatewayConfig (object)
isGatewayboolean
deviceErrorsstring
clientOnlineboolean
lastConfigAckTimestring
lastConfigSendTimestring
lastErrorStatusErrorStatus (object)
lastErrorTimestring
lastEventTimestring
lastHeartbeatTimestring
lastStateTimestring
logLevelLogLevel (enum)
INFOERROR
metadataobject
configDeviceConfig (object)
stateDeviceState (object)
policypolicy (object)
Response

OK

Body
id*string
namestring
numIdstring
parentstring
registrystring
blockedboolean
capresentboolean
subscriptionstring
createdOnstring
updatedOnstring
credentialsarray of DeviceCredential (object)
gatewayarray of string
gatewayConfigGatewayConfig (object)
isGatewayboolean
deviceErrorsstring
clientOnlineboolean
lastConfigAckTimestring
lastConfigSendTimestring
lastErrorStatusErrorStatus (object)
lastErrorTimestring
lastEventTimestring
lastHeartbeatTimestring
lastStateTimestring
logLevelLogLevel (enum)
INFOERROR
metadataobject
configDeviceConfig (object)
stateDeviceState (object)
policypolicy (object)
Request
const response = await fetch('https://api.korewireless.com/omnicore/subscriptions/{subscriptionId}/registries/{registryId}/devices', {
    method: 'POST',
    headers: {
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      "id": "text"
    }),
});
const data = await response.json();
Response
{
  "id": "text",
  "name": "text",
  "numId": "text",
  "parent": "text",
  "registry": "text",
  "blocked": false,
  "capresent": false,
  "subscription": "text",
  "createdOn": "text",
  "updatedOn": "text",
  "credentials": [
    {
      "expirationTime": "text",
      "id": "text",
      "publicKey": {
        "format": "RSA_PEM",
        "key": "text"
      }
    }
  ],
  "gateway": [
    "text"
  ],
  "gatewayConfig": {
    "gatewayAuthMethod": "GATEWAY_AUTH_METHOD_UNSPECIFIED",
    "gatewayType": "NON_GATEWAY"
  },
  "isGateway": false,
  "deviceErrors": "text",
  "clientOnline": false,
  "lastConfigAckTime": "text",
  "lastConfigSendTime": "text",
  "lastErrorStatus": {
    "details": "text",
    "message": "text"
  },
  "lastErrorTime": "text",
  "lastEventTime": "text",
  "lastHeartbeatTime": "text",
  "lastStateTime": "text",
  "logLevel": "INFO",
  "config": {
    "acknowledged": false,
    "binaryData": "text",
    "cloudUpdateTime": "text",
    "deviceAckTime": "text"
  },
  "state": {
    "binaryData": "text",
    "updateTime": "text"
  },
  "policy": {
    "Connect": false,
    "PublishState": false,
    "PublishEvents": false,
    "PublishEventsRegex": "text",
    "PublishLoopback": false,
    "SubscribeCommand": false,
    "SubscribeCommandRegex": "text",
    "SubscribeBroadcast": false,
    "SubscribeBroadcastRegex": "text",
    "SubscribeConfig": false
  }
}

Authorization: apiKey

name: x-api-key
in: header
type: apiKey
curl -L -X POST 'https://api.korewireless.com/omnicore/subscriptions/:subscriptionId/registries/:registryId/devices' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
-H 'x-api-key: <API_KEY_VALUE>' \
--data-raw '{
  "id": "string",
  "blocked": true,
  "credentials": [
    {
      "expirationTime": "string",
      "publicKey": {
        "format": "RSA_PEM",
        "key": "string"
      }
    }
  ],
  "gateway": [
    "string"
  ],
  "gatewayConfig": {
    "gatewayAuthMethod": "GATEWAY_AUTH_METHOD_UNSPECIFIED",
    "gatewayType": "NON_GATEWAY"
  },
  "lastErrorStatus": {},
  "logLevel": "INFO",
  "metadata": {},
  "config": {
    "binaryData": "string",
    "version": 0
  },
  "state": {
    "binaryData": "string",
    "updateTime": "string"
  },
  "policy": {
    "Connect": true,
    "PublishState": true,
    "PublishEvents": true,
    "PublishEventsRegex": "string",
    "PublishLoopback": true,
    "SubscribeCommand": true,
    "SubscribeCommandRegex": "string",
    "SubscribeBroadcast": true,
    "SubscribeBroadcastRegex": "string",
    "SubscribeConfig": true
  }
}'

Last updated