Configuring the compilation
Use the Compilation settings node in the API Designer's definition tree view to configure the settings for compiling the API.
If you want to use code from other DLLs in your API code (for example, API files from other projects), you need to create an assembly reference so that the compiler recognizes these DLLs.
To create an assembly reference
-
Start the API Designer program.
-
In the menu bar, click View > Navigation.
-
Click API projects in the navigation.
-
In the tree structure, double-click the API project to be edited.
-
In the definition tree view, right-click the Compilation settings node.
-
In the context menu, click Assembly reference.
The Assembly reference node is added under this node.
-
In the definition tree view, click Assembly reference.
-
Click View > Node editor on the menu bar.
-
In the node editor view, enter the name of the assembly you wish to reference into the Referenced assembly field.
-
In the menu bar, click (Save).
Related topics
Implementing your own APIs
Implementing your own APIs
To implement your own APIs, you can create API plugins.
The API Server loads all DLLs matching the *.CompositionApi.Server.PlugIn.dll naming scheme and deploys the API definitions contained therein.
To implement your own API
-
Create an API plugin (see Creating and editing API plugins).
-
Compile the appropriate TypeScript API client (see Compiling TypeScript API clients).
Detailed information about this topic
Creating and editing API plugins
With the help of API plugins, you can implement and use your customized APIs.
You can also convert existing API projects that you have created with the API Designer into API plugins (see Converting API projects to API plugins).
Prerequisites:
-
You use a version management system (for example, Git).
-
You are use an Integrated Development Environment (IDE).
To create an API plugin
-
Start your IDE (such as Visual Studio).
-
Create a new .NET Framework 4.8 project named CCC.CompositionApi.Server.Plugin.
-
Add references to the following DLL files from the One Identity Manager installation directory:
-
Create the API code.
-
Compile the DLL file in your IDE.
-
Import the DLL file into your One Identity Manager database using the Software Loader and assign it to the API Server machine role. For more information on importing files using the Software Loader, see the One Identity Manager Operational Guide.
-
Restart the API Server and ensure that the CCC.CompositionApi.Server.Plugin.dll file is present.
To edit an existing API plugin
-
Start your IDE (such as Visual Studio).
-
Open the existing .NET Framework 4.8 project.
-
Edit the API code.
-
Compile the DLL file in your IDE.
-
Import the DLL file into your One Identity Manager database using the Software Loader and assign it to the API Server machine role. For more information on importing files using the Software Loader, see the One Identity Manager Operational Guide.
-
Restart the API Server and ensure that the CCC.CompositionApi.Server.Plugin.dll file is present.
Converting API projects to API plugins
You can convert API projects that you have created with the API Designer to API plugins. To do this, you must import the API project's code as C# code into an API file, then delete the API project and create a new API plug-in with the code from the new API file.
To convert an API project to an API plugin
-
Start the API Designer program.
-
In the menu bar, click View > Navigation.
-
In the navigation, click API projects.
-
In the hierarchy, double-click the API project you want to convert.
-
Click Generated code.
-
Copy the entire code to clipboard.
-
In the menu bar, click View > Navigation.
-
In the navigation, click API files.
-
Click Add > Add API file.
-
In the new window paste the code from the clipboard.
-
In the Identifier field, enter a name for the API file.
-
On the toolbar, click (Save).
-
Delete the API project (see Deleting API projects).
-
Create the API plugin using the code from the newly created API file (see Creating and editing API plugins).