REST Driver - How to give the Input JSON

My  Rest driver is Up. I dont  know how to create request a POST Method. Can any help me how to achieve this in the Rest Driver ?

 

  • Verified Answer

    There is a Java class that ships with the shim and it is called in the OTP and will convert XDS to a particular pattern of JSON.

     

    So send through any event and it will be converted if you used the default packages.

    My feeling is taht it is rarely the conversion we actually want.

     

  • yes.. The resource which I am configured in the driver parameters, It gets queried and XDS is getting converted as the JSON.

    I want to send a request as like below..

    https://api.*********.com/2.0/group_memberships

    I want to send the below as JSON  

    {"user": {"id":"287404033"},"group": {"id": "196150288"},"role": "member"}

    Your help will be much appreciated

     

  • See this thread https://community.microfocus.com/t5/Identity-Manager-User/Need-help-in-Rest-Driver-configuration/m-p/2320938/highlight/true#M5623

     

  • This is a good example of how the shipping Java class does not handle what you need.  You need to specify user, then a id, value pair as a child.

    Look at the thread Norbert pointed at and you can call ECMA as in his exmaple to set it all up.

     

  • Hey guys.. Instead of using ECMA Script you can use append it as a String itself 

    ITS WORKING

    <do-append-xml-text expression="../driver-operation-data[last()]/request[last()]/value[last()]">
    <arg-string>
    { "data": {"mail": mail, "id": username} }
    </arg-string>
    </do-append-xml-text>

     

     

  • Do anyone have an idea for the below error ?

     

    I gave modify and PUT Method in Driver Rsource configuration.

     

    DirXML Log Event -------------------
    Driver: \CORNING-IDV-DEV1\system\IDM-DriverSet\RestUserApp
    Channel: Subscriber
    Status: Fatal
    Message: Code(-9005) The driver returned a "fatal" status indicating that the driver should be shut down. Detail from driver: MalformedURLException: Missing <association> placeholder in the URLDirXML
    <module>RestUserApp</module>

    Though its discussed n the below thread,

    /cyberres/idm/f/idm_discussion/313174/rest-driver-failing-on-custom-modify-handler

    I cannot understand where to hardcode <association>.. Could anyone help here please ?

    Thank you