How to Provision Channels
Requirements
-
A Valid API Key: Provisioned and provided by your platform administrator.
-
A organization Identifier: Provisioned and provided by your platform administrator. If you have enough permissions you can try to provision by sour self (see How to provision Organizations)
Method |
|
API Endpoint |
|
New channels can be created by sending a POST
request to the above defined URI, including a correctly formatted JSON document in the POST body.
The minimun fields you must complete are showed in the next example.
Unresolved directive in opengate-api-quick-reference-howto-provision-channels.adoc - include::./json/dmmExamples/opengate-north-dmm-provision-channel-minimum-example.json[]
Using curl
to perform the request:
curl --request POST \ --data-binary @opengate-north-dmm-provision-channel-minimum-example.json \ --header "X-ApiKey: YOUR_API_KEY_HERE" \ --verbose \ http://[your_opengate_address]/north/v80/provision/organizations/{organization_id}/channels \ -H "Content-type: application/json"
In the response we should see a status code of 201
(created) and a location header which tells us the location (including the assigned identifier) of the newly created channel. Let’s look the response.
HTTP/1.1 201 Created Location: http://[your_opengate_address]/north/v80/provision/organizations/{organization_id}/channels/battery_channel