The "filemetadata" web service provides various information about a specified file, such as data type and last modified date.
A typical URL for the filemetadata is: http://myserver.mycompany.com:8080/INTGeoServer/json/filemetadata?filePath=testSGY1.sgy
An alternate URL is http://myserver.mycompany.com:8080/json/filemetadata?json={"filePath"="testSGY1.sgy"}
The following parameter is available:
filePath: the relative path of the specified dataset. If a path encoder is used, this path is encoded.
Here is an example response. This response has been formatted to improve readability
{
"name":"testSGY1.sgy",
"relativePath":"testSGY1.sgy",
"logicalRelativePath":"testSGY1.sgy",
"hasParentRelativePath":false,
"absolutePath":"D:\\INT_GEOSERVER_HOME\\testSGY1.sgy",
"isDirectory":false,
"size":1257840,
"lastModified":1471643345350,
"dataType":"seismic"
}
This format is also used by the advancedfileslist web service.
The name entry represents the file name, including the extension if any.
The relativePath entry represents the relative path of the file. This is the path that is visible to all clients. If a path encoder is used, this path is encoded.
The logicalRelativePath entry represents the relative path of the file. This path is never encoded.
The hasParentRelativePath entry will be false if the file is contained in a directory that is not the INTGeoServer home directory, true otherwise.
The absolutePath entry represents the absolute path of the file. Depending on the confidentiality settings used by INTGeoServer, this might return confidential.
The isDirectory entry indicates whether the designated path is a directory. This would return true for Javaseis datasets which are always designated by their top directory.
The size entry represents the size (in bytes) of the specified file. Note that some files might just be pointers to bigger seismic files. The size of a .xgy file might be 4K while the actual .segy file it references might be 1TB.
The lastModified entry represents the last modification timestamp of the file, in milliseconds since January 1st, 1970
The dataType represents the detected type, typically seismic or well. In rare cases, a file might have several possible valid data types. Unless it was specified as a parameter in the advancedfilelist web service, the first valid data type found will be listed. The available data types are listed in the datatypes web service.
If the specified filePath doesn't match a valid resource, no JSON response will be provided. The HTTP response will only show a "File or Directory Not Found" (error 404) in its headers.