云服务器内容精选

  • 请求示例 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-AC CES S-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
  • 请求示例 HTTP的示例 PUT /controller/campus/v3/devices/ztpconfirm/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
  • 响应示例 返回状态码为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:删除设备成功,响应体参考DeleteDeviceBean。 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" : ["00000000-0000-0000-0000-000000000001"], "fail" : [ { "errcode" : "0", "errmsg" : "", "data" : "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 返回状态码为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的示例 DELETE /controller/campus/v3/devices 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" }