Forum Discussion
You can use the match query in V2 API.
select * from messages where subject matches 'String' and body matches 'String' and post_time > 2013-09-04T12:12:45.668-07:00 and board.id = 'boardId' order by post_time desc
If you need only V1 API, then you have to use V1 search API. Here is the documentation
- jaikumar17 years agoMentor
Hi VikasB,
Thank you for your response. I have tried the V2 API, and the following method to request the data from the server.
https://<community-server>/api/2.0/search?q=?q=select * from messages where board.id = "1" and subject MATCHES "Fast track" and post_time > 2013-10-07T10:04:30-08:00 AND post_time < 2018-04-17T10:04:30-08:00
The above url will request in ajax, from other server. While performing the ajax request, i'm getting the following "Access-Control-Allow-Origin" error.
No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost' is therefore not allowed access. The response had HTTP status code 401.
I referred in the document, and we may need to send client-id while initiate the request. If this is true, please help me how to achieve to resolve the issue.
- VikasB7 years agoBoss
Below links can resolve your problem.
https://community.lithium.com/t5/Developer-Discussion/Access-Control-Issue/m-p/251474#M10650
https://community.lithium.com/t5/Other-Techie-Stuff/CORS-vs-JSONP/ta-p/213715