curl --request POST \
--url http://localhost:8080/api/v1/pipeline/protect/suggest \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"pipeline": "<string>"
}
'import requests
url = "http://localhost:8080/api/v1/pipeline/protect/suggest"
payload = { "pipeline": "<string>" }
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({pipeline: '<string>'})
};
fetch('http://localhost:8080/api/v1/pipeline/protect/suggest', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "8080",
CURLOPT_URL => "http://localhost:8080/api/v1/pipeline/protect/suggest",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'pipeline' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://localhost:8080/api/v1/pipeline/protect/suggest"
payload := strings.NewReader("{\n \"pipeline\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("http://localhost:8080/api/v1/pipeline/protect/suggest")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"pipeline\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:8080/api/v1/pipeline/protect/suggest")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"pipeline\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"model": "<string>",
"fields": [
{
"name": "<string>",
"type": "<string>",
"current": {
"method": "hmac",
"preserve": "last4",
"params": {}
},
"suggested": {
"method": "hmac",
"preserve": "last4"
},
"reason": "<string>"
}
]
}{
"error": "<string>"
}Suggest field protection from field names and types
Asks the configured CodeGen model which source fields should carry protect (hmac, mask with an optional preserve, redact, drop, or none), with a one-line reason per field. Only field names and types are sent to the model; no row value leaves the server. Stateless: nothing is saved. Every suggestion passes the pipeline validator, so confirm the ones you want and save them as protect on the source fields. Pass either pipeline (its stored source schema is used) or fields. At most 150 fields per call (more returns 400 before the model is called); with pipeline, keyFields columns are only suggested hmac or none and non-string destination fields only drop or none. Needs the same capability as reading a pipeline.
curl --request POST \
--url http://localhost:8080/api/v1/pipeline/protect/suggest \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"pipeline": "<string>"
}
'import requests
url = "http://localhost:8080/api/v1/pipeline/protect/suggest"
payload = { "pipeline": "<string>" }
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({pipeline: '<string>'})
};
fetch('http://localhost:8080/api/v1/pipeline/protect/suggest', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "8080",
CURLOPT_URL => "http://localhost:8080/api/v1/pipeline/protect/suggest",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'pipeline' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://localhost:8080/api/v1/pipeline/protect/suggest"
payload := strings.NewReader("{\n \"pipeline\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("http://localhost:8080/api/v1/pipeline/protect/suggest")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"pipeline\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:8080/api/v1/pipeline/protect/suggest")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"pipeline\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"model": "<string>",
"fields": [
{
"name": "<string>",
"type": "<string>",
"current": {
"method": "hmac",
"preserve": "last4",
"params": {}
},
"suggested": {
"method": "hmac",
"preserve": "last4"
},
"reason": "<string>"
}
]
}{
"error": "<string>"
}Authorizations
Optional API key for authentication (enabled via application.yaml)
Body
- Option 1
- Option 2
Existing pipeline name
