update Custom Onboard Request
Authorization: apiKey
name: x-api-key
in: header
type: apiKey
curl -L -X POST 'https://api.korewireless.com/omnicore/subscriptions/:subscriptionid/registries/:registryId/devices/:deviceId/updateCustomOnboardRequest' \
-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"
},
"isGateway": true,
"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
},
"customOnboardData": "string",
"isApprove": true
}'
import requests
import json
url = "https://api.korewireless.com/omnicore/subscriptions/:subscriptionid/registries/:registryId/devices/:deviceId/updateCustomOnboardRequest"
payload = json.dumps({
"id": "string",
"blocked": True,
"credentials": [
{
"expirationTime": "string",
"publicKey": {
"format": "RSA_PEM",
"key": "string"
}
}
],
"gateway": [
"string"
],
"gatewayConfig": {
"gatewayAuthMethod": "GATEWAY_AUTH_METHOD_UNSPECIFIED",
"gatewayType": "NON_GATEWAY"
},
"isGateway": True,
"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
},
"customOnboardData": "string",
"isApprove": True
})
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer <TOKEN>',
'x-api-key': '<API_KEY_VALUE>'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.korewireless.com/omnicore/subscriptions/:subscriptionid/registries/:registryId/devices/:deviceId/updateCustomOnboardRequest"
method := "POST"
payload := strings.NewReader(`{
"id": "string",
"blocked": true,
"credentials": [
{
"expirationTime": "string",
"publicKey": {
"format": "RSA_PEM",
"key": "string"
}
}
],
"gateway": [
"string"
],
"gatewayConfig": {
"gatewayAuthMethod": "GATEWAY_AUTH_METHOD_UNSPECIFIED",
"gatewayType": "NON_GATEWAY"
},
"isGateway": true,
"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
},
"customOnboardData": "string",
"isApprove": true
}`)
client := &http.Client {
}
req, err := http.NewRequest(method, url, payload)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Content-Type", "application/json")
req.Header.Add("Accept", "application/json")
req.Header.Add("Authorization", "Bearer <TOKEN>")
req.Header.Add("x-api-key", "<API_KEY_VALUE>")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
const axios = require('axios');
let data = JSON.stringify({
"id": "string",
"blocked": true,
"credentials": [
{
"expirationTime": "string",
"publicKey": {
"format": "RSA_PEM",
"key": "string"
}
}
],
"gateway": [
"string"
],
"gatewayConfig": {
"gatewayAuthMethod": "GATEWAY_AUTH_METHOD_UNSPECIFIED",
"gatewayType": "NON_GATEWAY"
},
"isGateway": true,
"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
},
"customOnboardData": "string",
"isApprove": true
});
let config = {
method: 'post',
url: 'https://api.korewireless.com/omnicore/subscriptions/:subscriptionid/registries/:registryId/devices/:deviceId/updateCustomOnboardRequest',
headers: {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer <TOKEN>',
'x-api-key': '<API_KEY_VALUE>'
},
data : data
};
axios(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
Last updated