Highlighted
Frequent Contributor.
Frequent Contributor.
645 views

How to post/put in service manager RESTful API?

Jump to solution

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

0 Likes
1 Solution

Accepted Solutions
Highlighted
Knowledge Partner
Knowledge Partner

Re: How to post/put in service manager RESTful API?

Jump to solution
You need to use in the json the same name defined in your external access definition.
Regards,
Breno Abreu

If you feel this was helpful please click the KUDOS! thumb below!

View solution in original post

4 Replies
Highlighted
Super Contributor.. Super Contributor..
Super Contributor..

Re: How to post/put in service manager RESTful API?

Jump to solution

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",
 }
}

 

Highlighted
Frequent Contributor.
Frequent Contributor.

Re: How to post/put in service manager RESTful API?

Jump to solution

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!!

 

 

0 Likes
Highlighted
Frequent Contributor.
Frequent Contributor.

Re: How to post/put in service manager RESTful API?

Jump to solution

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

 

0 Likes
Highlighted
Knowledge Partner
Knowledge Partner

Re: How to post/put in service manager RESTful API?

Jump to solution
You need to use in the json the same name defined in your external access definition.
Regards,
Breno Abreu

If you feel this was helpful please click the KUDOS! thumb below!

View solution in original post

The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.