云服务器内容精选

  • 请求示例 HTTP的示例 POST /controller/campus/v1/sdwan/policy/traffic/session-whitelist/00000000-0000-0000-0000-000000000000 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 { "policyId" : "00000000-0000-0000-0000-000000000000", "policyName" : "policy1", "deviceId" : "00000000-0000-0000-0000-000000000000", "deviceName" : "device1", "ruleCount" : 1, "sessionWhitelistType" : "spr,firewall", "aclRules" : [ { "ruleId" : "00000000-0000-0000-0000-000000000000", "priority" : 1, "action" : "permit", "protocolNum" : 1, "sourceIP" : "192.168.0.0/16", "destinationIP" : "192.168.0.0/16", "sourcePortStart" : 1, "sourcePortEnd" : 1, "destinationPortStart" : 1, "destinationPortEnd" : 1 } ] }
  • 响应示例 返回状态码为201:创建成功,响应体参考SessionWhitelistResponse。 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" : "", "data" : [ { "policyId" : "00000000-0000-0000-0000-000000000000", "policyName" : "policy1", "deviceId" : "00000000-0000-0000-0000-000000000000", "deviceName" : "device1", "ruleCount" : 1, "sessionWhitelistType" : "spr,firewall", "aclRules" : [ { "ruleId" : "00000000-0000-0000-0000-000000000000", "priority" : 1, "action" : "permit", "protocolNum" : 1, "sourceIP" : "192.168.0.0/16", "destinationIP" : "192.168.0.0/16", "sourcePortStart" : 1, "sourcePortEnd" : 1, "destinationPortStart" : 1, "destinationPortEnd" : 1 } ] } ] } 返回状态码为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的示例 POST /controller/campus/v1/sdwan/policy/traffic/session-whitelist/00000000-0000-0000-0000-000000000000/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 { "policies" : [ { "policyId" : "00000000-0000-0000-0000-000000000000", "policyName" : "policy" } ] }
  • 响应示例 返回状态码为200:删除成功,响应体参考SessionWhitelistResponse。 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" : [ { "policyId" : "00000000-0000-0000-0000-000000000000", "policyName" : "policy1", "deviceId" : "00000000-0000-0000-0000-000000000000", "deviceName" : "device1", "ruleCount" : 1, "sessionWhitelistType" : "spr,firewall", "aclRules" : [ { "ruleId" : "00000000-0000-0000-0000-000000000000", "priority" : 1, "action" : "permit", "protocolNum" : 1, "sourceIP" : "192.168.0.0/16", "destinationIP" : "192.168.0.0/16", "sourcePortStart" : 1, "sourcePortEnd" : 1, "destinationPortStart" : 1, "destinationPortEnd" : 1 } ] } ] } 返回状态码为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
  • 请求参数 表2 body参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 sessionWhitelistDeleteInfo 是 REFERENCE 详细请参见表3。 待删除站点的请求数据。 - 表3 SessionWhitelistDeleteInfos对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 policies 否 ARRAY_REFERENCE 1-2个列表项,详细请参见表4。 待删除策略信息列表。 - 表4 SessionWhitelistDeleteInfo对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 policyId 是 uuid 1~36个字符。 - 策略id,必填。 "00000000-0000-0000-0000-000000000000" policyName 是 string 1~64个字符。 - 策略名称,必填。 "policy"
  • 响应示例 返回状态码为200:查询成功,响应体参考SessionWhitelistResponse。 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" : [ { "policyId" : "00000000-0000-0000-0000-000000000000", "policyName" : "policy1", "deviceId" : "00000000-0000-0000-0000-000000000000", "deviceName" : "device1", "ruleCount" : 1, "sessionWhitelistType" : "spr,firewall", "aclRules" : [ { "ruleId" : "00000000-0000-0000-0000-000000000000", "priority" : 1, "action" : "permit", "protocolNum" : 1, "sourceIP" : "192.168.0.0/16", "destinationIP" : "192.168.0.0/16", "sourcePortStart" : 1, "sourcePortEnd" : 1, "destinationPortStart" : 1, "destinationPortEnd" : 1 } ] } ] } 返回状态码为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/sdwan/policy/traffic/session-whitelist/00000000-0000-0000-0000-000000000000 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:查询成功,响应体参考SessionWhitelistResponse。 表2 QuerySessionWhitelistResponse对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 errcode string - - 错误码。 "0" errmsg string - - 错误信息。 "" data ARRAY_REFERENCE 0-2个列表项,详细请参见表6。 返回体中具体信息列表。 - 返回状态码为400:请求参数错误。 详细信息请参见实际响应消息体。 返回状态码为500:内部错误。 详细信息请参见实际响应消息体。
  • 响应示例 返回状态码为200:修改成功,响应体参考SessionWhitelistResponse。 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" : [ { "policyId" : "00000000-0000-0000-0000-000000000000", "policyName" : "policy1", "deviceId" : "00000000-0000-0000-0000-000000000000", "deviceName" : "device1", "ruleCount" : 1, "sessionWhitelistType" : "spr,firewall", "aclRules" : [ { "ruleId" : "00000000-0000-0000-0000-000000000000", "priority" : 1, "action" : "permit", "protocolNum" : 1, "sourceIP" : "192.168.0.0/16", "destinationIP" : "192.168.0.0/16", "sourcePortStart" : 1, "sourcePortEnd" : 1, "destinationPortStart" : 1, "destinationPortEnd" : 1 } ] } ] } 返回状态码为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的示例 PUT /controller/campus/v1/sdwan/policy/traffic/session-whitelist/00000000-0000-0000-0000-000000000000 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 { "policyId" : "00000000-0000-0000-0000-000000000000", "policyName" : "policy1", "deviceId" : "00000000-0000-0000-0000-000000000000", "deviceName" : "device1", "ruleCount" : 1, "sessionWhitelistType" : "spr,firewall", "aclRules" : [ { "ruleId" : "00000000-0000-0000-0000-000000000000", "priority" : 1, "action" : "permit", "protocolNum" : 1, "sourceIP" : "192.168.0.0/16", "destinationIP" : "192.168.0.0/16", "sourcePortStart" : 1, "sourcePortEnd" : 1, "destinationPortStart" : 1, "destinationPortEnd" : 1 } ] }