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/sinks' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer <TOKEN>' \ -H 'x-api-key: <API_KEY_VALUE>' \ --data-raw '{ "sink": "pubsub", "config": { "connectionParameter": "string" } }'
import requests import json url = "https://api.korewireless.com/omnicore/subscriptions/:subscriptionId/sinks" payload = json.dumps({ "sink": "pubsub", "config": { "connectionParameter": "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/sinks" method := "POST" payload := strings.NewReader(`{ "sink": "pubsub", "config": { "connectionParameter": "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({ "sink": "pubsub", "config": { "connectionParameter": "string" } }); let config = { method: 'post', url: 'https://api.korewireless.com/omnicore/subscriptions/:subscriptionId/sinks', 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); });
Create a Sink
Subscription ID
pubsub
curl -L \ --request POST \ --url 'https://api.korewireless.com/omnicore/subscriptions/{subscriptionId}/sinks' \ --header 'Authorization: Bearer JWT' \ --header 'Content-Type: application/json' \ --data '{ "sink": "pubsub", "config": { "connectionParameter": "text" } }'
{ "id": "text", "subscription": "text", "sink": "pubsub", "config": { "connectionParameter": "text" }, "status": true, "createdon": "text", "updatedon": "text" }