Adds new config
POSThttps://apis.<domain>/iot/edge/configs
Adds new config to the list of config owned by user identified using the provided access token.
Authorization Action:
core:config:create
Request
- application/json
Bodyrequired
JSON-formatted document describing the new config.
init_idstringrequired
MAC address or other indentifier.
init_keystringrequired
init key.
thing_idstring
ID of the corresponding Connhex Thing.
channelsstring[]
contentstring
Responses
- 201
- 400
- 401
- 415
- 500
Config created.
Response Headers
Bad request.
Unauthorized.
Missing or unsupported content type.
Unexpected server error.
Authorization: http
name: bearerTokentype: httpscheme: bearerin: headerdescription: Authorization Header: `Authorization: Bearer <user_token>`
- csharp
- curl
- dart
- go
- http
- java
- javascript
- kotlin
- c
- nodejs
- objective-c
- ocaml
- php
- powershell
- python
- r
- ruby
- rust
- shell
- swift
- HTTPCLIENT
- RESTSHARP
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://apis.<domain>/iot/edge/configs");
request.Headers.Add("Authorization", "Bearer <token>");
var content = new StringContent("{\n \"init_id\": \"string\",\n \"init_key\": \"string\",\n \"thing_id\": \"string\",\n \"channels\": [\n \"string\"\n ],\n \"content\": \"string\"\n}", null, "application/json");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());