Creating a Device
Function
This API is used to create a device on ROMA Connect.
URI
POST /v1/{project_id}/link/instances/{instance_id}/devices
Parameter |
Type |
Mandatory |
Description |
---|---|---|---|
project_id |
string |
Yes |
Project ID of each region of a tenant. |
instance_id |
string |
Yes |
ID of the ROMA Connect instance used by the tenant. |
Request
Request parameters
Parameter |
Type |
Mandatory |
Description |
---|---|---|---|
product_name |
string |
Yes |
Name of a product that has been created. |
devices |
Array<device> |
Yes |
Device information. |
Parameter |
Type |
Mandatory |
Description |
---|---|---|---|
device_name |
string |
Yes |
Device name. The value can contain a maximum of 64 characters, including letters, digits, underscores (_), and hyphens (-). |
remark |
string |
No |
Description, which contains a maximum of 200 characters. |
status |
integer |
No |
Device status. The value can only be 0 (default value) or 1.
|
Example request
https://example.cloud.com/v1/80e2b******f4a398d6409a50932d917/link/instances/fb3b24ab-5d87-473d-9c57-fc6******6a1/devices { "product_name" : "product01", "devices" : [ { "device_name" : "device01", "remark" : "", "status" : 0 } ] }
Response
Response parameters
The response parameter is an array element.
Parameter |
Type |
Description |
---|---|---|
Array elements |
Array<device> |
Device information. |
Parameter |
Type |
Description |
---|---|---|
client_id |
string |
Client ID. |
device_id |
integer |
Device ID. |
device_name |
string |
Device name. The value can contain a maximum of 64 characters, including letters, digits, underscores (_), and hyphens (-). |
password |
string |
Password. |
product_id |
integer |
Product ID. |
product_name |
string |
Product name. |
remark |
string |
Product description, which contains a maximum of 200 characters. |
status |
integer |
Device status. The value can be 0 or 1.
|
user_name |
string |
Username. |
Example response
[ { "client_id": "D2096b22290ddd4e", "device_id": 868, "device_name": "device-ada", "password": "*****************", "product_id": 209, "product_name": "product-ada1", "remark": "", "status": 0, "user_name": "5b24c8a0fb5a4416af1640bb1d25e294" } ]
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot