-
请求示例 HTTP的示例 GET /controller/campus/rest/sdwan/v1/device/nac/config?deviceId=fbb684c8-0d37-496f-bafa-4b06d5151e2e&interfaceId=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-AC
CES S-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" : {
"nacInterface" : {
"siteId" : "fbb684c8-ddaa-3451-bafa-4b06d5158956",
"deviceInfo" : [
{
"deviceId" : "fbb684c8-ddaa-3451-bafa-4b06d5158956",
"interfaceIds" : [
"fbb684c8-ddaa-3451-bafa-4b06d5158956"
]
}
]
},
"nacProfile" : {
"nacProfileName" : "d1",
"authenDomainName" : "isp1",
"nacType" : "portal"
},
"radiusServerInfo" : {
"id" : "6f6b816e-f130-46e2-be42-dd4d92db4c3e",
"serverName" : "RadiusServer1",
"desc" : "RADIUS服务器",
"sharedKey" : "",
"isContainDomainName" : true,
"primaryAuthenServerInfo" : {
"serverIP" : "10.134.6.5",
"serverPort" : 10,
"tnpId" : "00000000-0000-0000-0000-000000000000",
"vpnId" : "fbb684c8-0d37-496f-bafa-4b06d515j7l6",
"ipAddress" : "10.134.6.5",
"loopbackInterface" : "601"
},
"secondAuthenServerInfo" : {
"serverIP" : "10.134.6.5",
"serverPort" : 10,
"tnpId" : "00000000-0000-0000-0000-000000000000",
"vpnId" : "fbb684c8-0d37-496f-bafa-4b06d515j7l6",
"ipAddress" : "10.134.6.5",
"loopbackInterface" : "601"
},
"primaryAccountServerInfo" : {
"serverIP" : "10.134.6.5",
"serverPort" : 10,
"tnpId" : "00000000-0000-0000-0000-000000000000",
"vpnId" : "fbb684c8-0d37-496f-bafa-4b06d515j7l6",
"ipAddress" : "10.134.6.5",
"loopbackInterface" : "601"
},
"secondAccountServerInfo" : {
"serverIP" : "10.134.6.5",
"serverPort" : 10,
"tnpId" : "00000000-0000-0000-0000-000000000000",
"vpnId" : "fbb684c8-0d37-496f-bafa-4b06d515j7l6",
"ipAddress" : "10.134.6.5",
"loopbackInterface" : "601"
}
},
"portalInfo" : {
"portalMode" : "direct",
"enableBackupServer" : false,
"escapeMode" : "none,all,custom",
"escapeProfileId" : "fbb684c8-0d37-496f-bafa-4b06d515j7l6",
"escapeProfileName" : "none",
"primaryPortalServerInfo" : {
"portalServerProfileId" : "fbb684c8-0d37-496f-bafa-4b06d515j7l6",
"portalServerProfileName" : "portalProfile",
"tnpId" : "00000000-0000-0000-0000-000000000000",
"vpnId" : "fbb684c8-0d37-496f-bafa-4b06d515j7l6",
"urlTempDevIpAddress" : "10.134.6.5"
},
"secondPortalServerInfo" : {
"portalServerProfileId" : "fbb684c8-0d37-496f-bafa-4b06d515j7l6",
"portalServerProfileName" : "portalProfile",
"tnpId" : "00000000-0000-0000-0000-000000000000",
"vpnId" : "fbb684c8-0d37-496f-bafa-4b06d515j7l6",
"urlTempDevIpAddress" : "10.134.6.5"
}
}
}
} 返回状态码为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
-
URI /controller/campus/rest/sdwan/v1/device/nac/config 表1 query参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 deviceId 是 string 0~36个字符。 - 接口ID。 "fbb684c8-0d37-496f-bafa-4b06d5151e2e" interfaceId 是 string 0~36个字符。 - 设备接口ID。 "fbb684c8-0d37-496f-bafa-4b06d5151e2e"
-
响应示例 返回状态码为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" : "",
"siteId" : "fbb684c8-ddaa-3451-bafa-4b06d5158956",
"deviceId" : "fbb684c8-ddaa-3451-bafa-4b06d5158956",
"interfaceId" : "50601b1c-c751-4072-9bca-2cf79b63bf70"
} 返回状态码为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
-
请求示例 HTTP的示例 DELETE /controller/campus/rest/sdwan/v1/device/nac/config?siteId=fbb684c8-0d37-496f-bafa-4b06d5151e2e&deviceId=fbb684c8-0d37-496f-bafa-4b06d5151e2e&interfaceId=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
-
响应参数 返回状态码为200:去使能成功。 表2 DeleteNacConfigResponse对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 errcode string 0~10个字符。 - 错误码。 "0" errmsg string 0~255个字符。 - 错误描述。 "" siteId string 0~36个字符。 - 站点ID。 "fbb684c8-ddaa-3451-bafa-4b06d5158956" deviceId string 0~36个字符。 - 设备ID。 "fbb684c8-ddaa-3451-bafa-4b06d5158956" interfaceId string 0~36个字符。 - 接口ID。 "50601b1c-c751-4072-9bca-2cf79b63bf70" 返回状态码为204:接口调用成功,无数据。 返回状态码为400:请求参数错误。 详细信息请参见实际响应消息体。 返回状态码为500:内部异常。 详细信息请参见实际响应消息体。
-
URI /controller/campus/rest/sdwan/v1/device/nac/config 表1 query参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 siteId 否 string 0~36个字符。 - 站点ID。 "fbb684c8-0d37-496f-bafa-4b06d5151e2e" deviceId 否 string 0~36个字符。 - 设备ID。 "fbb684c8-0d37-496f-bafa-4b06d5151e2e" interfaceId 否 string 0~36个字符。 - 接口ID。 "fbb684c8-0d37-496f-bafa-4b06d5151e2e"
-
响应示例 返回状态码为200:使能成功,返回体参考DeviceFreeRuleConfigResponse。 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" : [
{
"siteId" : "fbb684c8-ddaa-3451-bafa-4b06d5158956",
"deviceId" : "fbb684c8-ddaa-3451-bafa-4b06d5158956",
"aclProfileId" : "50601b1c-c751-4072-9bca-2cf79b63bf70",
"aclProfileName" : "acl",
"freeRules" : [
{
"ruleId" : 0,
"sourceType" : "any",
"sourceContent" : "192.168.1.1/32",
"destType" : "any",
"destContent" : "192.168.1.1/32"
}
]
}
],
"fail" : [
{
"errcode" : "0",
"errmsg" : "",
"data" : {
"siteId" : "fbb684c8-ddaa-3451-bafa-4b06d5158956",
"deviceId" : "fbb684c8-ddaa-3451-bafa-4b06d5158956",
"aclProfileId" : "50601b1c-c751-4072-9bca-2cf79b63bf70",
"aclProfileName" : "acl",
"freeRules" : [
{
"ruleId" : 0,
"sourceType" : "any",
"sourceContent" : "192.168.1.1/32",
"destType" : "any",
"destContent" : "192.168.1.1/32"
}
]
}
}
]
} 返回状态码为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/rest/sdwan/v1/device/nac/free-rule 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
[
{
"siteId" : "fbb684c8-ddaa-3451-bafa-4b06d5158956",
"deviceId" : "fbb684c8-ddaa-3451-bafa-4b06d5158956",
"aclProfileId" : "50601b1c-c751-4072-9bca-2cf79b63bf70",
"aclProfileName" : "acl",
"freeRules" : [
{
"ruleId" : 0,
"sourceType" : "any",
"sourceContent" : "192.168.1.1/32",
"destType" : "any",
"destContent" : "192.168.1.1/32"
}
]
}
]
-
响应参数 返回状态码为200:使能成功,返回体参考DeviceFreeRuleConfigResponse。 表5 DeviceFreeRuleConfigResponse对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 errcode string 0~10个字符。 - 错误码。 "0" errmsg string 0~255个字符。 - 错误描述。 "" success ARRAY_REFERENCE 0-100个列表项,详细请参见表3。 成功的信息。 - fail ARRAY_REFERENCE 0-100个列表项,详细请参见表6。 失败的信息。 - 表6 FailDeviceFreeRuleConfigInfo对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 errcode string - - 错误码。 "0" errmsg string - - 错误信息。 "" data REFERENCE 详细请参见表3。 失败的信息。 - 返回状态码为400:请求参数错误。 详细信息请参见实际响应消息体。 返回状态码为500:内部异常。 详细信息请参见实际响应消息体。
-
请求参数 表1 body参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 requestBody 是 REFERENCE 详细请参见表2。 默认放行规则配置信息。 - 表2 DeviceFreeRuleConfigInfos对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 DeviceFreeRuleConfigInfos 是 ARRAY_REFERENCE 0-2个列表项,详细请参见表3。 批量默认放行规则结构体。 - 表3 DeviceFreeRuleConfigInfo对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 siteId 是 string 0~36个字符。 - 站点ID。 "fbb684c8-ddaa-3451-bafa-4b06d5158956" deviceId 是 string 0~36个字符。 - 设备ID。 "fbb684c8-ddaa-3451-bafa-4b06d5158956" aclProfileId 否 string 0~36个字符。 - acl模板ID。V600设备不支持。V300设备不支持IPv6 ACL模板,且地址类型为
域名 的IPv4 ACL模板不生效。与freeRules不支持同时配置。 "50601b1c-c751-4072-9bca-2cf79b63bf70" aclProfileName 否 string 0~32个字符。 - acl模板名称,仅供查询显示,配置时无需填写。 "acl" freeRules 否 ARRAY_REFERENCE 0-100个列表项,详细请参见表4。 规则列表,与aclProfileId不支持同时配置。 - 表4 FreeRuleDataInfo对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 ruleId 否 int32 [0-511] - Rule ID。 0 sourceType 否 string 0~36个字符。 - 源类型。 "any" sourceContent 否 string 0~128个字符。 - 源内容。 "192.168.1.1/32" destType 否 string 0~36个字符。 - 目的类型。 "any" destContent 否 string 0~128个字符。 - 目的内容。 "192.168.1.1/32"
-
响应参数 返回状态码为200:去使能成功,响应体参考DeviceFreeRuleConfigResponse。 表2 DeleteDeviceFreeRuleConfigResponse对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 errcode string 0~10个字符。 - 错误码。 "0" errmsg string 0~255个字符。 - 错误描述。 "" siteId string 0~36个字符。 - 站点ID。 "fbb684c8-ddaa-3451-bafa-4b06d5158956" deviceId string 0~36个字符。 - 设备ID。 "fbb684c8-ddaa-3451-bafa-4b06d5158956" 返回状态码为204:接口调用成功,无数据。 返回状态码为400:请求参数错误。 详细信息请参见实际响应消息体。 返回状态码为500:内部异常。 详细信息请参见实际响应消息体。
-
请求示例 HTTP的示例 DELETE /controller/campus/rest/sdwan/v1/device/nac/free-rule?siteId=fbb684c8-0d37-496f-bafa-4b06d5151e2e&deviceId=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
-
响应示例 返回状态码为200:去使能成功,响应体参考DeviceFreeRuleConfigResponse。 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" : "",
"siteId" : "fbb684c8-ddaa-3451-bafa-4b06d5158956",
"deviceId" : "fbb684c8-ddaa-3451-bafa-4b06d5158956"
} 返回状态码为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
-
URI /controller/campus/rest/sdwan/v1/device/nac/free-rule 表1 query参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 siteId 否 string 0~36个字符。 - 站点ID。 "fbb684c8-0d37-496f-bafa-4b06d5151e2e" deviceId 否 string 0~36个字符。 - 设备ID。 "fbb684c8-0d37-496f-bafa-4b06d5151e2e"