curl --request POST \
--url https://developer.synq.io/api/entities/v2/checks/categorisation-rules/preview \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"matcher": {
"attributes": {
"facets": {
"dataPlatformTypes": [],
"entityTypes": [],
"packages": [
"<string>"
],
"kinds": [
"<string>"
]
},
"names": [
"<string>"
],
"annotationMatches": [
{
"equals": "<string>",
"key": "<string>"
}
]
}
},
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"category": "<string>",
"priority": 0,
"sampleSize": 500
}
'import requests
url = "https://developer.synq.io/api/entities/v2/checks/categorisation-rules/preview"
payload = {
"matcher": { "attributes": {
"facets": {
"dataPlatformTypes": [],
"entityTypes": [],
"packages": ["<string>"],
"kinds": ["<string>"]
},
"names": ["<string>"],
"annotationMatches": [
{
"equals": "<string>",
"key": "<string>"
}
]
} },
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"category": "<string>",
"priority": 0,
"sampleSize": 500
}
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({
matcher: {
attributes: {
facets: {
dataPlatformTypes: [],
entityTypes: [],
packages: ['<string>'],
kinds: ['<string>']
},
names: ['<string>'],
annotationMatches: [{equals: '<string>', key: '<string>'}]
}
},
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
title: '<string>',
category: '<string>',
priority: 0,
sampleSize: 500
})
};
fetch('https://developer.synq.io/api/entities/v2/checks/categorisation-rules/preview', 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://developer.synq.io/api/entities/v2/checks/categorisation-rules/preview",
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([
'matcher' => [
'attributes' => [
'facets' => [
'dataPlatformTypes' => [
],
'entityTypes' => [
],
'packages' => [
'<string>'
],
'kinds' => [
'<string>'
]
],
'names' => [
'<string>'
],
'annotationMatches' => [
[
'equals' => '<string>',
'key' => '<string>'
]
]
]
],
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'title' => '<string>',
'category' => '<string>',
'priority' => 0,
'sampleSize' => 500
]),
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://developer.synq.io/api/entities/v2/checks/categorisation-rules/preview"
payload := strings.NewReader("{\n \"matcher\": {\n \"attributes\": {\n \"facets\": {\n \"dataPlatformTypes\": [],\n \"entityTypes\": [],\n \"packages\": [\n \"<string>\"\n ],\n \"kinds\": [\n \"<string>\"\n ]\n },\n \"names\": [\n \"<string>\"\n ],\n \"annotationMatches\": [\n {\n \"equals\": \"<string>\",\n \"key\": \"<string>\"\n }\n ]\n }\n },\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"title\": \"<string>\",\n \"category\": \"<string>\",\n \"priority\": 0,\n \"sampleSize\": 500\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://developer.synq.io/api/entities/v2/checks/categorisation-rules/preview")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"matcher\": {\n \"attributes\": {\n \"facets\": {\n \"dataPlatformTypes\": [],\n \"entityTypes\": [],\n \"packages\": [\n \"<string>\"\n ],\n \"kinds\": [\n \"<string>\"\n ]\n },\n \"names\": [\n \"<string>\"\n ],\n \"annotationMatches\": [\n {\n \"equals\": \"<string>\",\n \"key\": \"<string>\"\n }\n ]\n }\n },\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"title\": \"<string>\",\n \"category\": \"<string>\",\n \"priority\": 0,\n \"sampleSize\": 500\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://developer.synq.io/api/entities/v2/checks/categorisation-rules/preview")
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 \"matcher\": {\n \"attributes\": {\n \"facets\": {\n \"dataPlatformTypes\": [],\n \"entityTypes\": [],\n \"packages\": [\n \"<string>\"\n ],\n \"kinds\": [\n \"<string>\"\n ]\n },\n \"names\": [\n \"<string>\"\n ],\n \"annotationMatches\": [\n {\n \"equals\": \"<string>\",\n \"key\": \"<string>\"\n }\n ]\n }\n },\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"title\": \"<string>\",\n \"category\": \"<string>\",\n \"priority\": 0,\n \"sampleSize\": 500\n}"
response = http.request(request)
puts response.read_body{
"matchedCount": 123,
"affectedCount": 123,
"newlyCategorisedCount": 123,
"reassignedCount": 123,
"unchangedCount": 123,
"affectedEntityIds": [
"<string>"
],
"affectedEntityIdsTruncated": true,
"higherPriorityRuleCount": 123,
"explicitCategoryCount": 123,
"sameCategoryCount": 123,
"explicitCategoryEntityIds": [
"<string>"
],
"explicitCategoryEntityIdsTruncated": true
}PreviewRule
Report what a candidate rule would change, without saving it.
The candidate is slotted into the workspace’s live rule set — replacing an
existing rule when id names one — and the whole resolution is run over
every check, so scope, priority, explicit categories and producer-declared
categories are all honoured. The response separates the candidate’s raw
reach from its real effect, which are rarely the same number.
Preview a rule before saving it: one that matches broadly can recategorise a large part of a workspace in a single sweep.
curl --request POST \
--url https://developer.synq.io/api/entities/v2/checks/categorisation-rules/preview \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"matcher": {
"attributes": {
"facets": {
"dataPlatformTypes": [],
"entityTypes": [],
"packages": [
"<string>"
],
"kinds": [
"<string>"
]
},
"names": [
"<string>"
],
"annotationMatches": [
{
"equals": "<string>",
"key": "<string>"
}
]
}
},
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"category": "<string>",
"priority": 0,
"sampleSize": 500
}
'import requests
url = "https://developer.synq.io/api/entities/v2/checks/categorisation-rules/preview"
payload = {
"matcher": { "attributes": {
"facets": {
"dataPlatformTypes": [],
"entityTypes": [],
"packages": ["<string>"],
"kinds": ["<string>"]
},
"names": ["<string>"],
"annotationMatches": [
{
"equals": "<string>",
"key": "<string>"
}
]
} },
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"category": "<string>",
"priority": 0,
"sampleSize": 500
}
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({
matcher: {
attributes: {
facets: {
dataPlatformTypes: [],
entityTypes: [],
packages: ['<string>'],
kinds: ['<string>']
},
names: ['<string>'],
annotationMatches: [{equals: '<string>', key: '<string>'}]
}
},
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
title: '<string>',
category: '<string>',
priority: 0,
sampleSize: 500
})
};
fetch('https://developer.synq.io/api/entities/v2/checks/categorisation-rules/preview', 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://developer.synq.io/api/entities/v2/checks/categorisation-rules/preview",
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([
'matcher' => [
'attributes' => [
'facets' => [
'dataPlatformTypes' => [
],
'entityTypes' => [
],
'packages' => [
'<string>'
],
'kinds' => [
'<string>'
]
],
'names' => [
'<string>'
],
'annotationMatches' => [
[
'equals' => '<string>',
'key' => '<string>'
]
]
]
],
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'title' => '<string>',
'category' => '<string>',
'priority' => 0,
'sampleSize' => 500
]),
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://developer.synq.io/api/entities/v2/checks/categorisation-rules/preview"
payload := strings.NewReader("{\n \"matcher\": {\n \"attributes\": {\n \"facets\": {\n \"dataPlatformTypes\": [],\n \"entityTypes\": [],\n \"packages\": [\n \"<string>\"\n ],\n \"kinds\": [\n \"<string>\"\n ]\n },\n \"names\": [\n \"<string>\"\n ],\n \"annotationMatches\": [\n {\n \"equals\": \"<string>\",\n \"key\": \"<string>\"\n }\n ]\n }\n },\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"title\": \"<string>\",\n \"category\": \"<string>\",\n \"priority\": 0,\n \"sampleSize\": 500\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://developer.synq.io/api/entities/v2/checks/categorisation-rules/preview")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"matcher\": {\n \"attributes\": {\n \"facets\": {\n \"dataPlatformTypes\": [],\n \"entityTypes\": [],\n \"packages\": [\n \"<string>\"\n ],\n \"kinds\": [\n \"<string>\"\n ]\n },\n \"names\": [\n \"<string>\"\n ],\n \"annotationMatches\": [\n {\n \"equals\": \"<string>\",\n \"key\": \"<string>\"\n }\n ]\n }\n },\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"title\": \"<string>\",\n \"category\": \"<string>\",\n \"priority\": 0,\n \"sampleSize\": 500\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://developer.synq.io/api/entities/v2/checks/categorisation-rules/preview")
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 \"matcher\": {\n \"attributes\": {\n \"facets\": {\n \"dataPlatformTypes\": [],\n \"entityTypes\": [],\n \"packages\": [\n \"<string>\"\n ],\n \"kinds\": [\n \"<string>\"\n ]\n },\n \"names\": [\n \"<string>\"\n ],\n \"annotationMatches\": [\n {\n \"equals\": \"<string>\",\n \"key\": \"<string>\"\n }\n ]\n }\n },\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"title\": \"<string>\",\n \"category\": \"<string>\",\n \"priority\": 0,\n \"sampleSize\": 500\n}"
response = http.request(request)
puts response.read_body{
"matchedCount": 123,
"affectedCount": 123,
"newlyCategorisedCount": 123,
"reassignedCount": 123,
"unchangedCount": 123,
"affectedEntityIds": [
"<string>"
],
"affectedEntityIdsTruncated": true,
"higherPriorityRuleCount": 123,
"explicitCategoryCount": 123,
"sameCategoryCount": 123,
"explicitCategoryEntityIds": [
"<string>"
],
"explicitCategoryEntityIdsTruncated": true
}Authorizations
Body
How many check ids to return in each of the response's samples — it caps
affected_entity_ids and explicit_category_entity_ids independently, so
either may come back at this size. Defaults to 100, and may be 0 for
counts only. The counts are always exact whatever this is set to.
0 <= x <= 1000Response
Success
Of the unchanged checks, how many carry a category set explicitly on the check, or declared by the tool that produced it. Either outranks every rule, so these are the checks the candidate looks like it covers and does not — no priority will win them. Clear the explicit category to hand a check back to the rules.