curl --request GET \
--url http://127.0.0.1:4319/context/rootsimport requests
url = "http://127.0.0.1:4319/context/roots"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('http://127.0.0.1:4319/context/roots', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "http://127.0.0.1:4319/context/roots"
req, _ := http.NewRequest("GET", url, nil)
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/context/roots",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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/context/roots")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_bodyHttpResponse<String> response = Unirest.get("http://127.0.0.1:4319/context/roots")
.asString();using RestSharp;
var options = new RestClientOptions("http://127.0.0.1:4319/context/roots");
var client = new RestClient(options);
var request = new RestRequest("");
var response = await client.GetAsync(request);
Console.WriteLine("{0}", response.Content);
{
"enabled": true,
"roots": [
{
"id": "<string>",
"path": "<string>",
"watching": true,
"documents": 123,
"lastScanAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z"
}
],
"stats": {
"roots": 123,
"files": 123,
"queued": 123,
"missing": 123,
"capped": true
}
}List watched folders
The folders someone linked, as opposed to the documents inside them. Adding a folder creates one document per file and would otherwise forget the folder itself, which is the only record that files arriving LATER were asked for too.
enabled is false when the daemon has watching switched off (MEMLOOM_SYNC=off).
“Nothing is watched” and “watching is off” are different answers, and a client that
cannot tell them apart will report the wrong one.
curl --request GET \
--url http://127.0.0.1:4319/context/rootsimport requests
url = "http://127.0.0.1:4319/context/roots"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('http://127.0.0.1:4319/context/roots', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "http://127.0.0.1:4319/context/roots"
req, _ := http.NewRequest("GET", url, nil)
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/context/roots",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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/context/roots")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_bodyHttpResponse<String> response = Unirest.get("http://127.0.0.1:4319/context/roots")
.asString();using RestSharp;
var options = new RestClientOptions("http://127.0.0.1:4319/context/roots");
var client = new RestClient(options);
var request = new RestRequest("");
var response = await client.GetAsync(request);
Console.WriteLine("{0}", response.Content);
{
"enabled": true,
"roots": [
{
"id": "<string>",
"path": "<string>",
"watching": true,
"documents": 123,
"lastScanAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z"
}
],
"stats": {
"roots": 123,
"files": 123,
"queued": 123,
"missing": 123,
"capped": true
}
}Response
Linked folders, newest first.
The daemon is watching. False under MEMLOOM_SYNC=off.
Hide child attributes
Hide child attributes
Documents in the store whose path sits under this root.
The catch-up watermark. A rescan only reads entries modified since this, plus anything the store has never seen.
Present only while watching is enabled.
Hide child attributes
Hide child attributes