Composition API | Getting Started?

Hi there,

after creating a new solution, compiling and running it on the Self-hosted API server, I expected to be able to call the standard QBM_ApiServerAdmin or QBM_OperationsSupport resources. Although the Start point http://localhost:8182/ works, all my shoots to find the standard projects delivered 404.

I also tried a custom project with the sames results.

How are the resulting resources structured? Is it possible to have an overview? Where is the Postman and Swagger OpenAPI implementation mentioned in the documentation?

How can I see which API is currently running (from Project File vs Database)?

When working on a project, where do I see which compilation branch is currently being modified?

Thank you in advance

Parents
  • Hi Jose,

    Open a browser on http://localhost:8182/swagger/ui/index.html?url=/swagger/swagger.json to access the built-in Swagger UI. You can use that to test basic functionality of the API server.

    Postman is a seperate tool, not included in Identity Manager, that you can use to make calls to the API server. On the Modules\QBM\dvd\AddOn\ApiSamples\Sdk06_ClientJson folder of the installation set, you will find a JSON file that you can import into Postman to make some sample requests.

    The distinction of "Project file" vs. "database" API definitions is purely a compile-time setting, and there is currently no way to tell at runtime which setting was active at compile time.

    The compilation branch setting is only relevant when reading/writing a compiled API DLL from/to the database.

    Hope this helps,
    Hanno

  • Where is the Modules\QBM\dvd\AddOn\ApiSamples\Sdk06_ClientJson folder located? I am having trouble with authenticating through postman and using the other GET methods after. I have a few questions:

    - Is this link the authentication request url: http://localhost:8182/imx/login/admin?

    - Are there examples or documentation of making your own custom API project?

  • Please check your product delivery. The complete path is <OneIM Product Delivery>\Modules\QBM\dvd\AddOn\ApiSamples\Sdk06_ClientJson

    There is a readme file explaining how to use this sample project <OneIM>\Modules\QBM\dvd\AddOn\ApiSamples\readme.md

  • I found the folder path, I tried running the project in visual studios but when I run the debugger, I get this error:

    Severity

    Code

    Description

    Project

    File

    Line

    Suppression State

    Error

    CS0234

    The type or namespace name 'ApiManager' does not exist in the namespace 'QBM.CompositionApi' (are you missing an assembly reference?)

    ApiSamples

    E:\Software\One Identity\OneIM8.1.2\OneIM8.1SP2\Modules\QBM\dvd\AddOn\ApiSamples\Sdk01_Basics\06-RequestValidation.cs

    29

    Active

    I did redirect the path to imxclient.exe according to the readme.md but it didn't work either. Do you have any suggestions?

    I also still can't authenticate using Postman, the readme.md does not specify how I can authenticate to the API Server. I used the documentation provided in the package after installing One Identity and that doesn't have information on authentication either.

Reply
  • I found the folder path, I tried running the project in visual studios but when I run the debugger, I get this error:

    Severity

    Code

    Description

    Project

    File

    Line

    Suppression State

    Error

    CS0234

    The type or namespace name 'ApiManager' does not exist in the namespace 'QBM.CompositionApi' (are you missing an assembly reference?)

    ApiSamples

    E:\Software\One Identity\OneIM8.1.2\OneIM8.1SP2\Modules\QBM\dvd\AddOn\ApiSamples\Sdk01_Basics\06-RequestValidation.cs

    29

    Active

    I did redirect the path to imxclient.exe according to the readme.md but it didn't work either. Do you have any suggestions?

    I also still can't authenticate using Postman, the readme.md does not specify how I can authenticate to the API Server. I used the documentation provided in the package after installing One Identity and that doesn't have information on authentication either.

Children
  • Hi,

    Have you configured reference paths in Visual Studio? By default it points to the current user's program files, but of course a different version may be installed there. Unfortunately we cannot ship the project with relative paths, so we have to make a best guess.

    Take a look at the project properties and configure the path to use the 8.1.2 assemblies if necessary.

    Regarding authentication, take a look at the login method imx/login/apisamples . Replace the user name and password in the sample call with credentials that work for your database.

  • I did that yesterday and it did work. I mapped the references. I have question about the SystemDebugger. I was able to get it to run but none of the .vb files that says "This file will be filled from the SystemDebugger.exe automatically after the first start." actually automatically fill out. Am I supposed to do anything else?

  • Okay, it turns out the script directory was pointing to the wrong path.

  • For the custom API Server, is there a way to generate an API Key for access to the server?