Updates model info
PUThttps://apis.<domain>/iot/models/:modelId
Updates model's name, description, and metadata.
Authorization Action:
core:models:update
Request
Path Parameters
modelId uuidrequired
Unique model identifier.
- application/json
Bodyrequired
JSON-formatted document describing model updates.
namestring
descriptionstring
metadataobject
imagestring
Responses
- 200
- 400
- 401
- 404
- 415
- 500
Model details retrieved successfully.
- application/json
- Schema
- Example (auto)
Schema
idstring<uuid>
Unique model identifier.
namestring
Free-form model name.
descriptionstring
Free-form model description.
metadataobject
Arbitrary, object-encoded model data.
tagsstring[]
List of tags associated with the model.
tenantsstring[]
List of tenants that can access this model.
imagestring
URL to model image.
created_atstring<date-time>
Time when the model was created.
updated_atstring<date-time>
Time when the model was last updated.
{
"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 JSON.
Missing or invalid access token provided.
Model does not exist.
Missing or invalid 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/models/:modelId");
request.Headers.Add("Accept", "application/json");
request.Headers.Add("Authorization", "Bearer <token>");
var content = new StringContent("{\n \"name\": \"string\",\n \"description\": \"string\",\n \"metadata\": {},\n \"image\": \"string\"\n}", null, "application/json");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());