Most of the files in the InterMapper Settings folder can be accessed through the HTTP API. These include:
These folder contents may be exported, but not imported:
The contents of the following folders are not currently available:
All other files are served up as binary files with a MIME type of application/octet-stream. Each file has a corresponding URL to retrieve its contents; each folder in InterMapper Settings also has a URL to retrieve the list of URLs for the files in that folder.
All URLs given below are relative to a URL composed of the InterMapper Server address and the webport, as defined in the server settings. For example, in the following discussion a URL of /~files would imply the full URL (either http: or https:):
http://imserver_address:webport/~files
Example: The URL above produces a text listing the URLs for the folders in the InterMapper Settings that can be accessed over HTTP; this is provided for the convenience of scripts that might want to access all files.
A request for following URLs provides a text listing of the URLs for the files within the corresponding folder in the InterMapper Settings folder.
| InterMapper Settings folder | Corresponding URL |
| Custom Icons | /~files/icons |
| Extensions | /~files/extensions |
| Fonts | /~files/fonts |
| Maps | /~files/maps |
| MIB Files | /~files/mibs |
| Probes | /~files/probes |
| Sounds | /~files/sounds |
| Tools | /~files/tools |
| Web Pages | /~files/webpages |
To import these files over HTTP, issue a POST request to the appropriate URL with the file contents as a payload; the MIME type should be application/octet-stream.
Icons
You can import icons via HTTP as described above. The URL should take the following form:
http://imserver:port/~files/icons/Folder/Filename.type
If the file type is a valid image file (jpeg or png), it will be available to use immediately.
Sample curl commands (command-line) to use this facility might look like this (should be all on one line):
HTTP: curl --data-binary "@sample.png" http://localhost:8080/~files/icons/Default/sample.png HTTPS: curl -k --data-binary "@sample.png" https://localhost/~files/icons/Default/sample.png
Note: the -k option for HTTPS ignores an unsigned certificate.
You can import maps or map data using the HTTP API.
A sample curl command line to import a map file should take this form:
$ curl --user admin:Pa55w0rd --data-binary @/path/to/local/map_file http://imserver:port/~files/maps/map_file