Getting Started with the API
Scalr Command Line Tools
Scalr provides a set of command line tools that you can use to access the Scalr API.
Scalr has a library of API examples hosted on Github, you will find API examples for:
Endpoint for API Calls
If you are using Scalr Open Source or Scalr Enterprise, use the following endpoint when performing API Calls in Scalr Enterprise and Scalr Open Source installations:
SCALR_URL is an URL at which your Scalr installation is reachable.
If you are using Hosted Scalr, use the default.
Common Request Parameters
All Query operations share a set of common parameters that must be present in each call:
Indicates the action to perform.
The KeyID for the request sender. You can get it on 'Settings -> Environments -> [Edit environment]' page
The date and time at which the request is signed, in the format YYYY-MM-DDThh:mm:ssZ. For more information, go to ISO 8601 (http://www.w3.org/TR/NOTE-datetime).
The request signature. To learn how to compute the signature, see this page.
The API version to use.
Environment id to perform action within. To be used when a user has access more than to one Environment.
If omitted, the user's first environment (the one with the lowest ID) is assumed.
Indicates auth version. You should always use: 3
Common Response Parameters
The Transaction ID
In 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.
Error conditions in API Calls
When an error occurs during an API Call, the response will include a single
Error element (including for authentication errors).
The Error Element has a
Message attribute that details the Error that occurred.
The Current API Version is 2.3.0 (Added 8 new methods for deployment process)
2.2.0 (Minor improvements and fixes)
2.1.0 (Added methods for working with apache vhosts)
Please be mindful that the Scalr 1.X API is not compatible with later versions. This page is provided to help existing installations of Scalr.
2010-02-25 (added GetStatisticsGraphURL method)
2009-10-06 (contains minor improvements and various bugfixes)
2009-08-14 (added GetEvents, GetLogs, GetScriptDetails, RebootInstance methods. Added an ability to execute script with specified revision and arguments)
2009-08-04 (added the ListDNSZones, AddDNSZoneRecord, RemoveDNSZoneRecord, ListDNSZoneRecords methods)
2009-07-07 (added the TerminateInstance, LaunchInstance, GetFarmDetails methods)