Super Contributor.. Super Contributor..
Super Contributor..
536 views

RestFul Web Query through Browser Returns Error 71

Jump to solution

Hi Experts,

I am new to using the Restful API with HPSM 9.40 and am currently having a slight difficulty getting it to do what I would like; to list all incidents with a Status of "Open".

I am currently using:

http://ipaddress:13080/SM/9/rest/incidents?status\"open\"&view=summary

and it returns:

{
  "Messages": [
    "Query could not be parsed: status",
    "API=SQLExecute [in sqmssqlCount], Statement=SELECT COUNT(*) FROM PROBSUMMARYM1 m1 WHERE ((m1.\"STATUS\"))",
    "SQL State: 42000-8180  Message: [Microsoft][ODBC SQL Server Driver][SQL Server]Statement(s) could not be prepared.",
    "SQL State: 42000-4145  Message: [Microsoft][ODBC SQL Server Driver][SQL Server]An expression of non-boolean type specified in a context where a condition is expected, near ')'.",
    "API=SQLNumResultCols [in _describe], Statement=SELECT m1.\"NUMBER\" FROM PROBSUMMARYM1 m1 WHERE ((m1.\"STATUS\")) ORDER BY m1.\"NUMBER\" ASC",
    "SQL State: 42000-8180  Message: [Microsoft][ODBC SQL Server Driver][SQL Server]Statement(s) could not be prepared.",
    "SQL State: 42000-4145  Message: [Microsoft][ODBC SQL Server Driver][SQL Server]An expression of non-boolean type specified in a context where a condition is expected, near 'ORDER'."
  ],
  "ReturnCode": 71
}

Is there a document that would give a better idea at what syntax I am misusing? I had found the URI to use from another Forum post.

0 Likes
1 Solution

Accepted Solutions
Highlighted
Super Contributor.. Super Contributor..
Super Contributor..

After a lot of trial and error of various different syntax styles:

http://ipaddress:13080/SM/9/rest/incidents?status=open

is the Winner!

View solution in original post

0 Likes
1 Reply
Highlighted
Super Contributor.. Super Contributor..
Super Contributor..

After a lot of trial and error of various different syntax styles:

http://ipaddress:13080/SM/9/rest/incidents?status=open

is the Winner!

View solution in original post

0 Likes
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.