History
Patch apiusersearch history rename
Rename a saved search history export.
PATCH
/
api
/
user
/
search-history
/
{search_id}
/
rename
/
cURL
curl -X PATCH 'https://www.spherescout.io/api/user/search-history/{search_id}/rename/' \
-H 'Authorization: Token YOUR_API_KEY' \
-H 'User-Agent: SphereScout/1.0' \
-H 'Content-Type: application/json' \
-d '{}'import requests
response = requests.patch(
"https://www.spherescout.io/api/user/search-history/{search_id}/rename/",
headers={
"Authorization": "Token YOUR_API_KEY",
"User-Agent": "SphereScout/1.0",
},
json={},
)
print(response.json())const response = await fetch("https://www.spherescout.io/api/user/search-history/{search_id}/rename/", {
method: "PATCH",
headers: {
"Authorization": "Token YOUR_API_KEY",
"User-Agent": "SphereScout/1.0",
"Content-Type": "application/json",
},
body: JSON.stringify({}),
});
const data = await response.json();<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://www.spherescout.io/api/user/search-history/{search_id}/rename/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'display_name' => '<string>'
]),
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://www.spherescout.io/api/user/search-history/{search_id}/rename/"
payload := strings.NewReader("{\n \"display_name\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://www.spherescout.io/api/user/search-history/{search_id}/rename/")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"display_name\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.spherescout.io/api/user/search-history/{search_id}/rename/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"display_name\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"status": "<string>",
"validation_code": "<string>",
"id": 123,
"display_name": "<string>"
}Authorizations
API key. Format: Token
Path Parameters
Body
application/json
Maximum string length:
120⌘I
cURL
curl -X PATCH 'https://www.spherescout.io/api/user/search-history/{search_id}/rename/' \
-H 'Authorization: Token YOUR_API_KEY' \
-H 'User-Agent: SphereScout/1.0' \
-H 'Content-Type: application/json' \
-d '{}'import requests
response = requests.patch(
"https://www.spherescout.io/api/user/search-history/{search_id}/rename/",
headers={
"Authorization": "Token YOUR_API_KEY",
"User-Agent": "SphereScout/1.0",
},
json={},
)
print(response.json())const response = await fetch("https://www.spherescout.io/api/user/search-history/{search_id}/rename/", {
method: "PATCH",
headers: {
"Authorization": "Token YOUR_API_KEY",
"User-Agent": "SphereScout/1.0",
"Content-Type": "application/json",
},
body: JSON.stringify({}),
});
const data = await response.json();<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://www.spherescout.io/api/user/search-history/{search_id}/rename/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'display_name' => '<string>'
]),
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://www.spherescout.io/api/user/search-history/{search_id}/rename/"
payload := strings.NewReader("{\n \"display_name\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://www.spherescout.io/api/user/search-history/{search_id}/rename/")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"display_name\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.spherescout.io/api/user/search-history/{search_id}/rename/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"display_name\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"status": "<string>",
"validation_code": "<string>",
"id": 123,
"display_name": "<string>"
}