Re: Accessing CF Org in startup script

Vinod Singh <vinoddandy@...>

Thanks for prompt response, Daniel.

Actually, org/space info is needed outside my application. I can get
org/space inside my app using CF APIs. But I need org/info outside app in
my startup script (inside Procfile) which will be executed before running
my app. Is there any possibility to get org/info in my startup script ? I
do not want to hard code in app's manifest.yml file.

Making sense ?


On Wed, Oct 12, 2016 at 9:08 AM, Daniel Jones <
daniel.jones(a)> wrote:

Hi Vinod,

Is it correct to assume that your app needs to know the org and space it
is in? If so, you will need to either set these manually using `cf set-env
appname SPACE_NAME my-space`, or you can use the CloudController API
<> to look up the name of the space
from the space_id field in VCAP_APPLICATION

Daniel Jones - CTO
+44 (0)79 8000 9153
@DanielJonesEB <>
*EngineerBetter* Ltd <> - UK Cloud Foundry

On Wed, Oct 12, 2016 at 2:12 PM, Vinod Singh <vinoddandy(a)> wrote:


I need to access user's org before running the app on CF.

In my script, I am trying to access using $SPACE_NAME but it is not
working. Any suggestion please.

Again, please note that I need space info before starting of my


Join { to automatically receive all group messages.