|
|
Using the Query APIFrom $1Table of contentsThe Request IDIn every response from Scalr, you will find a string element called TransactionID. This is simply a unique identifier Scalr assigns to this request for tracking and troubleshooting purposes. Query API AuthenticationYou can send Query requests over HTTPS only. You must include a signature in every Query request. This section describes how to create the signature.
To create the signature v2
The final signature you send in the request must be URL encoded as specified in RFC 3986 (for more information, go to http://www.ietf.org/rfc/rfc3986.txt). If your toolkit URL encodes your final request, then it handles the required URL encoding of the signature. If your toolkit doesn't URL encode the final request, then make sure to URL encode the signature before you include it in the request. Most importantly, make sure the signature is URL encoded only once. A common mistake is to URL encode it manually during signature formation, and then again when the toolkit URL encodes the entire request.
To create the signature v3 Signature v3 added with API version 2.3.0 and compatible with all API versions. We're recomending to use this method. It is baisically the same as v2, except query string format evolved to this: %Action%:%KeyID%:%TimeStamp%"
To use new signature you also need to add the following data to your query: AuthVersion = 3
Query ExampleLaunchFarm API Request https://api.scalr.net/?Action=LaunchFarm &FarmID=123 &Version=2.3.0 &KeyID=<Your Scalr API Key ID> &TimeStamp=2009-06-19T05%3A13%3A00.000Z Following is the string to sign v2 ActionLaunchFarmFarmID123KeyID5d0e16f7498c41ccTimeStamp2009-06-19T05:13:00.000ZVersion2.3.0 Following is the string to sign v3 ActionLaunchFarmKeyIDTimeStamp2009-06-19T05:13:00.000ZVersion2.3.0 Following is the signed request for old API versions https://api.scalr.net/?Action=LaunchFarm &FarmID=123 &Version=2.3.0 &KeyID=<Your Scalr API Key ID> &TimeStamp=2009-06-19T05%3A13%3A00.000Z &Signature=<URLEncode(Base64Encode(Signature))> And for API versions since 2.3: https://api.scalr.net/? KeyID=KeyID=<Your Scalr API Key ID> &FarmID=123 &TimeStamp=2011-08-22T13%3A03%3A05.000Z &AuthVersion=3 &Version=2.3.0 &Signature=<URLEncode(Base64Encode(Signature)) &Action=FarmLaunch
Tags: (Edit tags)
|
Powered by MindTouch Core |
The documentation would be enhanced by showing an example signed request with a given KeyID and secret and the calculated signature to allow a check of the signing algorithm when using those inputs.
Could you give me some details regarding the signature?
I am having problems generating it. I tried to use Python and I have no idea what am I doing wrong.