-
请求示例 HTTP的示例 POST /controller/campus/v1/sdwan/net/sites/action/batch-isolate 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
{
"siteIds" : ["a99f794e-b510-438c-a75d-de59f02347eb"],
"isolated" : true
}
-
响应示例 返回状态码为200:批量隔离站点成功,响应体参考SitesIsolationResponse。 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" : [
""
],
"fail" : [
{
"errcode" : "0",
"errmsg" : "",
"data" : ""
}
]
} 返回状态码为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/net/sites/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
{
"sites" : [
{
"id" : "a99f794e-b510-438c-a75d-de59f02347eb",
"name" : "site1",
"locations" : [
{
"name" : "Beijing",
"address" : "Beijing",
"floor" : "5F",
"postcode" : "100000",
"latitude" : "39.92",
"longitude" : "116.46"
}
],
"devices" : [
{
"deviceId" : "a99f794e-b510-438c-a75d-de59f02347eb",
"locationName" : "nanjing"
}
],
"siteType" : "single-gateway",
"interLink" : {
"type" : "l3-interface",
"enableGre" : false,
"vlanMin" : 4000,
"vlanMax" : 4008,
"extendVlans" : ["1:9"],
"portPairs" : [
{
"device1PortId" : "a99f794e-b510-438c-a75d-de59f02347eb",
"device2PortId" : "a99f794e-b510-438c-a75d-de59f02347eb",
"device1Id" : "a99f794e-b510-438c-a75d-de59f02347eb",
"device1PortType" : "GE",
"device1PortNum" : "0/0/1",
"device1PortAddress" : "192.168.101.1",
"device1PortMask" : 24,
"device2Id" : "a99f794e-b510-438c-a75d-de59f02347eb",
"device2PortType" : "GE",
"device2PortNum" : "0/0/1",
"device2PortAddress" : "192.168.101.1",
"device2PortMask" : 24
}
],
"mtu" : 1500,
"mss" : 1200
},
"role" : ["sd-wan-edge","evpn-rr"],
"controlPoints" : ["a99f794e-b510-438c-a75d-de59f02347eb"],
"timeZone" : "(UTC+08:00)Beijing,Chongqing,Hong Kong,Urumqi",
"enableSummerConfig" : "",
"enableAutoConfig" : true,
"daylightSavingTime" : {
"name" : "Atlantic/Canary",
"offset" : "01:00",
"enableWeekDay" : false,
"startTime" : {
"month" : "Jan",
"time" : "23:59",
"week" : "first",
"weekday" : "Mon",
"day" : 21
},
"stopTime" : {
"month" : "Jan",
"time" : "23:59",
"week" : "first",
"weekday" : "Mon",
"day" : 21
}
},
"contact" : {
"responsiblePerson" : "Jack Lee",
"phoneNumber" : "152xxxxxxxx",
"emails" : ["xxx@xxx.xxx"]
},
"description" : "sdwan Site",
"tag" : "tagHub",
"isolated" : false,
"enhancedMode" : false
}
]
}
-
响应示例 返回状态码为200:删除站点成功。返回的Site信息中仅包含对应的ID,响应体参考SiteResponse。 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" : [
{
"id" : "a99f794e-b510-438c-a75d-de59f02347eb",
"name" : "site1",
"locations" : [
{
"name" : "Beijing",
"address" : "Beijing",
"floor" : "5F",
"postcode" : "100000",
"latitude" : "39.92",
"longitude" : "116.46"
}
],
"devices" : [
{
"deviceId" : "a99f794e-b510-438c-a75d-de59f02347eb",
"locationName" : "nanjing"
}
],
"siteType" : "single-gateway",
"interLink" : {
"type" : "l3-interface",
"enableGre" : false,
"vlanMin" : 4000,
"vlanMax" : 4008,
"extendVlans" : ["1:9"],
"portPairs" : [
{
"device1PortId" : "a99f794e-b510-438c-a75d-de59f02347eb",
"device2PortId" : "a99f794e-b510-438c-a75d-de59f02347eb",
"device1Id" : "a99f794e-b510-438c-a75d-de59f02347eb",
"device1PortType" : "GE",
"device1PortNum" : "0/0/1",
"device1PortAddress" : "192.168.101.1",
"device1PortMask" : 24,
"device2Id" : "a99f794e-b510-438c-a75d-de59f02347eb",
"device2PortType" : "GE",
"device2PortNum" : "0/0/1",
"device2PortAddress" : "192.168.101.1",
"device2PortMask" : 24
}
],
"mtu" : 1500,
"mss" : 1200
},
"role" : ["sd-wan-edge","evpn-rr"],
"controlPoints" : ["a99f794e-b510-438c-a75d-de59f02347eb"],
"timeZone" : "(UTC+08:00)Beijing,Chongqing,Hong Kong,Urumqi",
"enableSummerConfig" : "",
"enableAutoConfig" : true,
"daylightSavingTime" : {
"name" : "Atlantic/Canary",
"offset" : "01:00",
"enableWeekDay" : false,
"startTime" : {
"month" : "Jan",
"time" : "23:59",
"week" : "first",
"weekday" : "Mon",
"day" : 21
},
"stopTime" : {
"month" : "Jan",
"time" : "23:59",
"week" : "first",
"weekday" : "Mon",
"day" : 21
}
},
"contact" : {
"responsiblePerson" : "Jack Lee",
"phoneNumber" : "152xxxxxxxx",
"emails" : ["xxx@xxx.xxx"]
},
"description" : "sdwan Site",
"tag" : "tagHub",
"isolated" : false,
"enhancedMode" : false
}
],
"fail" : [
{
"errcode" : "0",
"errmsg" : "",
"data" : {
"id" : "a99f794e-b510-438c-a75d-de59f02347eb",
"name" : "site1",
"locations" : [
{
"name" : "Beijing",
"address" : "Beijing",
"floor" : "5F",
"postcode" : "100000",
"latitude" : "39.92",
"longitude" : "116.46"
}
],
"devices" : [
{
"deviceId" : "a99f794e-b510-438c-a75d-de59f02347eb",
"locationName" : "nanjing"
}
],
"siteType" : "single-gateway",
"interLink" : {
"type" : "l3-interface",
"enableGre" : false,
"vlanMin" : 4000,
"vlanMax" : 4008,
"extendVlans" : ["1:9"],
"portPairs" : [
{
"device1PortId" : "a99f794e-b510-438c-a75d-de59f02347eb",
"device2PortId" : "a99f794e-b510-438c-a75d-de59f02347eb",
"device1Id" : "a99f794e-b510-438c-a75d-de59f02347eb",
"device1PortType" : "GE",
"device1PortNum" : "0/0/1",
"device1PortAddress" : "192.168.101.1",
"device1PortMask" : 24,
"device2Id" : "a99f794e-b510-438c-a75d-de59f02347eb",
"device2PortType" : "GE",
"device2PortNum" : "0/0/1",
"device2PortAddress" : "192.168.101.1",
"device2PortMask" : 24
}
],
"mtu" : 1500,
"mss" : 1200
},
"role" : ["sd-wan-edge","evpn-rr"],
"controlPoints" : ["a99f794e-b510-438c-a75d-de59f02347eb"],
"timeZone" : "(UTC+08:00)Beijing,Chongqing,Hong Kong,Urumqi",
"enableSummerConfig" : "",
"enableAutoConfig" : true,
"daylightSavingTime" : {
"name" : "Atlantic/Canary",
"offset" : "01:00",
"enableWeekDay" : false,
"startTime" : {
"month" : "Jan",
"time" : "23:59",
"week" : "first",
"weekday" : "Mon",
"day" : 21
},
"stopTime" : {
"month" : "Jan",
"time" : "23:59",
"week" : "first",
"weekday" : "Mon",
"day" : 21
}
},
"contact" : {
"responsiblePerson" : "Jack Lee",
"phoneNumber" : "152xxxxxxxx",
"emails" : ["xxx@xxx.xxx"]
},
"description" : "sdwan Site",
"tag" : "tagHub",
"isolated" : false,
"enhancedMode" : false
}
}
],
"processInstanceId" : ""
} 返回状态码为204:执行成功,没有数据。 HTTP/1.1 204 No Content
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
-
响应示例 返回状态码为200:查询站点成功,响应体参考QuerySiteResponse。 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" : "",
"totalRecords" : 200,
"pageSize" : 20,
"pageIndex" : 1,
"data" : [
{
"id" : "a99f794e-b510-438c-a75d-de59f02347eb",
"name" : "site1",
"locations" : [
{
"name" : "Beijing",
"address" : "Beijing",
"floor" : "5F",
"postcode" : "100000",
"latitude" : "39.92",
"longitude" : "116.46"
}
],
"devices" : [
{
"deviceId" : "a99f794e-b510-438c-a75d-de59f02347eb",
"locationName" : "nanjing"
}
],
"siteType" : "single-gateway",
"interLink" : {
"type" : "l3-interface",
"enableGre" : false,
"vlanMin" : 4000,
"vlanMax" : 4008,
"extendVlans" : ["1:9"],
"portPairs" : [
{
"device1PortId" : "a99f794e-b510-438c-a75d-de59f02347eb",
"device2PortId" : "a99f794e-b510-438c-a75d-de59f02347eb",
"device1Id" : "a99f794e-b510-438c-a75d-de59f02347eb",
"device1PortType" : "GE",
"device1PortNum" : "0/0/1",
"device1PortAddress" : "192.168.101.1",
"device1PortMask" : 24,
"device2Id" : "a99f794e-b510-438c-a75d-de59f02347eb",
"device2PortType" : "GE",
"device2PortNum" : "0/0/1",
"device2PortAddress" : "192.168.101.1",
"device2PortMask" : 24
}
],
"mtu" : 1500,
"mss" : 1200
},
"role" : ["sd-wan-edge","evpn-rr"],
"controlPoints" : ["a99f794e-b510-438c-a75d-de59f02347eb"],
"timeZone" : "(UTC+08:00)Beijing,Chongqing,Hong Kong,Urumqi",
"enableSummerConfig" : "",
"enableAutoConfig" : true,
"daylightSavingTime" : {
"name" : "Atlantic/Canary",
"offset" : "01:00",
"enableWeekDay" : false,
"startTime" : {
"month" : "Jan",
"time" : "23:59",
"week" : "first",
"weekday" : "Mon",
"day" : 21
},
"stopTime" : {
"month" : "Jan",
"time" : "23:59",
"week" : "first",
"weekday" : "Mon",
"day" : 21
}
},
"contact" : {
"responsiblePerson" : "Jack Lee",
"phoneNumber" : "152xxxxxxxx",
"emails" : ["xxx@xxx.xxx"]
},
"description" : "sdwan Site",
"tag" : "tagHub",
"isolated" : false,
"enhancedMode" : false
}
]
} 返回状态码为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的示例 GET /controller/campus/v1/sdwan/net/sites?pageIndex=1&pageSize=20&sort=a99f794e-b510-438c-a75d-de59f02347eb&siteId=a99f794e-b510-438c-a75d-de59f02347eb 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:查询站点成功,响应体参考QuerySiteResponse。 表2 QuerySiteResponse对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 errcode string - - 错误码。 "0" errmsg string - - 错误信息。 "" totalRecords int32 - - 总的数据条数。 200 pageSize int32 - - 每页显示数量。 20 pageIndex int32 - - 当前页数。 1 data ARRAY_REFERENCE 0-1000个列表项,详细请参见表12。 Site信息。 - 返回状态码为400:校验异常。 详细信息请参见实际响应消息体。 返回状态码为500:内部错误。 详细信息请参见实际响应消息体。
-
请求示例 HTTP的示例 POST /controller/campus/v1/sdwan/net/sites 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
{
"sites" : [
{
"id" : "a99f794e-b510-438c-a75d-de59f02347eb",
"name" : "site1",
"locations" : [
{
"name" : "Beijing",
"address" : "Beijing",
"floor" : "5F",
"postcode" : "100000",
"latitude" : "39.92",
"longitude" : "116.46"
}
],
"devices" : [
{
"deviceId" : "a99f794e-b510-438c-a75d-de59f02347eb",
"locationName" : "nanjing"
}
],
"siteType" : "single-gateway",
"interLink" : {
"type" : "l3-interface",
"enableGre" : false,
"vlanMin" : 4000,
"vlanMax" : 4008,
"extendVlans" : ["1:9"],
"portPairs" : [
{
"device1PortId" : "a99f794e-b510-438c-a75d-de59f02347eb",
"device2PortId" : "a99f794e-b510-438c-a75d-de59f02347eb",
"device1Id" : "a99f794e-b510-438c-a75d-de59f02347eb",
"device1PortType" : "GE",
"device1PortNum" : "0/0/1",
"device1PortAddress" : "192.168.101.1",
"device1PortMask" : 24,
"device2Id" : "a99f794e-b510-438c-a75d-de59f02347eb",
"device2PortType" : "GE",
"device2PortNum" : "0/0/1",
"device2PortAddress" : "192.168.101.1",
"device2PortMask" : 24
}
],
"mtu" : 1500,
"mss" : 1200
},
"role" : ["sd-wan-edge","evpn-rr"],
"controlPoints" : ["a99f794e-b510-438c-a75d-de59f02347eb"],
"timeZone" : "(UTC+08:00)Beijing,Chongqing,Hong Kong,Urumqi",
"enableSummerConfig" : "",
"enableAutoConfig" : true,
"daylightSavingTime" : {
"name" : "Atlantic/Canary",
"offset" : "01:00",
"enableWeekDay" : false,
"startTime" : {
"month" : "Jan",
"time" : "23:59",
"week" : "first",
"weekday" : "Mon",
"day" : 21
},
"stopTime" : {
"month" : "Jan",
"time" : "23:59",
"week" : "first",
"weekday" : "Mon",
"day" : 21
}
},
"contact" : {
"responsiblePerson" : "Jack Lee",
"phoneNumber" : "152xxxxxxxx",
"emails" : ["xxx@xxx.xxx"]
},
"description" : "sdwan Site",
"tag" : "tagHub",
"isolated" : false,
"enhancedMode" : false
}
]
}
-
响应示例 返回状态码为201:创建站点成功,响应体参考SiteResponse。 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" : "",
"success" : [
{
"id" : "a99f794e-b510-438c-a75d-de59f02347eb",
"name" : "site1",
"locations" : [
{
"name" : "Beijing",
"address" : "Beijing",
"floor" : "5F",
"postcode" : "100000",
"latitude" : "39.92",
"longitude" : "116.46"
}
],
"devices" : [
{
"deviceId" : "a99f794e-b510-438c-a75d-de59f02347eb",
"locationName" : "nanjing"
}
],
"siteType" : "single-gateway",
"interLink" : {
"type" : "l3-interface",
"enableGre" : false,
"vlanMin" : 4000,
"vlanMax" : 4008,
"extendVlans" : ["1:9"],
"portPairs" : [
{
"device1PortId" : "a99f794e-b510-438c-a75d-de59f02347eb",
"device2PortId" : "a99f794e-b510-438c-a75d-de59f02347eb",
"device1Id" : "a99f794e-b510-438c-a75d-de59f02347eb",
"device1PortType" : "GE",
"device1PortNum" : "0/0/1",
"device1PortAddress" : "192.168.101.1",
"device1PortMask" : 24,
"device2Id" : "a99f794e-b510-438c-a75d-de59f02347eb",
"device2PortType" : "GE",
"device2PortNum" : "0/0/1",
"device2PortAddress" : "192.168.101.1",
"device2PortMask" : 24
}
],
"mtu" : 1500,
"mss" : 1200
},
"role" : ["sd-wan-edge","evpn-rr"],
"controlPoints" : ["a99f794e-b510-438c-a75d-de59f02347eb"],
"timeZone" : "(UTC+08:00)Beijing,Chongqing,Hong Kong,Urumqi",
"enableSummerConfig" : "",
"enableAutoConfig" : true,
"daylightSavingTime" : {
"name" : "Atlantic/Canary",
"offset" : "01:00",
"enableWeekDay" : false,
"startTime" : {
"month" : "Jan",
"time" : "23:59",
"week" : "first",
"weekday" : "Mon",
"day" : 21
},
"stopTime" : {
"month" : "Jan",
"time" : "23:59",
"week" : "first",
"weekday" : "Mon",
"day" : 21
}
},
"contact" : {
"responsiblePerson" : "Jack Lee",
"phoneNumber" : "152xxxxxxxx",
"emails" : ["xxx@xxx.xxx"]
},
"description" : "sdwan Site",
"tag" : "tagHub",
"isolated" : false,
"enhancedMode" : false
}
],
"fail" : [
{
"errcode" : "0",
"errmsg" : "",
"data" : {
"id" : "a99f794e-b510-438c-a75d-de59f02347eb",
"name" : "site1",
"locations" : [
{
"name" : "Beijing",
"address" : "Beijing",
"floor" : "5F",
"postcode" : "100000",
"latitude" : "39.92",
"longitude" : "116.46"
}
],
"devices" : [
{
"deviceId" : "a99f794e-b510-438c-a75d-de59f02347eb",
"locationName" : "nanjing"
}
],
"siteType" : "single-gateway",
"interLink" : {
"type" : "l3-interface",
"enableGre" : false,
"vlanMin" : 4000,
"vlanMax" : 4008,
"extendVlans" : ["1:9"],
"portPairs" : [
{
"device1PortId" : "a99f794e-b510-438c-a75d-de59f02347eb",
"device2PortId" : "a99f794e-b510-438c-a75d-de59f02347eb",
"device1Id" : "a99f794e-b510-438c-a75d-de59f02347eb",
"device1PortType" : "GE",
"device1PortNum" : "0/0/1",
"device1PortAddress" : "192.168.101.1",
"device1PortMask" : 24,
"device2Id" : "a99f794e-b510-438c-a75d-de59f02347eb",
"device2PortType" : "GE",
"device2PortNum" : "0/0/1",
"device2PortAddress" : "192.168.101.1",
"device2PortMask" : 24
}
],
"mtu" : 1500,
"mss" : 1200
},
"role" : ["sd-wan-edge","evpn-rr"],
"controlPoints" : ["a99f794e-b510-438c-a75d-de59f02347eb"],
"timeZone" : "(UTC+08:00)Beijing,Chongqing,Hong Kong,Urumqi",
"enableSummerConfig" : "",
"enableAutoConfig" : true,
"daylightSavingTime" : {
"name" : "Atlantic/Canary",
"offset" : "01:00",
"enableWeekDay" : false,
"startTime" : {
"month" : "Jan",
"time" : "23:59",
"week" : "first",
"weekday" : "Mon",
"day" : 21
},
"stopTime" : {
"month" : "Jan",
"time" : "23:59",
"week" : "first",
"weekday" : "Mon",
"day" : 21
}
},
"contact" : {
"responsiblePerson" : "Jack Lee",
"phoneNumber" : "152xxxxxxxx",
"emails" : ["xxx@xxx.xxx"]
},
"description" : "sdwan Site",
"tag" : "tagHub",
"isolated" : false,
"enhancedMode" : false
}
}
],
"processInstanceId" : ""
} 返回状态码为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