Calling APIs from Defined Programs

If you develop and run a Program that calls an API within Oracle LSH—that is, in the defined Source Code of a defined Program object—no security is required beyond normal Oracle LSH object security. You do not need Execute privileges on the CDR_PUB_API_INITIALIZATION API, and you do not need to enable APIs in your Program code.

Note:

Within Oracle LSH, the calls to CDR_PUB_API_INITIALIZATION are unnecessary and in fact a program that includes such a call will not compile because the Work Area schema does not have Execute privileges on CDR_PUB_API_INITIALIZATION.

You do need to install the Program before you can run it, as you do any defined Program in Oracle LSH.

You can write packages in an Oracle LSH Program that do anything with APIs that you could do in a package outside Oracle LSH. For example, you could create an instance of a Program definition whose Source Code created a Work Area, several Load Sets, and a Program to merge the data, instead of defining the Work Area, Load Sets and Program through the Oracle LSH user interface.