Custom Angular API for triggering a process

I'd like to trigger a process through a press of a button on 9.2.x Angular portal. I've checked API documentation but can't seem to find the correct API for my need.
Do any APIs like this already exist that I might have overlooked? If no, would you recommend that I write a custom API or do you have any other viable solutions?

  • Hello  
    any luck about this Issue/ question?
    I would like to know if you got it and how...

    Thank you in advance.

    BR Fermin

  • I'm not sure if it is the most correct way of doing it, and I have not tested it, but it should work:


    You could write an script based on this example from the OIM installation source: "OneIdentityManager.9.2.2\Modules\QBM\dvd\AddOn\SDK\ScriptSamples\03 Using database objects\10 Generate events.vb". You also need to add the appropriate rights to run this script.


    Then make a custom API, to call this script from the Angular portal. Look at the "Calling a script" chapter in this API dokumentation on GitHub: https://github.com/OneIdentity/IdentityManager.ApiSdk/blob/v93/doc/04-runtime-api.md

    Maybe this can help you on the way?

  • Hi  
    thank you very much for your fast answer.
    I´ll try it out and let you know how it was.

    BR
    Fermín

  • I was also looking for a way to trigger a process.

    First found this 
    To generate an event for an entity, use the URL <baseURL>/api/entity/{table}/{uid}/event/{eventName}.
    NOTE: The authenticated user must be entitled to use the program function Allow to trigger any events from the frontend in order to call an event on an entity.

    My second option .GenerateAsync (not publicly documented afaik?) testcode so far I haven't tried it yet
    Wanted to see if this option works without having the authenticated user be assigned to the program feature with the event: QBMEventHasFeature

      PortalApiProject>, IApiProvider
      {
        public void Build(IApiBuilder builder)
        {
          builder.AddMethod((IMethod) Method.Define("processautomation/checksomething").WithDescription<IMethod>("Starts the process checksomething").Handle("POST", (Func<IRequest, CancellationToken, Task>) (async (request, ct) =>
          {
            IEntity entity = await request.Session.Source().GetAsync(Query.From((IDbObjectKey) new DbObjectKey("DialogDatabase", "2C8487D522234560BF2F89BB6FBF20DC")).SelectAll(), EntityLoadType.Interactive, ct).ConfigureAwait(false);
            using (IUnitOfWork u = request.Session.StartUnitOfWork())
            {
              await u.GenerateAsync(entity, "CHECKSOMETHING", cancellationToken: ct).ConfigureAwait(false);
              await u.CommitAsync(ct).ConfigureAwait(false);
            }
          })));
        }
      }
    }