-
请求示例 HTTP的示例 POST /controller/campus/v4/devices/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
{
"discoverProtocol" : ["NETCONF","SNMP","COAP"],
"deviceGroupId" : "c43fd065268d31b8bdfcc7faaec15726",
"status" : ["NORMAL","ALARM"],
"roles" : ["Gateway","CORE"],
"types" : ["WAC","AP"],
"keyWord" : "127.0.0.1",
"name" : "AA02350",
"esn" : "DLR00000",
"model" : "P6050",
"softwareVersion" : "R020C00",
"patchVersion" : "patch001",
"manageStatus" : ["NORMAL","DEVICE_ISOLATE"],
"sortField" : "name",
"pageIndex" : "4",
"pageSize" : "20",
"createTimeBegin" : 1616554000,
"createTimeEnd" : 1616554000,
"registerTimeBegin" : 1616554000,
"registerTimeEnd" : 1616554000
}
-
响应示例 返回状态码为200:调用查询设备成功,响应体参考QueryDeviceResult。 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",
"pageIndex" : 1,
"pageSize" : 20,
"totalRecords" : 2,
"data" : [
{
"id" : "b473118d-17ff-4f4f-9fa9-a4c0e1e87e42",
"name" : "AR1",
"esn" : "2102351BTJ0000000666",
"deviceModel" : "AR161EW",
"deviceType" : "AR",
"status" : "0",
"siteId" : "ea25fdbf-8dee-4823-bac2-5bfe8e3359ca",
"mac" : "",
"ip" : "192.168.0.10",
"manageIp" : "192.168.0.10",
"neType" : "AR161EW",
"version" : "V300R003C00",
"vendor" : "HUAWEI",
"description" : "HUAWEI",
"resourceId" : "HUAWEI",
"tenantId" : "ea25fdbf-8dee-4823-bac2-5bfe8e3359ca",
"tenantName" : "XXX@XXX.com",
"siteName" : "test1",
"createTime" : "2017-12-13 01:37:28",
"registerTime" : "2017-12-13 01:37:28",
"modifyTime" : "2017-12-13 01:37:28",
"startupTime" : "2017-12-13 01:37:28",
"tags" : [
""
],
"systemIp" : "192.168.1.1",
"patchVersion" : "V200R019SPH",
"ztpConfirm" : false,
"manageStatus" : "ABNORMAL",
"manageStatusDownReason" : ["NEED_ZTP_CONFIRM","DEVICE_HAS_BEEN_ISOLATED"],
"role" : ["Gateway"],
"performance" : "",
"uptime" : "0 天 1 时 10 分"
}
]
} 返回状态码为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
-
请求示例 HTTP的示例 PUT /controller/campus/v3/devices/00000000-0000-0000-0000-000000000000 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
{
"name" : "AR1",
"description" : "AR",
"resourceId" : "HUAWEI",
"siteId" : "00000000-0000-0000-0000-000000000001",
"esn" : "2102351BTJ0000000666",
"tags" : ["AP01"],
"systemIp" : "192.168.1.1",
"ztpConfirm" : true,
"role" : ["Gateway"],
"performance" : 0
}
-
响应示例 返回状态码为200:修改设备基本信息成功,响应体参考ModifyDeviceBean。 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" : "",
"data" : {
"id" : "00000000-0000-0000-0000-000000000001",
"name" : "AR1",
"description" : "AR",
"resourceId" : "HUAWEI",
"siteId" : "00000000-0000-0000-0000-000000000001",
"esn" : "2102351BTJ0000000666",
"tags" : ["AP01"],
"systemIp" : "192.168.1.1",
"ztpConfirm" : true,
"role" : ["Gateway"]
}
} 返回状态码为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
-
请求示例 HTTP的示例 POST /controller/campus/v3/devices/action/batch-delete 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
{
"deviceIds" : ["00000000-0000-0000-0000-000000000001"],
"reset" : "true"
}
-
响应示例 返回状态码为200:删除设备全部成功,响应体参考BatchDeleteDeviceOut。 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" : "Failed to delete the device",
"success" : ["00000000-0000-0000-0000-000000000001"],
"fail" : [
{
"errCode" : "0",
"errMsg" : "Failed to operate the device because it is in stack",
"id" : "00000000-0000-0000-0000-000000000001"
}
]
} 返回状态码为207:删除设备部分成功,响应体参考BatchDeleteDeviceOut。 HTTP/1.1 207 Multi-Status
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" : "Failed to delete the device",
"success" : ["00000000-0000-0000-0000-000000000001"],
"fail" : [
{
"errCode" : "0",
"errMsg" : "Failed to operate the device because it is in stack",
"id" : "00000000-0000-0000-0000-000000000001"
}
]
} 返回状态码为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
{
"errCode" : "0",
"errMsg" : "Failed to delete the device",
"success" : ["00000000-0000-0000-0000-000000000001"],
"fail" : [
{
"errCode" : "0",
"errMsg" : "Failed to operate the device because it is in stack",
"id" : "00000000-0000-0000-0000-000000000001"
}
]
} 返回状态码为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
-
请求参数 表1 body参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 replaceOriginalDeviceDto 是 REFERENCE 详细请参见表2。 设备替换入参模型。 - 表2 ReplaceOriginalDeviceDto对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 originalDeviceId 是 UUID 0~64个字符。 - 待替换设备的ID。 "00000000-0000-0000-0000-000000000001" newEsn 是 string 0~64个字符。 - 该字段必填。newEsn字段合法则替换原有esn,newEsn字段不合法将originalDeviceId对应的设备esn置空。 "2102351BTJ0000000666" newDeviceModel 否 string 0~64个字符。 - 替换设备的新款型,替换前后设备款型必须一致(交换机除外),对于交换机需要设备的款型为同一系列下的设备款型。 "S8700-6"
-
响应示例 返回状态码为200:设备替换成功,响应体参考CommonResponseBean。 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" : ""
} 返回状态码为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
-
请求示例 HTTP的示例 POST /controller/campus/v3/devices/replacement 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
{
"originalDeviceId" : "00000000-0000-0000-0000-000000000001",
"newEsn" : "2102351BTJ0000000666",
"newDeviceModel" : "S8700-6"
}
-
请求示例 HTTP的示例 POST /controller/campus/v3/devices/replace 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
{
"originalDeviceId" : "00000000-0000-0000-0000-000000000001",
"replaceDeviceId" : "00000000-0000-0000-0000-000000000002"
}
-
请求参数 表1 body参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 replaceDeviceDto 是 REFERENCE 详细请参见表2。 设备替换入参模型。 - 表2 ReplaceDeviceDto对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 originalDeviceId 是 UUID 0~64个字符。 - 待替换设备的ID。 "00000000-0000-0000-0000-000000000001" replaceDeviceId 是 UUID 0~64个字符。 - 替换设备的ID。 "00000000-0000-0000-0000-000000000002"
-
响应参数 返回状态码为200:设备替换成功,响应体参考CommonResponseBean。 表3 CommonResponseBean对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 errcode string - - 错误码:当没有错误时返回0。 "0" errmsg string 0~256个字符。 - 接口调用结果的描述信息。 "" 返回状态码为400:参数错误。 详细信息请参见实际响应消息体。 返回状态码为500:服务内部错误。 详细信息请参见实际响应消息体。
-
响应示例 返回状态码为200:设备替换成功,响应体参考CommonResponseBean。 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" : ""
} 返回状态码为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
-
响应示例 返回状态码为200:调用查询设备成功,响应体参考QueryDeviceResult。 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",
"pageIndex" : 1,
"pageSize" : 20,
"totalRecords" : 2,
"data" : [
{
"id" : "b473118d-17ff-4f4f-9fa9-a4c0e1e87e42",
"name" : "AR1",
"esn" : "2102351BTJ0000000666",
"deviceModel" : "AR161EW",
"deviceType" : "AR",
"status" : "0",
"siteId" : "ea25fdbf-8dee-4823-bac2-5bfe8e3359ca",
"mac" : "",
"ip" : "192.168.0.10",
"manageIp" : "192.168.0.10",
"neType" : "AR161EW",
"version" : "V300R003C00",
"vendor" : "HUAWEI",
"description" : "HUAWEI",
"resourceId" : "HUAWEI",
"tenantId" : "ea25fdbf-8dee-4823-bac2-5bfe8e3359ca",
"tenantName" : "XXX@XXX.com",
"siteName" : "test1",
"createTime" : "2017-12-13 01:37:28",
"registerTime" : "2017-12-13 01:37:28",
"modifyTime" : "2017-12-13 01:37:28",
"startupTime" : "2017-12-13 01:37:28",
"tags" : [
""
],
"systemIp" : "192.168.1.1",
"patchVersion" : "V200R019SPH",
"ztpConfirm" : false,
"manageStatus" : "ABNORMAL",
"manageStatusDownReason" : ["NEED_ZTP_CONFIRM","DEVICE_HAS_BEEN_ISOLATED"],
"role" : ["Gateway"],
"performance" : "",
"uptime" : "0 天 1 时 10 分"
}
]
} 返回状态码为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
-
请求示例 HTTP的示例 POST /controller/campus/v4/devices/msp/query 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
{
"tenantIdList" : ["00000000-0000-0000-0000-000000000001"],
"keyWord" : "127.0.0.1",
"name" : "AA02350",
"esn" : "DLR00000",
"model" : "P6050",
"softwareVersion" : "R020C00",
"patchVersion" : "patch001",
"manageStatus" : ["NORMAL","DEVICE_ISOLATE"],
"sortField" : "name",
"status" : ["NORMAL","ALARM"],
"roles" : ["Gateway","CORE"],
"types" : ["WAC","AP"],
"pageIndex" : "4",
"pageSize" : "20",
"createTimeBegin" : 1616554000,
"createTimeEnd" : 1616554000,
"registerTimeBegin" : 1616554000,
"registerTimeEnd" : 1616554000
}