URI
<fileManager_uri>/md5[.<format>]
Supported methods
Parent resource
Introduction
MD5 encryption for the specified file, i.e., getting the MD5 checksum of the specified file in the specified list.
Supported Methods:
- GET: Gets the MD5 checksum of the specified file in the file list.
- HEAD: Checks whether the fileMD5 resource exists or whether it has permission to access the fileMD5 resource.
Supported output formats: rjson, json, xml.
Resource hierarchy
HTTP request methods
Implement the HTTP request on the following URI, where supermapiserver is the server name, with rjson being the output format.
http://supermapiserver:8090/iserver/manager/filemanager/md5.rjson?paths=../../samples/data/World/World.udb|../../samples/data/World/World.udd
GET request
Gets the MD5 checksum of the specified file in the file list.
Request parameter
Parameters in the URI:
Name | Type | Description |
paths | String | [Required parameter] Path of the file to be encrypted, like paths=../../samples/data/World/World.udb. Supports specifying multiple files, which can be delimited by "|", like paths=../../samples/data/World/World.udb|../../samples/data/World/World.udd. When the transmission path in paths doesn't exist, the MD5 checksum of the corresponding file is null. Both absolute path or relative path are OK. The starting position of relative path is the application directory of iServer. |
Response structure
Returns the MD5 checksum of data, each checksum is a Map<String, String> string: The string before the colon denotes the specified file and its path, while the string after the colon denotes the MD5 checksum of the file.
Response example
Gets the MD5 checksums of ".. /.. / Samples / data / World / World.udb", ".. /.. / Samples / data / World / World.udd" and ".. /.. / Samples / data / World / test.udd and then executes the GET request as illustrated below:
http://localhost:8090/iserver/manager/filemanager/md5.rjson?paths=../../samples/data/World/World.udb|../../samples/data/World/World.udd|../../samples/data/World/test.udd
The response result in rjson format returned is as follows:
{
"../../samples/data/World/World.udb": "4d028bf15ccc072fa2b769318e00f325",
"../../samples/data/World/World.udd": "b3f2831c417fe319b50cb8914ebf9dfb",
"../../samples/data/World/test.udd": null
}
Where ".. /.. / Samples / data / World / test.udd" does not exist, so the returned result is null.
HEAD request
Asks for the response identical to the one that would correspond to a GET request, but without the response body. This is useful for retrieving meta-information written in response headers, without having to transport the entire content. The meta-information includes the media-type, content-encoding, transfer-encoding, content-length, etc.
HEAD request can be used to check if the fileMD5 resource exists, or if the fileMD5 resource can be accessed by clients. It can also determine if the fileMD5 resource supports an output format <format> if performed on a URI with .<format> included.