Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
remi_astier
Product and Topic Expert
Product and Topic Expert
1,266
You might be in a situation where a colleague has published an application and has not committed the source in a repository so it's running all right, but you might not know exactly what's running 🙂

Here's one way to solve the issue:
Start by logging into cloud foundry using the command line.







cf login --sso

API endpoint: https://api.cf.eu20.hana.ondemand.com
Temporary Authentication Code ( Get one at https://login.cf.eu20.hana.ondemand.com/passcode 😞
Authenticating...
OK


Then navigate to the cloud foundry target organization and space using cf target
Locate the application or hdi container for which you'd like the source code and execute:







cf app your_app_name --guid

040b4e07-8fd2-4294-ab84-5328e5b73891


Finally, use the guid of your application to download the sources into a .tgz







cf curl -X GET /v2/apps/your_app_guid/download --output your_app_name.droplet.tgz



And voila ! The tgz will contain the source code and possibly dependent libraries so you might want to delete the dependency folder such as node_modules.
2 Comments