Skip to main content

Updates model tenants

PUT 

https://apis.<domain>/iot/models/:modelId/tenants

Update model's tenant list.

Authorization Action:

core:models:assignTenants

Request

Path Parameters

    modelId uuidrequired

    Unique model identifier.

Bodyrequired

JSON-formatted document containing model tenants.

    tenantsstring[]

Responses

Model details retrieved successfully.

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.

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/models/:modelId/tenants");
request.Headers.Add("Accept", "application/json");
request.Headers.Add("Authorization", "Bearer <token>");
var content = new StringContent("{\n \"tenants\": [\n \"string\"\n ]\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
{
  "tenants": [
    "string"
  ]
}