The authentication code of the request is computed by applying a HMAC_SHA512 on the request you’re about to send to the server. The message to authenticate has to respect the following specification (in pseudo code):
HttpMethod: Can be either GET, POST or PUT, mandatory in all requests
RelativePath: is a canonical url stripped of the base path, i.e. if you request https://...test.com/v1/devices that would be /v1/devices, ** mandatory** in all requests
CanonicalQuery: the encoded query, to be provided only if there is a query, for example:
property=temperature&since=1286705410000
Body: the exact json body to be sent, to be provided only if there is a body to send
Timestamp: in milliseconds. If provided, the request will only be valid for 60 seconds after this timestamp. It also has to be provided in the header in X-API-Timestamp.
This message is then authenticated using HMAC_SHA512 and its result base64 encoded. The final result is what we previously called request-hmac-512-authentication-code, or in short a “signature”.