The customer wants the ability to add an API to all the existing applications. If so, the only way to do this currently, without running a SQL query, is to have an API Group in each application then add the new API to the API Group.
The SQL query to do it is as follows:
insert into lrsapikey (orgid, enabled, planid, serviceUUID, appId, status, standalone);
select orgId, 1, (select planid from lrsapikey where appId = app.appId limit 1), '{SERVICEUUID}', appId, 1, 1
from lrsapplication app;
Where '{SERVICEUUID}' is the API Id of the API. '45703630-4014-455b-a231-ba1fce92af90' for example.
This query will set the API Plan from one of the existing APIs within the application.
After the query is run, you will need to execute the 'Sync API Keys' function of the 'CA Gateway' plugin.
This will update the Gateway's API key information.