create Device
post
Create a device under a registry
Authorizations
Path parameters
subscriptionIdstringRequired
Subscription ID
registryIdstringRequired
Registry ID
Body
idstring · min: 3 · max: 256Required
namestringRead-onlyOptional
numIdstringRead-onlyOptional
parentstringRead-onlyOptional
registrystringRead-onlyOptional
blockedbooleanOptional
capresentbooleanRead-onlyOptional
subscriptionstringRead-onlyOptional
createdOnstringRead-onlyOptional
updatedOnstringRead-onlyOptional
gatewaystring[]Optional
isGatewaybooleanOptional
deviceErrorsstringRead-onlyOptional
clientOnlinebooleanRead-onlyOptional
lastConfigAckTimestringRead-onlyOptional
lastConfigSendTimestringRead-onlyOptional
lastErrorTimestringRead-onlyOptional
lastEventTimestringRead-onlyOptional
lastHeartbeatTimestringRead-onlyOptional
lastStateTimestringRead-onlyOptional
logLevelstring · enumOptionalPossible values:
Responses
200
OK
application/json
400
Bad Request
application/json
404
Not Found
application/json
500
Internal Server Error
application/json
post
POST /omnicore/subscriptions/{subscriptionId}/registries/{registryId}/devices HTTP/1.1
Host: api.korewireless.com
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 732
{
"id": "text",
"blocked": true,
"credentials": [
{
"expirationTime": "text",
"publicKey": {
"format": "RSA_PEM",
"key": "text"
}
}
],
"gateway": [
"text"
],
"gatewayConfig": {
"gatewayAuthMethod": "GATEWAY_AUTH_METHOD_UNSPECIFIED",
"gatewayType": "NON_GATEWAY"
},
"isGateway": true,
"logLevel": "INFO",
"metadata": {
"ANY_ADDITIONAL_PROPERTY": "text"
},
"config": {
"acknowledged": true,
"binaryData": "text",
"cloudUpdateTime": "text",
"deviceAckTime": "text",
"version": 1
},
"state": {
"binaryData": "text",
"updateTime": "text"
},
"policy": {
"Connect": true,
"PublishState": true,
"PublishEvents": true,
"PublishEventsRegex": "text",
"PublishLoopback": true,
"SubscribeCommand": true,
"SubscribeCommandRegex": "text",
"SubscribeBroadcast": true,
"SubscribeBroadcastRegex": "text",
"SubscribeConfig": true
}
}
{
"id": "text",
"name": "text",
"numId": "text",
"parent": "text",
"registry": "text",
"blocked": true,
"capresent": true,
"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": true,
"deviceErrors": "text",
"clientOnline": true,
"lastConfigAckTime": "text",
"lastConfigSendTime": "text",
"lastErrorStatus": {
"code": 1,
"details": "text",
"message": "text"
},
"lastErrorTime": "text",
"lastEventTime": "text",
"lastHeartbeatTime": "text",
"lastStateTime": "text",
"logLevel": "INFO",
"metadata": {
"ANY_ADDITIONAL_PROPERTY": "text"
},
"config": {
"acknowledged": true,
"binaryData": "text",
"cloudUpdateTime": "text",
"deviceAckTime": "text",
"version": 1
},
"state": {
"binaryData": "text",
"updateTime": "text"
},
"policy": {
"Connect": true,
"PublishState": true,
"PublishEvents": true,
"PublishEventsRegex": "text",
"PublishLoopback": true,
"SubscribeCommand": true,
"SubscribeCommandRegex": "text",
"SubscribeBroadcast": true,
"SubscribeBroadcastRegex": "text",
"SubscribeConfig": true
}
}
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