Skip to main content

Updates thing info

PUT 

https://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.

Bodyrequired

Arbitrary, object-encoded thing's data.

    namestring

    Free-form thing name.

    metadataobject

Responses

Thing updated.

Authorization: http

name: bearerTokentype: httpscheme: bearerin: headerdescription: Authorization Header: `Authorization: Bearer <user_token>`
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());
Request Collapse all
Base URL
https://apis.<domain>
Auth
Parameters
— pathrequired
Body required
{
  "name": "string",
  "metadata": {}
}