Announcing Scalingo API: control our Platform as a Service programatically

February 20, 2015 - 5 min read
Announcing Scalingo API: control our Platform as a Service programatically

From the beginning we thought Scalingo as a platform , in the sense of a place which gathers several entities: application developers, add-ons developers, service companies, web shops. Of course, every well-born platform must have a public API.

image Of course, we’re eating our own dog food. This API is used by [our dashboard](https://my.scalingo.com/) (an EmberJS app) and our [Command Line Interface client](http://cli.scalingo.com/) (written in Go). But today, we’re enveiling Scalingo API documentation available at [developers.scalingo.com](http://developers.scalingo.com/). image

This API enables third-party developers to control the entire Scalingo’s platform. We already envisage several scenarios which could be leveraged thanks to our API.

Scenario 1: automatic scaling tailored to your needs

With our API, you can increase or decrease the number of containers of your application. Imagine your super fancy startup got some media attention and a report will be broacasted on TV sunday night. Because you know your application better than anyone, you can use our API to change dynamically (and instantly) the number of web containers. You won’t fear slowness of your product anymore, all the web traffic will be absorbed. When the television show has ended, the load will decrease and then, you can use our API to decrease the number of containers required by your application, and in the meantime, your expenses.

Because you can manipulate the number of containers of any type, you can also change dynamically your worker containers which handle asynchronous jobs. For instance, you could write some code to increase the amount of containers when the number of jobs enqueued is more than 20.

Bonus point: combine an analytics API like Newrelic and Scalingo’s API to adapt the number of containers regarding to CPU or memory load.

Scenario 2: building a SaaS on top of Scalingo

Thanks to the API, you can add or remove dynamically web domains for your applications. As example, imagine you’re selling an e-commerce platform for restaurants. You have one big web app that responds to several URLs like www.pizzanino.com, www.tapasespana.com and www.frenchbakery.com. Every time a new customer arrive on your platform he can specify his own custom URL for his account on your SaaS platform. When this happen, you can use Scalingo’s API to declare this new domain and the application became instantly available.

Bonus point: use a registrar API to automatically book a domain name, declare a CNAME pointing to scalingo.io and then declare this domain name in Scalingo’s platform using it’s API.

And of course, there’s many more scenarios than can be fullfiled with our API.

As usual, we’re keen on hearing your feedback on the API and its documentation.

Share the article
Yann Klis
Yann Klis
Yann Klis co-founded Scalingo. Scalingo's vision is to offer a european sovereign cloud housting platform for developers. Today Scalingo hosts thousands of web applications from customers located all over the world. Before that Yann founded Novelys a web studio specialised in Ruby on Rails technology.

Try Scalingo for free

30-day free trial / No credit card required / Hosted in Europe