curl --request GET \
--url https://use.hoop.dev/api/datamasking-rulesimport requests
url = "https://use.hoop.dev/api/datamasking-rules"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://use.hoop.dev/api/datamasking-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://use.hoop.dev/api/datamasking-rules",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://use.hoop.dev/api/datamasking-rules"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://use.hoop.dev/api/datamasking-rules")
.asString();require 'uri'
require 'net/http'
url = URI("https://use.hoop.dev/api/datamasking-rules")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body[
{
"name": "mask-email",
"attributes": [
"production",
"pii"
],
"connection_ids": [
"15B5A2FD-0706-4A47-B1CF-B93CCFC5B3D7",
"15B5A2FD-0706-4A47-B1CF-B93CCFC5B3D8"
],
"custom_entity_types": [
{
"name": "ZIP_CODE",
"score": 0.01,
"deny_list": [
"Mr",
"Mr.",
"Mister"
],
"regex": "\\b\\d{5}(?:-\\d{4})?\\b"
}
],
"description": "Mask email addresses in the data",
"id": "15B5A2FD-0706-4A47-B1CF-B93CCFC5B3D7",
"managed_by": "hoop",
"score_threshold": 0.6,
"supported_entity_types": [
{
"entity_types": [
"EMAIL_ADDRESS",
"PERSON",
"PHONE_NUMBER",
"IP_ADDRESS"
],
"name": "PII"
}
],
"updated_at": "2023-08-15T14:30:45Z"
}
]{
"message": "the error description"
}List Data Masking Rules
List Data Masking Rules
curl --request GET \
--url https://use.hoop.dev/api/datamasking-rulesimport requests
url = "https://use.hoop.dev/api/datamasking-rules"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://use.hoop.dev/api/datamasking-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://use.hoop.dev/api/datamasking-rules",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://use.hoop.dev/api/datamasking-rules"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://use.hoop.dev/api/datamasking-rules")
.asString();require 'uri'
require 'net/http'
url = URI("https://use.hoop.dev/api/datamasking-rules")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body[
{
"name": "mask-email",
"attributes": [
"production",
"pii"
],
"connection_ids": [
"15B5A2FD-0706-4A47-B1CF-B93CCFC5B3D7",
"15B5A2FD-0706-4A47-B1CF-B93CCFC5B3D8"
],
"custom_entity_types": [
{
"name": "ZIP_CODE",
"score": 0.01,
"deny_list": [
"Mr",
"Mr.",
"Mister"
],
"regex": "\\b\\d{5}(?:-\\d{4})?\\b"
}
],
"description": "Mask email addresses in the data",
"id": "15B5A2FD-0706-4A47-B1CF-B93CCFC5B3D7",
"managed_by": "hoop",
"score_threshold": 0.6,
"supported_entity_types": [
{
"entity_types": [
"EMAIL_ADDRESS",
"PERSON",
"PHONE_NUMBER",
"IP_ADDRESS"
],
"name": "PII"
}
],
"updated_at": "2023-08-15T14:30:45Z"
}
]{
"message": "the error description"
}Response
OK
The unique name of the data masking rule, it's immutable after creation
"mask-email"
Attributes associated with this data masking rule
["production", "pii"]
The connections that this rule applies to
[
"15B5A2FD-0706-4A47-B1CF-B93CCFC5B3D7",
"15B5A2FD-0706-4A47-B1CF-B93CCFC5B3D8"
]
The custom entity types that this rule applies to
Show child attributes
Show child attributes
The description of the data masking rule
"Mask email addresses in the data"
The unique identifier of the data masking rule
"15B5A2FD-0706-4A47-B1CF-B93CCFC5B3D7"
Managed By is a read only field that indicates who manages this rule. When set (e.g. "hoop" for protection profiles), the rule cannot be modified or deleted directly.
"hoop"
The minimal detection score threshold for the entities to be masked.
0.6
The registered entity types that this rule applies to
Show child attributes
Show child attributes
The timestamp when the rule was updated
"2023-08-15T14:30:45Z"
Was this page helpful?