Bulk provision things
POSThttps://apis.<domain>/iot/provision/things/bulk
Provisions multiple things in a single request.
Authorization Action:
core:provision:things
Request
- application/json
Body arrayrequired
- Array [
- ]
namestring
tenantstringrequired
modelstringrequired
init_idstringrequired
External identifier (MAC address or similar)
init_keystringrequired
External key
migration_keystring
migration_key_quotainteger<int32>
Responses
- 200
- 400
- 401
- 500
Bulk provision response.
- application/json
- Schema
- Example (auto)
Schema
things object[]
processedinteger
failedinteger
errorsstring[]
{
"things": [
{
"id": "string",
"name": "string",
"key": "string",
"metadata": {},
"tenant": "string",
"model": "string"
}
],
"processed": 0,
"failed": 0,
"errors": [
"string"
]
}
Failed due to malformed JSON.
Missing or invalid access token provided.
Unexpected server-side error occurred.
Authorization: http
name: bearerAuthtype: httpscheme: bearerdescription: * Users access: `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.Post, "https://apis.<domain>/iot/provision/things/bulk");
request.Headers.Add("Accept", "application/json");
request.Headers.Add("Authorization", "Bearer <token>");
var content = new StringContent("[\n {\n \"name\": \"string\",\n \"tenant\": \"string\",\n \"model\": \"string\",\n \"init_id\": \"string\",\n \"init_key\": \"string\",\n \"migration_key\": \"string\",\n \"migration_key_quota\": 0\n }\n]", null, "application/json");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());