Create Filter
POST
/
v1
/
guards
/
filters
cURL
curl --request POST \
--url https://api.domesystems.ai/v1/guards/filters \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"workspace_id": "<string>",
"name": "<string>",
"description": "<string>",
"config": {
"text": {
"components": [
{
"action": 123,
"matchers": [
{
"substring": {
"value": "<string>"
},
"ssn": {
"delimiters": [
123
]
},
"credit_card": {
"delimiters": [
123
],
"require_luhn": true,
"min_digits": 123,
"max_digits": 123
},
"phone": {
"delimiters": [
123
],
"group_sizes": [
123
],
"require_country_code": true,
"require_parens": true
},
"digits": {
"digits": 123,
"group_sizes": [
123
],
"delimiters": [
123
]
}
}
]
}
]
},
"json": {
"components": [
{
"field_actions": [
{
"field": "<string>",
"action": "<string>",
"reason": "<string>"
}
]
}
]
}
}
}
'import requests
url = "https://api.domesystems.ai/v1/guards/filters"
payload = {
"workspace_id": "<string>",
"name": "<string>",
"description": "<string>",
"config": {
"text": { "components": [
{
"action": 123,
"matchers": [
{
"substring": { "value": "<string>" },
"ssn": { "delimiters": [123] },
"credit_card": {
"delimiters": [123],
"require_luhn": True,
"min_digits": 123,
"max_digits": 123
},
"phone": {
"delimiters": [123],
"group_sizes": [123],
"require_country_code": True,
"require_parens": True
},
"digits": {
"digits": 123,
"group_sizes": [123],
"delimiters": [123]
}
}
]
}
] },
"json": { "components": [{ "field_actions": [
{
"field": "<string>",
"action": "<string>",
"reason": "<string>"
}
] }] }
}
}
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({
workspace_id: '<string>',
name: '<string>',
description: '<string>',
config: {
text: {
components: [
{
action: 123,
matchers: [
{
substring: {value: '<string>'},
ssn: {delimiters: [123]},
credit_card: {delimiters: [123], require_luhn: true, min_digits: 123, max_digits: 123},
phone: {
delimiters: [123],
group_sizes: [123],
require_country_code: true,
require_parens: true
},
digits: {digits: 123, group_sizes: [123], delimiters: [123]}
}
]
}
]
},
json: {
components: [{field_actions: [{field: '<string>', action: '<string>', reason: '<string>'}]}]
}
}
})
};
fetch('https://api.domesystems.ai/v1/guards/filters', 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.domesystems.ai/v1/guards/filters",
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([
'workspace_id' => '<string>',
'name' => '<string>',
'description' => '<string>',
'config' => [
'text' => [
'components' => [
[
'action' => 123,
'matchers' => [
[
'substring' => [
'value' => '<string>'
],
'ssn' => [
'delimiters' => [
123
]
],
'credit_card' => [
'delimiters' => [
123
],
'require_luhn' => true,
'min_digits' => 123,
'max_digits' => 123
],
'phone' => [
'delimiters' => [
123
],
'group_sizes' => [
123
],
'require_country_code' => true,
'require_parens' => true
],
'digits' => [
'digits' => 123,
'group_sizes' => [
123
],
'delimiters' => [
123
]
]
]
]
]
]
],
'json' => [
'components' => [
[
'field_actions' => [
[
'field' => '<string>',
'action' => '<string>',
'reason' => '<string>'
]
]
]
]
]
]
]),
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.domesystems.ai/v1/guards/filters"
payload := strings.NewReader("{\n \"workspace_id\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"config\": {\n \"text\": {\n \"components\": [\n {\n \"action\": 123,\n \"matchers\": [\n {\n \"substring\": {\n \"value\": \"<string>\"\n },\n \"ssn\": {\n \"delimiters\": [\n 123\n ]\n },\n \"credit_card\": {\n \"delimiters\": [\n 123\n ],\n \"require_luhn\": true,\n \"min_digits\": 123,\n \"max_digits\": 123\n },\n \"phone\": {\n \"delimiters\": [\n 123\n ],\n \"group_sizes\": [\n 123\n ],\n \"require_country_code\": true,\n \"require_parens\": true\n },\n \"digits\": {\n \"digits\": 123,\n \"group_sizes\": [\n 123\n ],\n \"delimiters\": [\n 123\n ]\n }\n }\n ]\n }\n ]\n },\n \"json\": {\n \"components\": [\n {\n \"field_actions\": [\n {\n \"field\": \"<string>\",\n \"action\": \"<string>\",\n \"reason\": \"<string>\"\n }\n ]\n }\n ]\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://api.domesystems.ai/v1/guards/filters")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"workspace_id\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"config\": {\n \"text\": {\n \"components\": [\n {\n \"action\": 123,\n \"matchers\": [\n {\n \"substring\": {\n \"value\": \"<string>\"\n },\n \"ssn\": {\n \"delimiters\": [\n 123\n ]\n },\n \"credit_card\": {\n \"delimiters\": [\n 123\n ],\n \"require_luhn\": true,\n \"min_digits\": 123,\n \"max_digits\": 123\n },\n \"phone\": {\n \"delimiters\": [\n 123\n ],\n \"group_sizes\": [\n 123\n ],\n \"require_country_code\": true,\n \"require_parens\": true\n },\n \"digits\": {\n \"digits\": 123,\n \"group_sizes\": [\n 123\n ],\n \"delimiters\": [\n 123\n ]\n }\n }\n ]\n }\n ]\n },\n \"json\": {\n \"components\": [\n {\n \"field_actions\": [\n {\n \"field\": \"<string>\",\n \"action\": \"<string>\",\n \"reason\": \"<string>\"\n }\n ]\n }\n ]\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.domesystems.ai/v1/guards/filters")
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 \"workspace_id\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"config\": {\n \"text\": {\n \"components\": [\n {\n \"action\": 123,\n \"matchers\": [\n {\n \"substring\": {\n \"value\": \"<string>\"\n },\n \"ssn\": {\n \"delimiters\": [\n 123\n ]\n },\n \"credit_card\": {\n \"delimiters\": [\n 123\n ],\n \"require_luhn\": true,\n \"min_digits\": 123,\n \"max_digits\": 123\n },\n \"phone\": {\n \"delimiters\": [\n 123\n ],\n \"group_sizes\": [\n 123\n ],\n \"require_country_code\": true,\n \"require_parens\": true\n },\n \"digits\": {\n \"digits\": 123,\n \"group_sizes\": [\n 123\n ],\n \"delimiters\": [\n 123\n ]\n }\n }\n ]\n }\n ]\n },\n \"json\": {\n \"components\": [\n {\n \"field_actions\": [\n {\n \"field\": \"<string>\",\n \"action\": \"<string>\",\n \"reason\": \"<string>\"\n }\n ]\n }\n ]\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"filter": {
"id": "<string>",
"workspace_id": "<string>",
"name": "<string>",
"description": "<string>",
"config": {
"text": {
"components": [
{
"action": 123,
"matchers": [
{
"substring": {
"value": "<string>"
},
"ssn": {
"delimiters": [
123
]
},
"credit_card": {
"delimiters": [
123
],
"require_luhn": true,
"min_digits": 123,
"max_digits": 123
},
"phone": {
"delimiters": [
123
],
"group_sizes": [
123
],
"require_country_code": true,
"require_parens": true
},
"digits": {
"digits": 123,
"group_sizes": [
123
],
"delimiters": [
123
]
}
}
]
}
]
},
"json": {
"components": [
{
"field_actions": [
{
"field": "<string>",
"action": "<string>",
"reason": "<string>"
}
]
}
]
}
},
"version": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"kind": 123
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Response
200 - application/json
OK
Filter is the logical, workspace-scoped Filter entity: a stable id + mutable metadata (name, description), plus its ACTIVE version's config denormalized for the common "show me this filter" read. Version history is a separate FilterVersion list (ListFilterVersions). Editing deploys a new active version; assignments follow the active version.
Show child attributes
Show child attributes
Was this page helpful?
⌘I
cURL
curl --request POST \
--url https://api.domesystems.ai/v1/guards/filters \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"workspace_id": "<string>",
"name": "<string>",
"description": "<string>",
"config": {
"text": {
"components": [
{
"action": 123,
"matchers": [
{
"substring": {
"value": "<string>"
},
"ssn": {
"delimiters": [
123
]
},
"credit_card": {
"delimiters": [
123
],
"require_luhn": true,
"min_digits": 123,
"max_digits": 123
},
"phone": {
"delimiters": [
123
],
"group_sizes": [
123
],
"require_country_code": true,
"require_parens": true
},
"digits": {
"digits": 123,
"group_sizes": [
123
],
"delimiters": [
123
]
}
}
]
}
]
},
"json": {
"components": [
{
"field_actions": [
{
"field": "<string>",
"action": "<string>",
"reason": "<string>"
}
]
}
]
}
}
}
'import requests
url = "https://api.domesystems.ai/v1/guards/filters"
payload = {
"workspace_id": "<string>",
"name": "<string>",
"description": "<string>",
"config": {
"text": { "components": [
{
"action": 123,
"matchers": [
{
"substring": { "value": "<string>" },
"ssn": { "delimiters": [123] },
"credit_card": {
"delimiters": [123],
"require_luhn": True,
"min_digits": 123,
"max_digits": 123
},
"phone": {
"delimiters": [123],
"group_sizes": [123],
"require_country_code": True,
"require_parens": True
},
"digits": {
"digits": 123,
"group_sizes": [123],
"delimiters": [123]
}
}
]
}
] },
"json": { "components": [{ "field_actions": [
{
"field": "<string>",
"action": "<string>",
"reason": "<string>"
}
] }] }
}
}
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({
workspace_id: '<string>',
name: '<string>',
description: '<string>',
config: {
text: {
components: [
{
action: 123,
matchers: [
{
substring: {value: '<string>'},
ssn: {delimiters: [123]},
credit_card: {delimiters: [123], require_luhn: true, min_digits: 123, max_digits: 123},
phone: {
delimiters: [123],
group_sizes: [123],
require_country_code: true,
require_parens: true
},
digits: {digits: 123, group_sizes: [123], delimiters: [123]}
}
]
}
]
},
json: {
components: [{field_actions: [{field: '<string>', action: '<string>', reason: '<string>'}]}]
}
}
})
};
fetch('https://api.domesystems.ai/v1/guards/filters', 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.domesystems.ai/v1/guards/filters",
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([
'workspace_id' => '<string>',
'name' => '<string>',
'description' => '<string>',
'config' => [
'text' => [
'components' => [
[
'action' => 123,
'matchers' => [
[
'substring' => [
'value' => '<string>'
],
'ssn' => [
'delimiters' => [
123
]
],
'credit_card' => [
'delimiters' => [
123
],
'require_luhn' => true,
'min_digits' => 123,
'max_digits' => 123
],
'phone' => [
'delimiters' => [
123
],
'group_sizes' => [
123
],
'require_country_code' => true,
'require_parens' => true
],
'digits' => [
'digits' => 123,
'group_sizes' => [
123
],
'delimiters' => [
123
]
]
]
]
]
]
],
'json' => [
'components' => [
[
'field_actions' => [
[
'field' => '<string>',
'action' => '<string>',
'reason' => '<string>'
]
]
]
]
]
]
]),
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.domesystems.ai/v1/guards/filters"
payload := strings.NewReader("{\n \"workspace_id\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"config\": {\n \"text\": {\n \"components\": [\n {\n \"action\": 123,\n \"matchers\": [\n {\n \"substring\": {\n \"value\": \"<string>\"\n },\n \"ssn\": {\n \"delimiters\": [\n 123\n ]\n },\n \"credit_card\": {\n \"delimiters\": [\n 123\n ],\n \"require_luhn\": true,\n \"min_digits\": 123,\n \"max_digits\": 123\n },\n \"phone\": {\n \"delimiters\": [\n 123\n ],\n \"group_sizes\": [\n 123\n ],\n \"require_country_code\": true,\n \"require_parens\": true\n },\n \"digits\": {\n \"digits\": 123,\n \"group_sizes\": [\n 123\n ],\n \"delimiters\": [\n 123\n ]\n }\n }\n ]\n }\n ]\n },\n \"json\": {\n \"components\": [\n {\n \"field_actions\": [\n {\n \"field\": \"<string>\",\n \"action\": \"<string>\",\n \"reason\": \"<string>\"\n }\n ]\n }\n ]\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://api.domesystems.ai/v1/guards/filters")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"workspace_id\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"config\": {\n \"text\": {\n \"components\": [\n {\n \"action\": 123,\n \"matchers\": [\n {\n \"substring\": {\n \"value\": \"<string>\"\n },\n \"ssn\": {\n \"delimiters\": [\n 123\n ]\n },\n \"credit_card\": {\n \"delimiters\": [\n 123\n ],\n \"require_luhn\": true,\n \"min_digits\": 123,\n \"max_digits\": 123\n },\n \"phone\": {\n \"delimiters\": [\n 123\n ],\n \"group_sizes\": [\n 123\n ],\n \"require_country_code\": true,\n \"require_parens\": true\n },\n \"digits\": {\n \"digits\": 123,\n \"group_sizes\": [\n 123\n ],\n \"delimiters\": [\n 123\n ]\n }\n }\n ]\n }\n ]\n },\n \"json\": {\n \"components\": [\n {\n \"field_actions\": [\n {\n \"field\": \"<string>\",\n \"action\": \"<string>\",\n \"reason\": \"<string>\"\n }\n ]\n }\n ]\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.domesystems.ai/v1/guards/filters")
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 \"workspace_id\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"config\": {\n \"text\": {\n \"components\": [\n {\n \"action\": 123,\n \"matchers\": [\n {\n \"substring\": {\n \"value\": \"<string>\"\n },\n \"ssn\": {\n \"delimiters\": [\n 123\n ]\n },\n \"credit_card\": {\n \"delimiters\": [\n 123\n ],\n \"require_luhn\": true,\n \"min_digits\": 123,\n \"max_digits\": 123\n },\n \"phone\": {\n \"delimiters\": [\n 123\n ],\n \"group_sizes\": [\n 123\n ],\n \"require_country_code\": true,\n \"require_parens\": true\n },\n \"digits\": {\n \"digits\": 123,\n \"group_sizes\": [\n 123\n ],\n \"delimiters\": [\n 123\n ]\n }\n }\n ]\n }\n ]\n },\n \"json\": {\n \"components\": [\n {\n \"field_actions\": [\n {\n \"field\": \"<string>\",\n \"action\": \"<string>\",\n \"reason\": \"<string>\"\n }\n ]\n }\n ]\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"filter": {
"id": "<string>",
"workspace_id": "<string>",
"name": "<string>",
"description": "<string>",
"config": {
"text": {
"components": [
{
"action": 123,
"matchers": [
{
"substring": {
"value": "<string>"
},
"ssn": {
"delimiters": [
123
]
},
"credit_card": {
"delimiters": [
123
],
"require_luhn": true,
"min_digits": 123,
"max_digits": 123
},
"phone": {
"delimiters": [
123
],
"group_sizes": [
123
],
"require_country_code": true,
"require_parens": true
},
"digits": {
"digits": 123,
"group_sizes": [
123
],
"delimiters": [
123
]
}
}
]
}
]
},
"json": {
"components": [
{
"field_actions": [
{
"field": "<string>",
"action": "<string>",
"reason": "<string>"
}
]
}
]
}
},
"version": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"kind": 123
}
}