Table Privacy
Table policies, bounded previews, durable inspection scans and source-bound findings. Privacy inspection and configuration require table administration permission.
Read table privacy policy and coverage
/tables/{tableName}/privacyProvide your bearer token in the Authorization header when making requests to protected resources.
Example: Authorization: Bearer YOUR_API_KEY
Code Examples
curl -X GET "/db/v1/tables/{tableName}/privacy" \
-H "Authorization: Bearer YOUR_API_KEY"const response = await fetch('/db/v1/tables/{tableName}/privacy', {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_API_KEY'
}
});
const data = await response.json();fetch('/db/v1/tables/{tableName}/privacy', {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_API_KEY'
}
})
.then(response => response.json())
.then(data => console.log(data));import requests
headers = {
'Authorization': 'Bearer YOUR_API_KEY'
}
response = requests.get('/db/v1/tables/{tableName}/privacy', headers=headers)
data = response.json()package main
import (
"bytes"
"encoding/json"
"net/http"
)
func main() {
req, _ := http.NewRequest("GET", "/db/v1/tables/{tableName}/privacy", nil)
req.Header.Set("Authorization", "Bearer YOUR_API_KEY")
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
}Responses
{
"configured": true,
"policy": {
"mode": "monitor",
"fields": [
"string"
],
"category_groups": [
"contact_details"
],
"categories": [
{
"name": "string",
"description": "string",
"threshold": 0
}
],
"sensitivity": "conservative",
"replacement": "category",
"producer": {
"type": "extractor",
"revision": "string",
"config": {
"provider": "antfly",
"model": "string",
"schema_version": 1,
"url": "string",
"api_url": "string",
"project_id": "string",
"location": "string",
"region": "string",
"credentials_path": "string",
"account_id": "string",
"gateway_id": "string",
"api_key": "string",
"bearer_token": "string",
"schema": {
"entities": [
"string"
],
"relations": [
{
"type": "string",
"source": "string",
"target": "string",
"description": "string",
"threshold": 0
}
],
"classifications": [
{
"name": "string",
"labels": [
"string"
],
"multi_label": true,
"hypothesis_template": "string",
"top_k": 1,
"mode": "single",
"label_definitions": {},
"min_labels": 0,
"max_labels": 0,
"ordered": true,
"threshold": 0,
"candidate_threshold": 0,
"activation": "auto",
"temperature": 0,
"default": "string",
"prompt": "string",
"instruction": "string",
"examples": [
{
"input": "string",
"label": "string"
}
]
}
],
"structures": {},
"entity_definitions": {},
"entity_attributes": {},
"classification_constraints": [
{
"type": "LabelRef",
"task": "string",
"label": "string"
}
],
"joint_ie": {
"entities": {},
"relations": {},
"constraints": [
{
"type": "TypedEndpoints",
"relation": "string",
"head_types": [
"string"
],
"tail_types": [
"string"
]
}
]
}
},
"options": {
"threshold": 0,
"flat_ner": true,
"include_confidence": true,
"include_spans": true,
"word_splitter": "whitespace",
"overlap": "allow",
"offset_unit": "utf8_bytes",
"long_document": {
"mode": "reject",
"window_words": 1,
"overlap_words": 0,
"max_windows": 1,
"record_identity": "occurrence"
},
"decoder": {
"algorithm": "auto",
"beam_width": 1,
"max_search_nodes": 0,
"max_local_assignments": 1,
"best_effort": true
},
"joint_ie": {
"candidate_threshold": 0,
"entity_threshold": 0,
"relation_role_threshold": 0,
"top_k_entities": 1,
"top_k_roles": 1,
"relation_pair_cap": 1,
"max_edges_per_type": 1,
"entity_weight": 0,
"relation_weight": 0
},
"reader": {
"provider": "string",
"model": "string",
"url": "string",
"api_url": "string"
},
"resolver": {
"similarity_threshold": 0,
"type_must_match": true,
"min_entity_confidence": 0,
"min_relation_confidence": 0,
"deduplicate_relations": true,
"track_provenance": true
}
}
}
},
"execution": {
"batch_items": 1,
"max_attempts": 1
}
},
"policy_version": "string",
"resource_version": 0,
"generation": 0,
"scan_id": "string",
"etag": "string",
"resolved_producer": {
"type": "extractor",
"revision": "string",
"config": {
"provider": "antfly",
"model": "string",
"schema_version": 1,
"url": "string",
"api_url": "string",
"project_id": "string",
"location": "string",
"region": "string",
"credentials_path": "string",
"account_id": "string",
"gateway_id": "string",
"api_key": "string",
"bearer_token": "string",
"schema": {
"entities": [
"string"
],
"relations": [
{
"type": "string",
"source": "string",
"target": "string",
"description": "string",
"threshold": 0
}
],
"classifications": [
{
"name": "string",
"labels": [
"string"
],
"multi_label": true,
"hypothesis_template": "string",
"top_k": 1,
"mode": "single",
"label_definitions": {},
"min_labels": 0,
"max_labels": 0,
"ordered": true,
"threshold": 0,
"candidate_threshold": 0,
"activation": "auto",
"temperature": 0,
"default": "string",
"prompt": "string",
"instruction": "string",
"examples": [
{
"input": "string",
"label": "string"
}
]
}
],
"structures": {},
"entity_definitions": {},
"entity_attributes": {},
"classification_constraints": [
{
"type": "LabelRef",
"task": "string",
"label": "string"
}
],
"joint_ie": {
"entities": {},
"relations": {},
"constraints": [
{
"type": "TypedEndpoints",
"relation": "string",
"head_types": [
"string"
],
"tail_types": [
"string"
]
}
]
}
},
"options": {
"threshold": 0,
"flat_ner": true,
"include_confidence": true,
"include_spans": true,
"word_splitter": "whitespace",
"overlap": "allow",
"offset_unit": "utf8_bytes",
"long_document": {
"mode": "reject",
"window_words": 1,
"overlap_words": 0,
"max_windows": 1,
"record_identity": "occurrence"
},
"decoder": {
"algorithm": "auto",
"beam_width": 1,
"max_search_nodes": 0,
"max_local_assignments": 1,
"best_effort": true
},
"joint_ie": {
"candidate_threshold": 0,
"entity_threshold": 0,
"relation_role_threshold": 0,
"top_k_entities": 1,
"top_k_roles": 1,
"relation_pair_cap": 1,
"max_edges_per_type": 1,
"entity_weight": 0,
"relation_weight": 0
},
"reader": {
"provider": "string",
"model": "string",
"url": "string",
"api_url": "string"
},
"resolver": {
"similarity_threshold": 0,
"type_must_match": true,
"min_entity_confidence": 0,
"min_relation_confidence": 0,
"deduplicate_relations": true,
"track_provenance": true
}
}
}
},
"external_processing": true,
"coverage": {
"available": true,
"refreshing": true,
"started_at_millis": 0,
"completed_at_millis": 0,
"total": 0,
"current": 0,
"pending": 0,
"failed": 0,
"with_findings": 0,
"protected_ready": 0,
"protected_blocked": 0,
"categories": {},
"fields": {},
"failed_known": 0,
"failures": [
{}
],
"next_key": "string"
}
}{
"code": "string",
"message": "string"
}{
"code": "string",
"message": "string"
}{
"code": "string",
"message": "string"
}{
"code": "string",
"message": "string"
}Apply table privacy policy
/tables/{tableName}/privacyProvide your bearer token in the Authorization header when making requests to protected resources.
Example: Authorization: Bearer YOUR_API_KEY
Parameters
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
If-Match | string | header | No | Required exact ETag when replacing an existing policy. |
Request Body
Example:
{
"mode": "monitor",
"fields": [
"string"
],
"category_groups": [
"contact_details"
],
"categories": [
{
"name": "string",
"description": "string",
"threshold": 0
}
],
"sensitivity": "conservative",
"replacement": "category",
"producer": {
"type": "extractor",
"revision": "string",
"config": {
"provider": "antfly",
"model": "string",
"schema_version": 1,
"url": "string",
"api_url": "string",
"project_id": "string",
"location": "string",
"region": "string",
"credentials_path": "string",
"account_id": "string",
"gateway_id": "string",
"api_key": "string",
"bearer_token": "string",
"schema": {
"entities": [
"string"
],
"relations": [
{
"type": "string",
"source": "string",
"target": "string",
"description": "string",
"threshold": 0
}
],
"classifications": [
{
"name": "string",
"labels": [
"string"
],
"multi_label": true,
"hypothesis_template": "string",
"top_k": 1,
"mode": "single",
"label_definitions": {},
"min_labels": 0,
"max_labels": 0,
"ordered": true,
"threshold": 0,
"candidate_threshold": 0,
"activation": "auto",
"temperature": 0,
"default": "string",
"prompt": "string",
"instruction": "string",
"examples": [
{
"input": "string",
"label": "string"
}
]
}
],
"structures": {},
"entity_definitions": {},
"entity_attributes": {},
"classification_constraints": [
{
"type": "LabelRef",
"task": "string",
"label": "string"
}
],
"joint_ie": {
"entities": {},
"relations": {},
"constraints": [
{
"type": "TypedEndpoints",
"relation": "string",
"head_types": [
"string"
],
"tail_types": [
"string"
]
}
]
}
},
"options": {
"threshold": 0,
"flat_ner": true,
"include_confidence": true,
"include_spans": true,
"word_splitter": "whitespace",
"overlap": "allow",
"offset_unit": "utf8_bytes",
"long_document": {
"mode": "reject",
"window_words": 1,
"overlap_words": 0,
"max_windows": 1,
"record_identity": "occurrence"
},
"decoder": {
"algorithm": "auto",
"beam_width": 1,
"max_search_nodes": 0,
"max_local_assignments": 1,
"best_effort": true
},
"joint_ie": {
"candidate_threshold": 0,
"entity_threshold": 0,
"relation_role_threshold": 0,
"top_k_entities": 1,
"top_k_roles": 1,
"relation_pair_cap": 1,
"max_edges_per_type": 1,
"entity_weight": 0,
"relation_weight": 0
},
"reader": {
"provider": "string",
"model": "string",
"url": "string",
"api_url": "string"
},
"resolver": {
"similarity_threshold": 0,
"type_must_match": true,
"min_entity_confidence": 0,
"min_relation_confidence": 0,
"deduplicate_relations": true,
"track_provenance": true
}
}
}
},
"execution": {
"batch_items": 1,
"max_attempts": 1
}
}
Code Examples
curl -X PUT "/db/v1/tables/{tableName}/privacy" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"mode": "monitor",
"fields": [
"string"
],
"category_groups": [
"contact_details"
],
"categories": [
{
"name": "string",
"description": "string",
"threshold": 0
}
],
"sensitivity": "conservative",
"replacement": "category",
"producer": {
"type": "extractor",
"revision": "string",
"config": {
"provider": "antfly",
"model": "string",
"schema_version": 1,
"url": "string",
"api_url": "string",
"project_id": "string",
"location": "string",
"region": "string",
"credentials_path": "string",
"account_id": "string",
"gateway_id": "string",
"api_key": "string",
"bearer_token": "string",
"schema": {
"entities": [
"string"
],
"relations": [
{
"type": "string",
"source": "string",
"target": "string",
"description": "string",
"threshold": 0
}
],
"classifications": [
{
"name": "string",
"labels": [
"string"
],
"multi_label": true,
"hypothesis_template": "string",
"top_k": 1,
"mode": "single",
"label_definitions": {},
"min_labels": 0,
"max_labels": 0,
"ordered": true,
"threshold": 0,
"candidate_threshold": 0,
"activation": "auto",
"temperature": 0,
"default": "string",
"prompt": "string",
"instruction": "string",
"examples": [
{
"input": "string",
"label": "string"
}
]
}
],
"structures": {},
"entity_definitions": {},
"entity_attributes": {},
"classification_constraints": [
{
"type": "LabelRef",
"task": "string",
"label": "string"
}
],
"joint_ie": {
"entities": {},
"relations": {},
"constraints": [
{
"type": "TypedEndpoints",
"relation": "string",
"head_types": [
"string"
],
"tail_types": [
"string"
]
}
]
}
},
"options": {
"threshold": 0,
"flat_ner": true,
"include_confidence": true,
"include_spans": true,
"word_splitter": "whitespace",
"overlap": "allow",
"offset_unit": "utf8_bytes",
"long_document": {
"mode": "reject",
"window_words": 1,
"overlap_words": 0,
"max_windows": 1,
"record_identity": "occurrence"
},
"decoder": {
"algorithm": "auto",
"beam_width": 1,
"max_search_nodes": 0,
"max_local_assignments": 1,
"best_effort": true
},
"joint_ie": {
"candidate_threshold": 0,
"entity_threshold": 0,
"relation_role_threshold": 0,
"top_k_entities": 1,
"top_k_roles": 1,
"relation_pair_cap": 1,
"max_edges_per_type": 1,
"entity_weight": 0,
"relation_weight": 0
},
"reader": {
"provider": "string",
"model": "string",
"url": "string",
"api_url": "string"
},
"resolver": {
"similarity_threshold": 0,
"type_must_match": true,
"min_entity_confidence": 0,
"min_relation_confidence": 0,
"deduplicate_relations": true,
"track_provenance": true
}
}
}
},
"execution": {
"batch_items": 1,
"max_attempts": 1
}
}'const response = await fetch('/db/v1/tables/{tableName}/privacy', {
method: 'PUT',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
"mode": "monitor",
"fields": [
"string"
],
"category_groups": [
"contact_details"
],
"categories": [
{
"name": "string",
"description": "string",
"threshold": 0
}
],
"sensitivity": "conservative",
"replacement": "category",
"producer": {
"type": "extractor",
"revision": "string",
"config": {
"provider": "antfly",
"model": "string",
"schema_version": 1,
"url": "string",
"api_url": "string",
"project_id": "string",
"location": "string",
"region": "string",
"credentials_path": "string",
"account_id": "string",
"gateway_id": "string",
"api_key": "string",
"bearer_token": "string",
"schema": {
"entities": [
"string"
],
"relations": [
{
"type": "string",
"source": "string",
"target": "string",
"description": "string",
"threshold": 0
}
],
"classifications": [
{
"name": "string",
"labels": [
"string"
],
"multi_label": true,
"hypothesis_template": "string",
"top_k": 1,
"mode": "single",
"label_definitions": {},
"min_labels": 0,
"max_labels": 0,
"ordered": true,
"threshold": 0,
"candidate_threshold": 0,
"activation": "auto",
"temperature": 0,
"default": "string",
"prompt": "string",
"instruction": "string",
"examples": [
{
"input": "string",
"label": "string"
}
]
}
],
"structures": {},
"entity_definitions": {},
"entity_attributes": {},
"classification_constraints": [
{
"type": "LabelRef",
"task": "string",
"label": "string"
}
],
"joint_ie": {
"entities": {},
"relations": {},
"constraints": [
{
"type": "TypedEndpoints",
"relation": "string",
"head_types": [
"string"
],
"tail_types": [
"string"
]
}
]
}
},
"options": {
"threshold": 0,
"flat_ner": true,
"include_confidence": true,
"include_spans": true,
"word_splitter": "whitespace",
"overlap": "allow",
"offset_unit": "utf8_bytes",
"long_document": {
"mode": "reject",
"window_words": 1,
"overlap_words": 0,
"max_windows": 1,
"record_identity": "occurrence"
},
"decoder": {
"algorithm": "auto",
"beam_width": 1,
"max_search_nodes": 0,
"max_local_assignments": 1,
"best_effort": true
},
"joint_ie": {
"candidate_threshold": 0,
"entity_threshold": 0,
"relation_role_threshold": 0,
"top_k_entities": 1,
"top_k_roles": 1,
"relation_pair_cap": 1,
"max_edges_per_type": 1,
"entity_weight": 0,
"relation_weight": 0
},
"reader": {
"provider": "string",
"model": "string",
"url": "string",
"api_url": "string"
},
"resolver": {
"similarity_threshold": 0,
"type_must_match": true,
"min_entity_confidence": 0,
"min_relation_confidence": 0,
"deduplicate_relations": true,
"track_provenance": true
}
}
}
},
"execution": {
"batch_items": 1,
"max_attempts": 1
}
})
});
const data = await response.json();fetch('/db/v1/tables/{tableName}/privacy', {
method: 'PUT',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
"mode": "monitor",
"fields": [
"string"
],
"category_groups": [
"contact_details"
],
"categories": [
{
"name": "string",
"description": "string",
"threshold": 0
}
],
"sensitivity": "conservative",
"replacement": "category",
"producer": {
"type": "extractor",
"revision": "string",
"config": {
"provider": "antfly",
"model": "string",
"schema_version": 1,
"url": "string",
"api_url": "string",
"project_id": "string",
"location": "string",
"region": "string",
"credentials_path": "string",
"account_id": "string",
"gateway_id": "string",
"api_key": "string",
"bearer_token": "string",
"schema": {
"entities": [
"string"
],
"relations": [
{
"type": "string",
"source": "string",
"target": "string",
"description": "string",
"threshold": 0
}
],
"classifications": [
{
"name": "string",
"labels": [
"string"
],
"multi_label": true,
"hypothesis_template": "string",
"top_k": 1,
"mode": "single",
"label_definitions": {},
"min_labels": 0,
"max_labels": 0,
"ordered": true,
"threshold": 0,
"candidate_threshold": 0,
"activation": "auto",
"temperature": 0,
"default": "string",
"prompt": "string",
"instruction": "string",
"examples": [
{
"input": "string",
"label": "string"
}
]
}
],
"structures": {},
"entity_definitions": {},
"entity_attributes": {},
"classification_constraints": [
{
"type": "LabelRef",
"task": "string",
"label": "string"
}
],
"joint_ie": {
"entities": {},
"relations": {},
"constraints": [
{
"type": "TypedEndpoints",
"relation": "string",
"head_types": [
"string"
],
"tail_types": [
"string"
]
}
]
}
},
"options": {
"threshold": 0,
"flat_ner": true,
"include_confidence": true,
"include_spans": true,
"word_splitter": "whitespace",
"overlap": "allow",
"offset_unit": "utf8_bytes",
"long_document": {
"mode": "reject",
"window_words": 1,
"overlap_words": 0,
"max_windows": 1,
"record_identity": "occurrence"
},
"decoder": {
"algorithm": "auto",
"beam_width": 1,
"max_search_nodes": 0,
"max_local_assignments": 1,
"best_effort": true
},
"joint_ie": {
"candidate_threshold": 0,
"entity_threshold": 0,
"relation_role_threshold": 0,
"top_k_entities": 1,
"top_k_roles": 1,
"relation_pair_cap": 1,
"max_edges_per_type": 1,
"entity_weight": 0,
"relation_weight": 0
},
"reader": {
"provider": "string",
"model": "string",
"url": "string",
"api_url": "string"
},
"resolver": {
"similarity_threshold": 0,
"type_must_match": true,
"min_entity_confidence": 0,
"min_relation_confidence": 0,
"deduplicate_relations": true,
"track_provenance": true
}
}
}
},
"execution": {
"batch_items": 1,
"max_attempts": 1
}
})
})
.then(response => response.json())
.then(data => console.log(data));import requests
headers = {
'Authorization': 'Bearer YOUR_API_KEY'
}
response = requests.put(
'/db/v1/tables/{tableName}/privacy',
headers=headers,
json={
"mode": "monitor",
"fields": [
"string"
],
"category_groups": [
"contact_details"
],
"categories": [
{
"name": "string",
"description": "string",
"threshold": 0
}
],
"sensitivity": "conservative",
"replacement": "category",
"producer": {
"type": "extractor",
"revision": "string",
"config": {
"provider": "antfly",
"model": "string",
"schema_version": 1,
"url": "string",
"api_url": "string",
"project_id": "string",
"location": "string",
"region": "string",
"credentials_path": "string",
"account_id": "string",
"gateway_id": "string",
"api_key": "string",
"bearer_token": "string",
"schema": {
"entities": [
"string"
],
"relations": [
{
"type": "string",
"source": "string",
"target": "string",
"description": "string",
"threshold": 0
}
],
"classifications": [
{
"name": "string",
"labels": [
"string"
],
"multi_label": true,
"hypothesis_template": "string",
"top_k": 1,
"mode": "single",
"label_definitions": {},
"min_labels": 0,
"max_labels": 0,
"ordered": true,
"threshold": 0,
"candidate_threshold": 0,
"activation": "auto",
"temperature": 0,
"default": "string",
"prompt": "string",
"instruction": "string",
"examples": [
{
"input": "string",
"label": "string"
}
]
}
],
"structures": {},
"entity_definitions": {},
"entity_attributes": {},
"classification_constraints": [
{
"type": "LabelRef",
"task": "string",
"label": "string"
}
],
"joint_ie": {
"entities": {},
"relations": {},
"constraints": [
{
"type": "TypedEndpoints",
"relation": "string",
"head_types": [
"string"
],
"tail_types": [
"string"
]
}
]
}
},
"options": {
"threshold": 0,
"flat_ner": true,
"include_confidence": true,
"include_spans": true,
"word_splitter": "whitespace",
"overlap": "allow",
"offset_unit": "utf8_bytes",
"long_document": {
"mode": "reject",
"window_words": 1,
"overlap_words": 0,
"max_windows": 1,
"record_identity": "occurrence"
},
"decoder": {
"algorithm": "auto",
"beam_width": 1,
"max_search_nodes": 0,
"max_local_assignments": 1,
"best_effort": true
},
"joint_ie": {
"candidate_threshold": 0,
"entity_threshold": 0,
"relation_role_threshold": 0,
"top_k_entities": 1,
"top_k_roles": 1,
"relation_pair_cap": 1,
"max_edges_per_type": 1,
"entity_weight": 0,
"relation_weight": 0
},
"reader": {
"provider": "string",
"model": "string",
"url": "string",
"api_url": "string"
},
"resolver": {
"similarity_threshold": 0,
"type_must_match": true,
"min_entity_confidence": 0,
"min_relation_confidence": 0,
"deduplicate_relations": true,
"track_provenance": true
}
}
}
},
"execution": {
"batch_items": 1,
"max_attempts": 1
}
}
)
data = response.json()package main
import (
"bytes"
"encoding/json"
"net/http"
)
func main() {
body := []byte(`{
"mode": "monitor",
"fields": [
"string"
],
"category_groups": [
"contact_details"
],
"categories": [
{
"name": "string",
"description": "string",
"threshold": 0
}
],
"sensitivity": "conservative",
"replacement": "category",
"producer": {
"type": "extractor",
"revision": "string",
"config": {
"provider": "antfly",
"model": "string",
"schema_version": 1,
"url": "string",
"api_url": "string",
"project_id": "string",
"location": "string",
"region": "string",
"credentials_path": "string",
"account_id": "string",
"gateway_id": "string",
"api_key": "string",
"bearer_token": "string",
"schema": {
"entities": [
"string"
],
"relations": [
{
"type": "string",
"source": "string",
"target": "string",
"description": "string",
"threshold": 0
}
],
"classifications": [
{
"name": "string",
"labels": [
"string"
],
"multi_label": true,
"hypothesis_template": "string",
"top_k": 1,
"mode": "single",
"label_definitions": {},
"min_labels": 0,
"max_labels": 0,
"ordered": true,
"threshold": 0,
"candidate_threshold": 0,
"activation": "auto",
"temperature": 0,
"default": "string",
"prompt": "string",
"instruction": "string",
"examples": [
{
"input": "string",
"label": "string"
}
]
}
],
"structures": {},
"entity_definitions": {},
"entity_attributes": {},
"classification_constraints": [
{
"type": "LabelRef",
"task": "string",
"label": "string"
}
],
"joint_ie": {
"entities": {},
"relations": {},
"constraints": [
{
"type": "TypedEndpoints",
"relation": "string",
"head_types": [
"string"
],
"tail_types": [
"string"
]
}
]
}
},
"options": {
"threshold": 0,
"flat_ner": true,
"include_confidence": true,
"include_spans": true,
"word_splitter": "whitespace",
"overlap": "allow",
"offset_unit": "utf8_bytes",
"long_document": {
"mode": "reject",
"window_words": 1,
"overlap_words": 0,
"max_windows": 1,
"record_identity": "occurrence"
},
"decoder": {
"algorithm": "auto",
"beam_width": 1,
"max_search_nodes": 0,
"max_local_assignments": 1,
"best_effort": true
},
"joint_ie": {
"candidate_threshold": 0,
"entity_threshold": 0,
"relation_role_threshold": 0,
"top_k_entities": 1,
"top_k_roles": 1,
"relation_pair_cap": 1,
"max_edges_per_type": 1,
"entity_weight": 0,
"relation_weight": 0
},
"reader": {
"provider": "string",
"model": "string",
"url": "string",
"api_url": "string"
},
"resolver": {
"similarity_threshold": 0,
"type_must_match": true,
"min_entity_confidence": 0,
"min_relation_confidence": 0,
"deduplicate_relations": true,
"track_provenance": true
}
}
}
},
"execution": {
"batch_items": 1,
"max_attempts": 1
}
}`)
req, _ := http.NewRequest("PUT", "/db/v1/tables/{tableName}/privacy", bytes.NewBuffer(body))
req.Header.Set("Authorization", "Bearer YOUR_API_KEY")
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
}Responses
{
"configured": true,
"policy": {
"mode": "monitor",
"fields": [
"string"
],
"category_groups": [
"contact_details"
],
"categories": [
{
"name": "string",
"description": "string",
"threshold": 0
}
],
"sensitivity": "conservative",
"replacement": "category",
"producer": {
"type": "extractor",
"revision": "string",
"config": {
"provider": "antfly",
"model": "string",
"schema_version": 1,
"url": "string",
"api_url": "string",
"project_id": "string",
"location": "string",
"region": "string",
"credentials_path": "string",
"account_id": "string",
"gateway_id": "string",
"api_key": "string",
"bearer_token": "string",
"schema": {
"entities": [
"string"
],
"relations": [
{
"type": "string",
"source": "string",
"target": "string",
"description": "string",
"threshold": 0
}
],
"classifications": [
{
"name": "string",
"labels": [
"string"
],
"multi_label": true,
"hypothesis_template": "string",
"top_k": 1,
"mode": "single",
"label_definitions": {},
"min_labels": 0,
"max_labels": 0,
"ordered": true,
"threshold": 0,
"candidate_threshold": 0,
"activation": "auto",
"temperature": 0,
"default": "string",
"prompt": "string",
"instruction": "string",
"examples": [
{
"input": "string",
"label": "string"
}
]
}
],
"structures": {},
"entity_definitions": {},
"entity_attributes": {},
"classification_constraints": [
{
"type": "LabelRef",
"task": "string",
"label": "string"
}
],
"joint_ie": {
"entities": {},
"relations": {},
"constraints": [
{
"type": "TypedEndpoints",
"relation": "string",
"head_types": [
"string"
],
"tail_types": [
"string"
]
}
]
}
},
"options": {
"threshold": 0,
"flat_ner": true,
"include_confidence": true,
"include_spans": true,
"word_splitter": "whitespace",
"overlap": "allow",
"offset_unit": "utf8_bytes",
"long_document": {
"mode": "reject",
"window_words": 1,
"overlap_words": 0,
"max_windows": 1,
"record_identity": "occurrence"
},
"decoder": {
"algorithm": "auto",
"beam_width": 1,
"max_search_nodes": 0,
"max_local_assignments": 1,
"best_effort": true
},
"joint_ie": {
"candidate_threshold": 0,
"entity_threshold": 0,
"relation_role_threshold": 0,
"top_k_entities": 1,
"top_k_roles": 1,
"relation_pair_cap": 1,
"max_edges_per_type": 1,
"entity_weight": 0,
"relation_weight": 0
},
"reader": {
"provider": "string",
"model": "string",
"url": "string",
"api_url": "string"
},
"resolver": {
"similarity_threshold": 0,
"type_must_match": true,
"min_entity_confidence": 0,
"min_relation_confidence": 0,
"deduplicate_relations": true,
"track_provenance": true
}
}
}
},
"execution": {
"batch_items": 1,
"max_attempts": 1
}
},
"policy_version": "string",
"resource_version": 0,
"generation": 0,
"scan_id": "string",
"etag": "string",
"resolved_producer": {
"type": "extractor",
"revision": "string",
"config": {
"provider": "antfly",
"model": "string",
"schema_version": 1,
"url": "string",
"api_url": "string",
"project_id": "string",
"location": "string",
"region": "string",
"credentials_path": "string",
"account_id": "string",
"gateway_id": "string",
"api_key": "string",
"bearer_token": "string",
"schema": {
"entities": [
"string"
],
"relations": [
{
"type": "string",
"source": "string",
"target": "string",
"description": "string",
"threshold": 0
}
],
"classifications": [
{
"name": "string",
"labels": [
"string"
],
"multi_label": true,
"hypothesis_template": "string",
"top_k": 1,
"mode": "single",
"label_definitions": {},
"min_labels": 0,
"max_labels": 0,
"ordered": true,
"threshold": 0,
"candidate_threshold": 0,
"activation": "auto",
"temperature": 0,
"default": "string",
"prompt": "string",
"instruction": "string",
"examples": [
{
"input": "string",
"label": "string"
}
]
}
],
"structures": {},
"entity_definitions": {},
"entity_attributes": {},
"classification_constraints": [
{
"type": "LabelRef",
"task": "string",
"label": "string"
}
],
"joint_ie": {
"entities": {},
"relations": {},
"constraints": [
{
"type": "TypedEndpoints",
"relation": "string",
"head_types": [
"string"
],
"tail_types": [
"string"
]
}
]
}
},
"options": {
"threshold": 0,
"flat_ner": true,
"include_confidence": true,
"include_spans": true,
"word_splitter": "whitespace",
"overlap": "allow",
"offset_unit": "utf8_bytes",
"long_document": {
"mode": "reject",
"window_words": 1,
"overlap_words": 0,
"max_windows": 1,
"record_identity": "occurrence"
},
"decoder": {
"algorithm": "auto",
"beam_width": 1,
"max_search_nodes": 0,
"max_local_assignments": 1,
"best_effort": true
},
"joint_ie": {
"candidate_threshold": 0,
"entity_threshold": 0,
"relation_role_threshold": 0,
"top_k_entities": 1,
"top_k_roles": 1,
"relation_pair_cap": 1,
"max_edges_per_type": 1,
"entity_weight": 0,
"relation_weight": 0
},
"reader": {
"provider": "string",
"model": "string",
"url": "string",
"api_url": "string"
},
"resolver": {
"similarity_threshold": 0,
"type_must_match": true,
"min_entity_confidence": 0,
"min_relation_confidence": 0,
"deduplicate_relations": true,
"track_provenance": true
}
}
}
},
"external_processing": true,
"coverage": {
"available": true,
"refreshing": true,
"started_at_millis": 0,
"completed_at_millis": 0,
"total": 0,
"current": 0,
"pending": 0,
"failed": 0,
"with_findings": 0,
"protected_ready": 0,
"protected_blocked": 0,
"categories": {},
"fields": {},
"failed_known": 0,
"failures": [
{}
],
"next_key": "string"
}
}{
"code": "string",
"message": "string"
}{
"code": "string",
"message": "string"
}{
"code": "string",
"message": "string"
}{
"code": "string",
"message": "string"
}Inspect a bounded sample without saving the policy
/tables/{tableName}/privacy/previewProvide your bearer token in the Authorization header when making requests to protected resources.
Example: Authorization: Bearer YOUR_API_KEY
Request Body
Example:
{
"policy": {
"mode": "monitor",
"fields": [
"string"
],
"category_groups": [
"contact_details"
],
"categories": [
{
"name": "string",
"description": "string",
"threshold": 0
}
],
"sensitivity": "conservative",
"replacement": "category",
"producer": {
"type": "extractor",
"revision": "string",
"config": {
"provider": "antfly",
"model": "string",
"schema_version": 1,
"url": "string",
"api_url": "string",
"project_id": "string",
"location": "string",
"region": "string",
"credentials_path": "string",
"account_id": "string",
"gateway_id": "string",
"api_key": "string",
"bearer_token": "string",
"schema": {
"entities": [
"string"
],
"relations": [
{
"type": "string",
"source": "string",
"target": "string",
"description": "string",
"threshold": 0
}
],
"classifications": [
{
"name": "string",
"labels": [
"string"
],
"multi_label": true,
"hypothesis_template": "string",
"top_k": 1,
"mode": "single",
"label_definitions": {},
"min_labels": 0,
"max_labels": 0,
"ordered": true,
"threshold": 0,
"candidate_threshold": 0,
"activation": "auto",
"temperature": 0,
"default": "string",
"prompt": "string",
"instruction": "string",
"examples": [
{
"input": "string",
"label": "string"
}
]
}
],
"structures": {},
"entity_definitions": {},
"entity_attributes": {},
"classification_constraints": [
{
"type": "LabelRef",
"task": "string",
"label": "string"
}
],
"joint_ie": {
"entities": {},
"relations": {},
"constraints": [
{
"type": "TypedEndpoints",
"relation": "string",
"head_types": [
"string"
],
"tail_types": [
"string"
]
}
]
}
},
"options": {
"threshold": 0,
"flat_ner": true,
"include_confidence": true,
"include_spans": true,
"word_splitter": "whitespace",
"overlap": "allow",
"offset_unit": "utf8_bytes",
"long_document": {
"mode": "reject",
"window_words": 1,
"overlap_words": 0,
"max_windows": 1,
"record_identity": "occurrence"
},
"decoder": {
"algorithm": "auto",
"beam_width": 1,
"max_search_nodes": 0,
"max_local_assignments": 1,
"best_effort": true
},
"joint_ie": {
"candidate_threshold": 0,
"entity_threshold": 0,
"relation_role_threshold": 0,
"top_k_entities": 1,
"top_k_roles": 1,
"relation_pair_cap": 1,
"max_edges_per_type": 1,
"entity_weight": 0,
"relation_weight": 0
},
"reader": {
"provider": "string",
"model": "string",
"url": "string",
"api_url": "string"
},
"resolver": {
"similarity_threshold": 0,
"type_must_match": true,
"min_entity_confidence": 0,
"min_relation_confidence": 0,
"deduplicate_relations": true,
"track_provenance": true
}
}
}
},
"execution": {
"batch_items": 1,
"max_attempts": 1
}
},
"sample": {
"keys": [
"string"
],
"limit": 1
}
}
Code Examples
curl -X POST "/db/v1/tables/{tableName}/privacy/preview" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"policy": {
"mode": "monitor",
"fields": [
"string"
],
"category_groups": [
"contact_details"
],
"categories": [
{
"name": "string",
"description": "string",
"threshold": 0
}
],
"sensitivity": "conservative",
"replacement": "category",
"producer": {
"type": "extractor",
"revision": "string",
"config": {
"provider": "antfly",
"model": "string",
"schema_version": 1,
"url": "string",
"api_url": "string",
"project_id": "string",
"location": "string",
"region": "string",
"credentials_path": "string",
"account_id": "string",
"gateway_id": "string",
"api_key": "string",
"bearer_token": "string",
"schema": {
"entities": [
"string"
],
"relations": [
{
"type": "string",
"source": "string",
"target": "string",
"description": "string",
"threshold": 0
}
],
"classifications": [
{
"name": "string",
"labels": [
"string"
],
"multi_label": true,
"hypothesis_template": "string",
"top_k": 1,
"mode": "single",
"label_definitions": {},
"min_labels": 0,
"max_labels": 0,
"ordered": true,
"threshold": 0,
"candidate_threshold": 0,
"activation": "auto",
"temperature": 0,
"default": "string",
"prompt": "string",
"instruction": "string",
"examples": [
{
"input": "string",
"label": "string"
}
]
}
],
"structures": {},
"entity_definitions": {},
"entity_attributes": {},
"classification_constraints": [
{
"type": "LabelRef",
"task": "string",
"label": "string"
}
],
"joint_ie": {
"entities": {},
"relations": {},
"constraints": [
{
"type": "TypedEndpoints",
"relation": "string",
"head_types": [
"string"
],
"tail_types": [
"string"
]
}
]
}
},
"options": {
"threshold": 0,
"flat_ner": true,
"include_confidence": true,
"include_spans": true,
"word_splitter": "whitespace",
"overlap": "allow",
"offset_unit": "utf8_bytes",
"long_document": {
"mode": "reject",
"window_words": 1,
"overlap_words": 0,
"max_windows": 1,
"record_identity": "occurrence"
},
"decoder": {
"algorithm": "auto",
"beam_width": 1,
"max_search_nodes": 0,
"max_local_assignments": 1,
"best_effort": true
},
"joint_ie": {
"candidate_threshold": 0,
"entity_threshold": 0,
"relation_role_threshold": 0,
"top_k_entities": 1,
"top_k_roles": 1,
"relation_pair_cap": 1,
"max_edges_per_type": 1,
"entity_weight": 0,
"relation_weight": 0
},
"reader": {
"provider": "string",
"model": "string",
"url": "string",
"api_url": "string"
},
"resolver": {
"similarity_threshold": 0,
"type_must_match": true,
"min_entity_confidence": 0,
"min_relation_confidence": 0,
"deduplicate_relations": true,
"track_provenance": true
}
}
}
},
"execution": {
"batch_items": 1,
"max_attempts": 1
}
},
"sample": {
"keys": [
"string"
],
"limit": 1
}
}'const response = await fetch('/db/v1/tables/{tableName}/privacy/preview', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
"policy": {
"mode": "monitor",
"fields": [
"string"
],
"category_groups": [
"contact_details"
],
"categories": [
{
"name": "string",
"description": "string",
"threshold": 0
}
],
"sensitivity": "conservative",
"replacement": "category",
"producer": {
"type": "extractor",
"revision": "string",
"config": {
"provider": "antfly",
"model": "string",
"schema_version": 1,
"url": "string",
"api_url": "string",
"project_id": "string",
"location": "string",
"region": "string",
"credentials_path": "string",
"account_id": "string",
"gateway_id": "string",
"api_key": "string",
"bearer_token": "string",
"schema": {
"entities": [
"string"
],
"relations": [
{
"type": "string",
"source": "string",
"target": "string",
"description": "string",
"threshold": 0
}
],
"classifications": [
{
"name": "string",
"labels": [
"string"
],
"multi_label": true,
"hypothesis_template": "string",
"top_k": 1,
"mode": "single",
"label_definitions": {},
"min_labels": 0,
"max_labels": 0,
"ordered": true,
"threshold": 0,
"candidate_threshold": 0,
"activation": "auto",
"temperature": 0,
"default": "string",
"prompt": "string",
"instruction": "string",
"examples": [
{
"input": "string",
"label": "string"
}
]
}
],
"structures": {},
"entity_definitions": {},
"entity_attributes": {},
"classification_constraints": [
{
"type": "LabelRef",
"task": "string",
"label": "string"
}
],
"joint_ie": {
"entities": {},
"relations": {},
"constraints": [
{
"type": "TypedEndpoints",
"relation": "string",
"head_types": [
"string"
],
"tail_types": [
"string"
]
}
]
}
},
"options": {
"threshold": 0,
"flat_ner": true,
"include_confidence": true,
"include_spans": true,
"word_splitter": "whitespace",
"overlap": "allow",
"offset_unit": "utf8_bytes",
"long_document": {
"mode": "reject",
"window_words": 1,
"overlap_words": 0,
"max_windows": 1,
"record_identity": "occurrence"
},
"decoder": {
"algorithm": "auto",
"beam_width": 1,
"max_search_nodes": 0,
"max_local_assignments": 1,
"best_effort": true
},
"joint_ie": {
"candidate_threshold": 0,
"entity_threshold": 0,
"relation_role_threshold": 0,
"top_k_entities": 1,
"top_k_roles": 1,
"relation_pair_cap": 1,
"max_edges_per_type": 1,
"entity_weight": 0,
"relation_weight": 0
},
"reader": {
"provider": "string",
"model": "string",
"url": "string",
"api_url": "string"
},
"resolver": {
"similarity_threshold": 0,
"type_must_match": true,
"min_entity_confidence": 0,
"min_relation_confidence": 0,
"deduplicate_relations": true,
"track_provenance": true
}
}
}
},
"execution": {
"batch_items": 1,
"max_attempts": 1
}
},
"sample": {
"keys": [
"string"
],
"limit": 1
}
})
});
const data = await response.json();fetch('/db/v1/tables/{tableName}/privacy/preview', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
"policy": {
"mode": "monitor",
"fields": [
"string"
],
"category_groups": [
"contact_details"
],
"categories": [
{
"name": "string",
"description": "string",
"threshold": 0
}
],
"sensitivity": "conservative",
"replacement": "category",
"producer": {
"type": "extractor",
"revision": "string",
"config": {
"provider": "antfly",
"model": "string",
"schema_version": 1,
"url": "string",
"api_url": "string",
"project_id": "string",
"location": "string",
"region": "string",
"credentials_path": "string",
"account_id": "string",
"gateway_id": "string",
"api_key": "string",
"bearer_token": "string",
"schema": {
"entities": [
"string"
],
"relations": [
{
"type": "string",
"source": "string",
"target": "string",
"description": "string",
"threshold": 0
}
],
"classifications": [
{
"name": "string",
"labels": [
"string"
],
"multi_label": true,
"hypothesis_template": "string",
"top_k": 1,
"mode": "single",
"label_definitions": {},
"min_labels": 0,
"max_labels": 0,
"ordered": true,
"threshold": 0,
"candidate_threshold": 0,
"activation": "auto",
"temperature": 0,
"default": "string",
"prompt": "string",
"instruction": "string",
"examples": [
{
"input": "string",
"label": "string"
}
]
}
],
"structures": {},
"entity_definitions": {},
"entity_attributes": {},
"classification_constraints": [
{
"type": "LabelRef",
"task": "string",
"label": "string"
}
],
"joint_ie": {
"entities": {},
"relations": {},
"constraints": [
{
"type": "TypedEndpoints",
"relation": "string",
"head_types": [
"string"
],
"tail_types": [
"string"
]
}
]
}
},
"options": {
"threshold": 0,
"flat_ner": true,
"include_confidence": true,
"include_spans": true,
"word_splitter": "whitespace",
"overlap": "allow",
"offset_unit": "utf8_bytes",
"long_document": {
"mode": "reject",
"window_words": 1,
"overlap_words": 0,
"max_windows": 1,
"record_identity": "occurrence"
},
"decoder": {
"algorithm": "auto",
"beam_width": 1,
"max_search_nodes": 0,
"max_local_assignments": 1,
"best_effort": true
},
"joint_ie": {
"candidate_threshold": 0,
"entity_threshold": 0,
"relation_role_threshold": 0,
"top_k_entities": 1,
"top_k_roles": 1,
"relation_pair_cap": 1,
"max_edges_per_type": 1,
"entity_weight": 0,
"relation_weight": 0
},
"reader": {
"provider": "string",
"model": "string",
"url": "string",
"api_url": "string"
},
"resolver": {
"similarity_threshold": 0,
"type_must_match": true,
"min_entity_confidence": 0,
"min_relation_confidence": 0,
"deduplicate_relations": true,
"track_provenance": true
}
}
}
},
"execution": {
"batch_items": 1,
"max_attempts": 1
}
},
"sample": {
"keys": [
"string"
],
"limit": 1
}
})
})
.then(response => response.json())
.then(data => console.log(data));import requests
headers = {
'Authorization': 'Bearer YOUR_API_KEY'
}
response = requests.post(
'/db/v1/tables/{tableName}/privacy/preview',
headers=headers,
json={
"policy": {
"mode": "monitor",
"fields": [
"string"
],
"category_groups": [
"contact_details"
],
"categories": [
{
"name": "string",
"description": "string",
"threshold": 0
}
],
"sensitivity": "conservative",
"replacement": "category",
"producer": {
"type": "extractor",
"revision": "string",
"config": {
"provider": "antfly",
"model": "string",
"schema_version": 1,
"url": "string",
"api_url": "string",
"project_id": "string",
"location": "string",
"region": "string",
"credentials_path": "string",
"account_id": "string",
"gateway_id": "string",
"api_key": "string",
"bearer_token": "string",
"schema": {
"entities": [
"string"
],
"relations": [
{
"type": "string",
"source": "string",
"target": "string",
"description": "string",
"threshold": 0
}
],
"classifications": [
{
"name": "string",
"labels": [
"string"
],
"multi_label": true,
"hypothesis_template": "string",
"top_k": 1,
"mode": "single",
"label_definitions": {},
"min_labels": 0,
"max_labels": 0,
"ordered": true,
"threshold": 0,
"candidate_threshold": 0,
"activation": "auto",
"temperature": 0,
"default": "string",
"prompt": "string",
"instruction": "string",
"examples": [
{
"input": "string",
"label": "string"
}
]
}
],
"structures": {},
"entity_definitions": {},
"entity_attributes": {},
"classification_constraints": [
{
"type": "LabelRef",
"task": "string",
"label": "string"
}
],
"joint_ie": {
"entities": {},
"relations": {},
"constraints": [
{
"type": "TypedEndpoints",
"relation": "string",
"head_types": [
"string"
],
"tail_types": [
"string"
]
}
]
}
},
"options": {
"threshold": 0,
"flat_ner": true,
"include_confidence": true,
"include_spans": true,
"word_splitter": "whitespace",
"overlap": "allow",
"offset_unit": "utf8_bytes",
"long_document": {
"mode": "reject",
"window_words": 1,
"overlap_words": 0,
"max_windows": 1,
"record_identity": "occurrence"
},
"decoder": {
"algorithm": "auto",
"beam_width": 1,
"max_search_nodes": 0,
"max_local_assignments": 1,
"best_effort": true
},
"joint_ie": {
"candidate_threshold": 0,
"entity_threshold": 0,
"relation_role_threshold": 0,
"top_k_entities": 1,
"top_k_roles": 1,
"relation_pair_cap": 1,
"max_edges_per_type": 1,
"entity_weight": 0,
"relation_weight": 0
},
"reader": {
"provider": "string",
"model": "string",
"url": "string",
"api_url": "string"
},
"resolver": {
"similarity_threshold": 0,
"type_must_match": true,
"min_entity_confidence": 0,
"min_relation_confidence": 0,
"deduplicate_relations": true,
"track_provenance": true
}
}
}
},
"execution": {
"batch_items": 1,
"max_attempts": 1
}
},
"sample": {
"keys": [
"string"
],
"limit": 1
}
}
)
data = response.json()package main
import (
"bytes"
"encoding/json"
"net/http"
)
func main() {
body := []byte(`{
"policy": {
"mode": "monitor",
"fields": [
"string"
],
"category_groups": [
"contact_details"
],
"categories": [
{
"name": "string",
"description": "string",
"threshold": 0
}
],
"sensitivity": "conservative",
"replacement": "category",
"producer": {
"type": "extractor",
"revision": "string",
"config": {
"provider": "antfly",
"model": "string",
"schema_version": 1,
"url": "string",
"api_url": "string",
"project_id": "string",
"location": "string",
"region": "string",
"credentials_path": "string",
"account_id": "string",
"gateway_id": "string",
"api_key": "string",
"bearer_token": "string",
"schema": {
"entities": [
"string"
],
"relations": [
{
"type": "string",
"source": "string",
"target": "string",
"description": "string",
"threshold": 0
}
],
"classifications": [
{
"name": "string",
"labels": [
"string"
],
"multi_label": true,
"hypothesis_template": "string",
"top_k": 1,
"mode": "single",
"label_definitions": {},
"min_labels": 0,
"max_labels": 0,
"ordered": true,
"threshold": 0,
"candidate_threshold": 0,
"activation": "auto",
"temperature": 0,
"default": "string",
"prompt": "string",
"instruction": "string",
"examples": [
{
"input": "string",
"label": "string"
}
]
}
],
"structures": {},
"entity_definitions": {},
"entity_attributes": {},
"classification_constraints": [
{
"type": "LabelRef",
"task": "string",
"label": "string"
}
],
"joint_ie": {
"entities": {},
"relations": {},
"constraints": [
{
"type": "TypedEndpoints",
"relation": "string",
"head_types": [
"string"
],
"tail_types": [
"string"
]
}
]
}
},
"options": {
"threshold": 0,
"flat_ner": true,
"include_confidence": true,
"include_spans": true,
"word_splitter": "whitespace",
"overlap": "allow",
"offset_unit": "utf8_bytes",
"long_document": {
"mode": "reject",
"window_words": 1,
"overlap_words": 0,
"max_windows": 1,
"record_identity": "occurrence"
},
"decoder": {
"algorithm": "auto",
"beam_width": 1,
"max_search_nodes": 0,
"max_local_assignments": 1,
"best_effort": true
},
"joint_ie": {
"candidate_threshold": 0,
"entity_threshold": 0,
"relation_role_threshold": 0,
"top_k_entities": 1,
"top_k_roles": 1,
"relation_pair_cap": 1,
"max_edges_per_type": 1,
"entity_weight": 0,
"relation_weight": 0
},
"reader": {
"provider": "string",
"model": "string",
"url": "string",
"api_url": "string"
},
"resolver": {
"similarity_threshold": 0,
"type_must_match": true,
"min_entity_confidence": 0,
"min_relation_confidence": 0,
"deduplicate_relations": true,
"track_provenance": true
}
}
}
},
"execution": {
"batch_items": 1,
"max_attempts": 1
}
},
"sample": {
"keys": [
"string"
],
"limit": 1
}
}`)
req, _ := http.NewRequest("POST", "/db/v1/tables/{tableName}/privacy/preview", bytes.NewBuffer(body))
req.Header.Set("Authorization", "Bearer YOUR_API_KEY")
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
}Responses
{
"policy_version": "string",
"sampled": 0,
"complete_table_scan": true,
"external_processing": true,
"documents": [
{
"document": "string",
"fields": [
{
"field": "string",
"original": "string",
"text": "string",
"findings": [
{
"document": "string",
"field": "string",
"category": "string",
"start": 0,
"end": 0,
"confidence": 0,
"policy_version": "string",
"source_fingerprint": "string",
"producer_revision": "string"
}
]
}
]
}
]
}{
"code": "string",
"message": "string"
}{
"code": "string",
"message": "string"
}{
"code": "string",
"message": "string"
}{
"code": "string",
"message": "string"
}Start a durable privacy rescan
/tables/{tableName}/privacy/scansProvide your bearer token in the Authorization header when making requests to protected resources.
Example: Authorization: Bearer YOUR_API_KEY
Request Body
Example:
{
"from_key": "string",
"to_key": "string",
"limit": 1
}
Code Examples
curl -X POST "/db/v1/tables/{tableName}/privacy/scans" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"from_key": "string",
"to_key": "string",
"limit": 1
}'const response = await fetch('/db/v1/tables/{tableName}/privacy/scans', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
"from_key": "string",
"to_key": "string",
"limit": 1
})
});
const data = await response.json();fetch('/db/v1/tables/{tableName}/privacy/scans', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
"from_key": "string",
"to_key": "string",
"limit": 1
})
})
.then(response => response.json())
.then(data => console.log(data));import requests
headers = {
'Authorization': 'Bearer YOUR_API_KEY'
}
response = requests.post(
'/db/v1/tables/{tableName}/privacy/scans',
headers=headers,
json={
"from_key": "string",
"to_key": "string",
"limit": 1
}
)
data = response.json()package main
import (
"bytes"
"encoding/json"
"net/http"
)
func main() {
body := []byte(`{
"from_key": "string",
"to_key": "string",
"limit": 1
}`)
req, _ := http.NewRequest("POST", "/db/v1/tables/{tableName}/privacy/scans", bytes.NewBuffer(body))
req.Header.Set("Authorization", "Bearer YOUR_API_KEY")
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
}Responses
{
"scan_id": "string",
"policy_version": "string",
"phase": "queued",
"scanned": 0,
"reprocessed": 0,
"failed": 0,
"next_key": "string",
"skipped": 0,
"last_error": "string",
"consecutive_errors": 0,
"retry_after_millis": 0,
"updated_at_millis": 0,
"verification_cursor": "string",
"verification_current": 0,
"verification_pending": 0,
"verification_failed": 0,
"verification_blocked": 0,
"failures": [
{}
]
}{
"code": "string",
"message": "string"
}{
"code": "string",
"message": "string"
}{
"code": "string",
"message": "string"
}{
"code": "string",
"message": "string"
}{
"code": "string",
"message": "string"
}Read privacy scan progress
/tables/{tableName}/privacy/scans/{scanId}Provide your bearer token in the Authorization header when making requests to protected resources.
Example: Authorization: Bearer YOUR_API_KEY
Code Examples
curl -X GET "/db/v1/tables/{tableName}/privacy/scans/{scanId}" \
-H "Authorization: Bearer YOUR_API_KEY"const response = await fetch('/db/v1/tables/{tableName}/privacy/scans/{scanId}', {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_API_KEY'
}
});
const data = await response.json();fetch('/db/v1/tables/{tableName}/privacy/scans/{scanId}', {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_API_KEY'
}
})
.then(response => response.json())
.then(data => console.log(data));import requests
headers = {
'Authorization': 'Bearer YOUR_API_KEY'
}
response = requests.get('/db/v1/tables/{tableName}/privacy/scans/{scanId}', headers=headers)
data = response.json()package main
import (
"bytes"
"encoding/json"
"net/http"
)
func main() {
req, _ := http.NewRequest("GET", "/db/v1/tables/{tableName}/privacy/scans/{scanId}", nil)
req.Header.Set("Authorization", "Bearer YOUR_API_KEY")
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
}Responses
{
"scan_id": "string",
"policy_version": "string",
"phase": "queued",
"scanned": 0,
"reprocessed": 0,
"failed": 0,
"next_key": "string",
"skipped": 0,
"last_error": "string",
"consecutive_errors": 0,
"retry_after_millis": 0,
"updated_at_millis": 0,
"verification_cursor": "string",
"verification_current": 0,
"verification_pending": 0,
"verification_failed": 0,
"verification_blocked": 0,
"failures": [
{}
]
}{
"code": "string",
"message": "string"
}{
"code": "string",
"message": "string"
}{
"code": "string",
"message": "string"
}{
"code": "string",
"message": "string"
}List current privacy findings
/tables/{tableName}/privacy/findingsProvide your bearer token in the Authorization header when making requests to protected resources.
Example: Authorization: Bearer YOUR_API_KEY
Parameters
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
cursor | string | query | No | |
document | string | query | No | |
field | string | query | No | |
category | string | query | No | |
policy_version | string | query | No | |
limit | integer | query | No |
Code Examples
curl -X GET "/db/v1/tables/{tableName}/privacy/findings?cursor=value&document=value&field=value&category=value&policy_version=value&limit=value" \
-H "Authorization: Bearer YOUR_API_KEY"const response = await fetch('/db/v1/tables/{tableName}/privacy/findings?cursor=value&document=value&field=value&category=value&policy_version=value&limit=value', {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_API_KEY'
}
});
const data = await response.json();fetch('/db/v1/tables/{tableName}/privacy/findings?cursor=value&document=value&field=value&category=value&policy_version=value&limit=value', {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_API_KEY'
}
})
.then(response => response.json())
.then(data => console.log(data));import requests
headers = {
'Authorization': 'Bearer YOUR_API_KEY'
}
response = requests.get('/db/v1/tables/{tableName}/privacy/findings?cursor=value&document=value&field=value&category=value&policy_version=value&limit=value', headers=headers)
data = response.json()package main
import (
"bytes"
"encoding/json"
"net/http"
)
func main() {
req, _ := http.NewRequest("GET", "/db/v1/tables/{tableName}/privacy/findings?cursor=value&document=value&field=value&category=value&policy_version=value&limit=value", nil)
req.Header.Set("Authorization", "Bearer YOUR_API_KEY")
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
}Responses
{
"policy_version": "string",
"findings": [
{
"document": "string",
"field": "string",
"category": "string",
"start": 0,
"end": 0,
"confidence": 0,
"policy_version": "string",
"source_fingerprint": "string",
"producer_revision": "string"
}
],
"next_cursor": "string",
"examined_documents": 0,
"pending_documents": 0
}{
"code": "string",
"message": "string"
}{
"code": "string",
"message": "string"
}{
"code": "string",
"message": "string"
}{
"code": "string",
"message": "string"
}List current privacy findings with body filters
/tables/{tableName}/privacy/findingsEquivalent to GET findings, with filters and continuation in JSON so large document identifiers do not exceed URL limits.
Provide your bearer token in the Authorization header when making requests to protected resources.
Example: Authorization: Bearer YOUR_API_KEY
Request Body
Example:
{
"cursor": "string",
"document": "string",
"field": "string",
"category": "string",
"policy_version": "string",
"limit": 1
}
Code Examples
curl -X POST "/db/v1/tables/{tableName}/privacy/findings" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"cursor": "string",
"document": "string",
"field": "string",
"category": "string",
"policy_version": "string",
"limit": 1
}'const response = await fetch('/db/v1/tables/{tableName}/privacy/findings', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
"cursor": "string",
"document": "string",
"field": "string",
"category": "string",
"policy_version": "string",
"limit": 1
})
});
const data = await response.json();fetch('/db/v1/tables/{tableName}/privacy/findings', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
"cursor": "string",
"document": "string",
"field": "string",
"category": "string",
"policy_version": "string",
"limit": 1
})
})
.then(response => response.json())
.then(data => console.log(data));import requests
headers = {
'Authorization': 'Bearer YOUR_API_KEY'
}
response = requests.post(
'/db/v1/tables/{tableName}/privacy/findings',
headers=headers,
json={
"cursor": "string",
"document": "string",
"field": "string",
"category": "string",
"policy_version": "string",
"limit": 1
}
)
data = response.json()package main
import (
"bytes"
"encoding/json"
"net/http"
)
func main() {
body := []byte(`{
"cursor": "string",
"document": "string",
"field": "string",
"category": "string",
"policy_version": "string",
"limit": 1
}`)
req, _ := http.NewRequest("POST", "/db/v1/tables/{tableName}/privacy/findings", bytes.NewBuffer(body))
req.Header.Set("Authorization", "Bearer YOUR_API_KEY")
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
}Responses
{
"policy_version": "string",
"findings": [
{
"document": "string",
"field": "string",
"category": "string",
"start": 0,
"end": 0,
"confidence": 0,
"policy_version": "string",
"source_fingerprint": "string",
"producer_revision": "string"
}
],
"next_cursor": "string",
"examined_documents": 0,
"pending_documents": 0
}{
"code": "string",
"message": "string"
}{
"code": "string",
"message": "string"
}{
"code": "string",
"message": "string"
}{
"code": "string",
"message": "string"
}Read table privacy policy and coverage
/databases/{databaseName}/namespaces/{namespaceName}/tables/{tableName}/privacyProvide your bearer token in the Authorization header when making requests to protected resources.
Example: Authorization: Bearer YOUR_API_KEY
Code Examples
curl -X GET "/db/v1/databases/{databaseName}/namespaces/{namespaceName}/tables/{tableName}/privacy" \
-H "Authorization: Bearer YOUR_API_KEY"const response = await fetch('/db/v1/databases/{databaseName}/namespaces/{namespaceName}/tables/{tableName}/privacy', {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_API_KEY'
}
});
const data = await response.json();fetch('/db/v1/databases/{databaseName}/namespaces/{namespaceName}/tables/{tableName}/privacy', {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_API_KEY'
}
})
.then(response => response.json())
.then(data => console.log(data));import requests
headers = {
'Authorization': 'Bearer YOUR_API_KEY'
}
response = requests.get('/db/v1/databases/{databaseName}/namespaces/{namespaceName}/tables/{tableName}/privacy', headers=headers)
data = response.json()package main
import (
"bytes"
"encoding/json"
"net/http"
)
func main() {
req, _ := http.NewRequest("GET", "/db/v1/databases/{databaseName}/namespaces/{namespaceName}/tables/{tableName}/privacy", nil)
req.Header.Set("Authorization", "Bearer YOUR_API_KEY")
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
}Responses
{
"configured": true,
"policy": {
"mode": "monitor",
"fields": [
"string"
],
"category_groups": [
"contact_details"
],
"categories": [
{
"name": "string",
"description": "string",
"threshold": 0
}
],
"sensitivity": "conservative",
"replacement": "category",
"producer": {
"type": "extractor",
"revision": "string",
"config": {
"provider": "antfly",
"model": "string",
"schema_version": 1,
"url": "string",
"api_url": "string",
"project_id": "string",
"location": "string",
"region": "string",
"credentials_path": "string",
"account_id": "string",
"gateway_id": "string",
"api_key": "string",
"bearer_token": "string",
"schema": {
"entities": [
"string"
],
"relations": [
{
"type": "string",
"source": "string",
"target": "string",
"description": "string",
"threshold": 0
}
],
"classifications": [
{
"name": "string",
"labels": [
"string"
],
"multi_label": true,
"hypothesis_template": "string",
"top_k": 1,
"mode": "single",
"label_definitions": {},
"min_labels": 0,
"max_labels": 0,
"ordered": true,
"threshold": 0,
"candidate_threshold": 0,
"activation": "auto",
"temperature": 0,
"default": "string",
"prompt": "string",
"instruction": "string",
"examples": [
{
"input": "string",
"label": "string"
}
]
}
],
"structures": {},
"entity_definitions": {},
"entity_attributes": {},
"classification_constraints": [
{
"type": "LabelRef",
"task": "string",
"label": "string"
}
],
"joint_ie": {
"entities": {},
"relations": {},
"constraints": [
{
"type": "TypedEndpoints",
"relation": "string",
"head_types": [
"string"
],
"tail_types": [
"string"
]
}
]
}
},
"options": {
"threshold": 0,
"flat_ner": true,
"include_confidence": true,
"include_spans": true,
"word_splitter": "whitespace",
"overlap": "allow",
"offset_unit": "utf8_bytes",
"long_document": {
"mode": "reject",
"window_words": 1,
"overlap_words": 0,
"max_windows": 1,
"record_identity": "occurrence"
},
"decoder": {
"algorithm": "auto",
"beam_width": 1,
"max_search_nodes": 0,
"max_local_assignments": 1,
"best_effort": true
},
"joint_ie": {
"candidate_threshold": 0,
"entity_threshold": 0,
"relation_role_threshold": 0,
"top_k_entities": 1,
"top_k_roles": 1,
"relation_pair_cap": 1,
"max_edges_per_type": 1,
"entity_weight": 0,
"relation_weight": 0
},
"reader": {
"provider": "string",
"model": "string",
"url": "string",
"api_url": "string"
},
"resolver": {
"similarity_threshold": 0,
"type_must_match": true,
"min_entity_confidence": 0,
"min_relation_confidence": 0,
"deduplicate_relations": true,
"track_provenance": true
}
}
}
},
"execution": {
"batch_items": 1,
"max_attempts": 1
}
},
"policy_version": "string",
"resource_version": 0,
"generation": 0,
"scan_id": "string",
"etag": "string",
"resolved_producer": {
"type": "extractor",
"revision": "string",
"config": {
"provider": "antfly",
"model": "string",
"schema_version": 1,
"url": "string",
"api_url": "string",
"project_id": "string",
"location": "string",
"region": "string",
"credentials_path": "string",
"account_id": "string",
"gateway_id": "string",
"api_key": "string",
"bearer_token": "string",
"schema": {
"entities": [
"string"
],
"relations": [
{
"type": "string",
"source": "string",
"target": "string",
"description": "string",
"threshold": 0
}
],
"classifications": [
{
"name": "string",
"labels": [
"string"
],
"multi_label": true,
"hypothesis_template": "string",
"top_k": 1,
"mode": "single",
"label_definitions": {},
"min_labels": 0,
"max_labels": 0,
"ordered": true,
"threshold": 0,
"candidate_threshold": 0,
"activation": "auto",
"temperature": 0,
"default": "string",
"prompt": "string",
"instruction": "string",
"examples": [
{
"input": "string",
"label": "string"
}
]
}
],
"structures": {},
"entity_definitions": {},
"entity_attributes": {},
"classification_constraints": [
{
"type": "LabelRef",
"task": "string",
"label": "string"
}
],
"joint_ie": {
"entities": {},
"relations": {},
"constraints": [
{
"type": "TypedEndpoints",
"relation": "string",
"head_types": [
"string"
],
"tail_types": [
"string"
]
}
]
}
},
"options": {
"threshold": 0,
"flat_ner": true,
"include_confidence": true,
"include_spans": true,
"word_splitter": "whitespace",
"overlap": "allow",
"offset_unit": "utf8_bytes",
"long_document": {
"mode": "reject",
"window_words": 1,
"overlap_words": 0,
"max_windows": 1,
"record_identity": "occurrence"
},
"decoder": {
"algorithm": "auto",
"beam_width": 1,
"max_search_nodes": 0,
"max_local_assignments": 1,
"best_effort": true
},
"joint_ie": {
"candidate_threshold": 0,
"entity_threshold": 0,
"relation_role_threshold": 0,
"top_k_entities": 1,
"top_k_roles": 1,
"relation_pair_cap": 1,
"max_edges_per_type": 1,
"entity_weight": 0,
"relation_weight": 0
},
"reader": {
"provider": "string",
"model": "string",
"url": "string",
"api_url": "string"
},
"resolver": {
"similarity_threshold": 0,
"type_must_match": true,
"min_entity_confidence": 0,
"min_relation_confidence": 0,
"deduplicate_relations": true,
"track_provenance": true
}
}
}
},
"external_processing": true,
"coverage": {
"available": true,
"refreshing": true,
"started_at_millis": 0,
"completed_at_millis": 0,
"total": 0,
"current": 0,
"pending": 0,
"failed": 0,
"with_findings": 0,
"protected_ready": 0,
"protected_blocked": 0,
"categories": {},
"fields": {},
"failed_known": 0,
"failures": [
{}
],
"next_key": "string"
}
}{
"code": "string",
"message": "string"
}{
"code": "string",
"message": "string"
}{
"code": "string",
"message": "string"
}{
"code": "string",
"message": "string"
}Apply table privacy policy
/databases/{databaseName}/namespaces/{namespaceName}/tables/{tableName}/privacyProvide your bearer token in the Authorization header when making requests to protected resources.
Example: Authorization: Bearer YOUR_API_KEY
Parameters
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
If-Match | string | header | No | Required exact ETag when replacing an existing policy. |
Request Body
Example:
{
"mode": "monitor",
"fields": [
"string"
],
"category_groups": [
"contact_details"
],
"categories": [
{
"name": "string",
"description": "string",
"threshold": 0
}
],
"sensitivity": "conservative",
"replacement": "category",
"producer": {
"type": "extractor",
"revision": "string",
"config": {
"provider": "antfly",
"model": "string",
"schema_version": 1,
"url": "string",
"api_url": "string",
"project_id": "string",
"location": "string",
"region": "string",
"credentials_path": "string",
"account_id": "string",
"gateway_id": "string",
"api_key": "string",
"bearer_token": "string",
"schema": {
"entities": [
"string"
],
"relations": [
{
"type": "string",
"source": "string",
"target": "string",
"description": "string",
"threshold": 0
}
],
"classifications": [
{
"name": "string",
"labels": [
"string"
],
"multi_label": true,
"hypothesis_template": "string",
"top_k": 1,
"mode": "single",
"label_definitions": {},
"min_labels": 0,
"max_labels": 0,
"ordered": true,
"threshold": 0,
"candidate_threshold": 0,
"activation": "auto",
"temperature": 0,
"default": "string",
"prompt": "string",
"instruction": "string",
"examples": [
{
"input": "string",
"label": "string"
}
]
}
],
"structures": {},
"entity_definitions": {},
"entity_attributes": {},
"classification_constraints": [
{
"type": "LabelRef",
"task": "string",
"label": "string"
}
],
"joint_ie": {
"entities": {},
"relations": {},
"constraints": [
{
"type": "TypedEndpoints",
"relation": "string",
"head_types": [
"string"
],
"tail_types": [
"string"
]
}
]
}
},
"options": {
"threshold": 0,
"flat_ner": true,
"include_confidence": true,
"include_spans": true,
"word_splitter": "whitespace",
"overlap": "allow",
"offset_unit": "utf8_bytes",
"long_document": {
"mode": "reject",
"window_words": 1,
"overlap_words": 0,
"max_windows": 1,
"record_identity": "occurrence"
},
"decoder": {
"algorithm": "auto",
"beam_width": 1,
"max_search_nodes": 0,
"max_local_assignments": 1,
"best_effort": true
},
"joint_ie": {
"candidate_threshold": 0,
"entity_threshold": 0,
"relation_role_threshold": 0,
"top_k_entities": 1,
"top_k_roles": 1,
"relation_pair_cap": 1,
"max_edges_per_type": 1,
"entity_weight": 0,
"relation_weight": 0
},
"reader": {
"provider": "string",
"model": "string",
"url": "string",
"api_url": "string"
},
"resolver": {
"similarity_threshold": 0,
"type_must_match": true,
"min_entity_confidence": 0,
"min_relation_confidence": 0,
"deduplicate_relations": true,
"track_provenance": true
}
}
}
},
"execution": {
"batch_items": 1,
"max_attempts": 1
}
}
Code Examples
curl -X PUT "/db/v1/databases/{databaseName}/namespaces/{namespaceName}/tables/{tableName}/privacy" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"mode": "monitor",
"fields": [
"string"
],
"category_groups": [
"contact_details"
],
"categories": [
{
"name": "string",
"description": "string",
"threshold": 0
}
],
"sensitivity": "conservative",
"replacement": "category",
"producer": {
"type": "extractor",
"revision": "string",
"config": {
"provider": "antfly",
"model": "string",
"schema_version": 1,
"url": "string",
"api_url": "string",
"project_id": "string",
"location": "string",
"region": "string",
"credentials_path": "string",
"account_id": "string",
"gateway_id": "string",
"api_key": "string",
"bearer_token": "string",
"schema": {
"entities": [
"string"
],
"relations": [
{
"type": "string",
"source": "string",
"target": "string",
"description": "string",
"threshold": 0
}
],
"classifications": [
{
"name": "string",
"labels": [
"string"
],
"multi_label": true,
"hypothesis_template": "string",
"top_k": 1,
"mode": "single",
"label_definitions": {},
"min_labels": 0,
"max_labels": 0,
"ordered": true,
"threshold": 0,
"candidate_threshold": 0,
"activation": "auto",
"temperature": 0,
"default": "string",
"prompt": "string",
"instruction": "string",
"examples": [
{
"input": "string",
"label": "string"
}
]
}
],
"structures": {},
"entity_definitions": {},
"entity_attributes": {},
"classification_constraints": [
{
"type": "LabelRef",
"task": "string",
"label": "string"
}
],
"joint_ie": {
"entities": {},
"relations": {},
"constraints": [
{
"type": "TypedEndpoints",
"relation": "string",
"head_types": [
"string"
],
"tail_types": [
"string"
]
}
]
}
},
"options": {
"threshold": 0,
"flat_ner": true,
"include_confidence": true,
"include_spans": true,
"word_splitter": "whitespace",
"overlap": "allow",
"offset_unit": "utf8_bytes",
"long_document": {
"mode": "reject",
"window_words": 1,
"overlap_words": 0,
"max_windows": 1,
"record_identity": "occurrence"
},
"decoder": {
"algorithm": "auto",
"beam_width": 1,
"max_search_nodes": 0,
"max_local_assignments": 1,
"best_effort": true
},
"joint_ie": {
"candidate_threshold": 0,
"entity_threshold": 0,
"relation_role_threshold": 0,
"top_k_entities": 1,
"top_k_roles": 1,
"relation_pair_cap": 1,
"max_edges_per_type": 1,
"entity_weight": 0,
"relation_weight": 0
},
"reader": {
"provider": "string",
"model": "string",
"url": "string",
"api_url": "string"
},
"resolver": {
"similarity_threshold": 0,
"type_must_match": true,
"min_entity_confidence": 0,
"min_relation_confidence": 0,
"deduplicate_relations": true,
"track_provenance": true
}
}
}
},
"execution": {
"batch_items": 1,
"max_attempts": 1
}
}'const response = await fetch('/db/v1/databases/{databaseName}/namespaces/{namespaceName}/tables/{tableName}/privacy', {
method: 'PUT',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
"mode": "monitor",
"fields": [
"string"
],
"category_groups": [
"contact_details"
],
"categories": [
{
"name": "string",
"description": "string",
"threshold": 0
}
],
"sensitivity": "conservative",
"replacement": "category",
"producer": {
"type": "extractor",
"revision": "string",
"config": {
"provider": "antfly",
"model": "string",
"schema_version": 1,
"url": "string",
"api_url": "string",
"project_id": "string",
"location": "string",
"region": "string",
"credentials_path": "string",
"account_id": "string",
"gateway_id": "string",
"api_key": "string",
"bearer_token": "string",
"schema": {
"entities": [
"string"
],
"relations": [
{
"type": "string",
"source": "string",
"target": "string",
"description": "string",
"threshold": 0
}
],
"classifications": [
{
"name": "string",
"labels": [
"string"
],
"multi_label": true,
"hypothesis_template": "string",
"top_k": 1,
"mode": "single",
"label_definitions": {},
"min_labels": 0,
"max_labels": 0,
"ordered": true,
"threshold": 0,
"candidate_threshold": 0,
"activation": "auto",
"temperature": 0,
"default": "string",
"prompt": "string",
"instruction": "string",
"examples": [
{
"input": "string",
"label": "string"
}
]
}
],
"structures": {},
"entity_definitions": {},
"entity_attributes": {},
"classification_constraints": [
{
"type": "LabelRef",
"task": "string",
"label": "string"
}
],
"joint_ie": {
"entities": {},
"relations": {},
"constraints": [
{
"type": "TypedEndpoints",
"relation": "string",
"head_types": [
"string"
],
"tail_types": [
"string"
]
}
]
}
},
"options": {
"threshold": 0,
"flat_ner": true,
"include_confidence": true,
"include_spans": true,
"word_splitter": "whitespace",
"overlap": "allow",
"offset_unit": "utf8_bytes",
"long_document": {
"mode": "reject",
"window_words": 1,
"overlap_words": 0,
"max_windows": 1,
"record_identity": "occurrence"
},
"decoder": {
"algorithm": "auto",
"beam_width": 1,
"max_search_nodes": 0,
"max_local_assignments": 1,
"best_effort": true
},
"joint_ie": {
"candidate_threshold": 0,
"entity_threshold": 0,
"relation_role_threshold": 0,
"top_k_entities": 1,
"top_k_roles": 1,
"relation_pair_cap": 1,
"max_edges_per_type": 1,
"entity_weight": 0,
"relation_weight": 0
},
"reader": {
"provider": "string",
"model": "string",
"url": "string",
"api_url": "string"
},
"resolver": {
"similarity_threshold": 0,
"type_must_match": true,
"min_entity_confidence": 0,
"min_relation_confidence": 0,
"deduplicate_relations": true,
"track_provenance": true
}
}
}
},
"execution": {
"batch_items": 1,
"max_attempts": 1
}
})
});
const data = await response.json();fetch('/db/v1/databases/{databaseName}/namespaces/{namespaceName}/tables/{tableName}/privacy', {
method: 'PUT',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
"mode": "monitor",
"fields": [
"string"
],
"category_groups": [
"contact_details"
],
"categories": [
{
"name": "string",
"description": "string",
"threshold": 0
}
],
"sensitivity": "conservative",
"replacement": "category",
"producer": {
"type": "extractor",
"revision": "string",
"config": {
"provider": "antfly",
"model": "string",
"schema_version": 1,
"url": "string",
"api_url": "string",
"project_id": "string",
"location": "string",
"region": "string",
"credentials_path": "string",
"account_id": "string",
"gateway_id": "string",
"api_key": "string",
"bearer_token": "string",
"schema": {
"entities": [
"string"
],
"relations": [
{
"type": "string",
"source": "string",
"target": "string",
"description": "string",
"threshold": 0
}
],
"classifications": [
{
"name": "string",
"labels": [
"string"
],
"multi_label": true,
"hypothesis_template": "string",
"top_k": 1,
"mode": "single",
"label_definitions": {},
"min_labels": 0,
"max_labels": 0,
"ordered": true,
"threshold": 0,
"candidate_threshold": 0,
"activation": "auto",
"temperature": 0,
"default": "string",
"prompt": "string",
"instruction": "string",
"examples": [
{
"input": "string",
"label": "string"
}
]
}
],
"structures": {},
"entity_definitions": {},
"entity_attributes": {},
"classification_constraints": [
{
"type": "LabelRef",
"task": "string",
"label": "string"
}
],
"joint_ie": {
"entities": {},
"relations": {},
"constraints": [
{
"type": "TypedEndpoints",
"relation": "string",
"head_types": [
"string"
],
"tail_types": [
"string"
]
}
]
}
},
"options": {
"threshold": 0,
"flat_ner": true,
"include_confidence": true,
"include_spans": true,
"word_splitter": "whitespace",
"overlap": "allow",
"offset_unit": "utf8_bytes",
"long_document": {
"mode": "reject",
"window_words": 1,
"overlap_words": 0,
"max_windows": 1,
"record_identity": "occurrence"
},
"decoder": {
"algorithm": "auto",
"beam_width": 1,
"max_search_nodes": 0,
"max_local_assignments": 1,
"best_effort": true
},
"joint_ie": {
"candidate_threshold": 0,
"entity_threshold": 0,
"relation_role_threshold": 0,
"top_k_entities": 1,
"top_k_roles": 1,
"relation_pair_cap": 1,
"max_edges_per_type": 1,
"entity_weight": 0,
"relation_weight": 0
},
"reader": {
"provider": "string",
"model": "string",
"url": "string",
"api_url": "string"
},
"resolver": {
"similarity_threshold": 0,
"type_must_match": true,
"min_entity_confidence": 0,
"min_relation_confidence": 0,
"deduplicate_relations": true,
"track_provenance": true
}
}
}
},
"execution": {
"batch_items": 1,
"max_attempts": 1
}
})
})
.then(response => response.json())
.then(data => console.log(data));import requests
headers = {
'Authorization': 'Bearer YOUR_API_KEY'
}
response = requests.put(
'/db/v1/databases/{databaseName}/namespaces/{namespaceName}/tables/{tableName}/privacy',
headers=headers,
json={
"mode": "monitor",
"fields": [
"string"
],
"category_groups": [
"contact_details"
],
"categories": [
{
"name": "string",
"description": "string",
"threshold": 0
}
],
"sensitivity": "conservative",
"replacement": "category",
"producer": {
"type": "extractor",
"revision": "string",
"config": {
"provider": "antfly",
"model": "string",
"schema_version": 1,
"url": "string",
"api_url": "string",
"project_id": "string",
"location": "string",
"region": "string",
"credentials_path": "string",
"account_id": "string",
"gateway_id": "string",
"api_key": "string",
"bearer_token": "string",
"schema": {
"entities": [
"string"
],
"relations": [
{
"type": "string",
"source": "string",
"target": "string",
"description": "string",
"threshold": 0
}
],
"classifications": [
{
"name": "string",
"labels": [
"string"
],
"multi_label": true,
"hypothesis_template": "string",
"top_k": 1,
"mode": "single",
"label_definitions": {},
"min_labels": 0,
"max_labels": 0,
"ordered": true,
"threshold": 0,
"candidate_threshold": 0,
"activation": "auto",
"temperature": 0,
"default": "string",
"prompt": "string",
"instruction": "string",
"examples": [
{
"input": "string",
"label": "string"
}
]
}
],
"structures": {},
"entity_definitions": {},
"entity_attributes": {},
"classification_constraints": [
{
"type": "LabelRef",
"task": "string",
"label": "string"
}
],
"joint_ie": {
"entities": {},
"relations": {},
"constraints": [
{
"type": "TypedEndpoints",
"relation": "string",
"head_types": [
"string"
],
"tail_types": [
"string"
]
}
]
}
},
"options": {
"threshold": 0,
"flat_ner": true,
"include_confidence": true,
"include_spans": true,
"word_splitter": "whitespace",
"overlap": "allow",
"offset_unit": "utf8_bytes",
"long_document": {
"mode": "reject",
"window_words": 1,
"overlap_words": 0,
"max_windows": 1,
"record_identity": "occurrence"
},
"decoder": {
"algorithm": "auto",
"beam_width": 1,
"max_search_nodes": 0,
"max_local_assignments": 1,
"best_effort": true
},
"joint_ie": {
"candidate_threshold": 0,
"entity_threshold": 0,
"relation_role_threshold": 0,
"top_k_entities": 1,
"top_k_roles": 1,
"relation_pair_cap": 1,
"max_edges_per_type": 1,
"entity_weight": 0,
"relation_weight": 0
},
"reader": {
"provider": "string",
"model": "string",
"url": "string",
"api_url": "string"
},
"resolver": {
"similarity_threshold": 0,
"type_must_match": true,
"min_entity_confidence": 0,
"min_relation_confidence": 0,
"deduplicate_relations": true,
"track_provenance": true
}
}
}
},
"execution": {
"batch_items": 1,
"max_attempts": 1
}
}
)
data = response.json()package main
import (
"bytes"
"encoding/json"
"net/http"
)
func main() {
body := []byte(`{
"mode": "monitor",
"fields": [
"string"
],
"category_groups": [
"contact_details"
],
"categories": [
{
"name": "string",
"description": "string",
"threshold": 0
}
],
"sensitivity": "conservative",
"replacement": "category",
"producer": {
"type": "extractor",
"revision": "string",
"config": {
"provider": "antfly",
"model": "string",
"schema_version": 1,
"url": "string",
"api_url": "string",
"project_id": "string",
"location": "string",
"region": "string",
"credentials_path": "string",
"account_id": "string",
"gateway_id": "string",
"api_key": "string",
"bearer_token": "string",
"schema": {
"entities": [
"string"
],
"relations": [
{
"type": "string",
"source": "string",
"target": "string",
"description": "string",
"threshold": 0
}
],
"classifications": [
{
"name": "string",
"labels": [
"string"
],
"multi_label": true,
"hypothesis_template": "string",
"top_k": 1,
"mode": "single",
"label_definitions": {},
"min_labels": 0,
"max_labels": 0,
"ordered": true,
"threshold": 0,
"candidate_threshold": 0,
"activation": "auto",
"temperature": 0,
"default": "string",
"prompt": "string",
"instruction": "string",
"examples": [
{
"input": "string",
"label": "string"
}
]
}
],
"structures": {},
"entity_definitions": {},
"entity_attributes": {},
"classification_constraints": [
{
"type": "LabelRef",
"task": "string",
"label": "string"
}
],
"joint_ie": {
"entities": {},
"relations": {},
"constraints": [
{
"type": "TypedEndpoints",
"relation": "string",
"head_types": [
"string"
],
"tail_types": [
"string"
]
}
]
}
},
"options": {
"threshold": 0,
"flat_ner": true,
"include_confidence": true,
"include_spans": true,
"word_splitter": "whitespace",
"overlap": "allow",
"offset_unit": "utf8_bytes",
"long_document": {
"mode": "reject",
"window_words": 1,
"overlap_words": 0,
"max_windows": 1,
"record_identity": "occurrence"
},
"decoder": {
"algorithm": "auto",
"beam_width": 1,
"max_search_nodes": 0,
"max_local_assignments": 1,
"best_effort": true
},
"joint_ie": {
"candidate_threshold": 0,
"entity_threshold": 0,
"relation_role_threshold": 0,
"top_k_entities": 1,
"top_k_roles": 1,
"relation_pair_cap": 1,
"max_edges_per_type": 1,
"entity_weight": 0,
"relation_weight": 0
},
"reader": {
"provider": "string",
"model": "string",
"url": "string",
"api_url": "string"
},
"resolver": {
"similarity_threshold": 0,
"type_must_match": true,
"min_entity_confidence": 0,
"min_relation_confidence": 0,
"deduplicate_relations": true,
"track_provenance": true
}
}
}
},
"execution": {
"batch_items": 1,
"max_attempts": 1
}
}`)
req, _ := http.NewRequest("PUT", "/db/v1/databases/{databaseName}/namespaces/{namespaceName}/tables/{tableName}/privacy", bytes.NewBuffer(body))
req.Header.Set("Authorization", "Bearer YOUR_API_KEY")
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
}Responses
{
"configured": true,
"policy": {
"mode": "monitor",
"fields": [
"string"
],
"category_groups": [
"contact_details"
],
"categories": [
{
"name": "string",
"description": "string",
"threshold": 0
}
],
"sensitivity": "conservative",
"replacement": "category",
"producer": {
"type": "extractor",
"revision": "string",
"config": {
"provider": "antfly",
"model": "string",
"schema_version": 1,
"url": "string",
"api_url": "string",
"project_id": "string",
"location": "string",
"region": "string",
"credentials_path": "string",
"account_id": "string",
"gateway_id": "string",
"api_key": "string",
"bearer_token": "string",
"schema": {
"entities": [
"string"
],
"relations": [
{
"type": "string",
"source": "string",
"target": "string",
"description": "string",
"threshold": 0
}
],
"classifications": [
{
"name": "string",
"labels": [
"string"
],
"multi_label": true,
"hypothesis_template": "string",
"top_k": 1,
"mode": "single",
"label_definitions": {},
"min_labels": 0,
"max_labels": 0,
"ordered": true,
"threshold": 0,
"candidate_threshold": 0,
"activation": "auto",
"temperature": 0,
"default": "string",
"prompt": "string",
"instruction": "string",
"examples": [
{
"input": "string",
"label": "string"
}
]
}
],
"structures": {},
"entity_definitions": {},
"entity_attributes": {},
"classification_constraints": [
{
"type": "LabelRef",
"task": "string",
"label": "string"
}
],
"joint_ie": {
"entities": {},
"relations": {},
"constraints": [
{
"type": "TypedEndpoints",
"relation": "string",
"head_types": [
"string"
],
"tail_types": [
"string"
]
}
]
}
},
"options": {
"threshold": 0,
"flat_ner": true,
"include_confidence": true,
"include_spans": true,
"word_splitter": "whitespace",
"overlap": "allow",
"offset_unit": "utf8_bytes",
"long_document": {
"mode": "reject",
"window_words": 1,
"overlap_words": 0,
"max_windows": 1,
"record_identity": "occurrence"
},
"decoder": {
"algorithm": "auto",
"beam_width": 1,
"max_search_nodes": 0,
"max_local_assignments": 1,
"best_effort": true
},
"joint_ie": {
"candidate_threshold": 0,
"entity_threshold": 0,
"relation_role_threshold": 0,
"top_k_entities": 1,
"top_k_roles": 1,
"relation_pair_cap": 1,
"max_edges_per_type": 1,
"entity_weight": 0,
"relation_weight": 0
},
"reader": {
"provider": "string",
"model": "string",
"url": "string",
"api_url": "string"
},
"resolver": {
"similarity_threshold": 0,
"type_must_match": true,
"min_entity_confidence": 0,
"min_relation_confidence": 0,
"deduplicate_relations": true,
"track_provenance": true
}
}
}
},
"execution": {
"batch_items": 1,
"max_attempts": 1
}
},
"policy_version": "string",
"resource_version": 0,
"generation": 0,
"scan_id": "string",
"etag": "string",
"resolved_producer": {
"type": "extractor",
"revision": "string",
"config": {
"provider": "antfly",
"model": "string",
"schema_version": 1,
"url": "string",
"api_url": "string",
"project_id": "string",
"location": "string",
"region": "string",
"credentials_path": "string",
"account_id": "string",
"gateway_id": "string",
"api_key": "string",
"bearer_token": "string",
"schema": {
"entities": [
"string"
],
"relations": [
{
"type": "string",
"source": "string",
"target": "string",
"description": "string",
"threshold": 0
}
],
"classifications": [
{
"name": "string",
"labels": [
"string"
],
"multi_label": true,
"hypothesis_template": "string",
"top_k": 1,
"mode": "single",
"label_definitions": {},
"min_labels": 0,
"max_labels": 0,
"ordered": true,
"threshold": 0,
"candidate_threshold": 0,
"activation": "auto",
"temperature": 0,
"default": "string",
"prompt": "string",
"instruction": "string",
"examples": [
{
"input": "string",
"label": "string"
}
]
}
],
"structures": {},
"entity_definitions": {},
"entity_attributes": {},
"classification_constraints": [
{
"type": "LabelRef",
"task": "string",
"label": "string"
}
],
"joint_ie": {
"entities": {},
"relations": {},
"constraints": [
{
"type": "TypedEndpoints",
"relation": "string",
"head_types": [
"string"
],
"tail_types": [
"string"
]
}
]
}
},
"options": {
"threshold": 0,
"flat_ner": true,
"include_confidence": true,
"include_spans": true,
"word_splitter": "whitespace",
"overlap": "allow",
"offset_unit": "utf8_bytes",
"long_document": {
"mode": "reject",
"window_words": 1,
"overlap_words": 0,
"max_windows": 1,
"record_identity": "occurrence"
},
"decoder": {
"algorithm": "auto",
"beam_width": 1,
"max_search_nodes": 0,
"max_local_assignments": 1,
"best_effort": true
},
"joint_ie": {
"candidate_threshold": 0,
"entity_threshold": 0,
"relation_role_threshold": 0,
"top_k_entities": 1,
"top_k_roles": 1,
"relation_pair_cap": 1,
"max_edges_per_type": 1,
"entity_weight": 0,
"relation_weight": 0
},
"reader": {
"provider": "string",
"model": "string",
"url": "string",
"api_url": "string"
},
"resolver": {
"similarity_threshold": 0,
"type_must_match": true,
"min_entity_confidence": 0,
"min_relation_confidence": 0,
"deduplicate_relations": true,
"track_provenance": true
}
}
}
},
"external_processing": true,
"coverage": {
"available": true,
"refreshing": true,
"started_at_millis": 0,
"completed_at_millis": 0,
"total": 0,
"current": 0,
"pending": 0,
"failed": 0,
"with_findings": 0,
"protected_ready": 0,
"protected_blocked": 0,
"categories": {},
"fields": {},
"failed_known": 0,
"failures": [
{}
],
"next_key": "string"
}
}{
"code": "string",
"message": "string"
}{
"code": "string",
"message": "string"
}{
"code": "string",
"message": "string"
}{
"code": "string",
"message": "string"
}Inspect a bounded sample without saving the policy
/databases/{databaseName}/namespaces/{namespaceName}/tables/{tableName}/privacy/previewProvide your bearer token in the Authorization header when making requests to protected resources.
Example: Authorization: Bearer YOUR_API_KEY
Request Body
Example:
{
"policy": {
"mode": "monitor",
"fields": [
"string"
],
"category_groups": [
"contact_details"
],
"categories": [
{
"name": "string",
"description": "string",
"threshold": 0
}
],
"sensitivity": "conservative",
"replacement": "category",
"producer": {
"type": "extractor",
"revision": "string",
"config": {
"provider": "antfly",
"model": "string",
"schema_version": 1,
"url": "string",
"api_url": "string",
"project_id": "string",
"location": "string",
"region": "string",
"credentials_path": "string",
"account_id": "string",
"gateway_id": "string",
"api_key": "string",
"bearer_token": "string",
"schema": {
"entities": [
"string"
],
"relations": [
{
"type": "string",
"source": "string",
"target": "string",
"description": "string",
"threshold": 0
}
],
"classifications": [
{
"name": "string",
"labels": [
"string"
],
"multi_label": true,
"hypothesis_template": "string",
"top_k": 1,
"mode": "single",
"label_definitions": {},
"min_labels": 0,
"max_labels": 0,
"ordered": true,
"threshold": 0,
"candidate_threshold": 0,
"activation": "auto",
"temperature": 0,
"default": "string",
"prompt": "string",
"instruction": "string",
"examples": [
{
"input": "string",
"label": "string"
}
]
}
],
"structures": {},
"entity_definitions": {},
"entity_attributes": {},
"classification_constraints": [
{
"type": "LabelRef",
"task": "string",
"label": "string"
}
],
"joint_ie": {
"entities": {},
"relations": {},
"constraints": [
{
"type": "TypedEndpoints",
"relation": "string",
"head_types": [
"string"
],
"tail_types": [
"string"
]
}
]
}
},
"options": {
"threshold": 0,
"flat_ner": true,
"include_confidence": true,
"include_spans": true,
"word_splitter": "whitespace",
"overlap": "allow",
"offset_unit": "utf8_bytes",
"long_document": {
"mode": "reject",
"window_words": 1,
"overlap_words": 0,
"max_windows": 1,
"record_identity": "occurrence"
},
"decoder": {
"algorithm": "auto",
"beam_width": 1,
"max_search_nodes": 0,
"max_local_assignments": 1,
"best_effort": true
},
"joint_ie": {
"candidate_threshold": 0,
"entity_threshold": 0,
"relation_role_threshold": 0,
"top_k_entities": 1,
"top_k_roles": 1,
"relation_pair_cap": 1,
"max_edges_per_type": 1,
"entity_weight": 0,
"relation_weight": 0
},
"reader": {
"provider": "string",
"model": "string",
"url": "string",
"api_url": "string"
},
"resolver": {
"similarity_threshold": 0,
"type_must_match": true,
"min_entity_confidence": 0,
"min_relation_confidence": 0,
"deduplicate_relations": true,
"track_provenance": true
}
}
}
},
"execution": {
"batch_items": 1,
"max_attempts": 1
}
},
"sample": {
"keys": [
"string"
],
"limit": 1
}
}
Code Examples
curl -X POST "/db/v1/databases/{databaseName}/namespaces/{namespaceName}/tables/{tableName}/privacy/preview" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"policy": {
"mode": "monitor",
"fields": [
"string"
],
"category_groups": [
"contact_details"
],
"categories": [
{
"name": "string",
"description": "string",
"threshold": 0
}
],
"sensitivity": "conservative",
"replacement": "category",
"producer": {
"type": "extractor",
"revision": "string",
"config": {
"provider": "antfly",
"model": "string",
"schema_version": 1,
"url": "string",
"api_url": "string",
"project_id": "string",
"location": "string",
"region": "string",
"credentials_path": "string",
"account_id": "string",
"gateway_id": "string",
"api_key": "string",
"bearer_token": "string",
"schema": {
"entities": [
"string"
],
"relations": [
{
"type": "string",
"source": "string",
"target": "string",
"description": "string",
"threshold": 0
}
],
"classifications": [
{
"name": "string",
"labels": [
"string"
],
"multi_label": true,
"hypothesis_template": "string",
"top_k": 1,
"mode": "single",
"label_definitions": {},
"min_labels": 0,
"max_labels": 0,
"ordered": true,
"threshold": 0,
"candidate_threshold": 0,
"activation": "auto",
"temperature": 0,
"default": "string",
"prompt": "string",
"instruction": "string",
"examples": [
{
"input": "string",
"label": "string"
}
]
}
],
"structures": {},
"entity_definitions": {},
"entity_attributes": {},
"classification_constraints": [
{
"type": "LabelRef",
"task": "string",
"label": "string"
}
],
"joint_ie": {
"entities": {},
"relations": {},
"constraints": [
{
"type": "TypedEndpoints",
"relation": "string",
"head_types": [
"string"
],
"tail_types": [
"string"
]
}
]
}
},
"options": {
"threshold": 0,
"flat_ner": true,
"include_confidence": true,
"include_spans": true,
"word_splitter": "whitespace",
"overlap": "allow",
"offset_unit": "utf8_bytes",
"long_document": {
"mode": "reject",
"window_words": 1,
"overlap_words": 0,
"max_windows": 1,
"record_identity": "occurrence"
},
"decoder": {
"algorithm": "auto",
"beam_width": 1,
"max_search_nodes": 0,
"max_local_assignments": 1,
"best_effort": true
},
"joint_ie": {
"candidate_threshold": 0,
"entity_threshold": 0,
"relation_role_threshold": 0,
"top_k_entities": 1,
"top_k_roles": 1,
"relation_pair_cap": 1,
"max_edges_per_type": 1,
"entity_weight": 0,
"relation_weight": 0
},
"reader": {
"provider": "string",
"model": "string",
"url": "string",
"api_url": "string"
},
"resolver": {
"similarity_threshold": 0,
"type_must_match": true,
"min_entity_confidence": 0,
"min_relation_confidence": 0,
"deduplicate_relations": true,
"track_provenance": true
}
}
}
},
"execution": {
"batch_items": 1,
"max_attempts": 1
}
},
"sample": {
"keys": [
"string"
],
"limit": 1
}
}'const response = await fetch('/db/v1/databases/{databaseName}/namespaces/{namespaceName}/tables/{tableName}/privacy/preview', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
"policy": {
"mode": "monitor",
"fields": [
"string"
],
"category_groups": [
"contact_details"
],
"categories": [
{
"name": "string",
"description": "string",
"threshold": 0
}
],
"sensitivity": "conservative",
"replacement": "category",
"producer": {
"type": "extractor",
"revision": "string",
"config": {
"provider": "antfly",
"model": "string",
"schema_version": 1,
"url": "string",
"api_url": "string",
"project_id": "string",
"location": "string",
"region": "string",
"credentials_path": "string",
"account_id": "string",
"gateway_id": "string",
"api_key": "string",
"bearer_token": "string",
"schema": {
"entities": [
"string"
],
"relations": [
{
"type": "string",
"source": "string",
"target": "string",
"description": "string",
"threshold": 0
}
],
"classifications": [
{
"name": "string",
"labels": [
"string"
],
"multi_label": true,
"hypothesis_template": "string",
"top_k": 1,
"mode": "single",
"label_definitions": {},
"min_labels": 0,
"max_labels": 0,
"ordered": true,
"threshold": 0,
"candidate_threshold": 0,
"activation": "auto",
"temperature": 0,
"default": "string",
"prompt": "string",
"instruction": "string",
"examples": [
{
"input": "string",
"label": "string"
}
]
}
],
"structures": {},
"entity_definitions": {},
"entity_attributes": {},
"classification_constraints": [
{
"type": "LabelRef",
"task": "string",
"label": "string"
}
],
"joint_ie": {
"entities": {},
"relations": {},
"constraints": [
{
"type": "TypedEndpoints",
"relation": "string",
"head_types": [
"string"
],
"tail_types": [
"string"
]
}
]
}
},
"options": {
"threshold": 0,
"flat_ner": true,
"include_confidence": true,
"include_spans": true,
"word_splitter": "whitespace",
"overlap": "allow",
"offset_unit": "utf8_bytes",
"long_document": {
"mode": "reject",
"window_words": 1,
"overlap_words": 0,
"max_windows": 1,
"record_identity": "occurrence"
},
"decoder": {
"algorithm": "auto",
"beam_width": 1,
"max_search_nodes": 0,
"max_local_assignments": 1,
"best_effort": true
},
"joint_ie": {
"candidate_threshold": 0,
"entity_threshold": 0,
"relation_role_threshold": 0,
"top_k_entities": 1,
"top_k_roles": 1,
"relation_pair_cap": 1,
"max_edges_per_type": 1,
"entity_weight": 0,
"relation_weight": 0
},
"reader": {
"provider": "string",
"model": "string",
"url": "string",
"api_url": "string"
},
"resolver": {
"similarity_threshold": 0,
"type_must_match": true,
"min_entity_confidence": 0,
"min_relation_confidence": 0,
"deduplicate_relations": true,
"track_provenance": true
}
}
}
},
"execution": {
"batch_items": 1,
"max_attempts": 1
}
},
"sample": {
"keys": [
"string"
],
"limit": 1
}
})
});
const data = await response.json();fetch('/db/v1/databases/{databaseName}/namespaces/{namespaceName}/tables/{tableName}/privacy/preview', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
"policy": {
"mode": "monitor",
"fields": [
"string"
],
"category_groups": [
"contact_details"
],
"categories": [
{
"name": "string",
"description": "string",
"threshold": 0
}
],
"sensitivity": "conservative",
"replacement": "category",
"producer": {
"type": "extractor",
"revision": "string",
"config": {
"provider": "antfly",
"model": "string",
"schema_version": 1,
"url": "string",
"api_url": "string",
"project_id": "string",
"location": "string",
"region": "string",
"credentials_path": "string",
"account_id": "string",
"gateway_id": "string",
"api_key": "string",
"bearer_token": "string",
"schema": {
"entities": [
"string"
],
"relations": [
{
"type": "string",
"source": "string",
"target": "string",
"description": "string",
"threshold": 0
}
],
"classifications": [
{
"name": "string",
"labels": [
"string"
],
"multi_label": true,
"hypothesis_template": "string",
"top_k": 1,
"mode": "single",
"label_definitions": {},
"min_labels": 0,
"max_labels": 0,
"ordered": true,
"threshold": 0,
"candidate_threshold": 0,
"activation": "auto",
"temperature": 0,
"default": "string",
"prompt": "string",
"instruction": "string",
"examples": [
{
"input": "string",
"label": "string"
}
]
}
],
"structures": {},
"entity_definitions": {},
"entity_attributes": {},
"classification_constraints": [
{
"type": "LabelRef",
"task": "string",
"label": "string"
}
],
"joint_ie": {
"entities": {},
"relations": {},
"constraints": [
{
"type": "TypedEndpoints",
"relation": "string",
"head_types": [
"string"
],
"tail_types": [
"string"
]
}
]
}
},
"options": {
"threshold": 0,
"flat_ner": true,
"include_confidence": true,
"include_spans": true,
"word_splitter": "whitespace",
"overlap": "allow",
"offset_unit": "utf8_bytes",
"long_document": {
"mode": "reject",
"window_words": 1,
"overlap_words": 0,
"max_windows": 1,
"record_identity": "occurrence"
},
"decoder": {
"algorithm": "auto",
"beam_width": 1,
"max_search_nodes": 0,
"max_local_assignments": 1,
"best_effort": true
},
"joint_ie": {
"candidate_threshold": 0,
"entity_threshold": 0,
"relation_role_threshold": 0,
"top_k_entities": 1,
"top_k_roles": 1,
"relation_pair_cap": 1,
"max_edges_per_type": 1,
"entity_weight": 0,
"relation_weight": 0
},
"reader": {
"provider": "string",
"model": "string",
"url": "string",
"api_url": "string"
},
"resolver": {
"similarity_threshold": 0,
"type_must_match": true,
"min_entity_confidence": 0,
"min_relation_confidence": 0,
"deduplicate_relations": true,
"track_provenance": true
}
}
}
},
"execution": {
"batch_items": 1,
"max_attempts": 1
}
},
"sample": {
"keys": [
"string"
],
"limit": 1
}
})
})
.then(response => response.json())
.then(data => console.log(data));import requests
headers = {
'Authorization': 'Bearer YOUR_API_KEY'
}
response = requests.post(
'/db/v1/databases/{databaseName}/namespaces/{namespaceName}/tables/{tableName}/privacy/preview',
headers=headers,
json={
"policy": {
"mode": "monitor",
"fields": [
"string"
],
"category_groups": [
"contact_details"
],
"categories": [
{
"name": "string",
"description": "string",
"threshold": 0
}
],
"sensitivity": "conservative",
"replacement": "category",
"producer": {
"type": "extractor",
"revision": "string",
"config": {
"provider": "antfly",
"model": "string",
"schema_version": 1,
"url": "string",
"api_url": "string",
"project_id": "string",
"location": "string",
"region": "string",
"credentials_path": "string",
"account_id": "string",
"gateway_id": "string",
"api_key": "string",
"bearer_token": "string",
"schema": {
"entities": [
"string"
],
"relations": [
{
"type": "string",
"source": "string",
"target": "string",
"description": "string",
"threshold": 0
}
],
"classifications": [
{
"name": "string",
"labels": [
"string"
],
"multi_label": true,
"hypothesis_template": "string",
"top_k": 1,
"mode": "single",
"label_definitions": {},
"min_labels": 0,
"max_labels": 0,
"ordered": true,
"threshold": 0,
"candidate_threshold": 0,
"activation": "auto",
"temperature": 0,
"default": "string",
"prompt": "string",
"instruction": "string",
"examples": [
{
"input": "string",
"label": "string"
}
]
}
],
"structures": {},
"entity_definitions": {},
"entity_attributes": {},
"classification_constraints": [
{
"type": "LabelRef",
"task": "string",
"label": "string"
}
],
"joint_ie": {
"entities": {},
"relations": {},
"constraints": [
{
"type": "TypedEndpoints",
"relation": "string",
"head_types": [
"string"
],
"tail_types": [
"string"
]
}
]
}
},
"options": {
"threshold": 0,
"flat_ner": true,
"include_confidence": true,
"include_spans": true,
"word_splitter": "whitespace",
"overlap": "allow",
"offset_unit": "utf8_bytes",
"long_document": {
"mode": "reject",
"window_words": 1,
"overlap_words": 0,
"max_windows": 1,
"record_identity": "occurrence"
},
"decoder": {
"algorithm": "auto",
"beam_width": 1,
"max_search_nodes": 0,
"max_local_assignments": 1,
"best_effort": true
},
"joint_ie": {
"candidate_threshold": 0,
"entity_threshold": 0,
"relation_role_threshold": 0,
"top_k_entities": 1,
"top_k_roles": 1,
"relation_pair_cap": 1,
"max_edges_per_type": 1,
"entity_weight": 0,
"relation_weight": 0
},
"reader": {
"provider": "string",
"model": "string",
"url": "string",
"api_url": "string"
},
"resolver": {
"similarity_threshold": 0,
"type_must_match": true,
"min_entity_confidence": 0,
"min_relation_confidence": 0,
"deduplicate_relations": true,
"track_provenance": true
}
}
}
},
"execution": {
"batch_items": 1,
"max_attempts": 1
}
},
"sample": {
"keys": [
"string"
],
"limit": 1
}
}
)
data = response.json()package main
import (
"bytes"
"encoding/json"
"net/http"
)
func main() {
body := []byte(`{
"policy": {
"mode": "monitor",
"fields": [
"string"
],
"category_groups": [
"contact_details"
],
"categories": [
{
"name": "string",
"description": "string",
"threshold": 0
}
],
"sensitivity": "conservative",
"replacement": "category",
"producer": {
"type": "extractor",
"revision": "string",
"config": {
"provider": "antfly",
"model": "string",
"schema_version": 1,
"url": "string",
"api_url": "string",
"project_id": "string",
"location": "string",
"region": "string",
"credentials_path": "string",
"account_id": "string",
"gateway_id": "string",
"api_key": "string",
"bearer_token": "string",
"schema": {
"entities": [
"string"
],
"relations": [
{
"type": "string",
"source": "string",
"target": "string",
"description": "string",
"threshold": 0
}
],
"classifications": [
{
"name": "string",
"labels": [
"string"
],
"multi_label": true,
"hypothesis_template": "string",
"top_k": 1,
"mode": "single",
"label_definitions": {},
"min_labels": 0,
"max_labels": 0,
"ordered": true,
"threshold": 0,
"candidate_threshold": 0,
"activation": "auto",
"temperature": 0,
"default": "string",
"prompt": "string",
"instruction": "string",
"examples": [
{
"input": "string",
"label": "string"
}
]
}
],
"structures": {},
"entity_definitions": {},
"entity_attributes": {},
"classification_constraints": [
{
"type": "LabelRef",
"task": "string",
"label": "string"
}
],
"joint_ie": {
"entities": {},
"relations": {},
"constraints": [
{
"type": "TypedEndpoints",
"relation": "string",
"head_types": [
"string"
],
"tail_types": [
"string"
]
}
]
}
},
"options": {
"threshold": 0,
"flat_ner": true,
"include_confidence": true,
"include_spans": true,
"word_splitter": "whitespace",
"overlap": "allow",
"offset_unit": "utf8_bytes",
"long_document": {
"mode": "reject",
"window_words": 1,
"overlap_words": 0,
"max_windows": 1,
"record_identity": "occurrence"
},
"decoder": {
"algorithm": "auto",
"beam_width": 1,
"max_search_nodes": 0,
"max_local_assignments": 1,
"best_effort": true
},
"joint_ie": {
"candidate_threshold": 0,
"entity_threshold": 0,
"relation_role_threshold": 0,
"top_k_entities": 1,
"top_k_roles": 1,
"relation_pair_cap": 1,
"max_edges_per_type": 1,
"entity_weight": 0,
"relation_weight": 0
},
"reader": {
"provider": "string",
"model": "string",
"url": "string",
"api_url": "string"
},
"resolver": {
"similarity_threshold": 0,
"type_must_match": true,
"min_entity_confidence": 0,
"min_relation_confidence": 0,
"deduplicate_relations": true,
"track_provenance": true
}
}
}
},
"execution": {
"batch_items": 1,
"max_attempts": 1
}
},
"sample": {
"keys": [
"string"
],
"limit": 1
}
}`)
req, _ := http.NewRequest("POST", "/db/v1/databases/{databaseName}/namespaces/{namespaceName}/tables/{tableName}/privacy/preview", bytes.NewBuffer(body))
req.Header.Set("Authorization", "Bearer YOUR_API_KEY")
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
}Responses
{
"policy_version": "string",
"sampled": 0,
"complete_table_scan": true,
"external_processing": true,
"documents": [
{
"document": "string",
"fields": [
{
"field": "string",
"original": "string",
"text": "string",
"findings": [
{
"document": "string",
"field": "string",
"category": "string",
"start": 0,
"end": 0,
"confidence": 0,
"policy_version": "string",
"source_fingerprint": "string",
"producer_revision": "string"
}
]
}
]
}
]
}{
"code": "string",
"message": "string"
}{
"code": "string",
"message": "string"
}{
"code": "string",
"message": "string"
}{
"code": "string",
"message": "string"
}Start a durable privacy rescan
/databases/{databaseName}/namespaces/{namespaceName}/tables/{tableName}/privacy/scansProvide your bearer token in the Authorization header when making requests to protected resources.
Example: Authorization: Bearer YOUR_API_KEY
Request Body
Example:
{
"from_key": "string",
"to_key": "string",
"limit": 1
}
Code Examples
curl -X POST "/db/v1/databases/{databaseName}/namespaces/{namespaceName}/tables/{tableName}/privacy/scans" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"from_key": "string",
"to_key": "string",
"limit": 1
}'const response = await fetch('/db/v1/databases/{databaseName}/namespaces/{namespaceName}/tables/{tableName}/privacy/scans', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
"from_key": "string",
"to_key": "string",
"limit": 1
})
});
const data = await response.json();fetch('/db/v1/databases/{databaseName}/namespaces/{namespaceName}/tables/{tableName}/privacy/scans', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
"from_key": "string",
"to_key": "string",
"limit": 1
})
})
.then(response => response.json())
.then(data => console.log(data));import requests
headers = {
'Authorization': 'Bearer YOUR_API_KEY'
}
response = requests.post(
'/db/v1/databases/{databaseName}/namespaces/{namespaceName}/tables/{tableName}/privacy/scans',
headers=headers,
json={
"from_key": "string",
"to_key": "string",
"limit": 1
}
)
data = response.json()package main
import (
"bytes"
"encoding/json"
"net/http"
)
func main() {
body := []byte(`{
"from_key": "string",
"to_key": "string",
"limit": 1
}`)
req, _ := http.NewRequest("POST", "/db/v1/databases/{databaseName}/namespaces/{namespaceName}/tables/{tableName}/privacy/scans", bytes.NewBuffer(body))
req.Header.Set("Authorization", "Bearer YOUR_API_KEY")
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
}Responses
{
"scan_id": "string",
"policy_version": "string",
"phase": "queued",
"scanned": 0,
"reprocessed": 0,
"failed": 0,
"next_key": "string",
"skipped": 0,
"last_error": "string",
"consecutive_errors": 0,
"retry_after_millis": 0,
"updated_at_millis": 0,
"verification_cursor": "string",
"verification_current": 0,
"verification_pending": 0,
"verification_failed": 0,
"verification_blocked": 0,
"failures": [
{}
]
}{
"code": "string",
"message": "string"
}{
"code": "string",
"message": "string"
}{
"code": "string",
"message": "string"
}{
"code": "string",
"message": "string"
}{
"code": "string",
"message": "string"
}Read privacy scan progress
/databases/{databaseName}/namespaces/{namespaceName}/tables/{tableName}/privacy/scans/{scanId}Provide your bearer token in the Authorization header when making requests to protected resources.
Example: Authorization: Bearer YOUR_API_KEY
Code Examples
curl -X GET "/db/v1/databases/{databaseName}/namespaces/{namespaceName}/tables/{tableName}/privacy/scans/{scanId}" \
-H "Authorization: Bearer YOUR_API_KEY"const response = await fetch('/db/v1/databases/{databaseName}/namespaces/{namespaceName}/tables/{tableName}/privacy/scans/{scanId}', {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_API_KEY'
}
});
const data = await response.json();fetch('/db/v1/databases/{databaseName}/namespaces/{namespaceName}/tables/{tableName}/privacy/scans/{scanId}', {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_API_KEY'
}
})
.then(response => response.json())
.then(data => console.log(data));import requests
headers = {
'Authorization': 'Bearer YOUR_API_KEY'
}
response = requests.get('/db/v1/databases/{databaseName}/namespaces/{namespaceName}/tables/{tableName}/privacy/scans/{scanId}', headers=headers)
data = response.json()package main
import (
"bytes"
"encoding/json"
"net/http"
)
func main() {
req, _ := http.NewRequest("GET", "/db/v1/databases/{databaseName}/namespaces/{namespaceName}/tables/{tableName}/privacy/scans/{scanId}", nil)
req.Header.Set("Authorization", "Bearer YOUR_API_KEY")
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
}Responses
{
"scan_id": "string",
"policy_version": "string",
"phase": "queued",
"scanned": 0,
"reprocessed": 0,
"failed": 0,
"next_key": "string",
"skipped": 0,
"last_error": "string",
"consecutive_errors": 0,
"retry_after_millis": 0,
"updated_at_millis": 0,
"verification_cursor": "string",
"verification_current": 0,
"verification_pending": 0,
"verification_failed": 0,
"verification_blocked": 0,
"failures": [
{}
]
}{
"code": "string",
"message": "string"
}{
"code": "string",
"message": "string"
}{
"code": "string",
"message": "string"
}{
"code": "string",
"message": "string"
}List current privacy findings
/databases/{databaseName}/namespaces/{namespaceName}/tables/{tableName}/privacy/findingsProvide your bearer token in the Authorization header when making requests to protected resources.
Example: Authorization: Bearer YOUR_API_KEY
Parameters
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
cursor | string | query | No | |
document | string | query | No | |
field | string | query | No | |
category | string | query | No | |
policy_version | string | query | No | |
limit | integer | query | No |
Code Examples
curl -X GET "/db/v1/databases/{databaseName}/namespaces/{namespaceName}/tables/{tableName}/privacy/findings?cursor=value&document=value&field=value&category=value&policy_version=value&limit=value" \
-H "Authorization: Bearer YOUR_API_KEY"const response = await fetch('/db/v1/databases/{databaseName}/namespaces/{namespaceName}/tables/{tableName}/privacy/findings?cursor=value&document=value&field=value&category=value&policy_version=value&limit=value', {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_API_KEY'
}
});
const data = await response.json();fetch('/db/v1/databases/{databaseName}/namespaces/{namespaceName}/tables/{tableName}/privacy/findings?cursor=value&document=value&field=value&category=value&policy_version=value&limit=value', {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_API_KEY'
}
})
.then(response => response.json())
.then(data => console.log(data));import requests
headers = {
'Authorization': 'Bearer YOUR_API_KEY'
}
response = requests.get('/db/v1/databases/{databaseName}/namespaces/{namespaceName}/tables/{tableName}/privacy/findings?cursor=value&document=value&field=value&category=value&policy_version=value&limit=value', headers=headers)
data = response.json()package main
import (
"bytes"
"encoding/json"
"net/http"
)
func main() {
req, _ := http.NewRequest("GET", "/db/v1/databases/{databaseName}/namespaces/{namespaceName}/tables/{tableName}/privacy/findings?cursor=value&document=value&field=value&category=value&policy_version=value&limit=value", nil)
req.Header.Set("Authorization", "Bearer YOUR_API_KEY")
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
}Responses
{
"policy_version": "string",
"findings": [
{
"document": "string",
"field": "string",
"category": "string",
"start": 0,
"end": 0,
"confidence": 0,
"policy_version": "string",
"source_fingerprint": "string",
"producer_revision": "string"
}
],
"next_cursor": "string",
"examined_documents": 0,
"pending_documents": 0
}{
"code": "string",
"message": "string"
}{
"code": "string",
"message": "string"
}{
"code": "string",
"message": "string"
}{
"code": "string",
"message": "string"
}List current privacy findings with body filters
/databases/{databaseName}/namespaces/{namespaceName}/tables/{tableName}/privacy/findingsEquivalent to GET findings, with filters and continuation in JSON so large document identifiers do not exceed URL limits.
Provide your bearer token in the Authorization header when making requests to protected resources.
Example: Authorization: Bearer YOUR_API_KEY
Request Body
Example:
{
"cursor": "string",
"document": "string",
"field": "string",
"category": "string",
"policy_version": "string",
"limit": 1
}
Code Examples
curl -X POST "/db/v1/databases/{databaseName}/namespaces/{namespaceName}/tables/{tableName}/privacy/findings" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"cursor": "string",
"document": "string",
"field": "string",
"category": "string",
"policy_version": "string",
"limit": 1
}'const response = await fetch('/db/v1/databases/{databaseName}/namespaces/{namespaceName}/tables/{tableName}/privacy/findings', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
"cursor": "string",
"document": "string",
"field": "string",
"category": "string",
"policy_version": "string",
"limit": 1
})
});
const data = await response.json();fetch('/db/v1/databases/{databaseName}/namespaces/{namespaceName}/tables/{tableName}/privacy/findings', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
"cursor": "string",
"document": "string",
"field": "string",
"category": "string",
"policy_version": "string",
"limit": 1
})
})
.then(response => response.json())
.then(data => console.log(data));import requests
headers = {
'Authorization': 'Bearer YOUR_API_KEY'
}
response = requests.post(
'/db/v1/databases/{databaseName}/namespaces/{namespaceName}/tables/{tableName}/privacy/findings',
headers=headers,
json={
"cursor": "string",
"document": "string",
"field": "string",
"category": "string",
"policy_version": "string",
"limit": 1
}
)
data = response.json()package main
import (
"bytes"
"encoding/json"
"net/http"
)
func main() {
body := []byte(`{
"cursor": "string",
"document": "string",
"field": "string",
"category": "string",
"policy_version": "string",
"limit": 1
}`)
req, _ := http.NewRequest("POST", "/db/v1/databases/{databaseName}/namespaces/{namespaceName}/tables/{tableName}/privacy/findings", bytes.NewBuffer(body))
req.Header.Set("Authorization", "Bearer YOUR_API_KEY")
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
}Responses
{
"policy_version": "string",
"findings": [
{
"document": "string",
"field": "string",
"category": "string",
"start": 0,
"end": 0,
"confidence": 0,
"policy_version": "string",
"source_fingerprint": "string",
"producer_revision": "string"
}
],
"next_cursor": "string",
"examined_documents": 0,
"pending_documents": 0
}{
"code": "string",
"message": "string"
}{
"code": "string",
"message": "string"
}{
"code": "string",
"message": "string"
}{
"code": "string",
"message": "string"
}