Overview › Forums › Discussions › index/reindex and search with API › Reply To: index/reindex and search with API
Thank you.
I saw it before, but it won’t work….
I’m not sure, what i should add into “id”. What means 123? is it a example?
thank you
my curl with php got invalid message:
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, ‘127.0.0.1:9920’);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, “{\n \”id\”: *,\n \”jsonrpc\”: \”2.0\”,\n \”method\”: \”ATRpcServer.Searcher.V1.GetResult\”,\n \”params\”: {\n \”input\”: {\n \”pattern\”: \”Hello\”,\n \”filterDir\”: \”*\”,\n \”filterExt\”: \”*\”,\n \”lastModifyBegin\”: 0,\n \”lastModifyEnd\”: 2147483647,\n \”limit\”: \”300\”,\n \”offset\”: 0,\n \”order\”: 0 /* 0: Default. 1:lastModify ASC. 2:lastModify DESC. 3: filterDir ASC. 3: filterDir DESC. */\n }\n }\n}”);
$headers = array();
$headers[] = ‘Accept: application/json’;
$headers[] = ‘Content-Type: application/json’;
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
$result = curl_exec($ch);
if (curl_errno($ch)) {
echo ‘Error:’ . curl_error($ch);
}
curl_close($ch);