Hi All
I am trying to get response for a RestFul POST request via cmsquery. Below is my Body (sample query). Basically the idea is to get all descendent objects of kind Webi within a folder (works in Query Builder)
{
“query”: “SELECT SI_NAME, SI_ID, SI_CUID, SI_KIND FROM CI_INFOOBJECTS WHERE DESCENDENTS(“si_name=‘Folder Hierarchy’”,“si_name=‘Web Intelligence Samples’ and si_kind=‘Folder’”) AND SI_KIND = ‘WEBI’ AND SI_INSTANCE = 0”
}
I am getting a Response error as below
{
“error_code”: “RWS 000019”,
“message”: “Illegal Argument: {\r\n “query”: “SELECT SI_NAME, SI_ID, SI_CUID, SI_KIND FROM CI_INFOOBJECTS WHERE DESCENDENTS(“si_name=‘Folder Hierarchy’”,“si_name=‘Web Intelligence Samples’ and si_kind=‘Folder’”) AND SI_KIND = ‘WEBI’ AND SI_INSTANCE = 0”\r\n} (RWS 000019)”
}
It is not able to validate the SQL statement because of special characters. In Postman I see that it gives an error Expected ‘,’ instead of ‘s’
Have done many trial and errors but have not able to have a correct Request body. For normal queries like SELECT SI_NAME FROM CI_INFOOBJECTS WHERE SI_ID = 123 it works fine
Any help would be appreciated
Regards
ViR2 (BOB member since 2018-05-09)