Chat now with support
Chat with Support

Identity Manager 9.1.2 - API Development Guide

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.

ImxClient command line program

You can use the ImxClient command line tool to run different functions for managing the API Server and files on the command line.

Detailed information about this topic
Related Documents

The document was helpful.

Select Rating

I easily found the information I needed.

Select Rating