Skip to Content
author's profile photo Former Member
Former Member

IDM Rest API question

Hello all,

I'm currently designing some UI fro IDM using Rest API v2 and and for one report I need a solution to query the API so that it would return the list of ALL request pending approval (not the "Get Open Approval Requests for Current User" which is obtained by calling "/idmrestapi/v2/service/TaskCollection").

The idea behind is that the service-center will be able to quickly check status of pending request for a specific user.

Could not find anything in the documentation regarding this. Anywone already did this ?



Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    Posted on Aug 18, 2016 at 08:04 PM

    HI Emmanuel,

    I'm not an expert on the Rest API, but my understanding is that if you have a task to create that report, you should be able to reference it via the API. However if it's an IDM report, that might not be supported.

    I'm wondering if Former Member, Former Member, or @Plamen Pavlov might have any ideas...

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Matt Pollicove


      as promised, I'm back with some progress (success in fact !)

      The need was to have some sort of "report viewer" UI (made out of Javascript and various js libs like AngularJS).

      The result is an UI that will extract the list of IDM reports an populate a drop-down list that allows you to select "the report type". For each "report type" it will also extract the list of report version and allows you to display this specific verion of the report. I also made a direct access to the latest version of a specific report type by passing this report type in the URL as a parameter.

      So to explain how I did this :

      - Create a report in Identity Manager

      - Query the API with /idmrest/v72alpha/entries?EntryType=MX_REPORT

      that will list the available reports in this form :


      "MX_REST_SUCCESS": true,

      "ENTRIES": [{

      "DISPLAYNAME": "Report bla bla bla",

      "MX_REST_URI": "http://<servername>:50000/idmrest/v72alpha/entries/22419",

      "MSKEY": 22419,

      "MSKEYVALUE": "REPORT:SOME_REPORT_ID:2014-07-31T12:58:35",

      "Z_REPORT_CODE": ""



      "DISPLAYNAME": "Report bla bla bla 2",

      "MX_REST_URI": "http://<servername>:50000/idmrest/v72alpha/entries/22421",

      "MSKEY": 22421,

      "MSKEYVALUE": "REPORT:SOME_REPORT_ID:2014-07-31T15:10:39",

      "Z_REPORT_CODE": ""



      --> retrieve the DISPLAYNAME and sort/filter/group then as report type.

      --> retrieve the MSKEY/MSKEYVALUE for each DISPLAYNAME (report-type) that will be the "Report version". The key is "MSKEY", that will be used in a second API request to extract one specific report.

      So basically retrieve the report mskey, and then you can extract the report you're looking for via :

      /idmrest/v72alpha/entries/<MSKEY of the report>/tasks/0/attributes/Z_REPORT_FILE

      Z_REPORT_FILE is a general attribute defined in HCM Staging Area / identity store schema / attributes) and is enabled for MX_REPORT entry type.

      In fact this part was already done for some reporting purpose, so I did not have to take care about it.

      After that it's just a question of formating this for display.... Remember when you create the report in identity center to use CSV, include the header.

      To format the display output retrieve the first line of your report, split it, remove the " that are around the values and you just have to create a table with those columns names.

      Then just loop through the report lines to display them in the table. ui-grid and AngularJS are great for such things, very flexible (don't know about SapUI5 as the pre-requisit was to NOT USE ui5 :-) )

      My approach using the V2 API failed, but I think this is linked to the system installation. I experienced also some issues with V72alpha on the DEV system, while it's working flawlessly on PROD system.

      However this (using V2 API) should work but i'm unable to confirm. The drawback of using the V2 API, is that you cannot easily extract the list of all reports, populate your drop-down selection list as you have to address the report via it's taskGUID while, with the V72apha API you address the report via it's MSKEY obtained by a first API request.

      If you need to create one specific report and display only this one, then V2 should work as suggested. I felt more flexible to have a generic report viewer that would work for any report, so that you won't have to change anything on the UI if you change/modify your report, and it's re-usable.


  • Posted on Aug 19, 2016 at 04:52 AM

    Hi Emmanuel,

    if you dont find any official way here is a workaround:

    1. You define a query that gives you the required information from the database.

    2. You create a custom attribute Z_ALL_OPEN_APPROVALS and put the SQL from 1. into value help whereby you can resolve the mskey of the calling user as %ADMINMSKEY%.

    3. You receive the value help of that attribute in your UI.



    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Aug 18, 2016 at 08:33 PM

    This is not possible AFAIK.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Jannis,

      Unfortunately this does not work.

      I checked both :




      and I got the "Could not map task GUID ..(FFF or the proper task guid here).... to task ID" for both

      Yet I did not try to create the report myself and used reports that were created previously. But I find the output csv file in the reporting folder when I run the report (with some data), so I guess they do work properly.

      I still don't get it why I can get an answer with


      (which will get me the description of the report)

      while this does not work with the proper GUID for this report ID:


      ("Could not map task GUID ....")

      Could it have something to do with the MX_RECORD entry type ? or some MX_RECORD related attributes ?

      Also IDM is running on a pretty old SP (SP4), might have to start looking for some notes at this point as well.

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.