Prerequisites
All the REST services require a base64 encoded username and password as one of the parameters on the request header for authorization.
You can obtain the base64 encoded username and password using the following command on Linux:
echo -n '<username>:<password>' | base64
 
Where username is the username that needs to be encoded and password is the password corresponding to the username that needs to be encoded.