4 Replies Latest reply on Jul 12, 2019 12:54 AM by Marek Ceizel

    REST Call within DWP Workflow

    Jonathan Piechur
      Share This:

      I am attempting to utilize the Send HTTP Request to consume the Incident creation REST call within ITSM 18.05 as a POC, as I will need to utilize Send HTTP Request to another system in the near future. I have variables defined which hold the headers and the bodies of the two REST calls needed to be made (one to retrieve a token, the second to create an Incident) which feed into other variables. I then have rendered variables feeding into the Send HTTP Request workflows. Upon running the workflow, I receive no errors, and no Incident is created. Inspecting the logs within ITSM shows nothing was created. How do I configure each of the steps to allow for the creation of an Incident?




      Auth Header:


      Auth Body:


      Intake Header:


      Intake Body:

      {"values":{"First_Name": "Jonathan","Last_Name": "Piechur","Description": "REST API: Incident Creation","Status": "Assigned","Reported Source": "Direct Input","Service_Type": "User Service Restoration","z1D_Action": "CREATE"}}

        • 1. Re: REST Call within DWP Workflow
          Hugh Fairfield

          Hi Jonathan,


          I think the issue on the subsequent calls, the session isn't getting set properly. I have got similar things to work by setting the session value of the subsequent calls to the session variable of the Authentication call. Here is an example:

          Screen Shot 2019-06-26 at 9.47.38 AM.png


          Try that and let me know if that works.





          • 2. Re: REST Call within DWP Workflow
            Jonathan Piechur

            Hi Hugh,

            The first request is to BMC Remedy ITSM to request a token using http://<Mid-Tier>/api/jwt/login/

            I store this in a variable I have called AuthToken, and am using it in both the Session for the request, as well as adding it in the header for the request. Do I need it in one or the other?

            • 3. Re: REST Call within DWP Workflow
              Jonathan Piechur

              After a bunch of troubleshooting, I was able to get the request to go through. I removed all global variables, simplifying my request down to just a Build Input Set and Send HTTP Request. In the Input Set, I defined the required headers for creating the Incident. I had to use Postman to issue me a Remedy token, as whenever I tried to have DWP make a REST call to Remedy to issue me a token, I kept receiving a generic error. I then created the request body manually, properly escaping all double quotes.

              • 4. Re: REST Call within DWP Workflow
                Marek Ceizel

                Hi Jonathan,


                Be aware. The rest interface implemented by BMC is pretty stupid. Guys don't transfer real error description so a generic error can be really any tiny error or typo in your definition or even a wrong password.