REST API Syntax

Describes the MapR REST API syntax format.

MapR REST calls use the following format:
https://<host>:<port>/rest/<command>[/<subcommand>...]?<parameters>

Construct the <parameters> list from the required and optional parameters, in the format <parameter>=<value> separated by the ampersand (&) character. Example:

https://r1n1.qa.sj.ca.us:8443/rest/volume/mount?name=test-volume&path=/test

Values in REST API calls must be URL-encoded. For readability, the values in this document use the actual characters, rather than the URL-encoded versions.

Authentication

To make REST calls using curl or wget, provide the username and password. To configure PAM for REST API, see PAM Configuration.

Curl Syntax

curl -k -u <username> https://<host>:<port>/rest/<command>...
WARNING: To keep your password secure, do not provide it on the command line. Curl will prompt you for your password, and you can enter it securely.

Wget Syntax

wget --no-check-certificate --user <username> --ask-password https://<host>:<port>/rest/<command>...
WARNING: To keep your password secure, do not provide it on the command line. Use the --ask-password option instead; then wget will prompt you for your password and you can enter it securely.