I would like to know if it is possible to later update the environment variables an app gets set when the addon is provisioned.
We would like to enable transfer of services to other machines and right now we have to transparently map hostnames via DNS and have to share ports over a range of servers to enable that feature. We would like to be able to simply update a users addon-variables.
Thanks a lot
Michael Hunger
Best,
-Morten
Sent from my iPad
Thanks for any pointers on the format for POSTing to the callback URL.
Michael
Am 03.11.2011 um 15:40 schrieb thoma...@atns.de:
> hi morten & kowsik,
>
> thank you for the answer, but can you get a bit more specific please:
>
> the callback_url i get from
>
> ## curl https://neo4j:$PA...@api.heroku.com/vendor/apps/36a30e299
> {"callback_url":"https://api.heroku.com/vendor/apps/app632672%40heroku.com","owner_email":"thoma...@atns.de","name":"furious-fog-653","domains":["furious-fog-653.heroku.com"],"id":"app6...@heroku.com","config":{"NEO4J_REST_URL":"http://3225308b5:3bee...@server1.hosted.neo4j.org:7004/db/data","NEO4J_URL":"http://3225308b5:3bee...@server1.hosted.neo4j.org:7004","NEO4J_PASSWORD":"3bee2abb8","NEO4J_LOGIN":"3225308b5","NEO4J_HOST":"server1.hosted.neo4j.org","NEO4J_PORT":"7004","NEO4J_INSTANCE":"36a30e299"}}
>
>
> what should i post back?
>
> ## curl -XPOST -d '{"callback_url":"https://api.heroku.com/vendor/apps/app632672%40heroku.com","owner_email":"thoma...@atns.de","name":"furious-fog-653","domains":["furious-fog-653.heroku.com"],"id":"app6...@heroku.com","config":{"NEO4J_REST_URL":"http://3225308b5:3bee...@server1.hosted.neo4j.org:7004/db/data","NEO4J_URL":"http://3225308b5:3bee...@server1.hosted.neo4j.org:7004","NEO4J_PASSWORD":"3bee2abb8","NEO4J_LOGIN":"3225308b5","NEO4J_HOST":"server1.hosted.neo4j.org","NEO4J_PORT":"7004","NEO4J_INSTANCE":"36a30e299"}}' https://neo4j:$PA...@api.heroku.com/vendor/apps/36a30e299
> ... gives a
>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
> ....
> <h2>Page Not Found</h2>
> <p class="panel-body">Sorry champ, no luck at that URL. Cut-and-paste error, maybe?</p>
> ....
> </html>
>
>
>
> thanks!
>
> thomas
>
>
>
> Am 03.11.2011 um 03:20 schrieb kowsik:
>
>> You can use the callback_url to POST new configs whenever you want.
>> This will update the config vars and also restart the apps that have
>> your addons.
>>
>> K.
>> ---
>> http://blitz.io
>> @pcapr
put uri,
:body => JSON.dump(:config => config),
:basic_auth => authentication
uri is the callback_url for the given app/client, config is a hash of env vars and values, and authentication is a hash of :username and :password with your add-on's username and password.
--
Pat
is it safe to store the information that is returned by the heroku-api callbacks?
Or which part is immutable for the lifetime of an application and can be safely stored?
Thanks
Michael
-M
K.
---
http://blitz.io
@pcapr