Get portal id from Rollbase

Posted by ionacaerex on 18-Nov-2016 04:17

Hi everyone,

I'm trying to get from Rollbase a list of all my portal created. But I'm not able to get this because "PORTAL" is not an object?

Is there any solutions with that? Thank you

All Replies

Posted by Shiva Duriseati on 05-Dec-2016 05:37

Hi ,

As on today there is no such API or method to list all the portals. However if you are on private cloud please enable custom trigger and add following code to trigger method in RuntimeTrigger class.

For a test I have printed all the portals on console.

 

@Override

public void trigger(TriggerRunner runner) throws Exception {

List<WebSite> portals =  WebSiteHandler.getPortals(runner.getCustomer());

Iterator<WebSite> listOfPortals=portals.iterator();

System.out.println("*********List of all portals**************");

while(it.hasNext()){

//System.out.println(it.next());

}}

For more information on Custom Trigger please see attached document.

[View:/cfs-file/__key/communityserver-discussions-components-files/25/DevelopmentGuide.docx:320:240]

Regards,

Shiva

This thread is closed