RestFULL call SM9.50

I am trying to run a custum action with a Rest POST call but I do not think the documentation is very clear on how to it.

I created an extaccess record for eventout table and I am trying this from SoapUI, I have also defined my own extaction processed.



When I excute that I get this error:
"Messages": ["JSONException: A JSONObject text must begin with '{' at character 0"],
"ReturnCode": "-5"

What am I missing?

  • Verified Answer

    Can you clarify what you mean when you say 'when I execute that'?  From where are you calling it?

    The error message you're getting says the structure of the object you're passing to the endpoint is incorrect.  A POST operation means you're sending some kind of json data to HPSM for it to do something with.  You may be trying to perform a POST without sending any data.

    For example, the Incidents POST action creates an Incident ticket, and the structure of the JSON object would be like

    	"Title":"This is a test interaction",
    	"Contact":"AARON, JIM",
    	"Area":"login failure",
    	"AssignmentGroup":"Service Desk"

    So, it seems like, from the error, you're trying to perform a POST without sending the object you're posting; or, the object you're posting isn't well formed.

  • Thanks, I did get it to work from SoapUI but am still trying from my c# program.