List of channels connected to a specified thing
GEThttps://apis.<domain>/iot/things/:thingId/channels
Retrieves list of channels connected to a specified thing.
Authorization Action:
core:things:getChannels
Request
Path Parameters
thingId uuidrequired
Unique thing identifier.
Query Parameters
offset integer
Possible values: >= 0
Number of items to skip during retrieval.
Default value:
0limit integer
Possible values: >= 1 and <= 100
Size of the subset to retrieve.
Default value:
10connected boolean
Connection state of the subset to retrieve.
Default value:
trueResponses
- 200
- 400
- 401
- 404
- 422
- 500
Data retrieved.
- application/json
- Schema
- Example (auto)
Schema
channels object[]
totalinteger
Total number of items.
offsetinteger
Number of items to skip during retrieval.
limitinteger
Maximum number of items to return in one page.
{
"channels": [
{
"id": "string",
"name": "string",
"metadata": {}
}
],
"total": 0,
"offset": 0,
"limit": 0
}
Bad request.
Unauthorized.
Thing not found.
Unprocessable entity.
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.Get, "https://apis.<domain>/iot/things/:thingId/channels");
request.Headers.Add("Accept", "application/json");
request.Headers.Add("Authorization", "Bearer <token>");
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());