curl --request POST \
--url https://api.example.com/v0/subscription-previews \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"evaluator": {
"plugin_id": "<string>",
"version": "<string>",
"configuration": {}
},
"saved_query_id": "<string>",
"saved_query_version_id": "<string>",
"limit": 20,
"accepted_after": "2023-11-07T05:31:56Z"
}
'import requests
url = "https://api.example.com/v0/subscription-previews"
payload = {
"evaluator": {
"plugin_id": "<string>",
"version": "<string>",
"configuration": {}
},
"saved_query_id": "<string>",
"saved_query_version_id": "<string>",
"limit": 20,
"accepted_after": "2023-11-07T05:31:56Z"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
evaluator: {plugin_id: '<string>', version: '<string>', configuration: {}},
saved_query_id: '<string>',
saved_query_version_id: '<string>',
limit: 20,
accepted_after: '2023-11-07T05:31:56Z'
})
};
fetch('https://api.example.com/v0/subscription-previews', 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.example.com/v0/subscription-previews",
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([
'evaluator' => [
'plugin_id' => '<string>',
'version' => '<string>',
'configuration' => [
]
],
'saved_query_id' => '<string>',
'saved_query_version_id' => '<string>',
'limit' => 20,
'accepted_after' => '2023-11-07T05:31:56Z'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://api.example.com/v0/subscription-previews"
payload := strings.NewReader("{\n \"evaluator\": {\n \"plugin_id\": \"<string>\",\n \"version\": \"<string>\",\n \"configuration\": {}\n },\n \"saved_query_id\": \"<string>\",\n \"saved_query_version_id\": \"<string>\",\n \"limit\": 20,\n \"accepted_after\": \"2023-11-07T05:31:56Z\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://api.example.com/v0/subscription-previews")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"evaluator\": {\n \"plugin_id\": \"<string>\",\n \"version\": \"<string>\",\n \"configuration\": {}\n },\n \"saved_query_id\": \"<string>\",\n \"saved_query_version_id\": \"<string>\",\n \"limit\": 20,\n \"accepted_after\": \"2023-11-07T05:31:56Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v0/subscription-previews")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"evaluator\": {\n \"plugin_id\": \"<string>\",\n \"version\": \"<string>\",\n \"configuration\": {}\n },\n \"saved_query_id\": \"<string>\",\n \"saved_query_version_id\": \"<string>\",\n \"limit\": 20,\n \"accepted_after\": \"2023-11-07T05:31:56Z\"\n}"
response = http.request(request)
puts response.read_body{
"evaluated": 1,
"matched": 1,
"not_ready": 1,
"complete": true,
"matches": [
{
"corpus_id": "<string>",
"record_id": "<string>",
"record_version_id": "<string>",
"accepted_at": "2023-11-07T05:31:56Z",
"evidence": {
"evaluator": {
"plugin_id": "<string>",
"version": "<string>",
"configuration": {}
},
"explanation": "<string>",
"part_keys": [
"<string>"
],
"details": {}
}
}
],
"oldest_accepted_at": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"message": "<string>",
"retryable": true,
"field": "<string>",
"resync_url": "<string>"
}Preview subscription
Dry run of a proposed Subscription. Runs the evaluator on the most recently accepted current eligible Record Versions of the Saved Query’s Corpora, newest first, and returns what it would have matched. Nothing is written - no Saved Query, Subscription, Match, Delivery or event - and it is not idempotent. The Saved Query is an inline definition or an existing Saved Query Version; the pair is validated as at Subscription creation (422 unsupported_evaluator, invalid_expression, invalid_subscription_configuration). Each Record Version costs one evaluator call, sent with the synthetic Subscription reference preview. At most limit Record Versions (1 to 50, default 20) are judged, within a time budget of a few seconds; those still undecided when it runs out are left out and complete is false. An evaluator that cannot be reached or reports a transient failure fails the preview with 503 evaluator_unavailable, and one that refuses or breaks an evaluation with 502 evaluator_error. Quivr applies no rate or cost rule; a layer above can limit who previews and how often.
curl --request POST \
--url https://api.example.com/v0/subscription-previews \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"evaluator": {
"plugin_id": "<string>",
"version": "<string>",
"configuration": {}
},
"saved_query_id": "<string>",
"saved_query_version_id": "<string>",
"limit": 20,
"accepted_after": "2023-11-07T05:31:56Z"
}
'import requests
url = "https://api.example.com/v0/subscription-previews"
payload = {
"evaluator": {
"plugin_id": "<string>",
"version": "<string>",
"configuration": {}
},
"saved_query_id": "<string>",
"saved_query_version_id": "<string>",
"limit": 20,
"accepted_after": "2023-11-07T05:31:56Z"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
evaluator: {plugin_id: '<string>', version: '<string>', configuration: {}},
saved_query_id: '<string>',
saved_query_version_id: '<string>',
limit: 20,
accepted_after: '2023-11-07T05:31:56Z'
})
};
fetch('https://api.example.com/v0/subscription-previews', 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.example.com/v0/subscription-previews",
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([
'evaluator' => [
'plugin_id' => '<string>',
'version' => '<string>',
'configuration' => [
]
],
'saved_query_id' => '<string>',
'saved_query_version_id' => '<string>',
'limit' => 20,
'accepted_after' => '2023-11-07T05:31:56Z'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://api.example.com/v0/subscription-previews"
payload := strings.NewReader("{\n \"evaluator\": {\n \"plugin_id\": \"<string>\",\n \"version\": \"<string>\",\n \"configuration\": {}\n },\n \"saved_query_id\": \"<string>\",\n \"saved_query_version_id\": \"<string>\",\n \"limit\": 20,\n \"accepted_after\": \"2023-11-07T05:31:56Z\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://api.example.com/v0/subscription-previews")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"evaluator\": {\n \"plugin_id\": \"<string>\",\n \"version\": \"<string>\",\n \"configuration\": {}\n },\n \"saved_query_id\": \"<string>\",\n \"saved_query_version_id\": \"<string>\",\n \"limit\": 20,\n \"accepted_after\": \"2023-11-07T05:31:56Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v0/subscription-previews")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"evaluator\": {\n \"plugin_id\": \"<string>\",\n \"version\": \"<string>\",\n \"configuration\": {}\n },\n \"saved_query_id\": \"<string>\",\n \"saved_query_version_id\": \"<string>\",\n \"limit\": 20,\n \"accepted_after\": \"2023-11-07T05:31:56Z\"\n}"
response = http.request(request)
puts response.read_body{
"evaluated": 1,
"matched": 1,
"not_ready": 1,
"complete": true,
"matches": [
{
"corpus_id": "<string>",
"record_id": "<string>",
"record_version_id": "<string>",
"accepted_at": "2023-11-07T05:31:56Z",
"evidence": {
"evaluator": {
"plugin_id": "<string>",
"version": "<string>",
"configuration": {}
},
"explanation": "<string>",
"part_keys": [
"<string>"
],
"details": {}
}
}
],
"oldest_accepted_at": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"message": "<string>",
"retryable": true,
"field": "<string>",
"resync_url": "<string>"
}Authorizations
API key, not necessarily a JWT. Server derives Organization, permitted actions and Corpus scope; every resource access is authorized.
Body
A proposed Subscription to preview. Give either definition, an inline Saved Query definition, or saved_query_id with saved_query_version_id, an existing Saved Query Version; not both.
Pins an installed evaluator by plugin id and version, and its configuration. Evaluators are the subscription Contributions of the plugins pinned at startup (Plugin Protocol v0); test deployments may also install the deterministic fixture quivr.fixture@1. The configuration must satisfy the evaluator's declared configuration schema.
Show child attributes
Show child attributes
Immutable query definition. Expression semantics belong to the evaluator plugin; no core keyword or semantic threshold is implied. All Corpora belong to the authorized Organization.
Show child attributes
Show child attributes
11The most Record Versions to judge, newest first. Each one costs an evaluator call.
1 <= x <= 50Judge only revisions accepted after this instant.
Response
Successful response
What a proposed Subscription would have matched among recent Record Versions.
Record Versions the evaluator decided.
x >= 0x >= 0Record Versions the evaluator could not decide yet (for example before enrichment).
x >= 0False when the time budget ran out before every listed Record Version was decided.
Most recently accepted first.
50Show child attributes
Show child attributes
When the oldest decided Record Version was accepted; absent when none was decided.