How to post/put in service manager RESTful API?

I am trying to update the request I have created in SM by using SOAPUI. But the SOAPUI is kept telling me I have a 400 Http Error. So, the update will not be successfully updated. 

Can anyone help me to solve the issue? Any help will be highly appreciated.issue.PNG

  • It looks like you're connecting successfully and just failing the validations on the workflow.

     

    Try adding the italized line below to your request string and see if it gets you any further (adjust the impact value to whatever you feel is appropriate):

     

    {
     "Request": {
      "Status": "Fulfilled",
      "Reason": "4",
      "Priority": "3",
      "Impact": "4",
     }
    }

     

  • Good Afternoon, Josh :

    Thanks for helping me out. I tried your method. It was not working. I have to change the impact from '5' to '4' from SM UI to make everything wok. 

    Another question I have is could you provide me with ideas on how I can use the POST of SM RESTful API to create a new request, incident, and change tickets. 

    I knew I need to use URL and JSON file. 

    But the issue is how to fill the required filed and values in JSON accurately to make things work.  The error message will tell me I sent a bad 400 request. But it is very hard to bug and will just base on guessing. 

     

    Thanks in advance and looking forward to hearing from you!!

     

     

  • Hi, Josh:

     

    I have successfully created an incident ticket by using Post method. But I got another bug which the error message said "The following values are ignored:{......} " -- see the screenshot more detailed information. 

     

    issue.PNG

     

  • Verified Answer

    You need to use in the json the same name defined in your external access definition.