Set which Notion items sync
curl --request PUT \
--url http://127.0.0.1:4319/notion/scope \
--header 'Content-Type: application/json' \
--data '
{
"scope": "<unknown>"
}
'import requests
url = "http://127.0.0.1:4319/notion/scope"
payload = { "scope": "<unknown>" }
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({scope: '<unknown>'})
};
fetch('http://127.0.0.1:4319/notion/scope', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://127.0.0.1:4319/notion/scope"
payload := strings.NewReader("{\n \"scope\": \"<unknown>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
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))
}<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "4319",
CURLOPT_URL => "http://127.0.0.1:4319/notion/scope",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'scope' => '<unknown>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}require 'uri'
require 'net/http'
url = URI("http://127.0.0.1:4319/notion/scope")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"scope\": \"<unknown>\"\n}"
response = http.request(request)
puts response.read_bodyHttpResponse<String> response = Unirest.put("http://127.0.0.1:4319/notion/scope")
.header("Content-Type", "application/json")
.body("{\n \"scope\": \"<unknown>\"\n}")
.asString();using RestSharp;
var options = new RestClientOptions("http://127.0.0.1:4319/notion/scope");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddJsonBody("{\n \"scope\": \"<unknown>\"\n}", false);
var response = await client.PutAsync(request);
Console.WriteLine("{0}", response.Content);
{
"error": "invalid request body",
"issues": [
{
"path": "query",
"message": "query must be a non-empty string"
}
]
}Connectors
Set which Notion items sync
Replaces the sync selection. Pass the items to sync, or null to disconnect (synced
documents stay). What memloom notion connect and the viewer’s connectors tab call.
PUT
/
notion
/
scope
Set which Notion items sync
curl --request PUT \
--url http://127.0.0.1:4319/notion/scope \
--header 'Content-Type: application/json' \
--data '
{
"scope": "<unknown>"
}
'import requests
url = "http://127.0.0.1:4319/notion/scope"
payload = { "scope": "<unknown>" }
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({scope: '<unknown>'})
};
fetch('http://127.0.0.1:4319/notion/scope', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://127.0.0.1:4319/notion/scope"
payload := strings.NewReader("{\n \"scope\": \"<unknown>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
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))
}<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "4319",
CURLOPT_URL => "http://127.0.0.1:4319/notion/scope",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'scope' => '<unknown>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}require 'uri'
require 'net/http'
url = URI("http://127.0.0.1:4319/notion/scope")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"scope\": \"<unknown>\"\n}"
response = http.request(request)
puts response.read_bodyHttpResponse<String> response = Unirest.put("http://127.0.0.1:4319/notion/scope")
.header("Content-Type", "application/json")
.body("{\n \"scope\": \"<unknown>\"\n}")
.asString();using RestSharp;
var options = new RestClientOptions("http://127.0.0.1:4319/notion/scope");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddJsonBody("{\n \"scope\": \"<unknown>\"\n}", false);
var response = await client.PutAsync(request);
Console.WriteLine("{0}", response.Content);
{
"error": "invalid request body",
"issues": [
{
"path": "query",
"message": "query must be a non-empty string"
}
]
}Body
application/json
The items to sync, or null to disconnect.
Response
Scope stored.
⌘I