REST Apis - Search - no entries when execute curl on Aspect metadata

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

REST Apis - Search - no entries when execute curl on Aspect metadata

Hi,

when i run the query below on Api Explorer, it returns entries: 

{
"query": {
"query": "tde:hashcode:\"123\""
},
"include": ["aspectNames", "properties"]
}

but if I execute the Curl command proposed by Api Explorer : 

curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' --header 'Authorization: Basic YWRtaW46YWRtaW4=' -d '{
  "query": {
    "query": "tde:hashcode:\"123\""
  },
	"include": ["aspectNames", "properties"]
  }' 'http://localhost:8080/alfresco/api/-default-/public/search/versions/1/search'

 I have no entries !!!

I did test with (+@tde:hashcode:\"123\"), but still same behavior, entries on Api explorer but not with Curl

Can someone help me ?

1 Reply
jpotts
Professional

Re: REST Apis - Search - no entries when execute curl on Aspect metadata

I don't see anything syntactically wrong with either one. When I change the query to use cm:name and a value I know exists I get results back using your curl example.

Try running the query in the Node Browser using fts-alfresco and see what happens.