get DialogConfigParm from API

Good morning, community,

I'm trying to retrieve the data from the DialogConfigParm table via the API to serve it to an Angular v9.3 portal, but I can't get it to work. I also tried extending the API with a plugin:

builder.AddMethod(
Method.Define("common/configparms")
.FromTable("DialogConfigParm")
.EnableRead()
.WithAllColumns());

I set the "Allow in wizard" field to true for the fields I'm interested in.

Does anyone have a working solution? What am I missing?

Thanks in advance,
A

Parents
  • Hi  , 

    Could you please detail what is not working on your case?

    FYI , tried the method in v9.3 to no success . I get not results at all:

    {
        "TotalCount": 0,
        "TableName": "DialogConfigParm",
        "Hierarchy": {
            "EntitiesWithHierarchy": []
        },
        "Entities": []
    }

    Following this post (being DialogConfigParm a hierarchical table) did not help either:

    www.oneidentity.com/.../compositions-api-handlegetbyquery-restricts-where-clause-when-accessing-dialogconfigparm-table

    , because the flag DisableHierarchicalData() has been deprecated.

    So , while we wait if some expert appears, my advice would be:

    1. Visit the api development github at https://github.com/OneIdentity/IdentityManager.ApiSdk/blob/v93/doc/02-entity-methods.md , there are examples that deal with hierarchical data but applied to FK and I find it difficult to adapt to your case.
    2. Create an issue there , asking for more info on the API and what alternatives can you use for that flag in newer versions.

    HtH!

  • Hi JuanCarlos,

    Thank you so much for your contribution. I also tried the same approach as you, but without success.
    I invested a lot of time into it, but no luck—the query on DialogConfigParm does not return anything, perhaps due to some missing permission.

    However, I noticed that:

    1. If you use an API that calls a script by passing the full path, the script can return the value via Connection.GetConfigParm(fullpath). In that case, it works. Of course, this is not suitable for retrieving lists of DialogConfigParm, but it’s a first step.

    2. Using Predefined SQL. At that point, I can do whatever I want, but the idea gives me chills.

    Unfortunately, due to time constraints and my inability to find other solutions or documentation, I think I will have to rely heavily on Predefined SQL.

    If you need the code, just ask, and I’ll be happy to share it.

    Thanks again,
    A

  • Hi, Alberto, 

    No thanks needed at all.

    Yes, the predefined SQL is a good option. In my case, I had to check some dialogconfiparm too and I solved it by calling a script from the api.  

    Well, each one of us found a good alternative, although I would like to stick to the api method but, alas, we are short of documentation.

    We will have to wait! Slight smile

    Have a great day.

  • **JuanCarlos,**
    Please allow me and forgive me if I take advantage of your patience once again.

    I desperately need to modify the behavior of an API:

    `...portal/shop/serviceitems/yyyyyyy-cac6-42f8-9cca-4119fdf357fb/dependencies?UID_Person=xxxxxxx-1ba7-4884-9732-0caecca31f287`

    The API returns an object like this:

    {
    "Display": "Hardware 1",
    "UidAccProduct": "da33240e-cac6-42f8-9cca-4119fdf357fb",
    "Optional": [
    {
    "Display": "Tablet",
    "UidAccProduct": "6c72c96c-8d8a-4684-995d-045974149125",
    "Optional": [],
    "Mandatory": []
    }
    ],
    "Mandatory": []
    }

    I need to have the API return the properties `ACCProduct.CustomProperty01` and `ACCProduct.CustomProperty02` within the `Optional` and `Mandatory` objects as well.

    Any ideas?

    Sorry again, but at this point, I’m jumping through so many hoops, I might qualify for the circus.

    Thanks,
    A

  • haha! I'm afraid I think this endpoint is doing this query (among others)  :

    select IsExcluded, IsMandatory, IsOptional, UID_AccProduct, UID_AccProductRelated, XDateInserted, XDateUpdated, XMarkedForDeletion, XObjectKey, XTouched, XUserInserted, XUserUpdated from AccProductDependencies where (AccProductDependencies.UID_AccProduct in ('XXXXX6407faa62a9b')) 

    , from AccProductDependencies, so no access to the CustomProperty01. It does query AccProduct but there's no simple way to customize the returned columns.

    You'll need to adapt your Angular code to query that column from AccProduct as well.

  • JuanCarlos,

    Thanks, this is pretty much the same conclusion I came to. It’s not a problem for me to retrieve additional properties from /portal/shop/serviceitems (there are at least a couple of ways to do it—one via Angular and Designer configuration, the other via API customization and Designer configuration).

    But I was hoping to use something like this:

    builder.ModifyQueryMethod("shop/serviceitems",
        method =>
        {
            method.WithResultColumns("CustomProperty01");
            method.WithResultColumns("CustomProperty02");
        });
    

    to also modify the objects returned by portal/shop/serviceitems/{uid}/dependencies?UID_Person=....

    So for now, it looks like the solution will require some kind of workaround.

    Thanks again... I owe you one!

    A

Reply
  • JuanCarlos,

    Thanks, this is pretty much the same conclusion I came to. It’s not a problem for me to retrieve additional properties from /portal/shop/serviceitems (there are at least a couple of ways to do it—one via Angular and Designer configuration, the other via API customization and Designer configuration).

    But I was hoping to use something like this:

    builder.ModifyQueryMethod("shop/serviceitems",
        method =>
        {
            method.WithResultColumns("CustomProperty01");
            method.WithResultColumns("CustomProperty02");
        });
    

    to also modify the objects returned by portal/shop/serviceitems/{uid}/dependencies?UID_Person=....

    So for now, it looks like the solution will require some kind of workaround.

    Thanks again... I owe you one!

    A

Children