There is no simple solution since your app needs to make async call before it is properly initialized.
There are several solutions.
Inject required data into main template of the app. Let's say you have a template index.html, which is served by your backend and where all scripts are included. Your backend could include one more script with your api functions. When you think of it, your api in the production code will not change frequently, therefore issuing a call for api functions everytime app starts does not make sense. Instead, you maintain a static .json or .js file with your apis and include it in the html itself. Function names would be ready at app boot time.
Make async call in .config or .run block of your app delaying all normal operations until api function list is fetched. This is maintenance nightmare because every single operation with api must first check a boolean flag or listen for event or depend on promise to be sure api function list is ready.
Using angular routing mechanisms (I prefer ui-state module), define top-level/root/main route or state that is initialized on "/" location and add api function call as it's dependency in resolve list.
I'm not really sure if this is possible with generic routes, but with states you could do something like this:
.config(['$stateProvider'], function($stateProvider) {
$stateProvider.state('main', {
resolve: {
apis: ['APIService', function(APIService) {
return APIService.getApis();
}]
}
}).state('someState', {
parent: 'main',
...
})
...
})
All other states would depend on 'main' and none of them would be initialized before your api functions list is ready.