云服务器内容精选

  • 响应参数 返回状态码为200:传输文件文件成功返回。返回体参考UploadFileResponse 表2 UploadFileResponse对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 errCode string - - 错误码。 0 : 无错误 1 : 参数校验或数据访问错误 详细信息见errMsg "0" errMsg string - - 错误信息。 "" data REFERENCE 详细请参见表3。 - - 表3 UploadResult对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 fileId string - - fileId "549d0eec-9d6a-40c2-ab36-c7239e5fe409" offset int64 [0-1099511627776] - 已上传字节数 11 fileSize int64 [0-1099511627776] - 文件总大小 11 uploadProgress int32 - - 上传进度 100 返回状态码为400:参数错误。 详细信息请参见实际响应消息体。 返回状态码为500:服务内部错误。 详细信息请参见实际响应消息体。
  • 响应示例 返回状态码为200:传输文件文件成功返回。返回体参考UploadFileResponse 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" : { "fileId" : "549d0eec-9d6a-40c2-ab36-c7239e5fe409", "offset" : 11, "fileSize" : 11, "uploadProgress" : 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
  • URI /controller/campus/baseservice/api/v1/filemgr/files/{fileId}/action/upload 表1 path参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 fileId 是 string 1~64个字符。 - 上传文件的id,使用上传文件第一步返回的fileId。 "afed86db-49e1-4e81-a0e9-097f27372e16"
  • 请求示例 HTTP的示例 POST /controller/campus/baseservice/api/v1/filemgr/files/afed86db-49e1-4e81-a0e9-097f27372e16/action/upload 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:删除文件返回结果。响应体参考DeleteFileResponse 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" : "", "successList" : [ { "fileName" : "test.xml", "fileId" : "" } ], "failList" : [ { "fileName" : "", "errCode" : "0", "errMsg" : "" } ] } 返回状态码为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/baseservice/api/v1/filemgr/files/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 [ "addc4e07-b534-4139-888a-5d44c8c7fda3" ]
  • 响应参数 返回状态码为200:删除文件返回结果。响应体参考DeleteFileResponse 表3 DeleteFileResponse对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 errCode string - - 错误码。 0 : 无错误 1 : 参数校验或数据访问错误 详细信息见errMsg "0" errMsg string - - 错误信息。 "" successList ARRAY_REFERENCE 详细请参见表4。 删除成功的文件列表。 - failList ARRAY_REFERENCE 详细请参见表5。 删除失败的文件列表。 - 表4 DeleteSuccessFile对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 fileName string - - 文件名 "test.xml" fileId string - - 文件Id - 表5 DeleteFailFile对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 fileName string - - 文件Id - errCode string - - 错误码。 0 : 无错误 1 : 参数校验或数据访问错误 详细信息见errMsg "0" errMsg string - - 错误信息。 "" 返回状态码为400:参数错误。 详细信息请参见实际响应消息体。 返回状态码为500:服务内部错误。 详细信息请参见实际响应消息体。
  • 请求示例 HTTP的示例 POST /controller/campus/baseservice/api/v1/filemgr/files/action/batch-query 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 [ "1" ]
  • 响应示例 返回状态码为200:文件查询成功返回。响应体参考QueryFileResponse 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" : "", "pageIndex" : 1, "pageSize" : 20, "totalRecords" : 1, "fileInfoList" : [ { "fileId" : "7d4ea473-dc8b-4acc-8cf9-0a550cbb09e6", "subFileDetails" : [ { "fileId" : "7d4ea473-dc8b-4acc-8cf9-0a550cbb09e6", "subFileDetails" : [ { ... } ], "currentUserUpload" : true, "fileType" : 20, "feature" : 22, "version" : "1.1", "fileName" : "test.xml", "description" : "文件描述", "tenantName" : "tenant", "fileSize" : "0", "offset" : 0, "sizeUnit" : "B", "uploadProgress" : 100, "createTime" : "2022-10-25 21:01:35", "iconString" : null, "storageTypesSupport" : [ { ... } ], "fileServerName" : " FusionInsight ", "manualRecord" : 0, "status" : 1, "needToReboot" : false, } ], "currentUserUpload" : true, "fileType" : 20, "feature" : 22, "version" : "1.1", "fileName" : "test.xml", "description" : "文件描述", "tenantName" : "tenant", "fileSize" : "0", "offset" : 0, "sizeUnit" : "B", "uploadProgress" : 100, "createTime" : "2022-10-25 21:01:35", "iconString" : "", "storageTypesSupport" : [ "" ], "fileServerName" : "FusionInsight", "manualRecord" : 0, "status" : 1, "needToReboot" : 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