where did you check? I thought this has been there since 7.1. Anyway, I checked the 7.1.6 source code, it is there. Load-DataPage is another way of doing it as described by Lee below. Inside it calls the API quoted above.
Call what from a Function - Activity or the loadAsyncDeclarativePage API directly?
I am in 7.1.9 and do not see "loadAsyncDeclarativePage" within the Pega Engine API Index.
There are literally tons of examples showing "doActivity" being called.
Do an "All Content Contains" search for "doActivity" then click "Show results in new window".
In an Activity java step the middle doActivity() argument is implicitly "myStepPage" but if there is no dependency on step page the middle argument can be null - similar to the difference between calling an instance method vs a static method.
Within a Function's Java code you can derive the current step page using tools.getStepPage().
When multiple Data Pages are sourced to a Connector and wanting to wait for those connectors to complete you would use a Load-DataPage step for each Connector-sourced Data Page followed by a Connect-Wait step.
PublicAPI.findPage works on Data Pages also, if its a parametised Data Page, you would fill a parameter page and pass it to te find Page method.
So for instance, D_SomeDataPage[FirstParameter: "Something"] would be called in a function somewhat like below (Not field tested, though taken from a similar function).
PublicAPI tools = ThreadContainer.get().getPublicAPI();
//create a Parameter Page for the DP
ParameterPage pp = new ParameterPage();
//set the DP Name
String pageToFind = "D_SomeDataPage";
//Put the params on
//Find the DataPage (specific data page find is an internal Pega API, we should use the OOTB)
ClipboardPage newDeclarePage = tools.findPage(pageToFind, pp, true);
I'd assumed the question was asking how to get access to the data page from within a function, in which case using findPage would give you the Data Page and allow the load management options dictate whether it needs refreshing or not.
Unless there's a specific need to reload rather than load the Data Page I (personally) wouldn't manually flush a Data Page merely to load it.