立即与支持人员聊天
与支持团队交流

Identity Manager 9.2 - API Development Guide

Compiling TypeScript API clients

After you create an API plug-in, you need to compile a corresponding TypeScript API client.

To compile a TypeScript API client

  1. Open a command line interface (for example, Windows Powershell).

  2. In the command line program, go to the One Identity Manager installation directory.

  3. Run the ImxClient's start-update command (see start-update).

    Example

    imxclient start-update
  4. Run the ImxClient's compile-api command (see compile-api).

    Example

    imxclient compile-api /copyapi imx-api-ccc.tgz /packagename imx-api-ccc

    The dialog to select the database connection is opened.

  5. In the dialog, perform one of the following actions:

    • to use an existing connection to the One Identity Manager database, select it in the Select a database connection menu.

      - OR -

    • to create a new connection to the One Identity Manager database, click Add new connection and enter a new connection.

  6. Select the authentication method and, under Authentication method, enter the login data for the database.

  7. Click Log in.

  8. Import the imx-api-ccc npm package into your TypeScript application.

    TIP: (Optional) If you want to use another name for the imx-api-ccc packet, extend the remove-local-packages.js by adding a line for the packet in the list. This ensures that your package is not included in package locking and is always updated from the local source.

  9. Copy the imx-api-ccc.tgz to the bin\imxweb subfolder of your IIS installation.

  10. Import the TGZ file into your One Identity Manager database using the Software Loader and assign it to the Business API Server machine role. For more information on importing files using the Software Loader, see the One Identity Manager Operational Guide.

  11. Restart the API Server and ensure that the imx-api-ccc.tgz file is in the bin\imxweb folder of your IIS installation.

Related topics

Adding APIs to One Identity API projects

You can add your own APIs to One Identity API projects to add customized functionality to One Identity HTML applications. To do this, create an API plug-in, define the API in it and assign the corresponding One Identity API project to the API plug-in.

To add an API to a One Identity API project

  1. Create or edit an API plug-in (see Creating API plug-ins or Editing API plug-ins) and proceed as follows:

    1. Create a new class in the API plug-in project. This class represents the so-called API provider.

    2. Declare the class with the interface that belongs to the API project you want to add your API to.

      The following One Identity API projects can be added:

      Table 1: Supplied API project

      HTML application name

      API project name Interface to implement

      Web Portal

      portal IApiProviderFor<QER.CompositionApi.Portal.PortalApiProject>

      Operations Support Web Portal

      opsupport IApiProviderFor<QBM.CompositionApi.Operations.OperationsApiProject>

      Administration portal

      admin IApiProviderFor<QBM.CompositionApi.AdminApi.AdminApiProject>

      Password Reset Portal

      passwordreset IApiProviderFor<QER.CompositionApi.Password.PasswordPortalApiProject>
    3. Implement the Build method of the IApiProviderFor interface with the desired API functionality.

      Example
      1
          public class ExampleApi : IApiProviderFor<QER.CompositionApi.Portal.PortalApiProject>
      2
       
      3
          {
      4
              public void Build(IApiBuilder builder)
      5
              {
      6
                  builder.AddMethod(Method.Define("example")
      7
                      .AllowUnauthenticated()
      8
                      .HandleGet(qr => new DataObject { Message = "Hello world!" }));
      9
              }
      10
          }

Creating API projects

You can create your own API projects to add customized functionality to One Identity HTML applications. To do this, copy the CustomApiProject sample API project (see Examples and help – Software Development Kit), customize it as required, and assign it to an API plug-in.

To create your own API project

  1. Copy the CustomApiProject sample API project.

  2. Make changes to the copied API project as required.

  3. Create an API plug-in (see Creating API plug-ins) and proceed as follows:

    • In the API plug-in project, create a new class that implements the IApiProviderFor<name of your API project> interface. This class represents the so-called API provider.

Adding APIs to your own API projects

You can add more APIs to your own API projects.

To add an API to your API project

  1. Edit the API plug-in (see Editing API plug-ins) associated with the API project and proceed as follows:

    • In the API plug-in project, create a new class that implements the IApiProviderFor<name of your API project> interface. This class represents the so-called API provider.

相关文档

The document was helpful.

选择评级

I easily found the information I needed.

选择评级