Skip to main content

Adds new config

POST 

https://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

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

Config created.

Response Headers
    Location

Authorization: http

name: bearerTokentype: httpscheme: bearerin: headerdescription: Authorization Header: `Authorization: Bearer <user_token>`
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());
Request Collapse all
Base URL
https://apis.<domain>
Auth
Body required
{
  "init_id": "string",
  "init_key": "string",
  "thing_id": "string",
  "channels": [
    "string"
  ],
  "content": "string"
}