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
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
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
Best,
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
-M
Yes, we recently added a list of domain names associated with the app.
Thanks,
Pedro
-Morten