Updates thing info
PUThttps://apis.<domain>/iot/things/:thingId
Update is performed by replacing the current resource data with values provided in a request payload. Note that the thing's type and ID cannot be changed.
Authorization Action:
core:things:update
Request
Path Parameters
thingId uuidrequired
Unique thing identifier.
- application/json
Bodyrequired
Arbitrary, object-encoded thing's data.
namestring
Free-form thing name.
metadataobject
Responses
- 200
- 400
- 401
- 404
- 415
- 500
Thing updated.
Bad request.
Unauthorized.
Thing 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/things/:thingId");
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());