华为乾坤-创建设备:响应示例

时间:2025-05-12 15:31:22

响应示例

返回状态码为200:创建设备成功,响应体参考CreateDeviceBean。

HTTP/1.1 200 OK
Date: Sun,11 May 2025 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
	"errcode" : "0",
	"errmsg" : "",
	"success" : [
		{
			"id" : "00000000-0000-0000-0000-000000000001",
			"name" : "AR1",
			"esn" : "2102351BTJ0000000666",
			"description" : "AR",
			"resourceId" : "HUAWEI",
			"tenantId" : "00000000-0000-0000-0000-000000000001",
			"siteId" : "00000000-0000-0000-0000-000000000001",
			"deviceModel" : "AR161EW",
			"tags" : ["AP01"],
			"systemIp" : "192.168.1.1",
			"ztpConfirm" : true,
			"role" : ["Gateway"]
		}
	],
	"fail" : [
		{
			"errcode" : "0",
			"errmsg" : "",
			"data" : {
				"esn" : "2102351BTJ0000000666",
				"name" : "AR1",
				"deviceModel" : "AR161EW",
				"systemIp" : "192.168.1.1",
				"oldTenantId" : "00000000-0000-0000-0000-000000000004",
				"oldTenantName" : "tenant1",
				"oldDeviceGroupId" : "00000000-0000-0000-0000-000000000004",
				"oldDeviceGroupName" : "group1"
			}
		}
	],
	"isRegisterEnable" : true,
	"forceRegister" : true
}

返回状态码为400:创建失败,错误请求。

HTTP/1.1 400 Bad Request
Date: Sun,11 May 2025 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

返回状态码为500:创建失败,内部服务器错误。

HTTP/1.1 500 Internal Server Error
Date: Sun,11 May 2025 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
support.huaweicloud.com/qiankuncmn-qiankuncs/toctopics/zh-cn_topic_0000002163880601.html