New API call: Get App Info

74 views
Skip to first unread message

Morten Bagai

unread,
Feb 7, 2011, 8:21:11 PM2/7/11
to heroku-add-...@googlegroups.com
Dear Add-on Providers,

We've got a new addition to the Add-on API to share with you. If you've ever needed to get user info for a particular instance of your add-on, you're going to find this useful. Here are the details:

==== Get App Info ========

GET api.heroku.com/vendor/apps/:provider_id

Provider ID: this is the id provided by your service to Heroku on provisioning.

Returns: name (heroku app name), config (config var hash), callback_url (url for async updates of config vars), owner_email (real email of owner).

======================

Here's an example:

require 'json'
require 'rest-client'

JSON.parse(RestClient::Resource.new('https://api.heroku.com', 'myaddon', 'wasspord')['/vendor/apps/12345'].get)

=> {"name"=>"myapp", "config"=>{"MYADDON_URL"=>"http://myaddon.com/5f06ce0f2fb0603ff1698d52e82f5d73"}, "callback_url"=>"https://api.heroku.com/vendor/apps/1234", "owner_email"=>"mor...@heroku.com"}

Give it a go, and let us know what you think.

Best,

-Morten

Michael Hunger

unread,
Feb 7, 2011, 8:36:53 PM2/7/11
to heroku-add-...@googlegroups.com
Morten,

could you specify the necessary auth information?

I tried that with my heroku account-id == email address and its password but still got an Access Denied. Could that be because our addon is still in the alpha testing phase?

Thanks

Michael

Pat Allan

unread,
Feb 7, 2011, 8:38:41 PM2/7/11
to heroku-add-...@googlegroups.com
Hi Morten

I'm guessing this doesn't work for add-ons in alpha? :) I get 'App addon not found'.

No worries, with a bit of luck, I think I'll be wrapping up alpha testing on Flying Sphinx by the end of the week.

Cheers

--
Pat

Morten Bagai

unread,
Feb 7, 2011, 8:44:58 PM2/7/11
to heroku-add-...@googlegroups.com
It should work for add-ons in alpha, but the creds you need to use are your provider API credentials. So, the id of your add-on (ie. flying_sphinx) and the API password that's in the manifest you pushed. Remember, with the latest version of kensa you can also pull the latest Heroku copy of your manifest (kensa pull youraddonname).

Best,

Morten

Michael Hunger

unread,
Feb 7, 2011, 8:51:36 PM2/7/11
to heroku-add-...@googlegroups.com
Thanks Morten,

works like a charm :)

Is there also an API call for retrieving all addon-ids provided to a certain user or app? (i.e. the other way round).

So if a user calls the provider to help him with his addon instance and he doesn't have the addon-id (where would he get that one from) one could look that information up.

Cheers

Michael

Morten Bagai

unread,
Feb 7, 2011, 9:02:34 PM2/7/11
to heroku-add-...@googlegroups.com
There's not - yet. We do realize this is an important use case though, and should be supported soon.

-M

ono

unread,
Feb 19, 2011, 2:00:22 PM2/19/11
to Heroku Add-on Providers
Hi,

Can I get the URL of the Application using the API?

Thanks

ono

unread,
Feb 19, 2011, 2:00:35 PM2/19/11
to Heroku Add-on Providers
Hi,

Can I get the URL of the Application using the API?

Thanks

On Feb 8, 1:21 am, Morten Bagai <mor...@heroku.com> wrote:

Pedro Belo

unread,
Feb 19, 2011, 5:22:04 PM2/19/11
to heroku-add-...@googlegroups.com
Hi there,

Yes, we recently added a list of domain names associated with the app.

Thanks,
Pedro

Steve Smith

unread,
Feb 22, 2011, 4:48:12 PM2/22/11
to Heroku Add-on Providers
Just out of interest is this available just after provisioning? i.e.
could we make the call and use it to set the default target of the
CloudMailin system as part of the user creating the add-on.

Thanks,
Steve

Morten Bagai

unread,
Feb 22, 2011, 4:55:12 PM2/22/11
to heroku-add-...@googlegroups.com
I think it's available once you've passed your response from the provisioning call back to Heroku.

-Morten

Steve Smith

unread,
Feb 22, 2011, 4:57:07 PM2/22/11
to Heroku Add-on Providers
Thanks, I'll give it a go.
Reply all
Reply to author
Forward
0 new messages