云服务器内容精选

  • 请求示例 HTTP的示例 POST /controller/campus/v1/lanwan/interconnection/route/static/action/batch-delete 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 { "vnId" : "fbb684c8-0d37-496f-bafa-4b06d5151e2e", "siteId" : "fbb684c8-0d37-496f-bafa-4b06d5151e2e", "coreStaticRouteIdList" : ["fbb684c8-0d37-496f-bafa-4b06d5151e2e"], "gatewayStaticRouteIdList" : ["fbb684c8-0d37-496f-bafa-4b06d5151e2e"] }
  • 响应示例 返回状态码为200:删除IPv4静态路由返回体。 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" : "", "success" : { "vnId" : "fbb684c8-0d37-496f-bafa-4b06d5151e2e", "siteId" : "fbb684c8-0d37-496f-bafa-4b06d5151e2e", "coreStaticRouteIdList" : ["fbb684c8-0d37-496f-bafa-4b06d5151e2e"], "gatewayStaticRouteIdList" : ["fbb684c8-0d37-496f-bafa-4b06d5151e2e"] }, "fail" : { "coreStaticRouteIdList" : { "errcode" : "0", "errmsg" : "", "routeIdList" : [ "" ] }, "gatewayStaticRouteIdList" : { "errcode" : "0", "errmsg" : "", "routeIdList" : [ "" ] } } } 返回状态码为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
  • 响应示例 返回状态码为201:创建IPv4静态路由返回参数。 HTTP/1.1 201 Created 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" : "", "success" : { "linkId" : "fbb684c8-0d37-496f-bafa-4b06d5151e2e", "coreStaticInfoList" : [ { "id" : "fbb684c8-0d37-496f-bafa-4b06d5151e2e", "linkId" : "fbb684c8-0d37-496f-bafa-4b06d5151e2e", "linkName" : "ConnectLink", "deviceId" : "fbb684c8-0d37-496f-bafa-4b06d5151e2e", "deviceName" : "Core-1", "deviceType" : "LSW", "platform" : "platform", "priority" : 120, "destIp" : "192.168.10.0/24", "nextHopType" : "ip-address", "nextHopIpAddress" : "192.168.10.1", "isTracked" : false, "trackTargetIpAddress" : "192.168.10.1", "configSource" : "LANWAN" } ], "gatewayStaticInfoList" : [ { "id" : "fbb684c8-0d37-496f-bafa-4b06d5151e2e", "linkId" : "fbb684c8-0d37-496f-bafa-4b06d5151e2e", "linkName" : "ConnectLink", "deviceId" : "fbb684c8-0d37-496f-bafa-4b06d5151e2e", "deviceName" : "Core-1", "deviceType" : "LSW", "platform" : "platform", "priority" : 120, "destIp" : "192.168.10.0/24", "nextHopType" : "ip-address", "nextHopIpAddress" : "192.168.10.1", "isTracked" : false, "trackTargetIpAddress" : "192.168.10.1", "configSource" : "LANWAN" } ] }, "fail" : { "linkId" : "fbb684c8-0d37-496f-bafa-4b06d5151e2e", "failCoreRouteStaticList" : { "errcode" : "0", "errmsg" : "", "routeInfo" : [ { "id" : "fbb684c8-0d37-496f-bafa-4b06d5151e2e", "linkId" : "fbb684c8-0d37-496f-bafa-4b06d5151e2e", "linkName" : "ConnectLink", "deviceId" : "fbb684c8-0d37-496f-bafa-4b06d5151e2e", "deviceName" : "Core-1", "deviceType" : "LSW", "platform" : "platform", "priority" : 120, "destIp" : "192.168.10.0/24", "nextHopType" : "ip-address", "nextHopIpAddress" : "192.168.10.1", "isTracked" : false, "trackTargetIpAddress" : "192.168.10.1", "configSource" : "LANWAN" } ] }, "failGatewayRouteStaticList" : { "errcode" : "0", "errmsg" : "", "routeInfo" : [ { "id" : "fbb684c8-0d37-496f-bafa-4b06d5151e2e", "linkId" : "fbb684c8-0d37-496f-bafa-4b06d5151e2e", "linkName" : "ConnectLink", "deviceId" : "fbb684c8-0d37-496f-bafa-4b06d5151e2e", "deviceName" : "Core-1", "deviceType" : "LSW", "platform" : "platform", "priority" : 120, "destIp" : "192.168.10.0/24", "nextHopType" : "ip-address", "nextHopIpAddress" : "192.168.10.1", "isTracked" : false, "trackTargetIpAddress" : "192.168.10.1", "configSource" : "LANWAN" } ] } } } 返回状态码为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
  • 响应参数 返回状态码为201:创建IPv4静态路由返回参数。 表4 RouteStaticResponse对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 errcode string 0~64个字符。 - 错误码。 "0" errmsg string 0~256个字符。 - 错误信息。 "" success REFERENCE 详细请参见表5。 配置IPv4静态路由成功时的返回数据。 - fail REFERENCE 详细请参见表7。 配置IPv4静态路由失败时的返回数据。 - 表5 RouteLinkStaticInfos对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 linkId string 36个字符。 - 互联接口标识,创建和更新时必填。 "fbb684c8-0d37-496f-bafa-4b06d5151e2e" coreStaticInfoList ARRAY_REFERENCE 0-128个列表项,详细请参见表6。 核心侧设备IPv4静态路由详细信息。 - gatewayStaticInfoList ARRAY_REFERENCE 0-128个列表项,详细请参见表6。 网关侧设备IPv4静态路由详细信息。 - 表6 RouteStaticInfo对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 id string 36个字符。 - 单条IPv4静态路由标识。创建不填。查询返回。 "fbb684c8-0d37-496f-bafa-4b06d5151e2e" linkId string 36个字符。 - 互联标识,创建不填,查询返回。 "fbb684c8-0d37-496f-bafa-4b06d5151e2e" linkName string 0~64个字符。 - 互联接口名称, 创建、更新不填,查询返回。 "ConnectLink" deviceId string 36个字符。 - 设备标识。创建时必填。查询返回。 "fbb684c8-0d37-496f-bafa-4b06d5151e2e" deviceName string 0~64个字符。 - 设备名称,创建、更新不填,查询返回。 "Core-1" deviceType string 0~10个字符。 - 设备类型,创建、更新不填,查询返回。 "LSW" platform string 0~10个字符。 - 是否是pnf设备的标识 "platform" priority int32 [1-255] 60 静态路由优先级。priority的值越小,优先级越高。 120 destIp string 0~64个字符。 - 静态路由目的地址。格式:IPV4/掩码。 "192.168.10.0/24" nextHopType string 0~64个字符。 ip-address 静态路由下一跳类型,取值范围:ip-address、black-hole。black-hole表示黑洞下一跳。仅网关侧设备支持。 "ip-address" nextHopIpAddress string 0~64个字符。 - 静态路由下一跳IP地址。当nextHopType为black-hole时,nextHopIpAddress无需填写。若linkId对应的核心侧和网关侧都存在,并且下一跳为对端主IP地址,则不需要填充此项,否则需要填充。 "192.168.10.1" isTracked boolean true false false 静态路由是否与NQA联动。仅网关侧设备支持。 false trackTargetIpAddress string 0~64个字符。 - NQA探测的目的IP地址。若isTracked为true,则trackTargetIpAddress必填,否则不需要填充。仅网关侧设备支持。 "192.168.10.1" configSource string 0~32个字符。 - 配置源 "LANWAN" 表7 FailRouteStaticInfos对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 linkId string 36个字符。 - 互联接口标识。 "fbb684c8-0d37-496f-bafa-4b06d5151e2e" failCoreRouteStaticList REFERENCE 详细请参见表8。 失败的核心侧IPv4静态路由集合。 - failGatewayRouteStaticList REFERENCE 详细请参见表8。 失败的网关侧IPv4静态路由集合。 - 表8 FailRouteStaticInfo对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 errcode string 0~64个字符。 - 错误码。 "0" errmsg string 0~256个字符。 - 错误信息。 "" routeInfo ARRAY_REFERENCE 0-128个列表项,详细请参见表6。 设备IPv4静态路由详细信息。 - 返回状态码为400:校验异常。 详细信息请参见实际响应消息体。 返回状态码为500:内部错误。 详细信息请参见实际响应消息体。
  • 请求示例 HTTP的示例 POST /controller/campus/v1/lanwan/interconnection/route/static 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 { "linkId" : "fbb684c8-0d37-496f-bafa-4b06d5151e2e", "coreStaticInfoList" : [ { "id" : "fbb684c8-0d37-496f-bafa-4b06d5151e2e", "linkId" : "fbb684c8-0d37-496f-bafa-4b06d5151e2e", "linkName" : "ConnectLink", "deviceId" : "fbb684c8-0d37-496f-bafa-4b06d5151e2e", "deviceName" : "Core-1", "deviceType" : "LSW", "platform" : "platform", "priority" : 120, "destIp" : "192.168.10.0/24", "nextHopType" : "ip-address", "nextHopIpAddress" : "192.168.10.1", "isTracked" : false, "trackTargetIpAddress" : "192.168.10.1", "configSource" : "LANWAN" } ], "gatewayStaticInfoList" : [ { "id" : "fbb684c8-0d37-496f-bafa-4b06d5151e2e", "linkId" : "fbb684c8-0d37-496f-bafa-4b06d5151e2e", "linkName" : "ConnectLink", "deviceId" : "fbb684c8-0d37-496f-bafa-4b06d5151e2e", "deviceName" : "Core-1", "deviceType" : "LSW", "platform" : "platform", "priority" : 120, "destIp" : "192.168.10.0/24", "nextHopType" : "ip-address", "nextHopIpAddress" : "192.168.10.1", "isTracked" : false, "trackTargetIpAddress" : "192.168.10.1", "configSource" : "LANWAN" } ] }
  • 请求参数 表1 body参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 routeLinkStaticInfo 是 REFERENCE 详细请参见表2。 创建LANWAN互联IPv4静态路由参数。一次操作只能创建基于一个互联口信息的路由。 - 表2 RouteLinkStaticInfos对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 linkId 是 string 36个字符。 - 互联接口标识,创建和更新时必填。 "fbb684c8-0d37-496f-bafa-4b06d5151e2e" coreStaticInfoList 否 ARRAY_REFERENCE 0-128个列表项,详细请参见表3。 核心侧设备IPv4静态路由详细信息。 - gatewayStaticInfoList 否 ARRAY_REFERENCE 0-128个列表项,详细请参见表3。 网关侧设备IPv4静态路由详细信息。 - 表3 RouteStaticInfo对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 id 否 string 36个字符。 - 单条IPv4静态路由标识。创建不填。查询返回。 "fbb684c8-0d37-496f-bafa-4b06d5151e2e" linkId 否 string 36个字符。 - 互联标识,创建不填,查询返回。 "fbb684c8-0d37-496f-bafa-4b06d5151e2e" linkName 否 string 0~64个字符。 - 互联接口名称, 创建、更新不填,查询返回。 "ConnectLink" deviceId 否 string 36个字符。 - 设备标识。创建时必填。查询返回。 "fbb684c8-0d37-496f-bafa-4b06d5151e2e" deviceName 否 string 0~64个字符。 - 设备名称,创建、更新不填,查询返回。 "Core-1" deviceType 否 string 0~10个字符。 - 设备类型,创建、更新不填,查询返回。 "LSW" platform 否 string 0~10个字符。 - 是否是pnf设备的标识 "platform" priority 否 int32 [1-255] 60 静态路由优先级。priority的值越小,优先级越高。 120 destIp 是 string 0~64个字符。 - 静态路由目的地址。格式:IPV4/掩码。 "192.168.10.0/24" nextHopType 否 string 0~64个字符。 ip-address 静态路由下一跳类型,取值范围:ip-address、black-hole。black-hole表示黑洞下一跳。仅网关侧设备支持。 "ip-address" nextHopIpAddress 否 string 0~64个字符。 - 静态路由下一跳IP地址。当nextHopType为black-hole时,nextHopIpAddress无需填写。若linkId对应的核心侧和网关侧都存在,并且下一跳为对端主IP地址,则不需要填充此项,否则需要填充。 "192.168.10.1" isTracked 否 boolean true false false 静态路由是否与NQA联动。仅网关侧设备支持。 false trackTargetIpAddress 否 string 0~64个字符。 - NQA探测的目的IP地址。若isTracked为true,则trackTargetIpAddress必填,否则不需要填充。仅网关侧设备支持。 "192.168.10.1" configSource 否 string 0~32个字符。 - 配置源 "LANWAN"
  • URI /controller/campus/v1/lanwan/interconnection/route/static 表1 query参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 vnId 是 string 36个字符。 - VN标识。uuid格式。 "fbb684c8-0d37-496f-bafa-4b06d5151e2e" siteId 是 string 36个字符。 - 站点标识。uuid格式。 "fbb684c8-0d37-496f-bafa-4b06d5151e2e" linkId 否 string 36个字符。 - 互联标识。uuid格式。 "fbb684c8-0d37-496f-bafa-4b06d5151e2e"
  • 响应参数 返回状态码为200:获取IPv4静态路由返回参数。 表2 QueryRouteStaticResponse对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 errcode string 0~64个字符。 - 错误码。 "0" errmsg string 0~256个字符。 - 错误信息。 "" totalRecords int32 [0-1000] - 总记录数 100 data ARRAY_REFERENCE 0-512个列表项,详细请参见表5。 查询到的IPv4静态路由数据集合。 - 返回状态码为400:校验异常。 详细信息请参见实际响应消息体。 返回状态码为500:内部错误。 详细信息请参见实际响应消息体。
  • 响应示例 返回状态码为200:获取IPv4静态路由返回参数。 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" : "", "totalRecords" : 100, "data" : [ { "linkId" : "fbb684c8-0d37-496f-bafa-4b06d5151e2e", "coreStaticInfoList" : [ { "id" : "fbb684c8-0d37-496f-bafa-4b06d5151e2e", "linkId" : "fbb684c8-0d37-496f-bafa-4b06d5151e2e", "linkName" : "ConnectLink", "deviceId" : "fbb684c8-0d37-496f-bafa-4b06d5151e2e", "deviceName" : "Core-1", "deviceType" : "LSW", "platform" : "platform", "priority" : 120, "destIp" : "192.168.10.0/24", "nextHopType" : "ip-address", "nextHopIpAddress" : "192.168.10.1", "isTracked" : false, "trackTargetIpAddress" : "192.168.10.1", "configSource" : "LANWAN" } ], "gatewayStaticInfoList" : [ { "id" : "fbb684c8-0d37-496f-bafa-4b06d5151e2e", "linkId" : "fbb684c8-0d37-496f-bafa-4b06d5151e2e", "linkName" : "ConnectLink", "deviceId" : "fbb684c8-0d37-496f-bafa-4b06d5151e2e", "deviceName" : "Core-1", "deviceType" : "LSW", "platform" : "platform", "priority" : 120, "destIp" : "192.168.10.0/24", "nextHopType" : "ip-address", "nextHopIpAddress" : "192.168.10.1", "isTracked" : false, "trackTargetIpAddress" : "192.168.10.1", "configSource" : "LANWAN" } ] } ] } 返回状态码为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
  • 请求示例 HTTP的示例 GET /controller/campus/v1/lanwan/interconnection/route/static?vnId=fbb684c8-0d37-496f-bafa-4b06d5151e2e&siteId=fbb684c8-0d37-496f-bafa-4b06d5151e2e&linkId=fbb684c8-0d37-496f-bafa-4b06d5151e2e 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