Last updated 1 year ago
Authorization: apiKey
name: x-api-key in: header type: apiKey
curl -L -X POST 'https://api.korewireless.com/omnicore/subscriptions/:subscriptionId/registries/:registryId/bindDeviceToGateway' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer <TOKEN>' \ -H 'x-api-key: <API_KEY_VALUE>' \ --data-raw '{ "deviceId": "string", "gatewayId": "string" }'
import requests import json url = "https://api.korewireless.com/omnicore/subscriptions/:subscriptionId/registries/:registryId/bindDeviceToGateway" payload = json.dumps({ "deviceId": "string", "gatewayId": "string" }) 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/bindDeviceToGateway" method := "POST" payload := strings.NewReader(`{ "deviceId": "string", "gatewayId": "string" }`) 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({ "deviceId": "string", "gatewayId": "string" }); let config = { method: 'post', url: 'https://api.korewireless.com/omnicore/subscriptions/:subscriptionId/registries/:registryId/bindDeviceToGateway', 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); });
Bind a device to a gateway under a registry
/subscriptions/{subscriptionId}/registries/{registryId}/bindDeviceToGateway
Subscription ID
Registry ID
curl -L \ --request POST \ --url 'https://api.korewireless.com/omnicore/subscriptions/{subscriptionId}/registries/{registryId}/bindDeviceToGateway' \ --header 'Authorization: Bearer JWT' \ --header 'Content-Type: application/json' \ --data '{ "deviceId": "text", "gatewayId": "text" }'
{ "info": "text" }