Upsert a search object
curl --request PUT \
--url https://api.reintersect.com/v0/search/objects \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.reintersect.com/v0/search/objects"
headers = {"Authorization": "Bearer <token>"}
response = requests.put(url, headers=headers)
print(response.text)const options = {method: 'PUT', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.reintersect.com/v0/search/objects', 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://api.reintersect.com/v0/search/objects",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.reintersect.com/v0/search/objects"
req, _ := http.NewRequest("PUT", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.reintersect.com/v0/search/objects")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.reintersect.com/v0/search/objects")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodySearch and memories
Upsert a search object
Add or update one of your objects in Reintersect search.
PUT
/
v0
/
search
/
objects
Upsert a search object
curl --request PUT \
--url https://api.reintersect.com/v0/search/objects \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.reintersect.com/v0/search/objects"
headers = {"Authorization": "Bearer <token>"}
response = requests.put(url, headers=headers)
print(response.text)const options = {method: 'PUT', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.reintersect.com/v0/search/objects', 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://api.reintersect.com/v0/search/objects",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.reintersect.com/v0/search/objects"
req, _ := http.NewRequest("PUT", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.reintersect.com/v0/search/objects")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.reintersect.com/v0/search/objects")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body
Adds or updates a search object. See Search and memories for where results
appear.
Authenticate with an install token that has the
search:write scope.
Body
| Field | Type | Required | Description |
|---|---|---|---|
kind | string | Yes | One of your reference kinds that has search. |
externalId | string | Yes | Your id, 1 to 200 characters. |
title | string | Yes | At most 200 characters. |
url | string | Yes | An https:// URL. |
subtitle | string | No | At most 200 characters. |
body | string | No | Plain text to search, at most 8,000 characters. |
updatedAt | string | Yes | ISO 8601. An upsert older than the stored object isn’t applied. |
visibility | "workspace" or { circleIds } | Yes | Everyone, or members of 1 to 50 circles. |
Response
The stored object (kind, externalId, title, url, subtitle, updatedAt, visibility) plus
applied, which is false when a newer copy was kept.
Errors
_tag | Status | Cause |
|---|---|---|
ReintersectAppScopeMissingError | 403 | The install lacks search:write. |
ReintersectAppReferenceKindUnknownError | 422 | The installed version has no such kind. |
ReintersectAppReferenceKindNotSearchableError | 422 | The kind has no search. |
ReintersectAppCircleNotFoundError | 404 | A circle isn’t in the workspace or your app can’t reach it; circleIds lists them. |