Retrieves models
GEThttps://apis.<domain>/iot/models
Retrieves a list of models. Due to performance concerns, data is retrieved in subsets. The API must ensure that the entire dataset is consumed either by making subsequent requests, or by increasing the subset size of the initial request.
Authorization Action:
core:models:list
Request
Query Parameters
Possible values: >= 1 and <= 100
Size of the subset to retrieve.
10Possible values: >= 0
Number of items to skip during retrieval.
0Name filter. Filtering is performed as a case-insensitive partial match.
Possible values: [name, id]
Order type.
idPossible values: [asc, desc]
Order direction.
descMetadata filter. Filtering is performed matching the parameter with metadata on top level. Parameter is json.
Tag filter. Filtering is performed as a case-insensitive match.
Possible values: <= 64 characters
Tenant filter. Used to filter models by specific tenant.
Responses
- 200
- 400
- 401
- 422
- 500
List of models with pagination info.
- application/json
- Schema
- Example (auto)
Schema
models object[]
{
"total": 0,
"offset": 0,
"limit": 0,
"models": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string",
"description": "string",
"metadata": {},
"tags": [
"string"
],
"tenants": [
"string"
],
"image": "string",
"created_at": "2024-07-29T15:51:28.071Z",
"updated_at": "2024-07-29T15:51:28.071Z"
}
]
}
Failed due to malformed query parameters.
Missing or invalid access token provided.
Database can't process request.
Unexpected server error.
- application/json
- Schema
- Example (auto)
Schema
"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");
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());