cancel
Showing results for 
Search instead for 
Did you mean: 

HCP - multitenant application - how to fetch list of accounts subscribing

Karthik-Thiru
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello All,

I am developing a multitenant Java application which would be hosted in one provider acoount and multiple accounts would be subscribing to this java application. My requirement is to find the list of accounts subscribing to my java application.

There is a console client command : list-subscribed-accounts to fetch this information but I want to fetch this information programmatically within my java application.

I have checked the com.sap.cloud.account api as well but could not find anything that serves this requirement. Is there any other API ?

Thanks,

Karthik

View Entire Topic
johannes_hoenger
Explorer
0 Kudos

Hi Karthik,

not quiet sure about your exact requirements, but my first idea would be to utilize the Tenant Context API. Especially the method getSubscribedTenants() should be interesting for your use case.

Please refer to SAP HANA Cloud Platform documentation for more details.

BR,

Johannes

Karthik-Thiru
Product and Topic Expert
Product and Topic Expert
0 Kudos

Thanks Johannes,

This was really helpful. I dont know how I missed to see this method.

My requirement was to get the list of account names that have subscribed to my java application. getSubscribedTenants() returns list of Tenants and getAccount() within the Tenant class returns all the account information.

The api documnetation is here TenantContext (SAP HANA Cloud Platform SDK) 

Thanks,

Karthik