cancel
Showing results for 
Search instead for 
Did you mean: 

Getting organizational informations (Subaccount-Id, -Name, Org-Id,...) in an cap application

haykma
Participant
0 Kudos

Hi everybody,

i would like to know if there is an easy way (or a btp-service) to get organizational information about subaccount-id, name, organisation, space, etc.) where my cap-app (NodeJs) is deployed on (cloud foundry).

kind regards
Matthias

Accepted Solutions (0)

Answers (2)

Answers (2)

jreimann
Participant

Hi mhay,

You can call

JSON.parse(process.env.VCAP_APPLICATION)

to get the information.

Kind regards
Johannes

haykma
Participant
0 Kudos

Hi. Found cfenv npm-module as a good alternative. It samples data from VCAP_APPLICATION and other data.

yogananda
Product and Topic Expert
Product and Topic Expert

mhay

yes, possible.. you can use v3 api of cloud foundry and you can use it in destination. Call the destination endpoint in CAP App.

https://v3-apidocs.cloudfoundry.org/version/3.102.0/index.html#organizations

haykma
Participant
0 Kudos

Will have a look at it. Thx. Looks good.