curl --request POST \
--url https://developer.synq.io/api/entities/v2/checks/categorisation-rules/matches \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"ruleIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"sampleSize": 500
}
'import requests
url = "https://developer.synq.io/api/entities/v2/checks/categorisation-rules/matches"
payload = {
"ruleIds": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"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({ruleIds: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'], sampleSize: 500})
};
fetch('https://developer.synq.io/api/entities/v2/checks/categorisation-rules/matches', 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/matches",
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([
'ruleIds' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'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/matches"
payload := strings.NewReader("{\n \"ruleIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\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/matches")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"ruleIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"sampleSize\": 500\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://developer.synq.io/api/entities/v2/checks/categorisation-rules/matches")
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 \"ruleIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"sampleSize\": 500\n}"
response = http.request(request)
puts response.read_body{
"matches": {}
}ListRuleMatches
Report how many checks each rule currently categorises, with a sample of them — the state already applied, not a projection. Use it to show “categorises N checks” next to each rule, and to spot a rule that has stopped matching anything. For the full, paginated list of one rule’s checks, call ChecksCategoriesService.ListCheckCategories with the rule id.
curl --request POST \
--url https://developer.synq.io/api/entities/v2/checks/categorisation-rules/matches \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"ruleIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"sampleSize": 500
}
'import requests
url = "https://developer.synq.io/api/entities/v2/checks/categorisation-rules/matches"
payload = {
"ruleIds": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"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({ruleIds: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'], sampleSize: 500})
};
fetch('https://developer.synq.io/api/entities/v2/checks/categorisation-rules/matches', 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/matches",
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([
'ruleIds' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'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/matches"
payload := strings.NewReader("{\n \"ruleIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\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/matches")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"ruleIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"sampleSize\": 500\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://developer.synq.io/api/entities/v2/checks/categorisation-rules/matches")
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 \"ruleIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"sampleSize\": 500\n}"
response = http.request(request)
puts response.read_body{
"matches": {}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Rules to report on. Empty returns every rule that currently categorises at least one check.
200How many check ids to return per rule as a sample. Defaults to 100, and may be 0 for counts only. The counts are always exact whatever this is set to.
0 <= x <= 1000Response
Success
Matches keyed by rule id. Rules that currently categorise nothing are absent.
Show child attributes
Show child attributes