UPDATE! The community will be go into read-only on April 19, 8am Pacific in preparation for migration on April 21. Read more.
UPDATE! The community will be go into read-only on April 19, 8am Pacific in preparation for migration on April 21.Read more.
Vice Admiral
Vice Admiral
481 views

4.7 REST API - create role/resource + entitlement

Hi,
I currently create roles and resources (+ entitlement value) out of existing code map values through the new REST API (as documented by idmappsdoc). This worked fine so far by using:


  1. /drivers/entitlementValues/list (ID = entitlement DN) - is getting a list of entitlement values per entitlement
  2. /resources?fromEntitlement=true - create resource + add entitlement value onto resource
  3. /roles - create role
  4. /roles/mappedResources - map resource to role


    Ok so far? Any other/better ways?

    Using the REST API I noticed a few things:


    1. What are all the fancy "viewID"s for? What is their meaning?
    2. /drivers/entitelmentValues/list is cached. That really hit me. Is there a way to flush the cache automatically?


      Suggestions for documentation: A few examples (complex, not per method as provided) would be great.

      regards
      Daniel
Labels (1)
0 Likes
1 Reply
Vice Admiral
Vice Admiral

If you have the same problem regarding caching:

Yes, the REST interface is caching data (additionally to the code map cache which you need to refresh!). If you want the current values from "/drivers/entitlementValues/list" you have to set the "Accept-Language" header in your REST HTTP request like the one of the browser which clicked the refresh entitlement button. And yes, this is more a kind of a workaround 🙂

regards
Daniel
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.