The API can be used to build tools or services around Beanstalk account information. You can enable API access in your account settings. You need to be an account owner to do so.
Beanstalk uses REST methodology for its API. Supported output formats are JSON and XML, but we recommend to use JSON at all times. All request have to be made via HTTPS.
Beanstalk API is using basic HTTP authentication. Since all requests are made through HTTPS it doesn’t pose any security risks. Simply use the same login and password for API that you use for the web interface.
Failure to use the following headers can result in API errors.
Make sure to include the following HTTP headers with every request you make to the API:
Content-Typewith either “application/xml” or “application/json”.
User-Agentwith a name of your app.
Beanstalk provides a Ruby gem (wrapper for
ActiveResource) that will make your work with the API easier.
Please let us know if you write a library in any other languages so we can post it for others.
For more information about the wrapper go to the Ruby Gem page.
We’re looking for help with other language libraries. Please email us if you are interested.
Each available Beanstalk resource has its own page on this site. That page contains all the information you need in order to start working with the resource, including descriptions of each API method available. For each API method we include three blocks of code as working examples. The first block of code illustrates how to utilize the method using the raw HTTP requests; the second block shows a sample response to that request; the third block shows how to use the Ruby gem provided by Beanstalk for that method (if available).
When you see code like this:
It means sending a GET request to a HTTPS URL