云服务器内容精选

  • 响应示例 返回状态码为200:查询成功,响应体参考DeviceInterfaceResponse。 HTTP/1.1 200 OK Date: Sun,16 Feb 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" : { "deviceId" : "00000000-0000-0000-0000-000000000000", "interfaceName" : "GigabitEthernet0/0/0", "status" : "shutdown" } } 返回状态码为400:请求参数错误。 HTTP/1.1 400 Bad Request Date: Sun,16 Feb 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,16 Feb 2025 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive
  • URI /controller/campus/v1/networkservice/networkconfig/interface 表1 query参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 deviceId 是 string 0~64个字符。 - 设备ID,UUID格式。 "00000000-0000-0000-0000-000000000000" interfaceName 是 string 0~128个字符。 - 接口名称,比如GigabitEthernet0/0/0。 "GigabitEthernet0/0/0"
  • 请求示例 HTTP的示例 GET /controller/campus/v1/networkservice/networkconfig/interface?deviceId=00000000-0000-0000-0000-000000000000&interfaceName=GigabitEthernet0/0/0 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
  • 响应参数 返回状态码为200:查询成功,响应体参考DeviceInterfaceResponse。 表2 DeviceInterfaceResponse对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 errcode string 0~64个字符。 - 错误码0表示成功,否则为失败。 "0" errmsg string 0~512个字符。 - 错误信息。 "" data REFERENCE 详细请参见表3。 打开或关闭设备接口返回实体。 - 表3 DeviceInterfaceResponseVo对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 deviceId string 0~64个字符。 - 设备ID,UUID格式。 "00000000-0000-0000-0000-000000000000" interfaceName string 0~64个字符。 - 设备接口名称。 "GigabitEthernet0/0/0" status string shutdown undo shutdown initial - 设备接口状态。 shutdown:设备接口关闭。 undo shutdown:设备接口打开。 initial:表示这个接口之前没有执行过shutdown或undo shutdown。 "shutdown" 返回状态码为400:请求参数错误。 详细信息请参见实际响应消息体。 返回状态码为500:内部服务器错误。 详细信息请参见实际响应消息体。
  • 请求示例 HTTP的示例 PUT /controller/campus/v1/networkservice/networkconfig/interface 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 { "deviceId" : "00000000-0000-0000-0000-000000000000", "interfaceName" : "GigabitEthernet0/0/0", "operation" : "shutdown" }
  • 响应示例 返回状态码为200:操作成功,响应体参考DeviceInterfaceResponse。 HTTP/1.1 200 OK Date: Sun,16 Feb 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" : { "deviceId" : "00000000-0000-0000-0000-000000000000", "interfaceName" : "GigabitEthernet0/0/0", "status" : "shutdown" } } 返回状态码为400:请求参数错误。 HTTP/1.1 400 Bad Request Date: Sun,16 Feb 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,16 Feb 2025 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive
  • 接口约束 1. 该接口仅支持租户视图或msp代维视图下,角色为“Open Api Operator”的用户访问,必须在用户会话建立后使用。 2. 请勿对设备管理通道和性能通道端口进行shutdown操作,会导致设备脱管和性能数据无法上报。 3. V600系列设备支持该功能的端口有:GE、10GE、25GE、40GE、MultiGE、Eth-Trunk、Tunnel、Vlanif、MEth。 4. V300系列设备支持该功能的端口有:GigabitEthernet、XGigabitEthernet、Ethernet、Cellular、Vlanif、LoopBack、Bridge-if、Virtual-Ethernet、Dialer、Eth-Trunk、Tunnel、Vbdif、Atm、Ima-group、Serial。 5. AR6700V-L款型设备支持该功能的端口有:GE。 6. shutdown/undo shutdown设备上不存在的逻辑口时,设备会创建该逻辑口,并生效shutdown配置;删除时,因无法识别该逻辑口的创建来源,不删除该逻辑口,只删除shutdown配置,设备上会残留该逻辑口。
  • 请求参数 表1 body参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 updateDeviceInterfaceRequestParam 是 REFERENCE 详细请参见表2。 执行打开或关闭操作的参数。 - 表2 updateDeviceInterfaceRequestParam对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 deviceId 是 string 0~64个字符。 - 设备ID,UUID格式。 "00000000-0000-0000-0000-000000000000" interfaceName 是 string 0~128个字符。 - 设备接口名称。 "GigabitEthernet0/0/0" operation 是 string shutdown undo shutdown - 操作,该字段可以设置为以下几种: a) shutdown:关闭设备接口 b) undo shutdown:打开设备接口 "shutdown"
  • 响应示例 返回状态码为200:删除成功,响应体参考DeleteDeviceInterfaceResponse。 HTTP/1.1 200 OK Date: Sun,16 Feb 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" : { "deviceId" : "00000000-0000-0000-0000-000000000000", "interfaceName" : "GigabitEthernet0/0/0" } } 返回状态码为400:请求参数错误。 HTTP/1.1 400 Bad Request Date: Sun,16 Feb 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,16 Feb 2025 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive
  • 响应参数 返回状态码为200:删除成功,响应体参考DeleteDeviceInterfaceResponse。 表3 DeleteDeviceInterfaceResponse对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 errcode string 0~64个字符。 - 错误码0表示成功,否则为失败。 "0" errmsg string 0~512个字符。 - 错误信息。 "" data REFERENCE 详细请参见表4。 删除设备接口返回实体。 - 表4 DeleteDeviceInterfaceResponseVo对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 deviceId string 0~64个字符。 - 设备ID,UUID格式。 "00000000-0000-0000-0000-000000000000" interfaceName string 0~64个字符。 - 设备接口名称。 "GigabitEthernet0/0/0" 返回状态码为400:请求参数错误。 详细信息请参见实际响应消息体。 返回状态码为500:内部服务器错误。 详细信息请参见实际响应消息体。
  • 请求参数 表1 body参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 deleteDeviceInterfaceRequestParam 是 REFERENCE 详细请参见表2。 执行删除操作的参数。 - 表2 DeleteDeviceInterfaceRequestParam对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 deviceId 是 string 0~64个字符。 - 设备ID,UUID格式。 "00000000-0000-0000-0000-000000000000" interfaceName 是 string 0~128个字符。 - 设备接口名称。 "GigabitEthernet0/0/0"
  • 请求示例 HTTP的示例 DELETE /controller/campus/v1/networkservice/networkconfig/interface 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 { "deviceId" : "00000000-0000-0000-0000-000000000000", "interfaceName" : "GigabitEthernet0/0/0" }