Search Engines
Process
Schedules a task for processing all search engine’s data sources.
POST
/
api
/
v2
/
search_engines
/
{hashid}
/
_process
Process
curl --request POST \
--url https://{search_zone}-api.doofinder.com/api/v2/search_engines/{hashid}/_process \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"callback_url": "https://example_url.com"
}
'import requests
url = "https://{search_zone}-api.doofinder.com/api/v2/search_engines/{hashid}/_process"
payload = { "callback_url": "https://example_url.com" }
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({callback_url: 'https://example_url.com'})
};
fetch('https://{search_zone}-api.doofinder.com/api/v2/search_engines/{hashid}/_process', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{search_zone}-api.doofinder.com/api/v2/search_engines/{hashid}/_process",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'callback_url' => 'https://example_url.com'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{search_zone}-api.doofinder.com/api/v2/search_engines/{hashid}/_process"
payload := strings.NewReader("{\n \"callback_url\": \"https://example_url.com\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{search_zone}-api.doofinder.com/api/v2/search_engines/{hashid}/_process")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"callback_url\": \"https://example_url.com\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{search_zone}-api.doofinder.com/api/v2/search_engines/{hashid}/_process")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"callback_url\": \"https://example_url.com\"\n}"
response = http.request(request)
puts response.read_body{
"href": "/api/v2/search_engines/{hashid}/_process",
"message": "PROCESS_CREATED"
}{
"error": {
"code": "not_authenticated",
"message": "Authentication required"
}
}{
"error": {
"code": "access_denied",
"message": "Access denied"
}
}{
"error": {
"code": "not_found",
"message": "Not found"
}
}{
"error": {
"code": "searchengine_timeout",
"message": "Timeout connecting to backend"
}
}{
"error": {
"code": "too_many_requests",
"message": "Too many requests"
}
}{
"error": {
"code": "internal_error",
"message": "Internal server error"
}
}{
"error": {
"code": "doomanager_unavailable",
"message": "Processing service is temporarily unavailable"
}
}Authorizations
api_tokenjwt_token
Doofinder API key. Pass it as: Authorization: Token <api_key>
Path Parameters
Unique id of a search engine.
Pattern:
^[a-f0-9]{32}$Body
application/json
When the tasks finishes, the systems calls to the provided URL giving the final status of the task. URL must use HTTPS. The call will be a POST, with the data result on the body.
Example:
"https://example_url.com"
⌘I
Process
curl --request POST \
--url https://{search_zone}-api.doofinder.com/api/v2/search_engines/{hashid}/_process \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"callback_url": "https://example_url.com"
}
'import requests
url = "https://{search_zone}-api.doofinder.com/api/v2/search_engines/{hashid}/_process"
payload = { "callback_url": "https://example_url.com" }
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({callback_url: 'https://example_url.com'})
};
fetch('https://{search_zone}-api.doofinder.com/api/v2/search_engines/{hashid}/_process', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{search_zone}-api.doofinder.com/api/v2/search_engines/{hashid}/_process",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'callback_url' => 'https://example_url.com'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{search_zone}-api.doofinder.com/api/v2/search_engines/{hashid}/_process"
payload := strings.NewReader("{\n \"callback_url\": \"https://example_url.com\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{search_zone}-api.doofinder.com/api/v2/search_engines/{hashid}/_process")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"callback_url\": \"https://example_url.com\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{search_zone}-api.doofinder.com/api/v2/search_engines/{hashid}/_process")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"callback_url\": \"https://example_url.com\"\n}"
response = http.request(request)
puts response.read_body{
"href": "/api/v2/search_engines/{hashid}/_process",
"message": "PROCESS_CREATED"
}{
"error": {
"code": "not_authenticated",
"message": "Authentication required"
}
}{
"error": {
"code": "access_denied",
"message": "Access denied"
}
}{
"error": {
"code": "not_found",
"message": "Not found"
}
}{
"error": {
"code": "searchengine_timeout",
"message": "Timeout connecting to backend"
}
}{
"error": {
"code": "too_many_requests",
"message": "Too many requests"
}
}{
"error": {
"code": "internal_error",
"message": "Internal server error"
}
}{
"error": {
"code": "doomanager_unavailable",
"message": "Processing service is temporarily unavailable"
}
}