This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to Update External system using REST API from Servcie Manager

Dear Experts,

Want to kow, How to Update External system using REST API from Servcie Manager

For Ex: I want to send SMS using REST API which looks like below from Postman

Currently i am using sms wsdl to send sms using doSOAPRequest & doHTTPRequest

Want to know how can we use the external system API to send update/PUT from SM

Regards,

Sanjay Yadav

  • Want to kow, How to Update External system using REST API of theres from Servcie Manager
    For Ex: I want to send SMS using REST API which looks like attached from Postman
    Currently i am using sms wsdl to send sms using doSOAPRequest & doHTTPRequest
    Want to know how can we use the external system API to send update/PUT from SM to external system

    Regards,

    Sanjay Yadav

  • Hi sanyada185,

    please check our doc https://docs.microfocus.com/doc/Service_Manager/9.71/WebServicesREST 

    Best regards, Heike

    Heike Ulshoefer
    Technical Support Consultant | Premium Support
    If you found this post useful, give it a “Like” or click on "Verify Answer" under the "More" button

  • Thanks but documents does not have any example consuming REST API of external system

    Regards,

    Sanjay Yadav

  • Verified Answer

    Achevied it using doHTTPRequest("POST", SMSURL, httpHeaders, request, 10, 10, null, respHeaders); Now able to consume External REST API and pass update from SM to external system using REST API

    Tested and its working as expected.

    Regards,

    Sanjay Yadav

  • Hi 

    Pleasee, i need know how sent the body in format JSON from Javascritp the Service Manager.

    My Script:

    var URL_PUCC="">10.218.41.126:4502/.../ticketHistory";
    var headers = new Array();
    var request;
    var reply;
    var body='{"ticketSMID": "F1861578", "commentary": "Prueba desde WebService", "problemStatus": "Open", "assignDept": "ADMINISTRACION SERVICE CENTER", "TypeActivity": "Nivel 1 de Estalación", "tgActividadPendiente": "Prueba desde WebService"}';
    body=parseRuleJSON(body);
    var respHeaders = new Object();
    try
    {
    request = doHTTPRequest( "POST", URL_PUCC, headers, body, 10, 10, null, respHeaders );
    print( "The response headers of the doHTTPRequest is:" );
    for( var name in respHeaders )
    {
    print( name + "=" + respHeaders[name] );
    }
    print( "The result of the doHTTPRequest is \n" + request );
    reply = writeFile( "C:\\IncidentManagement.wsdl", "text", request );
    }
    catch ( e )
    {
    print( "WSDL request failed with exception \n" + e );
    }