Heroku REST API – 有没有?

有一个Heroku的API,允许我扩大和缩小我的dynos程序化等?

我已经findAPI文档的链接,但它似乎不存在了。

谢谢

此链接适用于API。 对于自动缩放,我们使用了hirefire 。 这是一个托pipe的服务,比起开源的gem更有能力。

Heroku的gem允许你轻松地添加和删除过程。

gem“heroku”

你可以创build一个ruby客户端,可以设置工作人员或dynos的数量等

client = Heroku::Client.new(username, password) client.list # provides a list of heroku apps client.info(app) # provides info on the particular app, including dynos and workers client.workers(app) # returns the number of workers currently running for the app client.set_workers(app, qty) # sets the number of workers for the app client.dynos(app) # returns the number of dynos currently running for the app client.set_dynos(app, qty) # sets the number of dynos 

基本上,任何你可以从命令行上做的事情,你都可以用gem来做。

详情请参阅https://github.com/heroku/heroku/blob/master/lib/heroku/client.rb

看来Heroku :: Client现在已经被弃用了。 heroku-apigem有你需要的能力。 https://github.com/heroku/heroku.rb

我不确定是否有任何logging,但是heroku gem本身会通过REST与他们的API进行交stream,所以你可以在里面find一个高峰。

Heroku中有自动缩放的gem,我还看到了其他一些例子,你可以将Heroku的gem包含到自己的应用程序中,以便能够连接到他们的API,而不用过多地涉及它的内容。