云服务器内容精选

  • 响应示例 返回状态码为200:查询拓扑成功。 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" : "", "topology" : { "areas" : [ { "id" : "00000000-0000-0000-0000-000000000000", "name" : "area_1", "areaType" : "leaf", "topologyType" : "hub-spoke", "enableDynamicTunnel" : "", "gatewayIPv6Enable" : false, "hubWorkMode" : "with-interconnection", "isFullReplaceSite" : "", "siteAttachments" : [ { "siteId" : "00000000-0000-0000-0000-000000000000", "siteName" : "Site Name", "siteRoles" : [{"role":"hub","sitePriority":"active"},{"role":"border","sitePriority":"active"}], "accessServiceHubs" : [ { "siteName" : "", "siteId" : "00000000-0000-0000-0000-000000000000", "accessPriority" : 2 } ], "borderRelationShip" : { "activeBorderSiteId" : "00000000-0000-0000-0000-000000000000", "activeBorderSiteName" : "Site Name", "standbyBorderSiteId" : "00000000-0000-0000-0000-000000000000", "standbyBorderSiteName" : "Site Name" }, "enableHubLanConnect" : "" } ] } ] }, "processInstanceId" : "", "totalRecords" : 10, "pageSize" : 10, "pageIndex" : 1 } 返回状态码为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:查询拓扑成功。 表3 TopologyPageResponse对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 errcode string - - 错误码。 "0" errmsg string - - 错误信息。 "" topology REFERENCE 详细请参见表10。 拓扑信息。 - processInstanceId string 0~36个字符。 - 编排流程实例ID,UUID格式。当接口返回码为202时非空。 - totalRecords int32 - - 总的数据条数。 10 pageSize int32 - - 每页显示数量。 10 pageIndex int32 - - 当前页数。 1 返回状态码为400:校验异常。 详细信息请参见实际响应消息体。 返回状态码为500:内部错误。 详细信息请参见实际响应消息体。
  • URI /controller/campus/v1/sdwan/overlay-network/{vpnId}/topology 表1 path参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 vpnId 是 uuid - - VPN ID,UUID格式。 "00000000-0000-0000-0000-000000000000" 表2 query参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 areaId 否 uuid - - 指定区域ID,UUID格式。EVPN模式下,如果不填,表明查询指定vpn下的所有area。 "00000000-0000-0000-0000-000000000000" areaType 否 string 0~32个字符。 - 区域类型,支持按区域类型查询,取值范围:leaf、backbone。 "leaf" areaName 否 string 0~32个字符。 - 区 域名 称,支持按区域名称模糊查询。 "leaf" pageIndex 否 int32 - - 当前页数,为空表示查询所有。 - pageSize 否 int32 - - 每页显示数量,为空表示查询所有。 -
  • 请求示例 HTTP的示例 GET /controller/campus/v1/sdwan/overlay-network/00000000-0000-0000-0000-000000000000/topology?areaId=00000000-0000-0000-0000-000000000000&areaType=leaf&areaName=leaf 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
  • 请求示例 HTTP的示例 GET /controller/campus/v1/sdwan/overlay-network/topology/progress 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:重编排结果 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" : { "processStatus" : "running", "processProgress" : "100%" } } 返回状态码为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:重编排结果 表1 ProgressResponse对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 errcode string - - 错误码。 "0" errmsg string - - 错误信息。 "" data REFERENCE 详细请参见表2。 拓扑编排进度信息。 - 表2 ProgressInfo对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 processStatus string 0~8个字符。 - 编排process的状态:running、success、fail。 "running" processProgress string 0~8个字符。 - 进程进度,返回百分比数值。 "100%" 返回状态码为400:校验异常。 详细信息请参见实际响应消息体。 返回状态码为500:内部错误。 详细信息请参见实际响应消息体。
  • 响应示例 返回状态码为201:创建拓扑自定义策略成功。 HTTP/1.1 201 Created 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" : "", "customPolicys" : [ { "id" : "00000000-0000-0000-0000-000000000000", "policyName" : "partialMeshPolicy", "priority" : 1, "rules" : [ { "id" : "00000000-0000-0000-0000-000000000000", "matchCondition" : { "ipAddressPrefix" : { "prefixFilters" : [ { "id" : "00000000-0000-0000-0000-000000000000", "ipv4Address" : "10.1.0.0", "maskLength" : 24, "greaterEqual" : 24, "lessEqual" : 24 } ], "ipv6PrefixFilters" : [ { "id" : "00000000-0000-0000-0000-000000000000", "ipv6Address" : "fc00::", "maskLength" : 96, "greaterEqual" : 96, "lessEqual" : 96 } ] }, "siteIds" : ["00000000-0000-0000-0000-000000000000","00000000-0000-0000-0000-000000000001"], "siteNames" : ["siteName1","siteName2"] }, "applyAction" : { "siteSource" : "tenant", "nextHops" : [ { "siteId" : "00000000-0000-0000-0000-000000000000", "siteName" : "Site Name", "preference" : 2 } ], "applyMode" : "additive", "mode" : "permit" } } ], "applyToSites" : ["00000000-0000-0000-0000-000000000000","00000000-0000-0000-0000-000000000001"], "applyToSiteNames" : ["siteName1","siteName2"] } ] } 返回状态码为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/v1/sdwan/overlay-network/00000000-0000-0000-0000-000000000000/topology/policy 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 { "customPolicys" : [ { "id" : "00000000-0000-0000-0000-000000000000", "policyName" : "partialMeshPolicy", "priority" : 1, "rules" : [ { "id" : "00000000-0000-0000-0000-000000000000", "matchCondition" : { "ipAddressPrefix" : { "prefixFilters" : [ { "id" : "00000000-0000-0000-0000-000000000000", "ipv4Address" : "10.1.0.0", "maskLength" : 24, "greaterEqual" : 24, "lessEqual" : 24 } ], "ipv6PrefixFilters" : [ { "id" : "00000000-0000-0000-0000-000000000000", "ipv6Address" : "fc00::", "maskLength" : 96, "greaterEqual" : 96, "lessEqual" : 96 } ] }, "siteIds" : ["00000000-0000-0000-0000-000000000000","00000000-0000-0000-0000-000000000001"], "siteNames" : ["siteName1","siteName2"] }, "applyAction" : { "siteSource" : "tenant", "nextHops" : [ { "siteId" : "00000000-0000-0000-0000-000000000000", "siteName" : "Site Name", "preference" : 2 } ], "applyMode" : "additive", "mode" : "permit" } } ], "applyToSites" : ["00000000-0000-0000-0000-000000000000","00000000-0000-0000-0000-000000000001"], "applyToSiteNames" : ["siteName1","siteName2"] } ] }
  • 请求示例 HTTP的示例 DELETE /controller/campus/v1/sdwan/overlay-network/00000000-0000-0000-0000-000000000000/topology/policy?policyName=connectionPolicy 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:删除拓扑自定义策略成功。 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" : "", "customPolicys" : [ { "id" : "00000000-0000-0000-0000-000000000000", "policyName" : "partialMeshPolicy", "priority" : 1, "rules" : [ { "id" : "00000000-0000-0000-0000-000000000000", "matchCondition" : { "ipAddressPrefix" : { "prefixFilters" : [ { "id" : "00000000-0000-0000-0000-000000000000", "ipv4Address" : "10.1.0.0", "maskLength" : 24, "greaterEqual" : 24, "lessEqual" : 24 } ], "ipv6PrefixFilters" : [ { "id" : "00000000-0000-0000-0000-000000000000", "ipv6Address" : "fc00::", "maskLength" : 96, "greaterEqual" : 96, "lessEqual" : 96 } ] }, "siteIds" : ["00000000-0000-0000-0000-000000000000","00000000-0000-0000-0000-000000000001"], "siteNames" : ["siteName1","siteName2"] }, "applyAction" : { "siteSource" : "tenant", "nextHops" : [ { "siteId" : "00000000-0000-0000-0000-000000000000", "siteName" : "Site Name", "preference" : 2 } ], "applyMode" : "additive", "mode" : "permit" } } ], "applyToSites" : ["00000000-0000-0000-0000-000000000000","00000000-0000-0000-0000-000000000001"], "applyToSiteNames" : ["siteName1","siteName2"] } ] } 返回状态码为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
  • URI /controller/campus/v1/sdwan/overlay-network/{vpnId}/topology/policy 表1 path参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 vpnId 是 uuid - - VPN ID,UUID格式。 "00000000-0000-0000-0000-000000000000" 表2 query参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 policyName 否 string - - 自定义策略名称。不填时表示删除vpn下的所有策略,填写时表示删除指定名称的策略。 "connectionPolicy"
  • 响应参数 返回状态码为200:更新拓扑成功,响应体参考TopologyResponse。 TopologyResponse对象的参数列表,详细请参见表9。 返回状态码为202:请求正在处理中,请求处理详情请通过“查询业务编排结果”接口,确认是否处理成功。响应体参考TopologyResponse。 返回状态码为400:校验异常。 详细信息请参见实际响应消息体。 返回状态码为500:内部错误。 详细信息请参见实际响应消息体。
  • 响应示例 返回状态码为200:更新拓扑成功,响应体参考TopologyResponse。 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" : "", "topology" : { "areas" : [ { "id" : "00000000-0000-0000-0000-000000000000", "name" : "area_1", "areaType" : "leaf", "topologyType" : "hub-spoke", "enableDynamicTunnel" : "", "gatewayIPv6Enable" : false, "hubWorkMode" : "with-interconnection", "isFullReplaceSite" : "", "siteAttachments" : [ { "siteId" : "00000000-0000-0000-0000-000000000000", "siteName" : "Site Name", "siteRoles" : [{"role":"hub","sitePriority":"active"},{"role":"border","sitePriority":"active"}], "accessServiceHubs" : [ { "siteName" : "", "siteId" : "00000000-0000-0000-0000-000000000000", "accessPriority" : 2 } ], "borderRelationShip" : { "activeBorderSiteId" : "00000000-0000-0000-0000-000000000000", "activeBorderSiteName" : "Site Name", "standbyBorderSiteId" : "00000000-0000-0000-0000-000000000000", "standbyBorderSiteName" : "Site Name" }, "enableHubLanConnect" : "" } ] } ] }, "processInstanceId" : "" } 返回状态码为202:请求正在处理中,请求处理详情请通过“查询业务编排结果”接口,确认是否处理成功。响应体参考TopologyResponse。 HTTP/1.1 202 Accepted 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 返回状态码为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
  • 接口约束 1、该接口支持msp视图、租户视图或msp代维视图下,角色为“Open Api Operator”的用户访问,必须在用户会话建立后使用。 2、修改拓扑导致gateway角色变化(gateway角色丢失、gateway角色变化为其他类型 如border)时,如果此gateway已经配置的了vpn的路由策略,将会自动删除对应的路由策略。 3、若Topology中已有站点数超过100个,更新Topology处理耗时长,建议先规划好Topology部署,再增加站点。