Service Manager / Service Center User Discussions
cancel

Unable To Setup REST APIs in 9.40.3006

Highlighted
AmitJ Contributor.
Contributor.

Unable To Setup REST APIs in 9.40.3006

We have HPSM version 9.40.3006. We have followed the documentation to setup the REST APIs correctly. Also attaching the screenshot of the configurations. The situation is that, through browser, we are able to accees the endpoint,  <server>:13089/SM/9/rest (which shows all the APIs) but NOT ABLE TO ACCESS <server>:13089/SM/9/rest/incidents. BOTH from browser and when tried via a REST request, we get the same error which is:

A CxmlAPIException was raised in native code. error -1. Error in executing script RestfulMain.processResourceError in executing script: Type Error: log has no properties, ReturnCode -1

Please help.

Tagging a few experts. Please excuse for the intrusion, if any. @lingyanmeng @MarcusReinhardt @BrenoAbreu

Screenshot 2018-08-07 13.06.00.png

3 REPLIES
Acclaimed Contributor.. Jacob Heubner Acclaimed Contributor..
Acclaimed Contributor..

Re: Unable To Setup REST APIs in 9.40.3006

No screenshots are attached.

Did you modify any ScriptLibrary records when you were trying to set this up?

AmitJ Contributor.
Contributor.

Re: Unable To Setup REST APIs in 9.40.3006

Many thanks, @Jacob Heubner

No, we did not modify any ScriptLibrary records.

Here is the screenshot - not sure why this did not show up earlier. Attached.

 

Acclaimed Contributor.. Jacob Heubner Acclaimed Contributor..
Acclaimed Contributor..

Re: Unable To Setup REST APIs in 9.40.3006

Ok, got the screenshots

The error message indicates an issue with one of the ScriptLibrary scripts - either one directly used by the REST APIs or one for the module you're creating the ticket in.

So, set up additional debugging on a servlet and make the REST call to that servlet.

There's information on setting this up in the help, but from the command prompt, something like

%sm%\RUN\sm -httpPort:13077 -httpsPort:13076 -RTM:3 -debugjavascript&colon;1 -debughttp:1 -RTM:3 

Then make your REST call on that debug node and check the log to see where the error comes from.