curl --request POST \
--url https://developer.synq.io/api/entities/v2/checks/categorisation-rules \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"category": "<string>",
"matcher": {
"attributes": {
"facets": {
"dataPlatformTypes": [],
"entityTypes": [],
"packages": [
"<string>"
],
"kinds": [
"<string>"
]
},
"names": [
"<string>"
],
"annotationMatches": [
{
"equals": "<string>",
"key": "<string>"
}
]
}
},
"priority": 0,
"etag": "<string>",
"actor": {
"name": "<string>",
"email": {
"userEmail": "jsmith@example.com"
}
}
}
'import requests
url = "https://developer.synq.io/api/entities/v2/checks/categorisation-rules"
payload = {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"category": "<string>",
"matcher": { "attributes": {
"facets": {
"dataPlatformTypes": [],
"entityTypes": [],
"packages": ["<string>"],
"kinds": ["<string>"]
},
"names": ["<string>"],
"annotationMatches": [
{
"equals": "<string>",
"key": "<string>"
}
]
} },
"priority": 0,
"etag": "<string>",
"actor": {
"name": "<string>",
"email": { "userEmail": "jsmith@example.com" }
}
}
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({
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
title: '<string>',
category: '<string>',
matcher: {
attributes: {
facets: {
dataPlatformTypes: [],
entityTypes: [],
packages: ['<string>'],
kinds: ['<string>']
},
names: ['<string>'],
annotationMatches: [{equals: '<string>', key: '<string>'}]
}
},
priority: 0,
etag: '<string>',
actor: {name: '<string>', email: {userEmail: 'jsmith@example.com'}}
})
};
fetch('https://developer.synq.io/api/entities/v2/checks/categorisation-rules', 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",
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([
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'title' => '<string>',
'category' => '<string>',
'matcher' => [
'attributes' => [
'facets' => [
'dataPlatformTypes' => [
],
'entityTypes' => [
],
'packages' => [
'<string>'
],
'kinds' => [
'<string>'
]
],
'names' => [
'<string>'
],
'annotationMatches' => [
[
'equals' => '<string>',
'key' => '<string>'
]
]
]
],
'priority' => 0,
'etag' => '<string>',
'actor' => [
'name' => '<string>',
'email' => [
'userEmail' => 'jsmith@example.com'
]
]
]),
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"
payload := strings.NewReader("{\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"title\": \"<string>\",\n \"category\": \"<string>\",\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 \"priority\": 0,\n \"etag\": \"<string>\",\n \"actor\": {\n \"name\": \"<string>\",\n \"email\": {\n \"userEmail\": \"jsmith@example.com\"\n }\n }\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")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"title\": \"<string>\",\n \"category\": \"<string>\",\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 \"priority\": 0,\n \"etag\": \"<string>\",\n \"actor\": {\n \"name\": \"<string>\",\n \"email\": {\n \"userEmail\": \"jsmith@example.com\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://developer.synq.io/api/entities/v2/checks/categorisation-rules")
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 \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"title\": \"<string>\",\n \"category\": \"<string>\",\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 \"priority\": 0,\n \"etag\": \"<string>\",\n \"actor\": {\n \"name\": \"<string>\",\n \"email\": {\n \"userEmail\": \"jsmith@example.com\"\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"rule": {
"id": "<string>",
"title": "<string>",
"category": "<string>",
"matcher": {
"attributes": {
"facets": {
"dataPlatformTypes": [],
"entityTypes": [],
"packages": [
"<string>"
],
"kinds": [
"<string>"
]
},
"names": [
"<string>"
],
"annotationMatches": [
{
"equals": "<string>",
"key": "<string>"
}
]
}
},
"priority": 123,
"resolutionOrder": 123,
"updatedBy": {
"name": "<string>",
"email": {
"userEmail": "jsmith@example.com"
}
},
"etag": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}UpsertRule
Create or update a categorisation rule.
The rule id is supplied by the caller (a UUID), which makes this operation
idempotent — repeating the same request converges to the same rule rather
than creating a duplicate. On create, dimension, title, category and
matcher are required. On update, a field that is set is written and a
field that is omitted is left unchanged. To guard against overwriting a
concurrent edit, pass the etag you last read.
Saving a rule schedules a sweep that recategorises the workspace’s existing checks. It normally completes in seconds; GetRecategorisationStatus confirms it.
curl --request POST \
--url https://developer.synq.io/api/entities/v2/checks/categorisation-rules \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"category": "<string>",
"matcher": {
"attributes": {
"facets": {
"dataPlatformTypes": [],
"entityTypes": [],
"packages": [
"<string>"
],
"kinds": [
"<string>"
]
},
"names": [
"<string>"
],
"annotationMatches": [
{
"equals": "<string>",
"key": "<string>"
}
]
}
},
"priority": 0,
"etag": "<string>",
"actor": {
"name": "<string>",
"email": {
"userEmail": "jsmith@example.com"
}
}
}
'import requests
url = "https://developer.synq.io/api/entities/v2/checks/categorisation-rules"
payload = {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"category": "<string>",
"matcher": { "attributes": {
"facets": {
"dataPlatformTypes": [],
"entityTypes": [],
"packages": ["<string>"],
"kinds": ["<string>"]
},
"names": ["<string>"],
"annotationMatches": [
{
"equals": "<string>",
"key": "<string>"
}
]
} },
"priority": 0,
"etag": "<string>",
"actor": {
"name": "<string>",
"email": { "userEmail": "jsmith@example.com" }
}
}
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({
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
title: '<string>',
category: '<string>',
matcher: {
attributes: {
facets: {
dataPlatformTypes: [],
entityTypes: [],
packages: ['<string>'],
kinds: ['<string>']
},
names: ['<string>'],
annotationMatches: [{equals: '<string>', key: '<string>'}]
}
},
priority: 0,
etag: '<string>',
actor: {name: '<string>', email: {userEmail: 'jsmith@example.com'}}
})
};
fetch('https://developer.synq.io/api/entities/v2/checks/categorisation-rules', 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",
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([
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'title' => '<string>',
'category' => '<string>',
'matcher' => [
'attributes' => [
'facets' => [
'dataPlatformTypes' => [
],
'entityTypes' => [
],
'packages' => [
'<string>'
],
'kinds' => [
'<string>'
]
],
'names' => [
'<string>'
],
'annotationMatches' => [
[
'equals' => '<string>',
'key' => '<string>'
]
]
]
],
'priority' => 0,
'etag' => '<string>',
'actor' => [
'name' => '<string>',
'email' => [
'userEmail' => 'jsmith@example.com'
]
]
]),
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"
payload := strings.NewReader("{\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"title\": \"<string>\",\n \"category\": \"<string>\",\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 \"priority\": 0,\n \"etag\": \"<string>\",\n \"actor\": {\n \"name\": \"<string>\",\n \"email\": {\n \"userEmail\": \"jsmith@example.com\"\n }\n }\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")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"title\": \"<string>\",\n \"category\": \"<string>\",\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 \"priority\": 0,\n \"etag\": \"<string>\",\n \"actor\": {\n \"name\": \"<string>\",\n \"email\": {\n \"userEmail\": \"jsmith@example.com\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://developer.synq.io/api/entities/v2/checks/categorisation-rules")
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 \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"title\": \"<string>\",\n \"category\": \"<string>\",\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 \"priority\": 0,\n \"etag\": \"<string>\",\n \"actor\": {\n \"name\": \"<string>\",\n \"email\": {\n \"userEmail\": \"jsmith@example.com\"\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"rule": {
"id": "<string>",
"title": "<string>",
"category": "<string>",
"matcher": {
"attributes": {
"facets": {
"dataPlatformTypes": [],
"entityTypes": [],
"packages": [
"<string>"
],
"kinds": [
"<string>"
]
},
"names": [
"<string>"
],
"annotationMatches": [
{
"equals": "<string>",
"key": "<string>"
}
]
}
},
"priority": 123,
"resolutionOrder": 123,
"updatedBy": {
"name": "<string>",
"email": {
"userEmail": "jsmith@example.com"
}
},
"etag": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Client-supplied UUID identifying the rule. The same id updates the same rule; a new id creates a new rule.
The dimension the rule categorises along. Required when creating; omit to keep it on update.
CATEGORY_DIMENSION_UNSPECIFIED, CATEGORY_DIMENSION_TECHNICAL, CATEGORY_DIMENSION_GOVERNANCE Scope of the rule. Defaults to RULE_SCOPE_WORKSPACE when creating; omit to keep it on update. Platform-provided rules cannot be edited from a workspace.
RULE_SCOPE_UNSPECIFIED, RULE_SCOPE_GLOBAL, RULE_SCOPE_WORKSPACE Human-readable title, shown wherever the rule is credited for a category. Required when creating; omit to keep it on update.
1 - 200The category assigned to matching checks. Required when creating; omit to keep it on update. Prefer a name the workspace already uses — read them from ChecksCategoriesService.ListCategories.
1 - 200Which checks the rule applies to. Required when creating; omit to keep it on update. Replaces the previous matcher wholesale — there is no partial update within a matcher.
- attributes
- expression
Show child attributes
Show child attributes
Rank within the rule's scope: the highest number is tried first. Defaults to 0 when creating; omit to keep it on update.
-1000000 <= x <= 1000000Optional optimistic-concurrency guard. When set, the write fails with a conflict if the rule was modified since this etag was read.
100Who is making the change, when the caller acts on someone's behalf — an agent, a bot, an automation. Recorded as the editor and shown back on reads. Omit it when the caller's own credentials already identify them.
- Actor
- Actor
- Actor
Show child attributes
Show child attributes
Response
Success
The stored rule after the write.
Show child attributes
Show child attributes