Not able to execute the below query from REST client such as POSTMAN

cancel
Showing results for 
Search instead for 
Did you mean: 
Active Member II

Not able to execute the below query from REST client such as POSTMAN

I am trying to run the below query, do you know what the below issue could be?

{
"query": {
"query": "select * from my:documents where contains('PATH:"/app:company_home/st:sites/cm:my-main-site/cm:documentLibrary/*"')",
"language": "cmis"
}
}

Error

"error": {
"errorKey": "Could not read content from HTTP request body: Unexpected character ('/' (code 47)): maybe a (non-standard) comment? (not recognized as one since Feature 'ALLOW_COMMENTS' not enabled for parser)\n at [Source: java.io.BufferedReader@27de617f; line: 3, column: 65]",
"statusCode": 400,

1 Reply
Professional

Re: Not able to execute the below query from REST client such as POSTMAN

One problem is that you've got double-quotes unescaped in your JSON string. Instead, try using:

{
"query": {
"query": "select * from my:documents where contains('PATH:\"/app:company_home/st:sites/cm:my-main-site/cm:documentLibrary/*\"')",
"language": "cmis"
}
}