Skip to main content

Updates channel info

PUT 

https://apis.<domain>/iot/channels/:chanId

Update is performed by replacing the current resource data with values provided in a request payload. Note that the channel's ID will not be affected.

Authorization Action:

core:channels:update

Request

Path Parameters

    chanId uuidrequired

    Unique channel identifier.

Bodyrequired

JSON-formatted document describing the updated channel.

    namestring

    Free-form channel name.

    metadataobject

    Arbitrary, object-encoded channel's data.

Responses

Channel updated.

Authorization: http

name: bearerTokentype: httpscheme: bearerin: headerdescription: Authorization Header: `Authorization: Bearer <user_token>`
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Put, "https://apis.<domain>/iot/channels/:chanId");
request.Headers.Add("Authorization", "Bearer <token>");
var content = new StringContent("{\n \"name\": \"string\",\n \"metadata\": {}\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
Parameters
— pathrequired
Body required
{
  "name": "string",
  "metadata": {}
}