Uploaded image for project: 'OpenIDM'
  1. OpenIDM
  2. OPENIDM-13851

Add an example of a REST call about how to preferably add members to a role

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 6.5.0, 6.5.0.1
    • 7.1.0
    • documentation
    • 1
    • 2020.16 - IDM, 2020.17 IDM

    Description

      The current documentation both on backstage and ea (https://ea.forgerock.com/docs/idm/integrators-guide/index.html#granting-roles-manually) about how to manually grant a role to a user shows how to do so using either the admin UI or a REST call. However, the suggested REST call (to add the user as a member of the role) is bad in terms of performances when the role has lots of members (the bigger the role, the longer the REST call, which is bad).

      Instead or in addition, we should suggest to use the following type of REST call, which is by the way the one issued by the admin UI, and which performs the same no matter the number of members in the role:

       

      curl  --header "X-OpenIDM-Username: openidm-admin"  --header \
       "X-OpenIDM-Password: openidm-admin" --header "Content-Type: application/json" \
       --request POST --data '
       {
        "_ref": "managed/user/scarter'",
       "_refProperties": {
            "_grantType": ""
           }
        }' \
      "http://localhost:8080/openidm/managed/role/62351e56-85a3-4f51-be4f-c97810104923/members?_action=create"
      

       

       

       

      Attachments

        Activity

          People

            curtis.masuda Curtis Masuda
            cgrosjean Cyril Grosjean
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: