云服务器内容精选

  • 响应参数 返回状态码为200:接口配置成功。 表2 ruleInfoResponseDTO对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 errcode string 0~64个字符。 - 错误码。 "0" errmsg string 0~256个字符。 - 错误信息。 "" data REFERENCE 详细请参见表3。 - - 表3 ruleInfoDTO对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 ftpType string 1~4个字符。满足正则表达^(ftp|ftps)$。 - ftp类型。 "ftps" serverIP string 1~32个字符。 - 服务器IP。 "1.0.0.0" serverPort string 1~10个字符。 - 服务器端口,范围为1-65535。 "1" username string 1~32个字符。 - 用户名。 "xxxxxx" 返回状态码为400:校验异常。 详细信息请参见实际响应消息体。 返回状态码为500:内部错误。 详细信息请参见实际响应消息体。
  • 响应示例 返回状态码为200:接口配置成功。 { "errcode": "0", "errmsg": "", "date": { "ftpType": "ftps", "serverIP": "1.0.0.0", "serverPort": "1", "username": "xxxxxx" } } 返回状态码为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 /v1/networkservice/sites/securityrules/midwareInfos 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 { "ftpType" : "ftps", "serverIP" : "1.0.0.0", "serverPort" : "1", "userPsw" : "xxxxxx", "username" : "xxxxxx" }
  • 响应参数 返回状态码为200:接口测试连接成功。 表3 responseDTO对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 errcode string 0~64个字符。 - 错误码。 "0" errmsg string 0~256个字符。 - 错误信息。 "" 返回状态码为400:校验异常。 详细信息请参见实际响应消息体。 返回状态码为500:内部错误。 详细信息请参见实际响应消息体。
  • 请求示例 HTTP的示例 POST /v1/networkservice/sites/securityrules/action/connect 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 { "ftpType" : "ftps", "serverIP" : "1.0.0.0", "serverPort" : "1", "userPsw" : "xxxxxx", "username" : "xxxxxx" }
  • 响应示例 返回状态码为200:接口测试连接成功。 { "errcode": "0", "errmsg": "" } 返回状态码为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