List things by model
GEThttps://apis.<domain>/iot/models/:modelId/things
Retrieves list of things belonging to specified model with pagination metadata.
Authorization Action:
core:models:getThings
Request
Path Parameters
modelId uuidrequired
Unique model 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:
10order string
Possible values: [name, id]
Order type.
Default value:
iddir string
Possible values: [asc, desc]
Order direction.
Default value:
descResponses
- 200
- 400
- 401
- 404
- 422
- 500
Data retrieved.
- application/json
- Schema
- Example (auto)
Schema
things object[]
totalinteger
Total number of items.
offsetinteger
Number of items to skip during retrieval.
limitinteger
Maximum number of items to return in one page.
{
"things": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string",
"key": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"metadata": {
"type": "device",
"control_channel_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"event_channel_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
}
],
"total": 0,
"offset": 0,
"limit": 0
}
Failed due to malformed query parameters.
Missing or invalid access token provided.
Model does not exist.
Database can't process request.
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/models/:modelId/things");
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());