modify Registry
Last updated
Last updated
Authorization: apiKey
name: x-api-key
in: header
type: apiKey
curl -L -X PATCH 'https://api.korewireless.com/omnicore/subscriptions/:subscriptionId/registries/:registryId' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
-H 'x-api-key: <API_KEY_VALUE>' \
--data-raw '{
"id": "string",
"credentials": [
{
"publicKeyCertificate": {
"certificate": "string",
"format": "X509_CERTIFICATE_PEM",
"x509Details": {
"expiryTime": "string",
"issuer": "string",
"publicKeyType": "string",
"signatureAlgorithm": "string",
"startTime": "string",
"subject": "string"
}
}
}
],
"httpConfig": {
"httpEnabledState": "HTTP_ENABLED"
},
"mqttConfig": {
"mqttEnabledState": "MQTT_ENABLED"
},
"logLevel": "INFO",
"eventNotificationConfigs": [
{
"pubsubTopicName": "string",
"subfolderMatches": "string"
}
],
"logNotificationConfig": {
"pubsubTopicName": "string"
},
"stateNotificationConfig": {
"pubsubTopicName": "string"
},
"customOnboardNotificationConfig": {
"pubsubTopicName": "string"
},
"customOnboardEnabled": true
}'
import requests
import json
url = "https://api.korewireless.com/omnicore/subscriptions/:subscriptionId/registries/:registryId"
payload = json.dumps({
"id": "string",
"credentials": [
{
"publicKeyCertificate": {
"certificate": "string",
"format": "X509_CERTIFICATE_PEM",
"x509Details": {
"expiryTime": "string",
"issuer": "string",
"publicKeyType": "string",
"signatureAlgorithm": "string",
"startTime": "string",
"subject": "string"
}
}
}
],
"httpConfig": {
"httpEnabledState": "HTTP_ENABLED"
},
"mqttConfig": {
"mqttEnabledState": "MQTT_ENABLED"
},
"logLevel": "INFO",
"eventNotificationConfigs": [
{
"pubsubTopicName": "string",
"subfolderMatches": "string"
}
],
"logNotificationConfig": {
"pubsubTopicName": "string"
},
"stateNotificationConfig": {
"pubsubTopicName": "string"
},
"customOnboardNotificationConfig": {
"pubsubTopicName": "string"
},
"customOnboardEnabled": True
})
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer <TOKEN>',
'x-api-key': '<API_KEY_VALUE>'
}
response = requests.request("PATCH", 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"
method := "PATCH"
payload := strings.NewReader(`{
"id": "string",
"credentials": [
{
"publicKeyCertificate": {
"certificate": "string",
"format": "X509_CERTIFICATE_PEM",
"x509Details": {
"expiryTime": "string",
"issuer": "string",
"publicKeyType": "string",
"signatureAlgorithm": "string",
"startTime": "string",
"subject": "string"
}
}
}
],
"httpConfig": {
"httpEnabledState": "HTTP_ENABLED"
},
"mqttConfig": {
"mqttEnabledState": "MQTT_ENABLED"
},
"logLevel": "INFO",
"eventNotificationConfigs": [
{
"pubsubTopicName": "string",
"subfolderMatches": "string"
}
],
"logNotificationConfig": {
"pubsubTopicName": "string"
},
"stateNotificationConfig": {
"pubsubTopicName": "string"
},
"customOnboardNotificationConfig": {
"pubsubTopicName": "string"
},
"customOnboardEnabled": 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",
"credentials": [
{
"publicKeyCertificate": {
"certificate": "string",
"format": "X509_CERTIFICATE_PEM",
"x509Details": {
"expiryTime": "string",
"issuer": "string",
"publicKeyType": "string",
"signatureAlgorithm": "string",
"startTime": "string",
"subject": "string"
}
}
}
],
"httpConfig": {
"httpEnabledState": "HTTP_ENABLED"
},
"mqttConfig": {
"mqttEnabledState": "MQTT_ENABLED"
},
"logLevel": "INFO",
"eventNotificationConfigs": [
{
"pubsubTopicName": "string",
"subfolderMatches": "string"
}
],
"logNotificationConfig": {
"pubsubTopicName": "string"
},
"stateNotificationConfig": {
"pubsubTopicName": "string"
},
"customOnboardNotificationConfig": {
"pubsubTopicName": "string"
},
"customOnboardEnabled": true
});
let config = {
method: 'patch',
url: 'https://api.korewireless.com/omnicore/subscriptions/:subscriptionId/registries/:registryId',
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);
});
Update a registry
/subscriptions/{subscriptionId}/registries/{registryId}
Subscription ID
Registry ID
values to be updated: eventNotificationConfigs,stateNotificationConfig.pubsub_topic_name,logNotificationConfig.pubsub_topic_name,customOnboardNotificationConfig.pubsub_topic_name,mqttConfig.mqtt_enabled_state,httpConfig.http_enabled_state,logLevel,credentials,customOnboardEnabled
eventNotificationConfigs
, stateNotificationConfig.pubsub_topic_name
, logNotificationConfig.pubsub_topic_name
, customOnboardNotificationConfig.pubsub_topic_name
, customOnboardEnabled
, mqttConfig.mqtt_enabled_state
, httpConfig.http_enabled_state
, logLevel
, credentials
INFO
, ERROR
curl -L \
--request PATCH \
--url 'https://api.korewireless.com/omnicore/subscriptions/{subscriptionId}/registries/{registryId}?updateMask=eventNotificationConfigs' \
--header 'Authorization: Bearer JWT' \
--header 'Content-Type: application/json' \
--data '{
"id": "text",
"name": "text",
"parent": "text",
"createdOn": "text",
"updatedOn": "text",
"httpConfig": {
"httpEnabledState": "HTTP_ENABLED"
},
"mqttConfig": {
"mqttEnabledState": "MQTT_ENABLED"
},
"logLevel": "INFO",
"isNatsRoute": true,
"logNotificationConfig": {
"pubsubTopicName": "text"
},
"stateNotificationConfig": {
"pubsubTopicName": "text"
},
"customOnboardNotificationConfig": {
"pubsubTopicName": "text"
},
"customOnboardEnabled": true,
"numberOfDevices": 1,
"numberOfGateways": 1,
"credentials": [
{
"publicKeyCertificate": {
"certificate": "text",
"x509Details": {
"expiryTime": "text",
"issuer": "text",
"publicKeyType": "text",
"signatureAlgorithm": "text",
"startTime": "text",
"subject": "text"
},
"format": "X509_CERTIFICATE_PEM"
},
"id": "text"
}
],
"eventNotificationConfigs": [
{
"pubsubTopicName": "text",
"subfolderMatches": "text"
}
]
}'
{
"id": "text",
"name": "text",
"parent": "text",
"createdOn": "text",
"updatedOn": "text",
"httpConfig": {
"httpEnabledState": "HTTP_ENABLED"
},
"mqttConfig": {
"mqttEnabledState": "MQTT_ENABLED"
},
"logLevel": "INFO",
"isNatsRoute": true,
"logNotificationConfig": {
"pubsubTopicName": "text"
},
"stateNotificationConfig": {
"pubsubTopicName": "text"
},
"customOnboardNotificationConfig": {
"pubsubTopicName": "text"
},
"customOnboardEnabled": true,
"numberOfDevices": 1,
"numberOfGateways": 1,
"credentials": [
{
"publicKeyCertificate": {
"certificate": "text",
"x509Details": {
"expiryTime": "text",
"issuer": "text",
"publicKeyType": "text",
"signatureAlgorithm": "text",
"startTime": "text",
"subject": "text"
},
"format": "X509_CERTIFICATE_PEM"
},
"id": "text"
}
],
"eventNotificationConfigs": [
{
"pubsubTopicName": "text",
"subfolderMatches": "text"
}
]
}
OK