Updates channel info
PUThttps://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.
- application/json
Bodyrequired
JSON-formatted document describing the updated channel.
namestring
Free-form channel name.
metadataobject
Arbitrary, object-encoded channel's data.
Responses
- 200
- 400
- 401
- 404
- 415
- 500
Channel updated.
Bad request.
Unauthorized.
Channel not found.
Missing or unsupported content type.
Unexpected server error.
- application/json
- Schema
- Example (auto)
Schema
stringstring<byte>
"string"
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.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());