-
响应示例 返回状态码为200:查询成功,响应体参考BatchQueryResult。 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
{
"errorCode" : "0x00c80035",
"errorMessage" : "参数非法",
"totalCounts" : "",
"deviceList" : [
{
"siteName" : "siteName",
"siteId" : "00000000-0000-0000-0000-000000000001",
"deviceType" : "LSW",
"deviceModel" : "USG6380",
"role" : "ACC",
"id" : "00000000-0000-0000-0000-000000000001",
"esn" : "0088032VRE1234567890",
"name" : "name",
"firstConnectTime" : "1686532310230",
"lastConnectTime" : "1686532310230",
"approvalStatus" : 1,
"failReason" : "设备类型不匹配",
"nameModifyFlag" : "true",
"siteModifyFlag" : "true",
"stackMasterEsn" : "0088032VRE1234567890",
"mac" : "01-80-C2-00-00-00",
"discoveryType" : 1,
"discoveryParentId" : "00000000-0000-0000-0000-000000000001"
}
]
} 返回状态码为400:设备ID格式错误时返回,响应体参考ErrorResponse。 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
{
"errorCode" : "0x00c80035",
"errorMessage" : "参数非法"
} 返回状态码为500:服务内部异常时返回,响应体参考ErrorResponse。 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
{
"errorCode" : "0x00c80035",
"errorMessage" : "参数非法"
}
-
响应参数 返回状态码为200:查询成功,响应体参考BatchQueryResult。 表3 BatchQueryResult对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 errorCode string 1~128个字符。 - 错误码 "0x00c80035" errorMessage string 1~128个字符。 - 错误原因 "参数非法" totalCounts int32 [0-200000] - 数据总数 - deviceList ARRAY_REFERENCE 0-300个列表项,详细请参见表4。 设备信息 - 表4 DeviceApprovalDto对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 siteName string 2~32个字符。 - 站点名 该字段对应UI页面上是:UI【站点】 "siteName" siteId string 1~64个字符。 - 站点id "00000000-0000-0000-0000-000000000001" deviceType string 1~10个字符。 - 设备类型 该字段对应UI页面上是:UI【类型】 "LSW" deviceModel string 1~32个字符。 - 设备型号 该字段对应UI页面上是:UI【设备型号】 "USG6380" role string 1~10个字符。 - 设备角色 该字段对应UI页面上是:UI【角色】 "ACC" id string 1~64个字符。 - 设备id "00000000-0000-0000-0000-000000000001" esn string 1~64个字符。 - 设备ESN 该字段对应UI页面上是:UI【ESN】 "0088032VRE1234567890" name string 1~256个字符。 - 设备名称 该字段对应UI页面上是:UI【设备名称】 "name" firstConnectTime string 1~16个字符。 - 初次连接时间 该字段对应UI页面上是:UI【初次连接时间】 "1686532310230" lastConnectTime string 1~16个字符。 - 最后连接时间 该字段对应UI页面上是:UI【最后连接时间】 "1686532310230" approvalStatus int32 [0-2] - 审批状态 1 failReason string 1~32个字符。 - 失败原因 该字段对应UI页面上是:UI【失败原因】 "设备类型不匹配" nameModifyFlag string 1~8个字符。 - 是否修改过名称 "true" siteModifyFlag string 1~8个字符。 - 是否修改过站点 "true" stackMasterEsn string 1~64个字符。 - 堆叠主esn "0088032VRE1234567890" mac string 1~32个字符。 - 一体机从设备的MAC "01-80-C2-00-00-00" discoveryType int32 [1-2] - 发现渠道 1、免ESN发现 2、一体机发现 1 discoveryParentId string 1~64个字符。 - 一体机设备ID "00000000-0000-0000-0000-000000000001" 返回状态码为400:设备ID格式错误时返回,响应体参考ErrorResponse。 表5 ErrorResponse对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 errorCode string 1~128个字符。 - 错误码 "0x00c80035" errorMessage string 1~128个字符。 - 错误原因 "参数非法" 返回状态码为500:服务内部异常时返回,响应体参考ErrorResponse。 ErrorResponse对象的参数列表,详细请参见表5。
-
请求示例 HTTP的示例 POST /v1/devicemgr/access-approvals/action/batch-query HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-AC
CES S-TOKEN: x-yyyyyy
{
"keyWord" : "00000",
"deviceTypes" : ["AP","LSW"],
"siteIds" : ["00000000-0000-0000-0000-000000000001"],
"pageIndex" : 1,
"pageSize" : 20,
"status" : [1,2],
"discoveryType" : [1,2]
}
-
响应示例 返回状态码为200:批量审批成功,响应体参考ApproveResult。 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
{
"errorCode" : "0",
"errorMessage" : "设备不存在",
"success" : [
{
"deviceId" : "00000000-0000-0000-0000-000000000001",
"oldTenantId" : "00000000-0000-0000-0000-000000000004",
"oldTenantName" : "tenant1",
"oldDeviceGroupId" : "00000000-0000-0000-0000-000000000004",
"oldDeviceGroupName" : "group1",
"errorCode" : "0x00c8003c",
"errorMsg" : "register failed"
}
],
"fail" : [
{
"deviceId" : "00000000-0000-0000-0000-000000000001",
"oldTenantId" : "00000000-0000-0000-0000-000000000004",
"oldTenantName" : "tenant1",
"oldDeviceGroupId" : "00000000-0000-0000-0000-000000000004",
"oldDeviceGroupName" : "group1",
"errorCode" : "0x00c8003c",
"errorMsg" : "register failed"
}
]
} 返回状态码为400:设备ID格式错误时返回,响应体参考ErrorResponse。 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
{
"errorCode" : "0x00c80035",
"errorMessage" : "参数非法"
} 返回状态码为500:服务内部异常时返回,响应体参考ErrorResponse。 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
{
"errorCode" : "0x00c80035",
"errorMessage" : "参数非法"
}
-
请求示例 HTTP的示例 POST /v1/devicemgr/access-approvals/action/batch-approve HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-yyyyyy
{
"actionType" : 1,
"deviceIds" : ["00000000-0000-0000-0000-000000000001"],
"forceRegister" : true
}
-
响应参数 返回状态码为200:批量审批成功,响应体参考ApproveResult。 表3 ApproveResult对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 errorCode string 1~10个字符。 - 错误码,0表示成功,1表示失败 "0" errorMessage string 1~100个字符。 - 错误原因 "设备不存在" success ARRAY_REFERENCE 0-1000个列表项,详细请参见表4。 审批成功列表 - fail ARRAY_REFERENCE 0-1000个列表项,详细请参见表4。 审批失败列表 - 表4 ApproveResultUnit对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 deviceId string 1~64个字符。 - 设备ID "00000000-0000-0000-0000-000000000001" oldTenantId string 0~36个字符。 - 添加设备esn重复时,展示原租户id "00000000-0000-0000-0000-000000000004" oldTenantName string 0~64个字符。 - 添加设备esn重复时,展示原租户名称并匿名化处理 "tenant1" oldDeviceGroupId string 0~36个字符。 - 添加设备esn重复时,展示原站点id "00000000-0000-0000-0000-000000000004" oldDeviceGroupName string 0~64个字符。 - 添加设备esn重复时,展示原站点名称并匿名化处理 "group1" errorCode string 1~128个字符。 - 错误码 "0x00c8003c" errorMsg string 1~2048个字符。 - 错误信息 "register failed" 返回状态码为400:设备ID格式错误时返回,响应体参考ErrorResponse。 ErrorResponse对象的参数列表,详细请参见表5。 返回状态码为500:服务内部异常时返回,响应体参考ErrorResponse。 ErrorResponse对象的参数列表,详细请参见表5。
-
响应参数 返回状态码为200:修改成功,响应体参考BatchUpdateResult。 表3 BatchUpdateResult对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 errorCode string 1~128个字符。 - 错误码 "0x00c80035" errorMessage string 1~128个字符。 - 错误原因 "参数非法" 返回状态码为400:设备ID格式错误时返回,响应体参考ErrorResponse。 ErrorResponse对象的参数列表,详细请参见表5。 返回状态码为500:服务内部异常时返回,响应体参考ErrorResponse。 ErrorResponse对象的参数列表,详细请参见表5。
-
响应示例 返回状态码为200:修改成功,响应体参考BatchUpdateResult。 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
{
"errorCode" : "0x00c80035",
"errorMessage" : "参数非法"
} 返回状态码为400:设备ID格式错误时返回,响应体参考ErrorResponse。 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
{
"errorCode" : "0x00c80035",
"errorMessage" : "参数非法"
} 返回状态码为500:服务内部异常时返回,响应体参考ErrorResponse。 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
{
"errorCode" : "0x00c80035",
"errorMessage" : "参数非法"
}
-
请求示例 HTTP的示例 PUT /v1/devicemgr/access-approvals HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-yyyyyy
{
"siteId" : "00000000-0000-0000-0000-000000000001",
"role" : "ACC",
"devices" : ["00000000-0000-0000-0000-000000000001"]
}