Cloud Data Loss Prevention (DLP) API
GET
dlp.infoTypes.list
{{baseUrl}}/v2/infoTypes
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/infoTypes");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v2/infoTypes")
require "http/client"
url = "{{baseUrl}}/v2/infoTypes"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/v2/infoTypes"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/infoTypes");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/infoTypes"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/v2/infoTypes HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v2/infoTypes")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/infoTypes"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/v2/infoTypes")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v2/infoTypes")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/v2/infoTypes');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/v2/infoTypes'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/infoTypes';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v2/infoTypes',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v2/infoTypes")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v2/infoTypes',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'GET', url: '{{baseUrl}}/v2/infoTypes'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v2/infoTypes');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'GET', url: '{{baseUrl}}/v2/infoTypes'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/infoTypes';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v2/infoTypes"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v2/infoTypes" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/infoTypes",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/v2/infoTypes');
echo $response->getBody();
setUrl('{{baseUrl}}/v2/infoTypes');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v2/infoTypes');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v2/infoTypes' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/infoTypes' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v2/infoTypes")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/infoTypes"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/infoTypes"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/infoTypes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/v2/infoTypes') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v2/infoTypes";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/v2/infoTypes
http GET {{baseUrl}}/v2/infoTypes
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v2/infoTypes
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/infoTypes")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
dlp.locations.infoTypes.list
{{baseUrl}}/v2/:parent/infoTypes
QUERY PARAMS
parent
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/:parent/infoTypes");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v2/:parent/infoTypes")
require "http/client"
url = "{{baseUrl}}/v2/:parent/infoTypes"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/v2/:parent/infoTypes"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/:parent/infoTypes");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/:parent/infoTypes"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/v2/:parent/infoTypes HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v2/:parent/infoTypes")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/:parent/infoTypes"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/v2/:parent/infoTypes")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v2/:parent/infoTypes")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/v2/:parent/infoTypes');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/v2/:parent/infoTypes'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/:parent/infoTypes';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v2/:parent/infoTypes',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v2/:parent/infoTypes")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v2/:parent/infoTypes',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'GET', url: '{{baseUrl}}/v2/:parent/infoTypes'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v2/:parent/infoTypes');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'GET', url: '{{baseUrl}}/v2/:parent/infoTypes'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/:parent/infoTypes';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v2/:parent/infoTypes"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v2/:parent/infoTypes" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/:parent/infoTypes",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/v2/:parent/infoTypes');
echo $response->getBody();
setUrl('{{baseUrl}}/v2/:parent/infoTypes');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v2/:parent/infoTypes');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v2/:parent/infoTypes' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/:parent/infoTypes' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v2/:parent/infoTypes")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/:parent/infoTypes"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/:parent/infoTypes"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/:parent/infoTypes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/v2/:parent/infoTypes') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v2/:parent/infoTypes";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/v2/:parent/infoTypes
http GET {{baseUrl}}/v2/:parent/infoTypes
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v2/:parent/infoTypes
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/:parent/infoTypes")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
dlp.projects.locations.content.deidentify
{{baseUrl}}/v2/:parent/content:deidentify
QUERY PARAMS
parent
BODY json
{
"deidentifyConfig": {
"imageTransformations": {
"transforms": [
{
"allInfoTypes": {},
"allText": {},
"redactionColor": {
"blue": "",
"green": "",
"red": ""
},
"selectedInfoTypes": {
"infoTypes": [
{
"name": "",
"version": ""
}
]
}
}
]
},
"infoTypeTransformations": {
"transformations": [
{
"infoTypes": [
{}
],
"primitiveTransformation": {
"bucketingConfig": {
"buckets": [
{
"max": {
"booleanValue": false,
"dateValue": {
"day": 0,
"month": 0,
"year": 0
},
"dayOfWeekValue": "",
"floatValue": "",
"integerValue": "",
"stringValue": "",
"timeValue": {
"hours": 0,
"minutes": 0,
"nanos": 0,
"seconds": 0
},
"timestampValue": ""
},
"min": {},
"replacementValue": {}
}
]
},
"characterMaskConfig": {
"charactersToIgnore": [
{
"charactersToSkip": "",
"commonCharactersToIgnore": ""
}
],
"maskingCharacter": "",
"numberToMask": 0,
"reverseOrder": false
},
"cryptoDeterministicConfig": {
"context": {
"name": ""
},
"cryptoKey": {
"kmsWrapped": {
"cryptoKeyName": "",
"wrappedKey": ""
},
"transient": {
"name": ""
},
"unwrapped": {
"key": ""
}
},
"surrogateInfoType": {}
},
"cryptoHashConfig": {
"cryptoKey": {}
},
"cryptoReplaceFfxFpeConfig": {
"commonAlphabet": "",
"context": {},
"cryptoKey": {},
"customAlphabet": "",
"radix": 0,
"surrogateInfoType": {}
},
"dateShiftConfig": {
"context": {},
"cryptoKey": {},
"lowerBoundDays": 0,
"upperBoundDays": 0
},
"fixedSizeBucketingConfig": {
"bucketSize": "",
"lowerBound": {},
"upperBound": {}
},
"redactConfig": {},
"replaceConfig": {
"newValue": {}
},
"replaceDictionaryConfig": {
"wordList": {
"words": []
}
},
"replaceWithInfoTypeConfig": {},
"timePartConfig": {
"partToExtract": ""
}
}
}
]
},
"recordTransformations": {
"fieldTransformations": [
{
"condition": {
"expressions": {
"conditions": {
"conditions": [
{
"field": {},
"operator": "",
"value": {}
}
]
},
"logicalOperator": ""
}
},
"fields": [
{}
],
"infoTypeTransformations": {},
"primitiveTransformation": {}
}
],
"recordSuppressions": [
{
"condition": {}
}
]
},
"transformationErrorHandling": {
"leaveUntransformed": {},
"throwError": {}
}
},
"deidentifyTemplateName": "",
"inspectConfig": {
"contentOptions": [],
"customInfoTypes": [
{
"detectionRules": [
{
"hotwordRule": {
"hotwordRegex": {
"groupIndexes": [],
"pattern": ""
},
"likelihoodAdjustment": {
"fixedLikelihood": "",
"relativeLikelihood": 0
},
"proximity": {
"windowAfter": 0,
"windowBefore": 0
}
}
}
],
"dictionary": {
"cloudStoragePath": {
"path": ""
},
"wordList": {}
},
"exclusionType": "",
"infoType": {},
"likelihood": "",
"regex": {},
"storedType": {
"createTime": "",
"name": ""
},
"surrogateType": {}
}
],
"excludeInfoTypes": false,
"includeQuote": false,
"infoTypes": [
{}
],
"limits": {
"maxFindingsPerInfoType": [
{
"infoType": {},
"maxFindings": 0
}
],
"maxFindingsPerItem": 0,
"maxFindingsPerRequest": 0
},
"minLikelihood": "",
"ruleSet": [
{
"infoTypes": [
{}
],
"rules": [
{
"exclusionRule": {
"dictionary": {},
"excludeByHotword": {
"hotwordRegex": {},
"proximity": {}
},
"excludeInfoTypes": {
"infoTypes": [
{}
]
},
"matchingType": "",
"regex": {}
},
"hotwordRule": {}
}
]
}
]
},
"inspectTemplateName": "",
"item": {
"byteItem": {
"data": "",
"type": ""
},
"table": {
"headers": [
{}
],
"rows": [
{
"values": [
{}
]
}
]
},
"value": ""
},
"locationId": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/:parent/content:deidentify");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"deidentifyConfig\": {\n \"imageTransformations\": {\n \"transforms\": [\n {\n \"allInfoTypes\": {},\n \"allText\": {},\n \"redactionColor\": {\n \"blue\": \"\",\n \"green\": \"\",\n \"red\": \"\"\n },\n \"selectedInfoTypes\": {\n \"infoTypes\": [\n {\n \"name\": \"\",\n \"version\": \"\"\n }\n ]\n }\n }\n ]\n },\n \"infoTypeTransformations\": {\n \"transformations\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"primitiveTransformation\": {\n \"bucketingConfig\": {\n \"buckets\": [\n {\n \"max\": {\n \"booleanValue\": false,\n \"dateValue\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"dayOfWeekValue\": \"\",\n \"floatValue\": \"\",\n \"integerValue\": \"\",\n \"stringValue\": \"\",\n \"timeValue\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"timestampValue\": \"\"\n },\n \"min\": {},\n \"replacementValue\": {}\n }\n ]\n },\n \"characterMaskConfig\": {\n \"charactersToIgnore\": [\n {\n \"charactersToSkip\": \"\",\n \"commonCharactersToIgnore\": \"\"\n }\n ],\n \"maskingCharacter\": \"\",\n \"numberToMask\": 0,\n \"reverseOrder\": false\n },\n \"cryptoDeterministicConfig\": {\n \"context\": {\n \"name\": \"\"\n },\n \"cryptoKey\": {\n \"kmsWrapped\": {\n \"cryptoKeyName\": \"\",\n \"wrappedKey\": \"\"\n },\n \"transient\": {\n \"name\": \"\"\n },\n \"unwrapped\": {\n \"key\": \"\"\n }\n },\n \"surrogateInfoType\": {}\n },\n \"cryptoHashConfig\": {\n \"cryptoKey\": {}\n },\n \"cryptoReplaceFfxFpeConfig\": {\n \"commonAlphabet\": \"\",\n \"context\": {},\n \"cryptoKey\": {},\n \"customAlphabet\": \"\",\n \"radix\": 0,\n \"surrogateInfoType\": {}\n },\n \"dateShiftConfig\": {\n \"context\": {},\n \"cryptoKey\": {},\n \"lowerBoundDays\": 0,\n \"upperBoundDays\": 0\n },\n \"fixedSizeBucketingConfig\": {\n \"bucketSize\": \"\",\n \"lowerBound\": {},\n \"upperBound\": {}\n },\n \"redactConfig\": {},\n \"replaceConfig\": {\n \"newValue\": {}\n },\n \"replaceDictionaryConfig\": {\n \"wordList\": {\n \"words\": []\n }\n },\n \"replaceWithInfoTypeConfig\": {},\n \"timePartConfig\": {\n \"partToExtract\": \"\"\n }\n }\n }\n ]\n },\n \"recordTransformations\": {\n \"fieldTransformations\": [\n {\n \"condition\": {\n \"expressions\": {\n \"conditions\": {\n \"conditions\": [\n {\n \"field\": {},\n \"operator\": \"\",\n \"value\": {}\n }\n ]\n },\n \"logicalOperator\": \"\"\n }\n },\n \"fields\": [\n {}\n ],\n \"infoTypeTransformations\": {},\n \"primitiveTransformation\": {}\n }\n ],\n \"recordSuppressions\": [\n {\n \"condition\": {}\n }\n ]\n },\n \"transformationErrorHandling\": {\n \"leaveUntransformed\": {},\n \"throwError\": {}\n }\n },\n \"deidentifyTemplateName\": \"\",\n \"inspectConfig\": {\n \"contentOptions\": [],\n \"customInfoTypes\": [\n {\n \"detectionRules\": [\n {\n \"hotwordRule\": {\n \"hotwordRegex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n },\n \"likelihoodAdjustment\": {\n \"fixedLikelihood\": \"\",\n \"relativeLikelihood\": 0\n },\n \"proximity\": {\n \"windowAfter\": 0,\n \"windowBefore\": 0\n }\n }\n }\n ],\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {}\n },\n \"exclusionType\": \"\",\n \"infoType\": {},\n \"likelihood\": \"\",\n \"regex\": {},\n \"storedType\": {\n \"createTime\": \"\",\n \"name\": \"\"\n },\n \"surrogateType\": {}\n }\n ],\n \"excludeInfoTypes\": false,\n \"includeQuote\": false,\n \"infoTypes\": [\n {}\n ],\n \"limits\": {\n \"maxFindingsPerInfoType\": [\n {\n \"infoType\": {},\n \"maxFindings\": 0\n }\n ],\n \"maxFindingsPerItem\": 0,\n \"maxFindingsPerRequest\": 0\n },\n \"minLikelihood\": \"\",\n \"ruleSet\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"rules\": [\n {\n \"exclusionRule\": {\n \"dictionary\": {},\n \"excludeByHotword\": {\n \"hotwordRegex\": {},\n \"proximity\": {}\n },\n \"excludeInfoTypes\": {\n \"infoTypes\": [\n {}\n ]\n },\n \"matchingType\": \"\",\n \"regex\": {}\n },\n \"hotwordRule\": {}\n }\n ]\n }\n ]\n },\n \"inspectTemplateName\": \"\",\n \"item\": {\n \"byteItem\": {\n \"data\": \"\",\n \"type\": \"\"\n },\n \"table\": {\n \"headers\": [\n {}\n ],\n \"rows\": [\n {\n \"values\": [\n {}\n ]\n }\n ]\n },\n \"value\": \"\"\n },\n \"locationId\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v2/:parent/content:deidentify" {:content-type :json
:form-params {:deidentifyConfig {:imageTransformations {:transforms [{:allInfoTypes {}
:allText {}
:redactionColor {:blue ""
:green ""
:red ""}
:selectedInfoTypes {:infoTypes [{:name ""
:version ""}]}}]}
:infoTypeTransformations {:transformations [{:infoTypes [{}]
:primitiveTransformation {:bucketingConfig {:buckets [{:max {:booleanValue false
:dateValue {:day 0
:month 0
:year 0}
:dayOfWeekValue ""
:floatValue ""
:integerValue ""
:stringValue ""
:timeValue {:hours 0
:minutes 0
:nanos 0
:seconds 0}
:timestampValue ""}
:min {}
:replacementValue {}}]}
:characterMaskConfig {:charactersToIgnore [{:charactersToSkip ""
:commonCharactersToIgnore ""}]
:maskingCharacter ""
:numberToMask 0
:reverseOrder false}
:cryptoDeterministicConfig {:context {:name ""}
:cryptoKey {:kmsWrapped {:cryptoKeyName ""
:wrappedKey ""}
:transient {:name ""}
:unwrapped {:key ""}}
:surrogateInfoType {}}
:cryptoHashConfig {:cryptoKey {}}
:cryptoReplaceFfxFpeConfig {:commonAlphabet ""
:context {}
:cryptoKey {}
:customAlphabet ""
:radix 0
:surrogateInfoType {}}
:dateShiftConfig {:context {}
:cryptoKey {}
:lowerBoundDays 0
:upperBoundDays 0}
:fixedSizeBucketingConfig {:bucketSize ""
:lowerBound {}
:upperBound {}}
:redactConfig {}
:replaceConfig {:newValue {}}
:replaceDictionaryConfig {:wordList {:words []}}
:replaceWithInfoTypeConfig {}
:timePartConfig {:partToExtract ""}}}]}
:recordTransformations {:fieldTransformations [{:condition {:expressions {:conditions {:conditions [{:field {}
:operator ""
:value {}}]}
:logicalOperator ""}}
:fields [{}]
:infoTypeTransformations {}
:primitiveTransformation {}}]
:recordSuppressions [{:condition {}}]}
:transformationErrorHandling {:leaveUntransformed {}
:throwError {}}}
:deidentifyTemplateName ""
:inspectConfig {:contentOptions []
:customInfoTypes [{:detectionRules [{:hotwordRule {:hotwordRegex {:groupIndexes []
:pattern ""}
:likelihoodAdjustment {:fixedLikelihood ""
:relativeLikelihood 0}
:proximity {:windowAfter 0
:windowBefore 0}}}]
:dictionary {:cloudStoragePath {:path ""}
:wordList {}}
:exclusionType ""
:infoType {}
:likelihood ""
:regex {}
:storedType {:createTime ""
:name ""}
:surrogateType {}}]
:excludeInfoTypes false
:includeQuote false
:infoTypes [{}]
:limits {:maxFindingsPerInfoType [{:infoType {}
:maxFindings 0}]
:maxFindingsPerItem 0
:maxFindingsPerRequest 0}
:minLikelihood ""
:ruleSet [{:infoTypes [{}]
:rules [{:exclusionRule {:dictionary {}
:excludeByHotword {:hotwordRegex {}
:proximity {}}
:excludeInfoTypes {:infoTypes [{}]}
:matchingType ""
:regex {}}
:hotwordRule {}}]}]}
:inspectTemplateName ""
:item {:byteItem {:data ""
:type ""}
:table {:headers [{}]
:rows [{:values [{}]}]}
:value ""}
:locationId ""}})
require "http/client"
url = "{{baseUrl}}/v2/:parent/content:deidentify"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"deidentifyConfig\": {\n \"imageTransformations\": {\n \"transforms\": [\n {\n \"allInfoTypes\": {},\n \"allText\": {},\n \"redactionColor\": {\n \"blue\": \"\",\n \"green\": \"\",\n \"red\": \"\"\n },\n \"selectedInfoTypes\": {\n \"infoTypes\": [\n {\n \"name\": \"\",\n \"version\": \"\"\n }\n ]\n }\n }\n ]\n },\n \"infoTypeTransformations\": {\n \"transformations\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"primitiveTransformation\": {\n \"bucketingConfig\": {\n \"buckets\": [\n {\n \"max\": {\n \"booleanValue\": false,\n \"dateValue\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"dayOfWeekValue\": \"\",\n \"floatValue\": \"\",\n \"integerValue\": \"\",\n \"stringValue\": \"\",\n \"timeValue\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"timestampValue\": \"\"\n },\n \"min\": {},\n \"replacementValue\": {}\n }\n ]\n },\n \"characterMaskConfig\": {\n \"charactersToIgnore\": [\n {\n \"charactersToSkip\": \"\",\n \"commonCharactersToIgnore\": \"\"\n }\n ],\n \"maskingCharacter\": \"\",\n \"numberToMask\": 0,\n \"reverseOrder\": false\n },\n \"cryptoDeterministicConfig\": {\n \"context\": {\n \"name\": \"\"\n },\n \"cryptoKey\": {\n \"kmsWrapped\": {\n \"cryptoKeyName\": \"\",\n \"wrappedKey\": \"\"\n },\n \"transient\": {\n \"name\": \"\"\n },\n \"unwrapped\": {\n \"key\": \"\"\n }\n },\n \"surrogateInfoType\": {}\n },\n \"cryptoHashConfig\": {\n \"cryptoKey\": {}\n },\n \"cryptoReplaceFfxFpeConfig\": {\n \"commonAlphabet\": \"\",\n \"context\": {},\n \"cryptoKey\": {},\n \"customAlphabet\": \"\",\n \"radix\": 0,\n \"surrogateInfoType\": {}\n },\n \"dateShiftConfig\": {\n \"context\": {},\n \"cryptoKey\": {},\n \"lowerBoundDays\": 0,\n \"upperBoundDays\": 0\n },\n \"fixedSizeBucketingConfig\": {\n \"bucketSize\": \"\",\n \"lowerBound\": {},\n \"upperBound\": {}\n },\n \"redactConfig\": {},\n \"replaceConfig\": {\n \"newValue\": {}\n },\n \"replaceDictionaryConfig\": {\n \"wordList\": {\n \"words\": []\n }\n },\n \"replaceWithInfoTypeConfig\": {},\n \"timePartConfig\": {\n \"partToExtract\": \"\"\n }\n }\n }\n ]\n },\n \"recordTransformations\": {\n \"fieldTransformations\": [\n {\n \"condition\": {\n \"expressions\": {\n \"conditions\": {\n \"conditions\": [\n {\n \"field\": {},\n \"operator\": \"\",\n \"value\": {}\n }\n ]\n },\n \"logicalOperator\": \"\"\n }\n },\n \"fields\": [\n {}\n ],\n \"infoTypeTransformations\": {},\n \"primitiveTransformation\": {}\n }\n ],\n \"recordSuppressions\": [\n {\n \"condition\": {}\n }\n ]\n },\n \"transformationErrorHandling\": {\n \"leaveUntransformed\": {},\n \"throwError\": {}\n }\n },\n \"deidentifyTemplateName\": \"\",\n \"inspectConfig\": {\n \"contentOptions\": [],\n \"customInfoTypes\": [\n {\n \"detectionRules\": [\n {\n \"hotwordRule\": {\n \"hotwordRegex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n },\n \"likelihoodAdjustment\": {\n \"fixedLikelihood\": \"\",\n \"relativeLikelihood\": 0\n },\n \"proximity\": {\n \"windowAfter\": 0,\n \"windowBefore\": 0\n }\n }\n }\n ],\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {}\n },\n \"exclusionType\": \"\",\n \"infoType\": {},\n \"likelihood\": \"\",\n \"regex\": {},\n \"storedType\": {\n \"createTime\": \"\",\n \"name\": \"\"\n },\n \"surrogateType\": {}\n }\n ],\n \"excludeInfoTypes\": false,\n \"includeQuote\": false,\n \"infoTypes\": [\n {}\n ],\n \"limits\": {\n \"maxFindingsPerInfoType\": [\n {\n \"infoType\": {},\n \"maxFindings\": 0\n }\n ],\n \"maxFindingsPerItem\": 0,\n \"maxFindingsPerRequest\": 0\n },\n \"minLikelihood\": \"\",\n \"ruleSet\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"rules\": [\n {\n \"exclusionRule\": {\n \"dictionary\": {},\n \"excludeByHotword\": {\n \"hotwordRegex\": {},\n \"proximity\": {}\n },\n \"excludeInfoTypes\": {\n \"infoTypes\": [\n {}\n ]\n },\n \"matchingType\": \"\",\n \"regex\": {}\n },\n \"hotwordRule\": {}\n }\n ]\n }\n ]\n },\n \"inspectTemplateName\": \"\",\n \"item\": {\n \"byteItem\": {\n \"data\": \"\",\n \"type\": \"\"\n },\n \"table\": {\n \"headers\": [\n {}\n ],\n \"rows\": [\n {\n \"values\": [\n {}\n ]\n }\n ]\n },\n \"value\": \"\"\n },\n \"locationId\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/v2/:parent/content:deidentify"),
Content = new StringContent("{\n \"deidentifyConfig\": {\n \"imageTransformations\": {\n \"transforms\": [\n {\n \"allInfoTypes\": {},\n \"allText\": {},\n \"redactionColor\": {\n \"blue\": \"\",\n \"green\": \"\",\n \"red\": \"\"\n },\n \"selectedInfoTypes\": {\n \"infoTypes\": [\n {\n \"name\": \"\",\n \"version\": \"\"\n }\n ]\n }\n }\n ]\n },\n \"infoTypeTransformations\": {\n \"transformations\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"primitiveTransformation\": {\n \"bucketingConfig\": {\n \"buckets\": [\n {\n \"max\": {\n \"booleanValue\": false,\n \"dateValue\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"dayOfWeekValue\": \"\",\n \"floatValue\": \"\",\n \"integerValue\": \"\",\n \"stringValue\": \"\",\n \"timeValue\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"timestampValue\": \"\"\n },\n \"min\": {},\n \"replacementValue\": {}\n }\n ]\n },\n \"characterMaskConfig\": {\n \"charactersToIgnore\": [\n {\n \"charactersToSkip\": \"\",\n \"commonCharactersToIgnore\": \"\"\n }\n ],\n \"maskingCharacter\": \"\",\n \"numberToMask\": 0,\n \"reverseOrder\": false\n },\n \"cryptoDeterministicConfig\": {\n \"context\": {\n \"name\": \"\"\n },\n \"cryptoKey\": {\n \"kmsWrapped\": {\n \"cryptoKeyName\": \"\",\n \"wrappedKey\": \"\"\n },\n \"transient\": {\n \"name\": \"\"\n },\n \"unwrapped\": {\n \"key\": \"\"\n }\n },\n \"surrogateInfoType\": {}\n },\n \"cryptoHashConfig\": {\n \"cryptoKey\": {}\n },\n \"cryptoReplaceFfxFpeConfig\": {\n \"commonAlphabet\": \"\",\n \"context\": {},\n \"cryptoKey\": {},\n \"customAlphabet\": \"\",\n \"radix\": 0,\n \"surrogateInfoType\": {}\n },\n \"dateShiftConfig\": {\n \"context\": {},\n \"cryptoKey\": {},\n \"lowerBoundDays\": 0,\n \"upperBoundDays\": 0\n },\n \"fixedSizeBucketingConfig\": {\n \"bucketSize\": \"\",\n \"lowerBound\": {},\n \"upperBound\": {}\n },\n \"redactConfig\": {},\n \"replaceConfig\": {\n \"newValue\": {}\n },\n \"replaceDictionaryConfig\": {\n \"wordList\": {\n \"words\": []\n }\n },\n \"replaceWithInfoTypeConfig\": {},\n \"timePartConfig\": {\n \"partToExtract\": \"\"\n }\n }\n }\n ]\n },\n \"recordTransformations\": {\n \"fieldTransformations\": [\n {\n \"condition\": {\n \"expressions\": {\n \"conditions\": {\n \"conditions\": [\n {\n \"field\": {},\n \"operator\": \"\",\n \"value\": {}\n }\n ]\n },\n \"logicalOperator\": \"\"\n }\n },\n \"fields\": [\n {}\n ],\n \"infoTypeTransformations\": {},\n \"primitiveTransformation\": {}\n }\n ],\n \"recordSuppressions\": [\n {\n \"condition\": {}\n }\n ]\n },\n \"transformationErrorHandling\": {\n \"leaveUntransformed\": {},\n \"throwError\": {}\n }\n },\n \"deidentifyTemplateName\": \"\",\n \"inspectConfig\": {\n \"contentOptions\": [],\n \"customInfoTypes\": [\n {\n \"detectionRules\": [\n {\n \"hotwordRule\": {\n \"hotwordRegex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n },\n \"likelihoodAdjustment\": {\n \"fixedLikelihood\": \"\",\n \"relativeLikelihood\": 0\n },\n \"proximity\": {\n \"windowAfter\": 0,\n \"windowBefore\": 0\n }\n }\n }\n ],\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {}\n },\n \"exclusionType\": \"\",\n \"infoType\": {},\n \"likelihood\": \"\",\n \"regex\": {},\n \"storedType\": {\n \"createTime\": \"\",\n \"name\": \"\"\n },\n \"surrogateType\": {}\n }\n ],\n \"excludeInfoTypes\": false,\n \"includeQuote\": false,\n \"infoTypes\": [\n {}\n ],\n \"limits\": {\n \"maxFindingsPerInfoType\": [\n {\n \"infoType\": {},\n \"maxFindings\": 0\n }\n ],\n \"maxFindingsPerItem\": 0,\n \"maxFindingsPerRequest\": 0\n },\n \"minLikelihood\": \"\",\n \"ruleSet\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"rules\": [\n {\n \"exclusionRule\": {\n \"dictionary\": {},\n \"excludeByHotword\": {\n \"hotwordRegex\": {},\n \"proximity\": {}\n },\n \"excludeInfoTypes\": {\n \"infoTypes\": [\n {}\n ]\n },\n \"matchingType\": \"\",\n \"regex\": {}\n },\n \"hotwordRule\": {}\n }\n ]\n }\n ]\n },\n \"inspectTemplateName\": \"\",\n \"item\": {\n \"byteItem\": {\n \"data\": \"\",\n \"type\": \"\"\n },\n \"table\": {\n \"headers\": [\n {}\n ],\n \"rows\": [\n {\n \"values\": [\n {}\n ]\n }\n ]\n },\n \"value\": \"\"\n },\n \"locationId\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/:parent/content:deidentify");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"deidentifyConfig\": {\n \"imageTransformations\": {\n \"transforms\": [\n {\n \"allInfoTypes\": {},\n \"allText\": {},\n \"redactionColor\": {\n \"blue\": \"\",\n \"green\": \"\",\n \"red\": \"\"\n },\n \"selectedInfoTypes\": {\n \"infoTypes\": [\n {\n \"name\": \"\",\n \"version\": \"\"\n }\n ]\n }\n }\n ]\n },\n \"infoTypeTransformations\": {\n \"transformations\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"primitiveTransformation\": {\n \"bucketingConfig\": {\n \"buckets\": [\n {\n \"max\": {\n \"booleanValue\": false,\n \"dateValue\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"dayOfWeekValue\": \"\",\n \"floatValue\": \"\",\n \"integerValue\": \"\",\n \"stringValue\": \"\",\n \"timeValue\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"timestampValue\": \"\"\n },\n \"min\": {},\n \"replacementValue\": {}\n }\n ]\n },\n \"characterMaskConfig\": {\n \"charactersToIgnore\": [\n {\n \"charactersToSkip\": \"\",\n \"commonCharactersToIgnore\": \"\"\n }\n ],\n \"maskingCharacter\": \"\",\n \"numberToMask\": 0,\n \"reverseOrder\": false\n },\n \"cryptoDeterministicConfig\": {\n \"context\": {\n \"name\": \"\"\n },\n \"cryptoKey\": {\n \"kmsWrapped\": {\n \"cryptoKeyName\": \"\",\n \"wrappedKey\": \"\"\n },\n \"transient\": {\n \"name\": \"\"\n },\n \"unwrapped\": {\n \"key\": \"\"\n }\n },\n \"surrogateInfoType\": {}\n },\n \"cryptoHashConfig\": {\n \"cryptoKey\": {}\n },\n \"cryptoReplaceFfxFpeConfig\": {\n \"commonAlphabet\": \"\",\n \"context\": {},\n \"cryptoKey\": {},\n \"customAlphabet\": \"\",\n \"radix\": 0,\n \"surrogateInfoType\": {}\n },\n \"dateShiftConfig\": {\n \"context\": {},\n \"cryptoKey\": {},\n \"lowerBoundDays\": 0,\n \"upperBoundDays\": 0\n },\n \"fixedSizeBucketingConfig\": {\n \"bucketSize\": \"\",\n \"lowerBound\": {},\n \"upperBound\": {}\n },\n \"redactConfig\": {},\n \"replaceConfig\": {\n \"newValue\": {}\n },\n \"replaceDictionaryConfig\": {\n \"wordList\": {\n \"words\": []\n }\n },\n \"replaceWithInfoTypeConfig\": {},\n \"timePartConfig\": {\n \"partToExtract\": \"\"\n }\n }\n }\n ]\n },\n \"recordTransformations\": {\n \"fieldTransformations\": [\n {\n \"condition\": {\n \"expressions\": {\n \"conditions\": {\n \"conditions\": [\n {\n \"field\": {},\n \"operator\": \"\",\n \"value\": {}\n }\n ]\n },\n \"logicalOperator\": \"\"\n }\n },\n \"fields\": [\n {}\n ],\n \"infoTypeTransformations\": {},\n \"primitiveTransformation\": {}\n }\n ],\n \"recordSuppressions\": [\n {\n \"condition\": {}\n }\n ]\n },\n \"transformationErrorHandling\": {\n \"leaveUntransformed\": {},\n \"throwError\": {}\n }\n },\n \"deidentifyTemplateName\": \"\",\n \"inspectConfig\": {\n \"contentOptions\": [],\n \"customInfoTypes\": [\n {\n \"detectionRules\": [\n {\n \"hotwordRule\": {\n \"hotwordRegex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n },\n \"likelihoodAdjustment\": {\n \"fixedLikelihood\": \"\",\n \"relativeLikelihood\": 0\n },\n \"proximity\": {\n \"windowAfter\": 0,\n \"windowBefore\": 0\n }\n }\n }\n ],\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {}\n },\n \"exclusionType\": \"\",\n \"infoType\": {},\n \"likelihood\": \"\",\n \"regex\": {},\n \"storedType\": {\n \"createTime\": \"\",\n \"name\": \"\"\n },\n \"surrogateType\": {}\n }\n ],\n \"excludeInfoTypes\": false,\n \"includeQuote\": false,\n \"infoTypes\": [\n {}\n ],\n \"limits\": {\n \"maxFindingsPerInfoType\": [\n {\n \"infoType\": {},\n \"maxFindings\": 0\n }\n ],\n \"maxFindingsPerItem\": 0,\n \"maxFindingsPerRequest\": 0\n },\n \"minLikelihood\": \"\",\n \"ruleSet\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"rules\": [\n {\n \"exclusionRule\": {\n \"dictionary\": {},\n \"excludeByHotword\": {\n \"hotwordRegex\": {},\n \"proximity\": {}\n },\n \"excludeInfoTypes\": {\n \"infoTypes\": [\n {}\n ]\n },\n \"matchingType\": \"\",\n \"regex\": {}\n },\n \"hotwordRule\": {}\n }\n ]\n }\n ]\n },\n \"inspectTemplateName\": \"\",\n \"item\": {\n \"byteItem\": {\n \"data\": \"\",\n \"type\": \"\"\n },\n \"table\": {\n \"headers\": [\n {}\n ],\n \"rows\": [\n {\n \"values\": [\n {}\n ]\n }\n ]\n },\n \"value\": \"\"\n },\n \"locationId\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/:parent/content:deidentify"
payload := strings.NewReader("{\n \"deidentifyConfig\": {\n \"imageTransformations\": {\n \"transforms\": [\n {\n \"allInfoTypes\": {},\n \"allText\": {},\n \"redactionColor\": {\n \"blue\": \"\",\n \"green\": \"\",\n \"red\": \"\"\n },\n \"selectedInfoTypes\": {\n \"infoTypes\": [\n {\n \"name\": \"\",\n \"version\": \"\"\n }\n ]\n }\n }\n ]\n },\n \"infoTypeTransformations\": {\n \"transformations\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"primitiveTransformation\": {\n \"bucketingConfig\": {\n \"buckets\": [\n {\n \"max\": {\n \"booleanValue\": false,\n \"dateValue\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"dayOfWeekValue\": \"\",\n \"floatValue\": \"\",\n \"integerValue\": \"\",\n \"stringValue\": \"\",\n \"timeValue\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"timestampValue\": \"\"\n },\n \"min\": {},\n \"replacementValue\": {}\n }\n ]\n },\n \"characterMaskConfig\": {\n \"charactersToIgnore\": [\n {\n \"charactersToSkip\": \"\",\n \"commonCharactersToIgnore\": \"\"\n }\n ],\n \"maskingCharacter\": \"\",\n \"numberToMask\": 0,\n \"reverseOrder\": false\n },\n \"cryptoDeterministicConfig\": {\n \"context\": {\n \"name\": \"\"\n },\n \"cryptoKey\": {\n \"kmsWrapped\": {\n \"cryptoKeyName\": \"\",\n \"wrappedKey\": \"\"\n },\n \"transient\": {\n \"name\": \"\"\n },\n \"unwrapped\": {\n \"key\": \"\"\n }\n },\n \"surrogateInfoType\": {}\n },\n \"cryptoHashConfig\": {\n \"cryptoKey\": {}\n },\n \"cryptoReplaceFfxFpeConfig\": {\n \"commonAlphabet\": \"\",\n \"context\": {},\n \"cryptoKey\": {},\n \"customAlphabet\": \"\",\n \"radix\": 0,\n \"surrogateInfoType\": {}\n },\n \"dateShiftConfig\": {\n \"context\": {},\n \"cryptoKey\": {},\n \"lowerBoundDays\": 0,\n \"upperBoundDays\": 0\n },\n \"fixedSizeBucketingConfig\": {\n \"bucketSize\": \"\",\n \"lowerBound\": {},\n \"upperBound\": {}\n },\n \"redactConfig\": {},\n \"replaceConfig\": {\n \"newValue\": {}\n },\n \"replaceDictionaryConfig\": {\n \"wordList\": {\n \"words\": []\n }\n },\n \"replaceWithInfoTypeConfig\": {},\n \"timePartConfig\": {\n \"partToExtract\": \"\"\n }\n }\n }\n ]\n },\n \"recordTransformations\": {\n \"fieldTransformations\": [\n {\n \"condition\": {\n \"expressions\": {\n \"conditions\": {\n \"conditions\": [\n {\n \"field\": {},\n \"operator\": \"\",\n \"value\": {}\n }\n ]\n },\n \"logicalOperator\": \"\"\n }\n },\n \"fields\": [\n {}\n ],\n \"infoTypeTransformations\": {},\n \"primitiveTransformation\": {}\n }\n ],\n \"recordSuppressions\": [\n {\n \"condition\": {}\n }\n ]\n },\n \"transformationErrorHandling\": {\n \"leaveUntransformed\": {},\n \"throwError\": {}\n }\n },\n \"deidentifyTemplateName\": \"\",\n \"inspectConfig\": {\n \"contentOptions\": [],\n \"customInfoTypes\": [\n {\n \"detectionRules\": [\n {\n \"hotwordRule\": {\n \"hotwordRegex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n },\n \"likelihoodAdjustment\": {\n \"fixedLikelihood\": \"\",\n \"relativeLikelihood\": 0\n },\n \"proximity\": {\n \"windowAfter\": 0,\n \"windowBefore\": 0\n }\n }\n }\n ],\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {}\n },\n \"exclusionType\": \"\",\n \"infoType\": {},\n \"likelihood\": \"\",\n \"regex\": {},\n \"storedType\": {\n \"createTime\": \"\",\n \"name\": \"\"\n },\n \"surrogateType\": {}\n }\n ],\n \"excludeInfoTypes\": false,\n \"includeQuote\": false,\n \"infoTypes\": [\n {}\n ],\n \"limits\": {\n \"maxFindingsPerInfoType\": [\n {\n \"infoType\": {},\n \"maxFindings\": 0\n }\n ],\n \"maxFindingsPerItem\": 0,\n \"maxFindingsPerRequest\": 0\n },\n \"minLikelihood\": \"\",\n \"ruleSet\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"rules\": [\n {\n \"exclusionRule\": {\n \"dictionary\": {},\n \"excludeByHotword\": {\n \"hotwordRegex\": {},\n \"proximity\": {}\n },\n \"excludeInfoTypes\": {\n \"infoTypes\": [\n {}\n ]\n },\n \"matchingType\": \"\",\n \"regex\": {}\n },\n \"hotwordRule\": {}\n }\n ]\n }\n ]\n },\n \"inspectTemplateName\": \"\",\n \"item\": {\n \"byteItem\": {\n \"data\": \"\",\n \"type\": \"\"\n },\n \"table\": {\n \"headers\": [\n {}\n ],\n \"rows\": [\n {\n \"values\": [\n {}\n ]\n }\n ]\n },\n \"value\": \"\"\n },\n \"locationId\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/v2/:parent/content:deidentify HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 6237
{
"deidentifyConfig": {
"imageTransformations": {
"transforms": [
{
"allInfoTypes": {},
"allText": {},
"redactionColor": {
"blue": "",
"green": "",
"red": ""
},
"selectedInfoTypes": {
"infoTypes": [
{
"name": "",
"version": ""
}
]
}
}
]
},
"infoTypeTransformations": {
"transformations": [
{
"infoTypes": [
{}
],
"primitiveTransformation": {
"bucketingConfig": {
"buckets": [
{
"max": {
"booleanValue": false,
"dateValue": {
"day": 0,
"month": 0,
"year": 0
},
"dayOfWeekValue": "",
"floatValue": "",
"integerValue": "",
"stringValue": "",
"timeValue": {
"hours": 0,
"minutes": 0,
"nanos": 0,
"seconds": 0
},
"timestampValue": ""
},
"min": {},
"replacementValue": {}
}
]
},
"characterMaskConfig": {
"charactersToIgnore": [
{
"charactersToSkip": "",
"commonCharactersToIgnore": ""
}
],
"maskingCharacter": "",
"numberToMask": 0,
"reverseOrder": false
},
"cryptoDeterministicConfig": {
"context": {
"name": ""
},
"cryptoKey": {
"kmsWrapped": {
"cryptoKeyName": "",
"wrappedKey": ""
},
"transient": {
"name": ""
},
"unwrapped": {
"key": ""
}
},
"surrogateInfoType": {}
},
"cryptoHashConfig": {
"cryptoKey": {}
},
"cryptoReplaceFfxFpeConfig": {
"commonAlphabet": "",
"context": {},
"cryptoKey": {},
"customAlphabet": "",
"radix": 0,
"surrogateInfoType": {}
},
"dateShiftConfig": {
"context": {},
"cryptoKey": {},
"lowerBoundDays": 0,
"upperBoundDays": 0
},
"fixedSizeBucketingConfig": {
"bucketSize": "",
"lowerBound": {},
"upperBound": {}
},
"redactConfig": {},
"replaceConfig": {
"newValue": {}
},
"replaceDictionaryConfig": {
"wordList": {
"words": []
}
},
"replaceWithInfoTypeConfig": {},
"timePartConfig": {
"partToExtract": ""
}
}
}
]
},
"recordTransformations": {
"fieldTransformations": [
{
"condition": {
"expressions": {
"conditions": {
"conditions": [
{
"field": {},
"operator": "",
"value": {}
}
]
},
"logicalOperator": ""
}
},
"fields": [
{}
],
"infoTypeTransformations": {},
"primitiveTransformation": {}
}
],
"recordSuppressions": [
{
"condition": {}
}
]
},
"transformationErrorHandling": {
"leaveUntransformed": {},
"throwError": {}
}
},
"deidentifyTemplateName": "",
"inspectConfig": {
"contentOptions": [],
"customInfoTypes": [
{
"detectionRules": [
{
"hotwordRule": {
"hotwordRegex": {
"groupIndexes": [],
"pattern": ""
},
"likelihoodAdjustment": {
"fixedLikelihood": "",
"relativeLikelihood": 0
},
"proximity": {
"windowAfter": 0,
"windowBefore": 0
}
}
}
],
"dictionary": {
"cloudStoragePath": {
"path": ""
},
"wordList": {}
},
"exclusionType": "",
"infoType": {},
"likelihood": "",
"regex": {},
"storedType": {
"createTime": "",
"name": ""
},
"surrogateType": {}
}
],
"excludeInfoTypes": false,
"includeQuote": false,
"infoTypes": [
{}
],
"limits": {
"maxFindingsPerInfoType": [
{
"infoType": {},
"maxFindings": 0
}
],
"maxFindingsPerItem": 0,
"maxFindingsPerRequest": 0
},
"minLikelihood": "",
"ruleSet": [
{
"infoTypes": [
{}
],
"rules": [
{
"exclusionRule": {
"dictionary": {},
"excludeByHotword": {
"hotwordRegex": {},
"proximity": {}
},
"excludeInfoTypes": {
"infoTypes": [
{}
]
},
"matchingType": "",
"regex": {}
},
"hotwordRule": {}
}
]
}
]
},
"inspectTemplateName": "",
"item": {
"byteItem": {
"data": "",
"type": ""
},
"table": {
"headers": [
{}
],
"rows": [
{
"values": [
{}
]
}
]
},
"value": ""
},
"locationId": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v2/:parent/content:deidentify")
.setHeader("content-type", "application/json")
.setBody("{\n \"deidentifyConfig\": {\n \"imageTransformations\": {\n \"transforms\": [\n {\n \"allInfoTypes\": {},\n \"allText\": {},\n \"redactionColor\": {\n \"blue\": \"\",\n \"green\": \"\",\n \"red\": \"\"\n },\n \"selectedInfoTypes\": {\n \"infoTypes\": [\n {\n \"name\": \"\",\n \"version\": \"\"\n }\n ]\n }\n }\n ]\n },\n \"infoTypeTransformations\": {\n \"transformations\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"primitiveTransformation\": {\n \"bucketingConfig\": {\n \"buckets\": [\n {\n \"max\": {\n \"booleanValue\": false,\n \"dateValue\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"dayOfWeekValue\": \"\",\n \"floatValue\": \"\",\n \"integerValue\": \"\",\n \"stringValue\": \"\",\n \"timeValue\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"timestampValue\": \"\"\n },\n \"min\": {},\n \"replacementValue\": {}\n }\n ]\n },\n \"characterMaskConfig\": {\n \"charactersToIgnore\": [\n {\n \"charactersToSkip\": \"\",\n \"commonCharactersToIgnore\": \"\"\n }\n ],\n \"maskingCharacter\": \"\",\n \"numberToMask\": 0,\n \"reverseOrder\": false\n },\n \"cryptoDeterministicConfig\": {\n \"context\": {\n \"name\": \"\"\n },\n \"cryptoKey\": {\n \"kmsWrapped\": {\n \"cryptoKeyName\": \"\",\n \"wrappedKey\": \"\"\n },\n \"transient\": {\n \"name\": \"\"\n },\n \"unwrapped\": {\n \"key\": \"\"\n }\n },\n \"surrogateInfoType\": {}\n },\n \"cryptoHashConfig\": {\n \"cryptoKey\": {}\n },\n \"cryptoReplaceFfxFpeConfig\": {\n \"commonAlphabet\": \"\",\n \"context\": {},\n \"cryptoKey\": {},\n \"customAlphabet\": \"\",\n \"radix\": 0,\n \"surrogateInfoType\": {}\n },\n \"dateShiftConfig\": {\n \"context\": {},\n \"cryptoKey\": {},\n \"lowerBoundDays\": 0,\n \"upperBoundDays\": 0\n },\n \"fixedSizeBucketingConfig\": {\n \"bucketSize\": \"\",\n \"lowerBound\": {},\n \"upperBound\": {}\n },\n \"redactConfig\": {},\n \"replaceConfig\": {\n \"newValue\": {}\n },\n \"replaceDictionaryConfig\": {\n \"wordList\": {\n \"words\": []\n }\n },\n \"replaceWithInfoTypeConfig\": {},\n \"timePartConfig\": {\n \"partToExtract\": \"\"\n }\n }\n }\n ]\n },\n \"recordTransformations\": {\n \"fieldTransformations\": [\n {\n \"condition\": {\n \"expressions\": {\n \"conditions\": {\n \"conditions\": [\n {\n \"field\": {},\n \"operator\": \"\",\n \"value\": {}\n }\n ]\n },\n \"logicalOperator\": \"\"\n }\n },\n \"fields\": [\n {}\n ],\n \"infoTypeTransformations\": {},\n \"primitiveTransformation\": {}\n }\n ],\n \"recordSuppressions\": [\n {\n \"condition\": {}\n }\n ]\n },\n \"transformationErrorHandling\": {\n \"leaveUntransformed\": {},\n \"throwError\": {}\n }\n },\n \"deidentifyTemplateName\": \"\",\n \"inspectConfig\": {\n \"contentOptions\": [],\n \"customInfoTypes\": [\n {\n \"detectionRules\": [\n {\n \"hotwordRule\": {\n \"hotwordRegex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n },\n \"likelihoodAdjustment\": {\n \"fixedLikelihood\": \"\",\n \"relativeLikelihood\": 0\n },\n \"proximity\": {\n \"windowAfter\": 0,\n \"windowBefore\": 0\n }\n }\n }\n ],\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {}\n },\n \"exclusionType\": \"\",\n \"infoType\": {},\n \"likelihood\": \"\",\n \"regex\": {},\n \"storedType\": {\n \"createTime\": \"\",\n \"name\": \"\"\n },\n \"surrogateType\": {}\n }\n ],\n \"excludeInfoTypes\": false,\n \"includeQuote\": false,\n \"infoTypes\": [\n {}\n ],\n \"limits\": {\n \"maxFindingsPerInfoType\": [\n {\n \"infoType\": {},\n \"maxFindings\": 0\n }\n ],\n \"maxFindingsPerItem\": 0,\n \"maxFindingsPerRequest\": 0\n },\n \"minLikelihood\": \"\",\n \"ruleSet\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"rules\": [\n {\n \"exclusionRule\": {\n \"dictionary\": {},\n \"excludeByHotword\": {\n \"hotwordRegex\": {},\n \"proximity\": {}\n },\n \"excludeInfoTypes\": {\n \"infoTypes\": [\n {}\n ]\n },\n \"matchingType\": \"\",\n \"regex\": {}\n },\n \"hotwordRule\": {}\n }\n ]\n }\n ]\n },\n \"inspectTemplateName\": \"\",\n \"item\": {\n \"byteItem\": {\n \"data\": \"\",\n \"type\": \"\"\n },\n \"table\": {\n \"headers\": [\n {}\n ],\n \"rows\": [\n {\n \"values\": [\n {}\n ]\n }\n ]\n },\n \"value\": \"\"\n },\n \"locationId\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/:parent/content:deidentify"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"deidentifyConfig\": {\n \"imageTransformations\": {\n \"transforms\": [\n {\n \"allInfoTypes\": {},\n \"allText\": {},\n \"redactionColor\": {\n \"blue\": \"\",\n \"green\": \"\",\n \"red\": \"\"\n },\n \"selectedInfoTypes\": {\n \"infoTypes\": [\n {\n \"name\": \"\",\n \"version\": \"\"\n }\n ]\n }\n }\n ]\n },\n \"infoTypeTransformations\": {\n \"transformations\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"primitiveTransformation\": {\n \"bucketingConfig\": {\n \"buckets\": [\n {\n \"max\": {\n \"booleanValue\": false,\n \"dateValue\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"dayOfWeekValue\": \"\",\n \"floatValue\": \"\",\n \"integerValue\": \"\",\n \"stringValue\": \"\",\n \"timeValue\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"timestampValue\": \"\"\n },\n \"min\": {},\n \"replacementValue\": {}\n }\n ]\n },\n \"characterMaskConfig\": {\n \"charactersToIgnore\": [\n {\n \"charactersToSkip\": \"\",\n \"commonCharactersToIgnore\": \"\"\n }\n ],\n \"maskingCharacter\": \"\",\n \"numberToMask\": 0,\n \"reverseOrder\": false\n },\n \"cryptoDeterministicConfig\": {\n \"context\": {\n \"name\": \"\"\n },\n \"cryptoKey\": {\n \"kmsWrapped\": {\n \"cryptoKeyName\": \"\",\n \"wrappedKey\": \"\"\n },\n \"transient\": {\n \"name\": \"\"\n },\n \"unwrapped\": {\n \"key\": \"\"\n }\n },\n \"surrogateInfoType\": {}\n },\n \"cryptoHashConfig\": {\n \"cryptoKey\": {}\n },\n \"cryptoReplaceFfxFpeConfig\": {\n \"commonAlphabet\": \"\",\n \"context\": {},\n \"cryptoKey\": {},\n \"customAlphabet\": \"\",\n \"radix\": 0,\n \"surrogateInfoType\": {}\n },\n \"dateShiftConfig\": {\n \"context\": {},\n \"cryptoKey\": {},\n \"lowerBoundDays\": 0,\n \"upperBoundDays\": 0\n },\n \"fixedSizeBucketingConfig\": {\n \"bucketSize\": \"\",\n \"lowerBound\": {},\n \"upperBound\": {}\n },\n \"redactConfig\": {},\n \"replaceConfig\": {\n \"newValue\": {}\n },\n \"replaceDictionaryConfig\": {\n \"wordList\": {\n \"words\": []\n }\n },\n \"replaceWithInfoTypeConfig\": {},\n \"timePartConfig\": {\n \"partToExtract\": \"\"\n }\n }\n }\n ]\n },\n \"recordTransformations\": {\n \"fieldTransformations\": [\n {\n \"condition\": {\n \"expressions\": {\n \"conditions\": {\n \"conditions\": [\n {\n \"field\": {},\n \"operator\": \"\",\n \"value\": {}\n }\n ]\n },\n \"logicalOperator\": \"\"\n }\n },\n \"fields\": [\n {}\n ],\n \"infoTypeTransformations\": {},\n \"primitiveTransformation\": {}\n }\n ],\n \"recordSuppressions\": [\n {\n \"condition\": {}\n }\n ]\n },\n \"transformationErrorHandling\": {\n \"leaveUntransformed\": {},\n \"throwError\": {}\n }\n },\n \"deidentifyTemplateName\": \"\",\n \"inspectConfig\": {\n \"contentOptions\": [],\n \"customInfoTypes\": [\n {\n \"detectionRules\": [\n {\n \"hotwordRule\": {\n \"hotwordRegex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n },\n \"likelihoodAdjustment\": {\n \"fixedLikelihood\": \"\",\n \"relativeLikelihood\": 0\n },\n \"proximity\": {\n \"windowAfter\": 0,\n \"windowBefore\": 0\n }\n }\n }\n ],\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {}\n },\n \"exclusionType\": \"\",\n \"infoType\": {},\n \"likelihood\": \"\",\n \"regex\": {},\n \"storedType\": {\n \"createTime\": \"\",\n \"name\": \"\"\n },\n \"surrogateType\": {}\n }\n ],\n \"excludeInfoTypes\": false,\n \"includeQuote\": false,\n \"infoTypes\": [\n {}\n ],\n \"limits\": {\n \"maxFindingsPerInfoType\": [\n {\n \"infoType\": {},\n \"maxFindings\": 0\n }\n ],\n \"maxFindingsPerItem\": 0,\n \"maxFindingsPerRequest\": 0\n },\n \"minLikelihood\": \"\",\n \"ruleSet\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"rules\": [\n {\n \"exclusionRule\": {\n \"dictionary\": {},\n \"excludeByHotword\": {\n \"hotwordRegex\": {},\n \"proximity\": {}\n },\n \"excludeInfoTypes\": {\n \"infoTypes\": [\n {}\n ]\n },\n \"matchingType\": \"\",\n \"regex\": {}\n },\n \"hotwordRule\": {}\n }\n ]\n }\n ]\n },\n \"inspectTemplateName\": \"\",\n \"item\": {\n \"byteItem\": {\n \"data\": \"\",\n \"type\": \"\"\n },\n \"table\": {\n \"headers\": [\n {}\n ],\n \"rows\": [\n {\n \"values\": [\n {}\n ]\n }\n ]\n },\n \"value\": \"\"\n },\n \"locationId\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"deidentifyConfig\": {\n \"imageTransformations\": {\n \"transforms\": [\n {\n \"allInfoTypes\": {},\n \"allText\": {},\n \"redactionColor\": {\n \"blue\": \"\",\n \"green\": \"\",\n \"red\": \"\"\n },\n \"selectedInfoTypes\": {\n \"infoTypes\": [\n {\n \"name\": \"\",\n \"version\": \"\"\n }\n ]\n }\n }\n ]\n },\n \"infoTypeTransformations\": {\n \"transformations\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"primitiveTransformation\": {\n \"bucketingConfig\": {\n \"buckets\": [\n {\n \"max\": {\n \"booleanValue\": false,\n \"dateValue\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"dayOfWeekValue\": \"\",\n \"floatValue\": \"\",\n \"integerValue\": \"\",\n \"stringValue\": \"\",\n \"timeValue\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"timestampValue\": \"\"\n },\n \"min\": {},\n \"replacementValue\": {}\n }\n ]\n },\n \"characterMaskConfig\": {\n \"charactersToIgnore\": [\n {\n \"charactersToSkip\": \"\",\n \"commonCharactersToIgnore\": \"\"\n }\n ],\n \"maskingCharacter\": \"\",\n \"numberToMask\": 0,\n \"reverseOrder\": false\n },\n \"cryptoDeterministicConfig\": {\n \"context\": {\n \"name\": \"\"\n },\n \"cryptoKey\": {\n \"kmsWrapped\": {\n \"cryptoKeyName\": \"\",\n \"wrappedKey\": \"\"\n },\n \"transient\": {\n \"name\": \"\"\n },\n \"unwrapped\": {\n \"key\": \"\"\n }\n },\n \"surrogateInfoType\": {}\n },\n \"cryptoHashConfig\": {\n \"cryptoKey\": {}\n },\n \"cryptoReplaceFfxFpeConfig\": {\n \"commonAlphabet\": \"\",\n \"context\": {},\n \"cryptoKey\": {},\n \"customAlphabet\": \"\",\n \"radix\": 0,\n \"surrogateInfoType\": {}\n },\n \"dateShiftConfig\": {\n \"context\": {},\n \"cryptoKey\": {},\n \"lowerBoundDays\": 0,\n \"upperBoundDays\": 0\n },\n \"fixedSizeBucketingConfig\": {\n \"bucketSize\": \"\",\n \"lowerBound\": {},\n \"upperBound\": {}\n },\n \"redactConfig\": {},\n \"replaceConfig\": {\n \"newValue\": {}\n },\n \"replaceDictionaryConfig\": {\n \"wordList\": {\n \"words\": []\n }\n },\n \"replaceWithInfoTypeConfig\": {},\n \"timePartConfig\": {\n \"partToExtract\": \"\"\n }\n }\n }\n ]\n },\n \"recordTransformations\": {\n \"fieldTransformations\": [\n {\n \"condition\": {\n \"expressions\": {\n \"conditions\": {\n \"conditions\": [\n {\n \"field\": {},\n \"operator\": \"\",\n \"value\": {}\n }\n ]\n },\n \"logicalOperator\": \"\"\n }\n },\n \"fields\": [\n {}\n ],\n \"infoTypeTransformations\": {},\n \"primitiveTransformation\": {}\n }\n ],\n \"recordSuppressions\": [\n {\n \"condition\": {}\n }\n ]\n },\n \"transformationErrorHandling\": {\n \"leaveUntransformed\": {},\n \"throwError\": {}\n }\n },\n \"deidentifyTemplateName\": \"\",\n \"inspectConfig\": {\n \"contentOptions\": [],\n \"customInfoTypes\": [\n {\n \"detectionRules\": [\n {\n \"hotwordRule\": {\n \"hotwordRegex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n },\n \"likelihoodAdjustment\": {\n \"fixedLikelihood\": \"\",\n \"relativeLikelihood\": 0\n },\n \"proximity\": {\n \"windowAfter\": 0,\n \"windowBefore\": 0\n }\n }\n }\n ],\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {}\n },\n \"exclusionType\": \"\",\n \"infoType\": {},\n \"likelihood\": \"\",\n \"regex\": {},\n \"storedType\": {\n \"createTime\": \"\",\n \"name\": \"\"\n },\n \"surrogateType\": {}\n }\n ],\n \"excludeInfoTypes\": false,\n \"includeQuote\": false,\n \"infoTypes\": [\n {}\n ],\n \"limits\": {\n \"maxFindingsPerInfoType\": [\n {\n \"infoType\": {},\n \"maxFindings\": 0\n }\n ],\n \"maxFindingsPerItem\": 0,\n \"maxFindingsPerRequest\": 0\n },\n \"minLikelihood\": \"\",\n \"ruleSet\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"rules\": [\n {\n \"exclusionRule\": {\n \"dictionary\": {},\n \"excludeByHotword\": {\n \"hotwordRegex\": {},\n \"proximity\": {}\n },\n \"excludeInfoTypes\": {\n \"infoTypes\": [\n {}\n ]\n },\n \"matchingType\": \"\",\n \"regex\": {}\n },\n \"hotwordRule\": {}\n }\n ]\n }\n ]\n },\n \"inspectTemplateName\": \"\",\n \"item\": {\n \"byteItem\": {\n \"data\": \"\",\n \"type\": \"\"\n },\n \"table\": {\n \"headers\": [\n {}\n ],\n \"rows\": [\n {\n \"values\": [\n {}\n ]\n }\n ]\n },\n \"value\": \"\"\n },\n \"locationId\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v2/:parent/content:deidentify")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v2/:parent/content:deidentify")
.header("content-type", "application/json")
.body("{\n \"deidentifyConfig\": {\n \"imageTransformations\": {\n \"transforms\": [\n {\n \"allInfoTypes\": {},\n \"allText\": {},\n \"redactionColor\": {\n \"blue\": \"\",\n \"green\": \"\",\n \"red\": \"\"\n },\n \"selectedInfoTypes\": {\n \"infoTypes\": [\n {\n \"name\": \"\",\n \"version\": \"\"\n }\n ]\n }\n }\n ]\n },\n \"infoTypeTransformations\": {\n \"transformations\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"primitiveTransformation\": {\n \"bucketingConfig\": {\n \"buckets\": [\n {\n \"max\": {\n \"booleanValue\": false,\n \"dateValue\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"dayOfWeekValue\": \"\",\n \"floatValue\": \"\",\n \"integerValue\": \"\",\n \"stringValue\": \"\",\n \"timeValue\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"timestampValue\": \"\"\n },\n \"min\": {},\n \"replacementValue\": {}\n }\n ]\n },\n \"characterMaskConfig\": {\n \"charactersToIgnore\": [\n {\n \"charactersToSkip\": \"\",\n \"commonCharactersToIgnore\": \"\"\n }\n ],\n \"maskingCharacter\": \"\",\n \"numberToMask\": 0,\n \"reverseOrder\": false\n },\n \"cryptoDeterministicConfig\": {\n \"context\": {\n \"name\": \"\"\n },\n \"cryptoKey\": {\n \"kmsWrapped\": {\n \"cryptoKeyName\": \"\",\n \"wrappedKey\": \"\"\n },\n \"transient\": {\n \"name\": \"\"\n },\n \"unwrapped\": {\n \"key\": \"\"\n }\n },\n \"surrogateInfoType\": {}\n },\n \"cryptoHashConfig\": {\n \"cryptoKey\": {}\n },\n \"cryptoReplaceFfxFpeConfig\": {\n \"commonAlphabet\": \"\",\n \"context\": {},\n \"cryptoKey\": {},\n \"customAlphabet\": \"\",\n \"radix\": 0,\n \"surrogateInfoType\": {}\n },\n \"dateShiftConfig\": {\n \"context\": {},\n \"cryptoKey\": {},\n \"lowerBoundDays\": 0,\n \"upperBoundDays\": 0\n },\n \"fixedSizeBucketingConfig\": {\n \"bucketSize\": \"\",\n \"lowerBound\": {},\n \"upperBound\": {}\n },\n \"redactConfig\": {},\n \"replaceConfig\": {\n \"newValue\": {}\n },\n \"replaceDictionaryConfig\": {\n \"wordList\": {\n \"words\": []\n }\n },\n \"replaceWithInfoTypeConfig\": {},\n \"timePartConfig\": {\n \"partToExtract\": \"\"\n }\n }\n }\n ]\n },\n \"recordTransformations\": {\n \"fieldTransformations\": [\n {\n \"condition\": {\n \"expressions\": {\n \"conditions\": {\n \"conditions\": [\n {\n \"field\": {},\n \"operator\": \"\",\n \"value\": {}\n }\n ]\n },\n \"logicalOperator\": \"\"\n }\n },\n \"fields\": [\n {}\n ],\n \"infoTypeTransformations\": {},\n \"primitiveTransformation\": {}\n }\n ],\n \"recordSuppressions\": [\n {\n \"condition\": {}\n }\n ]\n },\n \"transformationErrorHandling\": {\n \"leaveUntransformed\": {},\n \"throwError\": {}\n }\n },\n \"deidentifyTemplateName\": \"\",\n \"inspectConfig\": {\n \"contentOptions\": [],\n \"customInfoTypes\": [\n {\n \"detectionRules\": [\n {\n \"hotwordRule\": {\n \"hotwordRegex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n },\n \"likelihoodAdjustment\": {\n \"fixedLikelihood\": \"\",\n \"relativeLikelihood\": 0\n },\n \"proximity\": {\n \"windowAfter\": 0,\n \"windowBefore\": 0\n }\n }\n }\n ],\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {}\n },\n \"exclusionType\": \"\",\n \"infoType\": {},\n \"likelihood\": \"\",\n \"regex\": {},\n \"storedType\": {\n \"createTime\": \"\",\n \"name\": \"\"\n },\n \"surrogateType\": {}\n }\n ],\n \"excludeInfoTypes\": false,\n \"includeQuote\": false,\n \"infoTypes\": [\n {}\n ],\n \"limits\": {\n \"maxFindingsPerInfoType\": [\n {\n \"infoType\": {},\n \"maxFindings\": 0\n }\n ],\n \"maxFindingsPerItem\": 0,\n \"maxFindingsPerRequest\": 0\n },\n \"minLikelihood\": \"\",\n \"ruleSet\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"rules\": [\n {\n \"exclusionRule\": {\n \"dictionary\": {},\n \"excludeByHotword\": {\n \"hotwordRegex\": {},\n \"proximity\": {}\n },\n \"excludeInfoTypes\": {\n \"infoTypes\": [\n {}\n ]\n },\n \"matchingType\": \"\",\n \"regex\": {}\n },\n \"hotwordRule\": {}\n }\n ]\n }\n ]\n },\n \"inspectTemplateName\": \"\",\n \"item\": {\n \"byteItem\": {\n \"data\": \"\",\n \"type\": \"\"\n },\n \"table\": {\n \"headers\": [\n {}\n ],\n \"rows\": [\n {\n \"values\": [\n {}\n ]\n }\n ]\n },\n \"value\": \"\"\n },\n \"locationId\": \"\"\n}")
.asString();
const data = JSON.stringify({
deidentifyConfig: {
imageTransformations: {
transforms: [
{
allInfoTypes: {},
allText: {},
redactionColor: {
blue: '',
green: '',
red: ''
},
selectedInfoTypes: {
infoTypes: [
{
name: '',
version: ''
}
]
}
}
]
},
infoTypeTransformations: {
transformations: [
{
infoTypes: [
{}
],
primitiveTransformation: {
bucketingConfig: {
buckets: [
{
max: {
booleanValue: false,
dateValue: {
day: 0,
month: 0,
year: 0
},
dayOfWeekValue: '',
floatValue: '',
integerValue: '',
stringValue: '',
timeValue: {
hours: 0,
minutes: 0,
nanos: 0,
seconds: 0
},
timestampValue: ''
},
min: {},
replacementValue: {}
}
]
},
characterMaskConfig: {
charactersToIgnore: [
{
charactersToSkip: '',
commonCharactersToIgnore: ''
}
],
maskingCharacter: '',
numberToMask: 0,
reverseOrder: false
},
cryptoDeterministicConfig: {
context: {
name: ''
},
cryptoKey: {
kmsWrapped: {
cryptoKeyName: '',
wrappedKey: ''
},
transient: {
name: ''
},
unwrapped: {
key: ''
}
},
surrogateInfoType: {}
},
cryptoHashConfig: {
cryptoKey: {}
},
cryptoReplaceFfxFpeConfig: {
commonAlphabet: '',
context: {},
cryptoKey: {},
customAlphabet: '',
radix: 0,
surrogateInfoType: {}
},
dateShiftConfig: {
context: {},
cryptoKey: {},
lowerBoundDays: 0,
upperBoundDays: 0
},
fixedSizeBucketingConfig: {
bucketSize: '',
lowerBound: {},
upperBound: {}
},
redactConfig: {},
replaceConfig: {
newValue: {}
},
replaceDictionaryConfig: {
wordList: {
words: []
}
},
replaceWithInfoTypeConfig: {},
timePartConfig: {
partToExtract: ''
}
}
}
]
},
recordTransformations: {
fieldTransformations: [
{
condition: {
expressions: {
conditions: {
conditions: [
{
field: {},
operator: '',
value: {}
}
]
},
logicalOperator: ''
}
},
fields: [
{}
],
infoTypeTransformations: {},
primitiveTransformation: {}
}
],
recordSuppressions: [
{
condition: {}
}
]
},
transformationErrorHandling: {
leaveUntransformed: {},
throwError: {}
}
},
deidentifyTemplateName: '',
inspectConfig: {
contentOptions: [],
customInfoTypes: [
{
detectionRules: [
{
hotwordRule: {
hotwordRegex: {
groupIndexes: [],
pattern: ''
},
likelihoodAdjustment: {
fixedLikelihood: '',
relativeLikelihood: 0
},
proximity: {
windowAfter: 0,
windowBefore: 0
}
}
}
],
dictionary: {
cloudStoragePath: {
path: ''
},
wordList: {}
},
exclusionType: '',
infoType: {},
likelihood: '',
regex: {},
storedType: {
createTime: '',
name: ''
},
surrogateType: {}
}
],
excludeInfoTypes: false,
includeQuote: false,
infoTypes: [
{}
],
limits: {
maxFindingsPerInfoType: [
{
infoType: {},
maxFindings: 0
}
],
maxFindingsPerItem: 0,
maxFindingsPerRequest: 0
},
minLikelihood: '',
ruleSet: [
{
infoTypes: [
{}
],
rules: [
{
exclusionRule: {
dictionary: {},
excludeByHotword: {
hotwordRegex: {},
proximity: {}
},
excludeInfoTypes: {
infoTypes: [
{}
]
},
matchingType: '',
regex: {}
},
hotwordRule: {}
}
]
}
]
},
inspectTemplateName: '',
item: {
byteItem: {
data: '',
type: ''
},
table: {
headers: [
{}
],
rows: [
{
values: [
{}
]
}
]
},
value: ''
},
locationId: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v2/:parent/content:deidentify');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v2/:parent/content:deidentify',
headers: {'content-type': 'application/json'},
data: {
deidentifyConfig: {
imageTransformations: {
transforms: [
{
allInfoTypes: {},
allText: {},
redactionColor: {blue: '', green: '', red: ''},
selectedInfoTypes: {infoTypes: [{name: '', version: ''}]}
}
]
},
infoTypeTransformations: {
transformations: [
{
infoTypes: [{}],
primitiveTransformation: {
bucketingConfig: {
buckets: [
{
max: {
booleanValue: false,
dateValue: {day: 0, month: 0, year: 0},
dayOfWeekValue: '',
floatValue: '',
integerValue: '',
stringValue: '',
timeValue: {hours: 0, minutes: 0, nanos: 0, seconds: 0},
timestampValue: ''
},
min: {},
replacementValue: {}
}
]
},
characterMaskConfig: {
charactersToIgnore: [{charactersToSkip: '', commonCharactersToIgnore: ''}],
maskingCharacter: '',
numberToMask: 0,
reverseOrder: false
},
cryptoDeterministicConfig: {
context: {name: ''},
cryptoKey: {
kmsWrapped: {cryptoKeyName: '', wrappedKey: ''},
transient: {name: ''},
unwrapped: {key: ''}
},
surrogateInfoType: {}
},
cryptoHashConfig: {cryptoKey: {}},
cryptoReplaceFfxFpeConfig: {
commonAlphabet: '',
context: {},
cryptoKey: {},
customAlphabet: '',
radix: 0,
surrogateInfoType: {}
},
dateShiftConfig: {context: {}, cryptoKey: {}, lowerBoundDays: 0, upperBoundDays: 0},
fixedSizeBucketingConfig: {bucketSize: '', lowerBound: {}, upperBound: {}},
redactConfig: {},
replaceConfig: {newValue: {}},
replaceDictionaryConfig: {wordList: {words: []}},
replaceWithInfoTypeConfig: {},
timePartConfig: {partToExtract: ''}
}
}
]
},
recordTransformations: {
fieldTransformations: [
{
condition: {
expressions: {
conditions: {conditions: [{field: {}, operator: '', value: {}}]},
logicalOperator: ''
}
},
fields: [{}],
infoTypeTransformations: {},
primitiveTransformation: {}
}
],
recordSuppressions: [{condition: {}}]
},
transformationErrorHandling: {leaveUntransformed: {}, throwError: {}}
},
deidentifyTemplateName: '',
inspectConfig: {
contentOptions: [],
customInfoTypes: [
{
detectionRules: [
{
hotwordRule: {
hotwordRegex: {groupIndexes: [], pattern: ''},
likelihoodAdjustment: {fixedLikelihood: '', relativeLikelihood: 0},
proximity: {windowAfter: 0, windowBefore: 0}
}
}
],
dictionary: {cloudStoragePath: {path: ''}, wordList: {}},
exclusionType: '',
infoType: {},
likelihood: '',
regex: {},
storedType: {createTime: '', name: ''},
surrogateType: {}
}
],
excludeInfoTypes: false,
includeQuote: false,
infoTypes: [{}],
limits: {
maxFindingsPerInfoType: [{infoType: {}, maxFindings: 0}],
maxFindingsPerItem: 0,
maxFindingsPerRequest: 0
},
minLikelihood: '',
ruleSet: [
{
infoTypes: [{}],
rules: [
{
exclusionRule: {
dictionary: {},
excludeByHotword: {hotwordRegex: {}, proximity: {}},
excludeInfoTypes: {infoTypes: [{}]},
matchingType: '',
regex: {}
},
hotwordRule: {}
}
]
}
]
},
inspectTemplateName: '',
item: {
byteItem: {data: '', type: ''},
table: {headers: [{}], rows: [{values: [{}]}]},
value: ''
},
locationId: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/:parent/content:deidentify';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"deidentifyConfig":{"imageTransformations":{"transforms":[{"allInfoTypes":{},"allText":{},"redactionColor":{"blue":"","green":"","red":""},"selectedInfoTypes":{"infoTypes":[{"name":"","version":""}]}}]},"infoTypeTransformations":{"transformations":[{"infoTypes":[{}],"primitiveTransformation":{"bucketingConfig":{"buckets":[{"max":{"booleanValue":false,"dateValue":{"day":0,"month":0,"year":0},"dayOfWeekValue":"","floatValue":"","integerValue":"","stringValue":"","timeValue":{"hours":0,"minutes":0,"nanos":0,"seconds":0},"timestampValue":""},"min":{},"replacementValue":{}}]},"characterMaskConfig":{"charactersToIgnore":[{"charactersToSkip":"","commonCharactersToIgnore":""}],"maskingCharacter":"","numberToMask":0,"reverseOrder":false},"cryptoDeterministicConfig":{"context":{"name":""},"cryptoKey":{"kmsWrapped":{"cryptoKeyName":"","wrappedKey":""},"transient":{"name":""},"unwrapped":{"key":""}},"surrogateInfoType":{}},"cryptoHashConfig":{"cryptoKey":{}},"cryptoReplaceFfxFpeConfig":{"commonAlphabet":"","context":{},"cryptoKey":{},"customAlphabet":"","radix":0,"surrogateInfoType":{}},"dateShiftConfig":{"context":{},"cryptoKey":{},"lowerBoundDays":0,"upperBoundDays":0},"fixedSizeBucketingConfig":{"bucketSize":"","lowerBound":{},"upperBound":{}},"redactConfig":{},"replaceConfig":{"newValue":{}},"replaceDictionaryConfig":{"wordList":{"words":[]}},"replaceWithInfoTypeConfig":{},"timePartConfig":{"partToExtract":""}}}]},"recordTransformations":{"fieldTransformations":[{"condition":{"expressions":{"conditions":{"conditions":[{"field":{},"operator":"","value":{}}]},"logicalOperator":""}},"fields":[{}],"infoTypeTransformations":{},"primitiveTransformation":{}}],"recordSuppressions":[{"condition":{}}]},"transformationErrorHandling":{"leaveUntransformed":{},"throwError":{}}},"deidentifyTemplateName":"","inspectConfig":{"contentOptions":[],"customInfoTypes":[{"detectionRules":[{"hotwordRule":{"hotwordRegex":{"groupIndexes":[],"pattern":""},"likelihoodAdjustment":{"fixedLikelihood":"","relativeLikelihood":0},"proximity":{"windowAfter":0,"windowBefore":0}}}],"dictionary":{"cloudStoragePath":{"path":""},"wordList":{}},"exclusionType":"","infoType":{},"likelihood":"","regex":{},"storedType":{"createTime":"","name":""},"surrogateType":{}}],"excludeInfoTypes":false,"includeQuote":false,"infoTypes":[{}],"limits":{"maxFindingsPerInfoType":[{"infoType":{},"maxFindings":0}],"maxFindingsPerItem":0,"maxFindingsPerRequest":0},"minLikelihood":"","ruleSet":[{"infoTypes":[{}],"rules":[{"exclusionRule":{"dictionary":{},"excludeByHotword":{"hotwordRegex":{},"proximity":{}},"excludeInfoTypes":{"infoTypes":[{}]},"matchingType":"","regex":{}},"hotwordRule":{}}]}]},"inspectTemplateName":"","item":{"byteItem":{"data":"","type":""},"table":{"headers":[{}],"rows":[{"values":[{}]}]},"value":""},"locationId":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v2/:parent/content:deidentify',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "deidentifyConfig": {\n "imageTransformations": {\n "transforms": [\n {\n "allInfoTypes": {},\n "allText": {},\n "redactionColor": {\n "blue": "",\n "green": "",\n "red": ""\n },\n "selectedInfoTypes": {\n "infoTypes": [\n {\n "name": "",\n "version": ""\n }\n ]\n }\n }\n ]\n },\n "infoTypeTransformations": {\n "transformations": [\n {\n "infoTypes": [\n {}\n ],\n "primitiveTransformation": {\n "bucketingConfig": {\n "buckets": [\n {\n "max": {\n "booleanValue": false,\n "dateValue": {\n "day": 0,\n "month": 0,\n "year": 0\n },\n "dayOfWeekValue": "",\n "floatValue": "",\n "integerValue": "",\n "stringValue": "",\n "timeValue": {\n "hours": 0,\n "minutes": 0,\n "nanos": 0,\n "seconds": 0\n },\n "timestampValue": ""\n },\n "min": {},\n "replacementValue": {}\n }\n ]\n },\n "characterMaskConfig": {\n "charactersToIgnore": [\n {\n "charactersToSkip": "",\n "commonCharactersToIgnore": ""\n }\n ],\n "maskingCharacter": "",\n "numberToMask": 0,\n "reverseOrder": false\n },\n "cryptoDeterministicConfig": {\n "context": {\n "name": ""\n },\n "cryptoKey": {\n "kmsWrapped": {\n "cryptoKeyName": "",\n "wrappedKey": ""\n },\n "transient": {\n "name": ""\n },\n "unwrapped": {\n "key": ""\n }\n },\n "surrogateInfoType": {}\n },\n "cryptoHashConfig": {\n "cryptoKey": {}\n },\n "cryptoReplaceFfxFpeConfig": {\n "commonAlphabet": "",\n "context": {},\n "cryptoKey": {},\n "customAlphabet": "",\n "radix": 0,\n "surrogateInfoType": {}\n },\n "dateShiftConfig": {\n "context": {},\n "cryptoKey": {},\n "lowerBoundDays": 0,\n "upperBoundDays": 0\n },\n "fixedSizeBucketingConfig": {\n "bucketSize": "",\n "lowerBound": {},\n "upperBound": {}\n },\n "redactConfig": {},\n "replaceConfig": {\n "newValue": {}\n },\n "replaceDictionaryConfig": {\n "wordList": {\n "words": []\n }\n },\n "replaceWithInfoTypeConfig": {},\n "timePartConfig": {\n "partToExtract": ""\n }\n }\n }\n ]\n },\n "recordTransformations": {\n "fieldTransformations": [\n {\n "condition": {\n "expressions": {\n "conditions": {\n "conditions": [\n {\n "field": {},\n "operator": "",\n "value": {}\n }\n ]\n },\n "logicalOperator": ""\n }\n },\n "fields": [\n {}\n ],\n "infoTypeTransformations": {},\n "primitiveTransformation": {}\n }\n ],\n "recordSuppressions": [\n {\n "condition": {}\n }\n ]\n },\n "transformationErrorHandling": {\n "leaveUntransformed": {},\n "throwError": {}\n }\n },\n "deidentifyTemplateName": "",\n "inspectConfig": {\n "contentOptions": [],\n "customInfoTypes": [\n {\n "detectionRules": [\n {\n "hotwordRule": {\n "hotwordRegex": {\n "groupIndexes": [],\n "pattern": ""\n },\n "likelihoodAdjustment": {\n "fixedLikelihood": "",\n "relativeLikelihood": 0\n },\n "proximity": {\n "windowAfter": 0,\n "windowBefore": 0\n }\n }\n }\n ],\n "dictionary": {\n "cloudStoragePath": {\n "path": ""\n },\n "wordList": {}\n },\n "exclusionType": "",\n "infoType": {},\n "likelihood": "",\n "regex": {},\n "storedType": {\n "createTime": "",\n "name": ""\n },\n "surrogateType": {}\n }\n ],\n "excludeInfoTypes": false,\n "includeQuote": false,\n "infoTypes": [\n {}\n ],\n "limits": {\n "maxFindingsPerInfoType": [\n {\n "infoType": {},\n "maxFindings": 0\n }\n ],\n "maxFindingsPerItem": 0,\n "maxFindingsPerRequest": 0\n },\n "minLikelihood": "",\n "ruleSet": [\n {\n "infoTypes": [\n {}\n ],\n "rules": [\n {\n "exclusionRule": {\n "dictionary": {},\n "excludeByHotword": {\n "hotwordRegex": {},\n "proximity": {}\n },\n "excludeInfoTypes": {\n "infoTypes": [\n {}\n ]\n },\n "matchingType": "",\n "regex": {}\n },\n "hotwordRule": {}\n }\n ]\n }\n ]\n },\n "inspectTemplateName": "",\n "item": {\n "byteItem": {\n "data": "",\n "type": ""\n },\n "table": {\n "headers": [\n {}\n ],\n "rows": [\n {\n "values": [\n {}\n ]\n }\n ]\n },\n "value": ""\n },\n "locationId": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"deidentifyConfig\": {\n \"imageTransformations\": {\n \"transforms\": [\n {\n \"allInfoTypes\": {},\n \"allText\": {},\n \"redactionColor\": {\n \"blue\": \"\",\n \"green\": \"\",\n \"red\": \"\"\n },\n \"selectedInfoTypes\": {\n \"infoTypes\": [\n {\n \"name\": \"\",\n \"version\": \"\"\n }\n ]\n }\n }\n ]\n },\n \"infoTypeTransformations\": {\n \"transformations\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"primitiveTransformation\": {\n \"bucketingConfig\": {\n \"buckets\": [\n {\n \"max\": {\n \"booleanValue\": false,\n \"dateValue\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"dayOfWeekValue\": \"\",\n \"floatValue\": \"\",\n \"integerValue\": \"\",\n \"stringValue\": \"\",\n \"timeValue\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"timestampValue\": \"\"\n },\n \"min\": {},\n \"replacementValue\": {}\n }\n ]\n },\n \"characterMaskConfig\": {\n \"charactersToIgnore\": [\n {\n \"charactersToSkip\": \"\",\n \"commonCharactersToIgnore\": \"\"\n }\n ],\n \"maskingCharacter\": \"\",\n \"numberToMask\": 0,\n \"reverseOrder\": false\n },\n \"cryptoDeterministicConfig\": {\n \"context\": {\n \"name\": \"\"\n },\n \"cryptoKey\": {\n \"kmsWrapped\": {\n \"cryptoKeyName\": \"\",\n \"wrappedKey\": \"\"\n },\n \"transient\": {\n \"name\": \"\"\n },\n \"unwrapped\": {\n \"key\": \"\"\n }\n },\n \"surrogateInfoType\": {}\n },\n \"cryptoHashConfig\": {\n \"cryptoKey\": {}\n },\n \"cryptoReplaceFfxFpeConfig\": {\n \"commonAlphabet\": \"\",\n \"context\": {},\n \"cryptoKey\": {},\n \"customAlphabet\": \"\",\n \"radix\": 0,\n \"surrogateInfoType\": {}\n },\n \"dateShiftConfig\": {\n \"context\": {},\n \"cryptoKey\": {},\n \"lowerBoundDays\": 0,\n \"upperBoundDays\": 0\n },\n \"fixedSizeBucketingConfig\": {\n \"bucketSize\": \"\",\n \"lowerBound\": {},\n \"upperBound\": {}\n },\n \"redactConfig\": {},\n \"replaceConfig\": {\n \"newValue\": {}\n },\n \"replaceDictionaryConfig\": {\n \"wordList\": {\n \"words\": []\n }\n },\n \"replaceWithInfoTypeConfig\": {},\n \"timePartConfig\": {\n \"partToExtract\": \"\"\n }\n }\n }\n ]\n },\n \"recordTransformations\": {\n \"fieldTransformations\": [\n {\n \"condition\": {\n \"expressions\": {\n \"conditions\": {\n \"conditions\": [\n {\n \"field\": {},\n \"operator\": \"\",\n \"value\": {}\n }\n ]\n },\n \"logicalOperator\": \"\"\n }\n },\n \"fields\": [\n {}\n ],\n \"infoTypeTransformations\": {},\n \"primitiveTransformation\": {}\n }\n ],\n \"recordSuppressions\": [\n {\n \"condition\": {}\n }\n ]\n },\n \"transformationErrorHandling\": {\n \"leaveUntransformed\": {},\n \"throwError\": {}\n }\n },\n \"deidentifyTemplateName\": \"\",\n \"inspectConfig\": {\n \"contentOptions\": [],\n \"customInfoTypes\": [\n {\n \"detectionRules\": [\n {\n \"hotwordRule\": {\n \"hotwordRegex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n },\n \"likelihoodAdjustment\": {\n \"fixedLikelihood\": \"\",\n \"relativeLikelihood\": 0\n },\n \"proximity\": {\n \"windowAfter\": 0,\n \"windowBefore\": 0\n }\n }\n }\n ],\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {}\n },\n \"exclusionType\": \"\",\n \"infoType\": {},\n \"likelihood\": \"\",\n \"regex\": {},\n \"storedType\": {\n \"createTime\": \"\",\n \"name\": \"\"\n },\n \"surrogateType\": {}\n }\n ],\n \"excludeInfoTypes\": false,\n \"includeQuote\": false,\n \"infoTypes\": [\n {}\n ],\n \"limits\": {\n \"maxFindingsPerInfoType\": [\n {\n \"infoType\": {},\n \"maxFindings\": 0\n }\n ],\n \"maxFindingsPerItem\": 0,\n \"maxFindingsPerRequest\": 0\n },\n \"minLikelihood\": \"\",\n \"ruleSet\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"rules\": [\n {\n \"exclusionRule\": {\n \"dictionary\": {},\n \"excludeByHotword\": {\n \"hotwordRegex\": {},\n \"proximity\": {}\n },\n \"excludeInfoTypes\": {\n \"infoTypes\": [\n {}\n ]\n },\n \"matchingType\": \"\",\n \"regex\": {}\n },\n \"hotwordRule\": {}\n }\n ]\n }\n ]\n },\n \"inspectTemplateName\": \"\",\n \"item\": {\n \"byteItem\": {\n \"data\": \"\",\n \"type\": \"\"\n },\n \"table\": {\n \"headers\": [\n {}\n ],\n \"rows\": [\n {\n \"values\": [\n {}\n ]\n }\n ]\n },\n \"value\": \"\"\n },\n \"locationId\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v2/:parent/content:deidentify")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/v2/:parent/content:deidentify',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
deidentifyConfig: {
imageTransformations: {
transforms: [
{
allInfoTypes: {},
allText: {},
redactionColor: {blue: '', green: '', red: ''},
selectedInfoTypes: {infoTypes: [{name: '', version: ''}]}
}
]
},
infoTypeTransformations: {
transformations: [
{
infoTypes: [{}],
primitiveTransformation: {
bucketingConfig: {
buckets: [
{
max: {
booleanValue: false,
dateValue: {day: 0, month: 0, year: 0},
dayOfWeekValue: '',
floatValue: '',
integerValue: '',
stringValue: '',
timeValue: {hours: 0, minutes: 0, nanos: 0, seconds: 0},
timestampValue: ''
},
min: {},
replacementValue: {}
}
]
},
characterMaskConfig: {
charactersToIgnore: [{charactersToSkip: '', commonCharactersToIgnore: ''}],
maskingCharacter: '',
numberToMask: 0,
reverseOrder: false
},
cryptoDeterministicConfig: {
context: {name: ''},
cryptoKey: {
kmsWrapped: {cryptoKeyName: '', wrappedKey: ''},
transient: {name: ''},
unwrapped: {key: ''}
},
surrogateInfoType: {}
},
cryptoHashConfig: {cryptoKey: {}},
cryptoReplaceFfxFpeConfig: {
commonAlphabet: '',
context: {},
cryptoKey: {},
customAlphabet: '',
radix: 0,
surrogateInfoType: {}
},
dateShiftConfig: {context: {}, cryptoKey: {}, lowerBoundDays: 0, upperBoundDays: 0},
fixedSizeBucketingConfig: {bucketSize: '', lowerBound: {}, upperBound: {}},
redactConfig: {},
replaceConfig: {newValue: {}},
replaceDictionaryConfig: {wordList: {words: []}},
replaceWithInfoTypeConfig: {},
timePartConfig: {partToExtract: ''}
}
}
]
},
recordTransformations: {
fieldTransformations: [
{
condition: {
expressions: {
conditions: {conditions: [{field: {}, operator: '', value: {}}]},
logicalOperator: ''
}
},
fields: [{}],
infoTypeTransformations: {},
primitiveTransformation: {}
}
],
recordSuppressions: [{condition: {}}]
},
transformationErrorHandling: {leaveUntransformed: {}, throwError: {}}
},
deidentifyTemplateName: '',
inspectConfig: {
contentOptions: [],
customInfoTypes: [
{
detectionRules: [
{
hotwordRule: {
hotwordRegex: {groupIndexes: [], pattern: ''},
likelihoodAdjustment: {fixedLikelihood: '', relativeLikelihood: 0},
proximity: {windowAfter: 0, windowBefore: 0}
}
}
],
dictionary: {cloudStoragePath: {path: ''}, wordList: {}},
exclusionType: '',
infoType: {},
likelihood: '',
regex: {},
storedType: {createTime: '', name: ''},
surrogateType: {}
}
],
excludeInfoTypes: false,
includeQuote: false,
infoTypes: [{}],
limits: {
maxFindingsPerInfoType: [{infoType: {}, maxFindings: 0}],
maxFindingsPerItem: 0,
maxFindingsPerRequest: 0
},
minLikelihood: '',
ruleSet: [
{
infoTypes: [{}],
rules: [
{
exclusionRule: {
dictionary: {},
excludeByHotword: {hotwordRegex: {}, proximity: {}},
excludeInfoTypes: {infoTypes: [{}]},
matchingType: '',
regex: {}
},
hotwordRule: {}
}
]
}
]
},
inspectTemplateName: '',
item: {
byteItem: {data: '', type: ''},
table: {headers: [{}], rows: [{values: [{}]}]},
value: ''
},
locationId: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v2/:parent/content:deidentify',
headers: {'content-type': 'application/json'},
body: {
deidentifyConfig: {
imageTransformations: {
transforms: [
{
allInfoTypes: {},
allText: {},
redactionColor: {blue: '', green: '', red: ''},
selectedInfoTypes: {infoTypes: [{name: '', version: ''}]}
}
]
},
infoTypeTransformations: {
transformations: [
{
infoTypes: [{}],
primitiveTransformation: {
bucketingConfig: {
buckets: [
{
max: {
booleanValue: false,
dateValue: {day: 0, month: 0, year: 0},
dayOfWeekValue: '',
floatValue: '',
integerValue: '',
stringValue: '',
timeValue: {hours: 0, minutes: 0, nanos: 0, seconds: 0},
timestampValue: ''
},
min: {},
replacementValue: {}
}
]
},
characterMaskConfig: {
charactersToIgnore: [{charactersToSkip: '', commonCharactersToIgnore: ''}],
maskingCharacter: '',
numberToMask: 0,
reverseOrder: false
},
cryptoDeterministicConfig: {
context: {name: ''},
cryptoKey: {
kmsWrapped: {cryptoKeyName: '', wrappedKey: ''},
transient: {name: ''},
unwrapped: {key: ''}
},
surrogateInfoType: {}
},
cryptoHashConfig: {cryptoKey: {}},
cryptoReplaceFfxFpeConfig: {
commonAlphabet: '',
context: {},
cryptoKey: {},
customAlphabet: '',
radix: 0,
surrogateInfoType: {}
},
dateShiftConfig: {context: {}, cryptoKey: {}, lowerBoundDays: 0, upperBoundDays: 0},
fixedSizeBucketingConfig: {bucketSize: '', lowerBound: {}, upperBound: {}},
redactConfig: {},
replaceConfig: {newValue: {}},
replaceDictionaryConfig: {wordList: {words: []}},
replaceWithInfoTypeConfig: {},
timePartConfig: {partToExtract: ''}
}
}
]
},
recordTransformations: {
fieldTransformations: [
{
condition: {
expressions: {
conditions: {conditions: [{field: {}, operator: '', value: {}}]},
logicalOperator: ''
}
},
fields: [{}],
infoTypeTransformations: {},
primitiveTransformation: {}
}
],
recordSuppressions: [{condition: {}}]
},
transformationErrorHandling: {leaveUntransformed: {}, throwError: {}}
},
deidentifyTemplateName: '',
inspectConfig: {
contentOptions: [],
customInfoTypes: [
{
detectionRules: [
{
hotwordRule: {
hotwordRegex: {groupIndexes: [], pattern: ''},
likelihoodAdjustment: {fixedLikelihood: '', relativeLikelihood: 0},
proximity: {windowAfter: 0, windowBefore: 0}
}
}
],
dictionary: {cloudStoragePath: {path: ''}, wordList: {}},
exclusionType: '',
infoType: {},
likelihood: '',
regex: {},
storedType: {createTime: '', name: ''},
surrogateType: {}
}
],
excludeInfoTypes: false,
includeQuote: false,
infoTypes: [{}],
limits: {
maxFindingsPerInfoType: [{infoType: {}, maxFindings: 0}],
maxFindingsPerItem: 0,
maxFindingsPerRequest: 0
},
minLikelihood: '',
ruleSet: [
{
infoTypes: [{}],
rules: [
{
exclusionRule: {
dictionary: {},
excludeByHotword: {hotwordRegex: {}, proximity: {}},
excludeInfoTypes: {infoTypes: [{}]},
matchingType: '',
regex: {}
},
hotwordRule: {}
}
]
}
]
},
inspectTemplateName: '',
item: {
byteItem: {data: '', type: ''},
table: {headers: [{}], rows: [{values: [{}]}]},
value: ''
},
locationId: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/v2/:parent/content:deidentify');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
deidentifyConfig: {
imageTransformations: {
transforms: [
{
allInfoTypes: {},
allText: {},
redactionColor: {
blue: '',
green: '',
red: ''
},
selectedInfoTypes: {
infoTypes: [
{
name: '',
version: ''
}
]
}
}
]
},
infoTypeTransformations: {
transformations: [
{
infoTypes: [
{}
],
primitiveTransformation: {
bucketingConfig: {
buckets: [
{
max: {
booleanValue: false,
dateValue: {
day: 0,
month: 0,
year: 0
},
dayOfWeekValue: '',
floatValue: '',
integerValue: '',
stringValue: '',
timeValue: {
hours: 0,
minutes: 0,
nanos: 0,
seconds: 0
},
timestampValue: ''
},
min: {},
replacementValue: {}
}
]
},
characterMaskConfig: {
charactersToIgnore: [
{
charactersToSkip: '',
commonCharactersToIgnore: ''
}
],
maskingCharacter: '',
numberToMask: 0,
reverseOrder: false
},
cryptoDeterministicConfig: {
context: {
name: ''
},
cryptoKey: {
kmsWrapped: {
cryptoKeyName: '',
wrappedKey: ''
},
transient: {
name: ''
},
unwrapped: {
key: ''
}
},
surrogateInfoType: {}
},
cryptoHashConfig: {
cryptoKey: {}
},
cryptoReplaceFfxFpeConfig: {
commonAlphabet: '',
context: {},
cryptoKey: {},
customAlphabet: '',
radix: 0,
surrogateInfoType: {}
},
dateShiftConfig: {
context: {},
cryptoKey: {},
lowerBoundDays: 0,
upperBoundDays: 0
},
fixedSizeBucketingConfig: {
bucketSize: '',
lowerBound: {},
upperBound: {}
},
redactConfig: {},
replaceConfig: {
newValue: {}
},
replaceDictionaryConfig: {
wordList: {
words: []
}
},
replaceWithInfoTypeConfig: {},
timePartConfig: {
partToExtract: ''
}
}
}
]
},
recordTransformations: {
fieldTransformations: [
{
condition: {
expressions: {
conditions: {
conditions: [
{
field: {},
operator: '',
value: {}
}
]
},
logicalOperator: ''
}
},
fields: [
{}
],
infoTypeTransformations: {},
primitiveTransformation: {}
}
],
recordSuppressions: [
{
condition: {}
}
]
},
transformationErrorHandling: {
leaveUntransformed: {},
throwError: {}
}
},
deidentifyTemplateName: '',
inspectConfig: {
contentOptions: [],
customInfoTypes: [
{
detectionRules: [
{
hotwordRule: {
hotwordRegex: {
groupIndexes: [],
pattern: ''
},
likelihoodAdjustment: {
fixedLikelihood: '',
relativeLikelihood: 0
},
proximity: {
windowAfter: 0,
windowBefore: 0
}
}
}
],
dictionary: {
cloudStoragePath: {
path: ''
},
wordList: {}
},
exclusionType: '',
infoType: {},
likelihood: '',
regex: {},
storedType: {
createTime: '',
name: ''
},
surrogateType: {}
}
],
excludeInfoTypes: false,
includeQuote: false,
infoTypes: [
{}
],
limits: {
maxFindingsPerInfoType: [
{
infoType: {},
maxFindings: 0
}
],
maxFindingsPerItem: 0,
maxFindingsPerRequest: 0
},
minLikelihood: '',
ruleSet: [
{
infoTypes: [
{}
],
rules: [
{
exclusionRule: {
dictionary: {},
excludeByHotword: {
hotwordRegex: {},
proximity: {}
},
excludeInfoTypes: {
infoTypes: [
{}
]
},
matchingType: '',
regex: {}
},
hotwordRule: {}
}
]
}
]
},
inspectTemplateName: '',
item: {
byteItem: {
data: '',
type: ''
},
table: {
headers: [
{}
],
rows: [
{
values: [
{}
]
}
]
},
value: ''
},
locationId: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/v2/:parent/content:deidentify',
headers: {'content-type': 'application/json'},
data: {
deidentifyConfig: {
imageTransformations: {
transforms: [
{
allInfoTypes: {},
allText: {},
redactionColor: {blue: '', green: '', red: ''},
selectedInfoTypes: {infoTypes: [{name: '', version: ''}]}
}
]
},
infoTypeTransformations: {
transformations: [
{
infoTypes: [{}],
primitiveTransformation: {
bucketingConfig: {
buckets: [
{
max: {
booleanValue: false,
dateValue: {day: 0, month: 0, year: 0},
dayOfWeekValue: '',
floatValue: '',
integerValue: '',
stringValue: '',
timeValue: {hours: 0, minutes: 0, nanos: 0, seconds: 0},
timestampValue: ''
},
min: {},
replacementValue: {}
}
]
},
characterMaskConfig: {
charactersToIgnore: [{charactersToSkip: '', commonCharactersToIgnore: ''}],
maskingCharacter: '',
numberToMask: 0,
reverseOrder: false
},
cryptoDeterministicConfig: {
context: {name: ''},
cryptoKey: {
kmsWrapped: {cryptoKeyName: '', wrappedKey: ''},
transient: {name: ''},
unwrapped: {key: ''}
},
surrogateInfoType: {}
},
cryptoHashConfig: {cryptoKey: {}},
cryptoReplaceFfxFpeConfig: {
commonAlphabet: '',
context: {},
cryptoKey: {},
customAlphabet: '',
radix: 0,
surrogateInfoType: {}
},
dateShiftConfig: {context: {}, cryptoKey: {}, lowerBoundDays: 0, upperBoundDays: 0},
fixedSizeBucketingConfig: {bucketSize: '', lowerBound: {}, upperBound: {}},
redactConfig: {},
replaceConfig: {newValue: {}},
replaceDictionaryConfig: {wordList: {words: []}},
replaceWithInfoTypeConfig: {},
timePartConfig: {partToExtract: ''}
}
}
]
},
recordTransformations: {
fieldTransformations: [
{
condition: {
expressions: {
conditions: {conditions: [{field: {}, operator: '', value: {}}]},
logicalOperator: ''
}
},
fields: [{}],
infoTypeTransformations: {},
primitiveTransformation: {}
}
],
recordSuppressions: [{condition: {}}]
},
transformationErrorHandling: {leaveUntransformed: {}, throwError: {}}
},
deidentifyTemplateName: '',
inspectConfig: {
contentOptions: [],
customInfoTypes: [
{
detectionRules: [
{
hotwordRule: {
hotwordRegex: {groupIndexes: [], pattern: ''},
likelihoodAdjustment: {fixedLikelihood: '', relativeLikelihood: 0},
proximity: {windowAfter: 0, windowBefore: 0}
}
}
],
dictionary: {cloudStoragePath: {path: ''}, wordList: {}},
exclusionType: '',
infoType: {},
likelihood: '',
regex: {},
storedType: {createTime: '', name: ''},
surrogateType: {}
}
],
excludeInfoTypes: false,
includeQuote: false,
infoTypes: [{}],
limits: {
maxFindingsPerInfoType: [{infoType: {}, maxFindings: 0}],
maxFindingsPerItem: 0,
maxFindingsPerRequest: 0
},
minLikelihood: '',
ruleSet: [
{
infoTypes: [{}],
rules: [
{
exclusionRule: {
dictionary: {},
excludeByHotword: {hotwordRegex: {}, proximity: {}},
excludeInfoTypes: {infoTypes: [{}]},
matchingType: '',
regex: {}
},
hotwordRule: {}
}
]
}
]
},
inspectTemplateName: '',
item: {
byteItem: {data: '', type: ''},
table: {headers: [{}], rows: [{values: [{}]}]},
value: ''
},
locationId: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/:parent/content:deidentify';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"deidentifyConfig":{"imageTransformations":{"transforms":[{"allInfoTypes":{},"allText":{},"redactionColor":{"blue":"","green":"","red":""},"selectedInfoTypes":{"infoTypes":[{"name":"","version":""}]}}]},"infoTypeTransformations":{"transformations":[{"infoTypes":[{}],"primitiveTransformation":{"bucketingConfig":{"buckets":[{"max":{"booleanValue":false,"dateValue":{"day":0,"month":0,"year":0},"dayOfWeekValue":"","floatValue":"","integerValue":"","stringValue":"","timeValue":{"hours":0,"minutes":0,"nanos":0,"seconds":0},"timestampValue":""},"min":{},"replacementValue":{}}]},"characterMaskConfig":{"charactersToIgnore":[{"charactersToSkip":"","commonCharactersToIgnore":""}],"maskingCharacter":"","numberToMask":0,"reverseOrder":false},"cryptoDeterministicConfig":{"context":{"name":""},"cryptoKey":{"kmsWrapped":{"cryptoKeyName":"","wrappedKey":""},"transient":{"name":""},"unwrapped":{"key":""}},"surrogateInfoType":{}},"cryptoHashConfig":{"cryptoKey":{}},"cryptoReplaceFfxFpeConfig":{"commonAlphabet":"","context":{},"cryptoKey":{},"customAlphabet":"","radix":0,"surrogateInfoType":{}},"dateShiftConfig":{"context":{},"cryptoKey":{},"lowerBoundDays":0,"upperBoundDays":0},"fixedSizeBucketingConfig":{"bucketSize":"","lowerBound":{},"upperBound":{}},"redactConfig":{},"replaceConfig":{"newValue":{}},"replaceDictionaryConfig":{"wordList":{"words":[]}},"replaceWithInfoTypeConfig":{},"timePartConfig":{"partToExtract":""}}}]},"recordTransformations":{"fieldTransformations":[{"condition":{"expressions":{"conditions":{"conditions":[{"field":{},"operator":"","value":{}}]},"logicalOperator":""}},"fields":[{}],"infoTypeTransformations":{},"primitiveTransformation":{}}],"recordSuppressions":[{"condition":{}}]},"transformationErrorHandling":{"leaveUntransformed":{},"throwError":{}}},"deidentifyTemplateName":"","inspectConfig":{"contentOptions":[],"customInfoTypes":[{"detectionRules":[{"hotwordRule":{"hotwordRegex":{"groupIndexes":[],"pattern":""},"likelihoodAdjustment":{"fixedLikelihood":"","relativeLikelihood":0},"proximity":{"windowAfter":0,"windowBefore":0}}}],"dictionary":{"cloudStoragePath":{"path":""},"wordList":{}},"exclusionType":"","infoType":{},"likelihood":"","regex":{},"storedType":{"createTime":"","name":""},"surrogateType":{}}],"excludeInfoTypes":false,"includeQuote":false,"infoTypes":[{}],"limits":{"maxFindingsPerInfoType":[{"infoType":{},"maxFindings":0}],"maxFindingsPerItem":0,"maxFindingsPerRequest":0},"minLikelihood":"","ruleSet":[{"infoTypes":[{}],"rules":[{"exclusionRule":{"dictionary":{},"excludeByHotword":{"hotwordRegex":{},"proximity":{}},"excludeInfoTypes":{"infoTypes":[{}]},"matchingType":"","regex":{}},"hotwordRule":{}}]}]},"inspectTemplateName":"","item":{"byteItem":{"data":"","type":""},"table":{"headers":[{}],"rows":[{"values":[{}]}]},"value":""},"locationId":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"deidentifyConfig": @{ @"imageTransformations": @{ @"transforms": @[ @{ @"allInfoTypes": @{ }, @"allText": @{ }, @"redactionColor": @{ @"blue": @"", @"green": @"", @"red": @"" }, @"selectedInfoTypes": @{ @"infoTypes": @[ @{ @"name": @"", @"version": @"" } ] } } ] }, @"infoTypeTransformations": @{ @"transformations": @[ @{ @"infoTypes": @[ @{ } ], @"primitiveTransformation": @{ @"bucketingConfig": @{ @"buckets": @[ @{ @"max": @{ @"booleanValue": @NO, @"dateValue": @{ @"day": @0, @"month": @0, @"year": @0 }, @"dayOfWeekValue": @"", @"floatValue": @"", @"integerValue": @"", @"stringValue": @"", @"timeValue": @{ @"hours": @0, @"minutes": @0, @"nanos": @0, @"seconds": @0 }, @"timestampValue": @"" }, @"min": @{ }, @"replacementValue": @{ } } ] }, @"characterMaskConfig": @{ @"charactersToIgnore": @[ @{ @"charactersToSkip": @"", @"commonCharactersToIgnore": @"" } ], @"maskingCharacter": @"", @"numberToMask": @0, @"reverseOrder": @NO }, @"cryptoDeterministicConfig": @{ @"context": @{ @"name": @"" }, @"cryptoKey": @{ @"kmsWrapped": @{ @"cryptoKeyName": @"", @"wrappedKey": @"" }, @"transient": @{ @"name": @"" }, @"unwrapped": @{ @"key": @"" } }, @"surrogateInfoType": @{ } }, @"cryptoHashConfig": @{ @"cryptoKey": @{ } }, @"cryptoReplaceFfxFpeConfig": @{ @"commonAlphabet": @"", @"context": @{ }, @"cryptoKey": @{ }, @"customAlphabet": @"", @"radix": @0, @"surrogateInfoType": @{ } }, @"dateShiftConfig": @{ @"context": @{ }, @"cryptoKey": @{ }, @"lowerBoundDays": @0, @"upperBoundDays": @0 }, @"fixedSizeBucketingConfig": @{ @"bucketSize": @"", @"lowerBound": @{ }, @"upperBound": @{ } }, @"redactConfig": @{ }, @"replaceConfig": @{ @"newValue": @{ } }, @"replaceDictionaryConfig": @{ @"wordList": @{ @"words": @[ ] } }, @"replaceWithInfoTypeConfig": @{ }, @"timePartConfig": @{ @"partToExtract": @"" } } } ] }, @"recordTransformations": @{ @"fieldTransformations": @[ @{ @"condition": @{ @"expressions": @{ @"conditions": @{ @"conditions": @[ @{ @"field": @{ }, @"operator": @"", @"value": @{ } } ] }, @"logicalOperator": @"" } }, @"fields": @[ @{ } ], @"infoTypeTransformations": @{ }, @"primitiveTransformation": @{ } } ], @"recordSuppressions": @[ @{ @"condition": @{ } } ] }, @"transformationErrorHandling": @{ @"leaveUntransformed": @{ }, @"throwError": @{ } } },
@"deidentifyTemplateName": @"",
@"inspectConfig": @{ @"contentOptions": @[ ], @"customInfoTypes": @[ @{ @"detectionRules": @[ @{ @"hotwordRule": @{ @"hotwordRegex": @{ @"groupIndexes": @[ ], @"pattern": @"" }, @"likelihoodAdjustment": @{ @"fixedLikelihood": @"", @"relativeLikelihood": @0 }, @"proximity": @{ @"windowAfter": @0, @"windowBefore": @0 } } } ], @"dictionary": @{ @"cloudStoragePath": @{ @"path": @"" }, @"wordList": @{ } }, @"exclusionType": @"", @"infoType": @{ }, @"likelihood": @"", @"regex": @{ }, @"storedType": @{ @"createTime": @"", @"name": @"" }, @"surrogateType": @{ } } ], @"excludeInfoTypes": @NO, @"includeQuote": @NO, @"infoTypes": @[ @{ } ], @"limits": @{ @"maxFindingsPerInfoType": @[ @{ @"infoType": @{ }, @"maxFindings": @0 } ], @"maxFindingsPerItem": @0, @"maxFindingsPerRequest": @0 }, @"minLikelihood": @"", @"ruleSet": @[ @{ @"infoTypes": @[ @{ } ], @"rules": @[ @{ @"exclusionRule": @{ @"dictionary": @{ }, @"excludeByHotword": @{ @"hotwordRegex": @{ }, @"proximity": @{ } }, @"excludeInfoTypes": @{ @"infoTypes": @[ @{ } ] }, @"matchingType": @"", @"regex": @{ } }, @"hotwordRule": @{ } } ] } ] },
@"inspectTemplateName": @"",
@"item": @{ @"byteItem": @{ @"data": @"", @"type": @"" }, @"table": @{ @"headers": @[ @{ } ], @"rows": @[ @{ @"values": @[ @{ } ] } ] }, @"value": @"" },
@"locationId": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v2/:parent/content:deidentify"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v2/:parent/content:deidentify" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"deidentifyConfig\": {\n \"imageTransformations\": {\n \"transforms\": [\n {\n \"allInfoTypes\": {},\n \"allText\": {},\n \"redactionColor\": {\n \"blue\": \"\",\n \"green\": \"\",\n \"red\": \"\"\n },\n \"selectedInfoTypes\": {\n \"infoTypes\": [\n {\n \"name\": \"\",\n \"version\": \"\"\n }\n ]\n }\n }\n ]\n },\n \"infoTypeTransformations\": {\n \"transformations\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"primitiveTransformation\": {\n \"bucketingConfig\": {\n \"buckets\": [\n {\n \"max\": {\n \"booleanValue\": false,\n \"dateValue\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"dayOfWeekValue\": \"\",\n \"floatValue\": \"\",\n \"integerValue\": \"\",\n \"stringValue\": \"\",\n \"timeValue\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"timestampValue\": \"\"\n },\n \"min\": {},\n \"replacementValue\": {}\n }\n ]\n },\n \"characterMaskConfig\": {\n \"charactersToIgnore\": [\n {\n \"charactersToSkip\": \"\",\n \"commonCharactersToIgnore\": \"\"\n }\n ],\n \"maskingCharacter\": \"\",\n \"numberToMask\": 0,\n \"reverseOrder\": false\n },\n \"cryptoDeterministicConfig\": {\n \"context\": {\n \"name\": \"\"\n },\n \"cryptoKey\": {\n \"kmsWrapped\": {\n \"cryptoKeyName\": \"\",\n \"wrappedKey\": \"\"\n },\n \"transient\": {\n \"name\": \"\"\n },\n \"unwrapped\": {\n \"key\": \"\"\n }\n },\n \"surrogateInfoType\": {}\n },\n \"cryptoHashConfig\": {\n \"cryptoKey\": {}\n },\n \"cryptoReplaceFfxFpeConfig\": {\n \"commonAlphabet\": \"\",\n \"context\": {},\n \"cryptoKey\": {},\n \"customAlphabet\": \"\",\n \"radix\": 0,\n \"surrogateInfoType\": {}\n },\n \"dateShiftConfig\": {\n \"context\": {},\n \"cryptoKey\": {},\n \"lowerBoundDays\": 0,\n \"upperBoundDays\": 0\n },\n \"fixedSizeBucketingConfig\": {\n \"bucketSize\": \"\",\n \"lowerBound\": {},\n \"upperBound\": {}\n },\n \"redactConfig\": {},\n \"replaceConfig\": {\n \"newValue\": {}\n },\n \"replaceDictionaryConfig\": {\n \"wordList\": {\n \"words\": []\n }\n },\n \"replaceWithInfoTypeConfig\": {},\n \"timePartConfig\": {\n \"partToExtract\": \"\"\n }\n }\n }\n ]\n },\n \"recordTransformations\": {\n \"fieldTransformations\": [\n {\n \"condition\": {\n \"expressions\": {\n \"conditions\": {\n \"conditions\": [\n {\n \"field\": {},\n \"operator\": \"\",\n \"value\": {}\n }\n ]\n },\n \"logicalOperator\": \"\"\n }\n },\n \"fields\": [\n {}\n ],\n \"infoTypeTransformations\": {},\n \"primitiveTransformation\": {}\n }\n ],\n \"recordSuppressions\": [\n {\n \"condition\": {}\n }\n ]\n },\n \"transformationErrorHandling\": {\n \"leaveUntransformed\": {},\n \"throwError\": {}\n }\n },\n \"deidentifyTemplateName\": \"\",\n \"inspectConfig\": {\n \"contentOptions\": [],\n \"customInfoTypes\": [\n {\n \"detectionRules\": [\n {\n \"hotwordRule\": {\n \"hotwordRegex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n },\n \"likelihoodAdjustment\": {\n \"fixedLikelihood\": \"\",\n \"relativeLikelihood\": 0\n },\n \"proximity\": {\n \"windowAfter\": 0,\n \"windowBefore\": 0\n }\n }\n }\n ],\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {}\n },\n \"exclusionType\": \"\",\n \"infoType\": {},\n \"likelihood\": \"\",\n \"regex\": {},\n \"storedType\": {\n \"createTime\": \"\",\n \"name\": \"\"\n },\n \"surrogateType\": {}\n }\n ],\n \"excludeInfoTypes\": false,\n \"includeQuote\": false,\n \"infoTypes\": [\n {}\n ],\n \"limits\": {\n \"maxFindingsPerInfoType\": [\n {\n \"infoType\": {},\n \"maxFindings\": 0\n }\n ],\n \"maxFindingsPerItem\": 0,\n \"maxFindingsPerRequest\": 0\n },\n \"minLikelihood\": \"\",\n \"ruleSet\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"rules\": [\n {\n \"exclusionRule\": {\n \"dictionary\": {},\n \"excludeByHotword\": {\n \"hotwordRegex\": {},\n \"proximity\": {}\n },\n \"excludeInfoTypes\": {\n \"infoTypes\": [\n {}\n ]\n },\n \"matchingType\": \"\",\n \"regex\": {}\n },\n \"hotwordRule\": {}\n }\n ]\n }\n ]\n },\n \"inspectTemplateName\": \"\",\n \"item\": {\n \"byteItem\": {\n \"data\": \"\",\n \"type\": \"\"\n },\n \"table\": {\n \"headers\": [\n {}\n ],\n \"rows\": [\n {\n \"values\": [\n {}\n ]\n }\n ]\n },\n \"value\": \"\"\n },\n \"locationId\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/:parent/content:deidentify",
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([
'deidentifyConfig' => [
'imageTransformations' => [
'transforms' => [
[
'allInfoTypes' => [
],
'allText' => [
],
'redactionColor' => [
'blue' => '',
'green' => '',
'red' => ''
],
'selectedInfoTypes' => [
'infoTypes' => [
[
'name' => '',
'version' => ''
]
]
]
]
]
],
'infoTypeTransformations' => [
'transformations' => [
[
'infoTypes' => [
[
]
],
'primitiveTransformation' => [
'bucketingConfig' => [
'buckets' => [
[
'max' => [
'booleanValue' => null,
'dateValue' => [
'day' => 0,
'month' => 0,
'year' => 0
],
'dayOfWeekValue' => '',
'floatValue' => '',
'integerValue' => '',
'stringValue' => '',
'timeValue' => [
'hours' => 0,
'minutes' => 0,
'nanos' => 0,
'seconds' => 0
],
'timestampValue' => ''
],
'min' => [
],
'replacementValue' => [
]
]
]
],
'characterMaskConfig' => [
'charactersToIgnore' => [
[
'charactersToSkip' => '',
'commonCharactersToIgnore' => ''
]
],
'maskingCharacter' => '',
'numberToMask' => 0,
'reverseOrder' => null
],
'cryptoDeterministicConfig' => [
'context' => [
'name' => ''
],
'cryptoKey' => [
'kmsWrapped' => [
'cryptoKeyName' => '',
'wrappedKey' => ''
],
'transient' => [
'name' => ''
],
'unwrapped' => [
'key' => ''
]
],
'surrogateInfoType' => [
]
],
'cryptoHashConfig' => [
'cryptoKey' => [
]
],
'cryptoReplaceFfxFpeConfig' => [
'commonAlphabet' => '',
'context' => [
],
'cryptoKey' => [
],
'customAlphabet' => '',
'radix' => 0,
'surrogateInfoType' => [
]
],
'dateShiftConfig' => [
'context' => [
],
'cryptoKey' => [
],
'lowerBoundDays' => 0,
'upperBoundDays' => 0
],
'fixedSizeBucketingConfig' => [
'bucketSize' => '',
'lowerBound' => [
],
'upperBound' => [
]
],
'redactConfig' => [
],
'replaceConfig' => [
'newValue' => [
]
],
'replaceDictionaryConfig' => [
'wordList' => [
'words' => [
]
]
],
'replaceWithInfoTypeConfig' => [
],
'timePartConfig' => [
'partToExtract' => ''
]
]
]
]
],
'recordTransformations' => [
'fieldTransformations' => [
[
'condition' => [
'expressions' => [
'conditions' => [
'conditions' => [
[
'field' => [
],
'operator' => '',
'value' => [
]
]
]
],
'logicalOperator' => ''
]
],
'fields' => [
[
]
],
'infoTypeTransformations' => [
],
'primitiveTransformation' => [
]
]
],
'recordSuppressions' => [
[
'condition' => [
]
]
]
],
'transformationErrorHandling' => [
'leaveUntransformed' => [
],
'throwError' => [
]
]
],
'deidentifyTemplateName' => '',
'inspectConfig' => [
'contentOptions' => [
],
'customInfoTypes' => [
[
'detectionRules' => [
[
'hotwordRule' => [
'hotwordRegex' => [
'groupIndexes' => [
],
'pattern' => ''
],
'likelihoodAdjustment' => [
'fixedLikelihood' => '',
'relativeLikelihood' => 0
],
'proximity' => [
'windowAfter' => 0,
'windowBefore' => 0
]
]
]
],
'dictionary' => [
'cloudStoragePath' => [
'path' => ''
],
'wordList' => [
]
],
'exclusionType' => '',
'infoType' => [
],
'likelihood' => '',
'regex' => [
],
'storedType' => [
'createTime' => '',
'name' => ''
],
'surrogateType' => [
]
]
],
'excludeInfoTypes' => null,
'includeQuote' => null,
'infoTypes' => [
[
]
],
'limits' => [
'maxFindingsPerInfoType' => [
[
'infoType' => [
],
'maxFindings' => 0
]
],
'maxFindingsPerItem' => 0,
'maxFindingsPerRequest' => 0
],
'minLikelihood' => '',
'ruleSet' => [
[
'infoTypes' => [
[
]
],
'rules' => [
[
'exclusionRule' => [
'dictionary' => [
],
'excludeByHotword' => [
'hotwordRegex' => [
],
'proximity' => [
]
],
'excludeInfoTypes' => [
'infoTypes' => [
[
]
]
],
'matchingType' => '',
'regex' => [
]
],
'hotwordRule' => [
]
]
]
]
]
],
'inspectTemplateName' => '',
'item' => [
'byteItem' => [
'data' => '',
'type' => ''
],
'table' => [
'headers' => [
[
]
],
'rows' => [
[
'values' => [
[
]
]
]
]
],
'value' => ''
],
'locationId' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/v2/:parent/content:deidentify', [
'body' => '{
"deidentifyConfig": {
"imageTransformations": {
"transforms": [
{
"allInfoTypes": {},
"allText": {},
"redactionColor": {
"blue": "",
"green": "",
"red": ""
},
"selectedInfoTypes": {
"infoTypes": [
{
"name": "",
"version": ""
}
]
}
}
]
},
"infoTypeTransformations": {
"transformations": [
{
"infoTypes": [
{}
],
"primitiveTransformation": {
"bucketingConfig": {
"buckets": [
{
"max": {
"booleanValue": false,
"dateValue": {
"day": 0,
"month": 0,
"year": 0
},
"dayOfWeekValue": "",
"floatValue": "",
"integerValue": "",
"stringValue": "",
"timeValue": {
"hours": 0,
"minutes": 0,
"nanos": 0,
"seconds": 0
},
"timestampValue": ""
},
"min": {},
"replacementValue": {}
}
]
},
"characterMaskConfig": {
"charactersToIgnore": [
{
"charactersToSkip": "",
"commonCharactersToIgnore": ""
}
],
"maskingCharacter": "",
"numberToMask": 0,
"reverseOrder": false
},
"cryptoDeterministicConfig": {
"context": {
"name": ""
},
"cryptoKey": {
"kmsWrapped": {
"cryptoKeyName": "",
"wrappedKey": ""
},
"transient": {
"name": ""
},
"unwrapped": {
"key": ""
}
},
"surrogateInfoType": {}
},
"cryptoHashConfig": {
"cryptoKey": {}
},
"cryptoReplaceFfxFpeConfig": {
"commonAlphabet": "",
"context": {},
"cryptoKey": {},
"customAlphabet": "",
"radix": 0,
"surrogateInfoType": {}
},
"dateShiftConfig": {
"context": {},
"cryptoKey": {},
"lowerBoundDays": 0,
"upperBoundDays": 0
},
"fixedSizeBucketingConfig": {
"bucketSize": "",
"lowerBound": {},
"upperBound": {}
},
"redactConfig": {},
"replaceConfig": {
"newValue": {}
},
"replaceDictionaryConfig": {
"wordList": {
"words": []
}
},
"replaceWithInfoTypeConfig": {},
"timePartConfig": {
"partToExtract": ""
}
}
}
]
},
"recordTransformations": {
"fieldTransformations": [
{
"condition": {
"expressions": {
"conditions": {
"conditions": [
{
"field": {},
"operator": "",
"value": {}
}
]
},
"logicalOperator": ""
}
},
"fields": [
{}
],
"infoTypeTransformations": {},
"primitiveTransformation": {}
}
],
"recordSuppressions": [
{
"condition": {}
}
]
},
"transformationErrorHandling": {
"leaveUntransformed": {},
"throwError": {}
}
},
"deidentifyTemplateName": "",
"inspectConfig": {
"contentOptions": [],
"customInfoTypes": [
{
"detectionRules": [
{
"hotwordRule": {
"hotwordRegex": {
"groupIndexes": [],
"pattern": ""
},
"likelihoodAdjustment": {
"fixedLikelihood": "",
"relativeLikelihood": 0
},
"proximity": {
"windowAfter": 0,
"windowBefore": 0
}
}
}
],
"dictionary": {
"cloudStoragePath": {
"path": ""
},
"wordList": {}
},
"exclusionType": "",
"infoType": {},
"likelihood": "",
"regex": {},
"storedType": {
"createTime": "",
"name": ""
},
"surrogateType": {}
}
],
"excludeInfoTypes": false,
"includeQuote": false,
"infoTypes": [
{}
],
"limits": {
"maxFindingsPerInfoType": [
{
"infoType": {},
"maxFindings": 0
}
],
"maxFindingsPerItem": 0,
"maxFindingsPerRequest": 0
},
"minLikelihood": "",
"ruleSet": [
{
"infoTypes": [
{}
],
"rules": [
{
"exclusionRule": {
"dictionary": {},
"excludeByHotword": {
"hotwordRegex": {},
"proximity": {}
},
"excludeInfoTypes": {
"infoTypes": [
{}
]
},
"matchingType": "",
"regex": {}
},
"hotwordRule": {}
}
]
}
]
},
"inspectTemplateName": "",
"item": {
"byteItem": {
"data": "",
"type": ""
},
"table": {
"headers": [
{}
],
"rows": [
{
"values": [
{}
]
}
]
},
"value": ""
},
"locationId": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v2/:parent/content:deidentify');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'deidentifyConfig' => [
'imageTransformations' => [
'transforms' => [
[
'allInfoTypes' => [
],
'allText' => [
],
'redactionColor' => [
'blue' => '',
'green' => '',
'red' => ''
],
'selectedInfoTypes' => [
'infoTypes' => [
[
'name' => '',
'version' => ''
]
]
]
]
]
],
'infoTypeTransformations' => [
'transformations' => [
[
'infoTypes' => [
[
]
],
'primitiveTransformation' => [
'bucketingConfig' => [
'buckets' => [
[
'max' => [
'booleanValue' => null,
'dateValue' => [
'day' => 0,
'month' => 0,
'year' => 0
],
'dayOfWeekValue' => '',
'floatValue' => '',
'integerValue' => '',
'stringValue' => '',
'timeValue' => [
'hours' => 0,
'minutes' => 0,
'nanos' => 0,
'seconds' => 0
],
'timestampValue' => ''
],
'min' => [
],
'replacementValue' => [
]
]
]
],
'characterMaskConfig' => [
'charactersToIgnore' => [
[
'charactersToSkip' => '',
'commonCharactersToIgnore' => ''
]
],
'maskingCharacter' => '',
'numberToMask' => 0,
'reverseOrder' => null
],
'cryptoDeterministicConfig' => [
'context' => [
'name' => ''
],
'cryptoKey' => [
'kmsWrapped' => [
'cryptoKeyName' => '',
'wrappedKey' => ''
],
'transient' => [
'name' => ''
],
'unwrapped' => [
'key' => ''
]
],
'surrogateInfoType' => [
]
],
'cryptoHashConfig' => [
'cryptoKey' => [
]
],
'cryptoReplaceFfxFpeConfig' => [
'commonAlphabet' => '',
'context' => [
],
'cryptoKey' => [
],
'customAlphabet' => '',
'radix' => 0,
'surrogateInfoType' => [
]
],
'dateShiftConfig' => [
'context' => [
],
'cryptoKey' => [
],
'lowerBoundDays' => 0,
'upperBoundDays' => 0
],
'fixedSizeBucketingConfig' => [
'bucketSize' => '',
'lowerBound' => [
],
'upperBound' => [
]
],
'redactConfig' => [
],
'replaceConfig' => [
'newValue' => [
]
],
'replaceDictionaryConfig' => [
'wordList' => [
'words' => [
]
]
],
'replaceWithInfoTypeConfig' => [
],
'timePartConfig' => [
'partToExtract' => ''
]
]
]
]
],
'recordTransformations' => [
'fieldTransformations' => [
[
'condition' => [
'expressions' => [
'conditions' => [
'conditions' => [
[
'field' => [
],
'operator' => '',
'value' => [
]
]
]
],
'logicalOperator' => ''
]
],
'fields' => [
[
]
],
'infoTypeTransformations' => [
],
'primitiveTransformation' => [
]
]
],
'recordSuppressions' => [
[
'condition' => [
]
]
]
],
'transformationErrorHandling' => [
'leaveUntransformed' => [
],
'throwError' => [
]
]
],
'deidentifyTemplateName' => '',
'inspectConfig' => [
'contentOptions' => [
],
'customInfoTypes' => [
[
'detectionRules' => [
[
'hotwordRule' => [
'hotwordRegex' => [
'groupIndexes' => [
],
'pattern' => ''
],
'likelihoodAdjustment' => [
'fixedLikelihood' => '',
'relativeLikelihood' => 0
],
'proximity' => [
'windowAfter' => 0,
'windowBefore' => 0
]
]
]
],
'dictionary' => [
'cloudStoragePath' => [
'path' => ''
],
'wordList' => [
]
],
'exclusionType' => '',
'infoType' => [
],
'likelihood' => '',
'regex' => [
],
'storedType' => [
'createTime' => '',
'name' => ''
],
'surrogateType' => [
]
]
],
'excludeInfoTypes' => null,
'includeQuote' => null,
'infoTypes' => [
[
]
],
'limits' => [
'maxFindingsPerInfoType' => [
[
'infoType' => [
],
'maxFindings' => 0
]
],
'maxFindingsPerItem' => 0,
'maxFindingsPerRequest' => 0
],
'minLikelihood' => '',
'ruleSet' => [
[
'infoTypes' => [
[
]
],
'rules' => [
[
'exclusionRule' => [
'dictionary' => [
],
'excludeByHotword' => [
'hotwordRegex' => [
],
'proximity' => [
]
],
'excludeInfoTypes' => [
'infoTypes' => [
[
]
]
],
'matchingType' => '',
'regex' => [
]
],
'hotwordRule' => [
]
]
]
]
]
],
'inspectTemplateName' => '',
'item' => [
'byteItem' => [
'data' => '',
'type' => ''
],
'table' => [
'headers' => [
[
]
],
'rows' => [
[
'values' => [
[
]
]
]
]
],
'value' => ''
],
'locationId' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'deidentifyConfig' => [
'imageTransformations' => [
'transforms' => [
[
'allInfoTypes' => [
],
'allText' => [
],
'redactionColor' => [
'blue' => '',
'green' => '',
'red' => ''
],
'selectedInfoTypes' => [
'infoTypes' => [
[
'name' => '',
'version' => ''
]
]
]
]
]
],
'infoTypeTransformations' => [
'transformations' => [
[
'infoTypes' => [
[
]
],
'primitiveTransformation' => [
'bucketingConfig' => [
'buckets' => [
[
'max' => [
'booleanValue' => null,
'dateValue' => [
'day' => 0,
'month' => 0,
'year' => 0
],
'dayOfWeekValue' => '',
'floatValue' => '',
'integerValue' => '',
'stringValue' => '',
'timeValue' => [
'hours' => 0,
'minutes' => 0,
'nanos' => 0,
'seconds' => 0
],
'timestampValue' => ''
],
'min' => [
],
'replacementValue' => [
]
]
]
],
'characterMaskConfig' => [
'charactersToIgnore' => [
[
'charactersToSkip' => '',
'commonCharactersToIgnore' => ''
]
],
'maskingCharacter' => '',
'numberToMask' => 0,
'reverseOrder' => null
],
'cryptoDeterministicConfig' => [
'context' => [
'name' => ''
],
'cryptoKey' => [
'kmsWrapped' => [
'cryptoKeyName' => '',
'wrappedKey' => ''
],
'transient' => [
'name' => ''
],
'unwrapped' => [
'key' => ''
]
],
'surrogateInfoType' => [
]
],
'cryptoHashConfig' => [
'cryptoKey' => [
]
],
'cryptoReplaceFfxFpeConfig' => [
'commonAlphabet' => '',
'context' => [
],
'cryptoKey' => [
],
'customAlphabet' => '',
'radix' => 0,
'surrogateInfoType' => [
]
],
'dateShiftConfig' => [
'context' => [
],
'cryptoKey' => [
],
'lowerBoundDays' => 0,
'upperBoundDays' => 0
],
'fixedSizeBucketingConfig' => [
'bucketSize' => '',
'lowerBound' => [
],
'upperBound' => [
]
],
'redactConfig' => [
],
'replaceConfig' => [
'newValue' => [
]
],
'replaceDictionaryConfig' => [
'wordList' => [
'words' => [
]
]
],
'replaceWithInfoTypeConfig' => [
],
'timePartConfig' => [
'partToExtract' => ''
]
]
]
]
],
'recordTransformations' => [
'fieldTransformations' => [
[
'condition' => [
'expressions' => [
'conditions' => [
'conditions' => [
[
'field' => [
],
'operator' => '',
'value' => [
]
]
]
],
'logicalOperator' => ''
]
],
'fields' => [
[
]
],
'infoTypeTransformations' => [
],
'primitiveTransformation' => [
]
]
],
'recordSuppressions' => [
[
'condition' => [
]
]
]
],
'transformationErrorHandling' => [
'leaveUntransformed' => [
],
'throwError' => [
]
]
],
'deidentifyTemplateName' => '',
'inspectConfig' => [
'contentOptions' => [
],
'customInfoTypes' => [
[
'detectionRules' => [
[
'hotwordRule' => [
'hotwordRegex' => [
'groupIndexes' => [
],
'pattern' => ''
],
'likelihoodAdjustment' => [
'fixedLikelihood' => '',
'relativeLikelihood' => 0
],
'proximity' => [
'windowAfter' => 0,
'windowBefore' => 0
]
]
]
],
'dictionary' => [
'cloudStoragePath' => [
'path' => ''
],
'wordList' => [
]
],
'exclusionType' => '',
'infoType' => [
],
'likelihood' => '',
'regex' => [
],
'storedType' => [
'createTime' => '',
'name' => ''
],
'surrogateType' => [
]
]
],
'excludeInfoTypes' => null,
'includeQuote' => null,
'infoTypes' => [
[
]
],
'limits' => [
'maxFindingsPerInfoType' => [
[
'infoType' => [
],
'maxFindings' => 0
]
],
'maxFindingsPerItem' => 0,
'maxFindingsPerRequest' => 0
],
'minLikelihood' => '',
'ruleSet' => [
[
'infoTypes' => [
[
]
],
'rules' => [
[
'exclusionRule' => [
'dictionary' => [
],
'excludeByHotword' => [
'hotwordRegex' => [
],
'proximity' => [
]
],
'excludeInfoTypes' => [
'infoTypes' => [
[
]
]
],
'matchingType' => '',
'regex' => [
]
],
'hotwordRule' => [
]
]
]
]
]
],
'inspectTemplateName' => '',
'item' => [
'byteItem' => [
'data' => '',
'type' => ''
],
'table' => [
'headers' => [
[
]
],
'rows' => [
[
'values' => [
[
]
]
]
]
],
'value' => ''
],
'locationId' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v2/:parent/content:deidentify');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v2/:parent/content:deidentify' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"deidentifyConfig": {
"imageTransformations": {
"transforms": [
{
"allInfoTypes": {},
"allText": {},
"redactionColor": {
"blue": "",
"green": "",
"red": ""
},
"selectedInfoTypes": {
"infoTypes": [
{
"name": "",
"version": ""
}
]
}
}
]
},
"infoTypeTransformations": {
"transformations": [
{
"infoTypes": [
{}
],
"primitiveTransformation": {
"bucketingConfig": {
"buckets": [
{
"max": {
"booleanValue": false,
"dateValue": {
"day": 0,
"month": 0,
"year": 0
},
"dayOfWeekValue": "",
"floatValue": "",
"integerValue": "",
"stringValue": "",
"timeValue": {
"hours": 0,
"minutes": 0,
"nanos": 0,
"seconds": 0
},
"timestampValue": ""
},
"min": {},
"replacementValue": {}
}
]
},
"characterMaskConfig": {
"charactersToIgnore": [
{
"charactersToSkip": "",
"commonCharactersToIgnore": ""
}
],
"maskingCharacter": "",
"numberToMask": 0,
"reverseOrder": false
},
"cryptoDeterministicConfig": {
"context": {
"name": ""
},
"cryptoKey": {
"kmsWrapped": {
"cryptoKeyName": "",
"wrappedKey": ""
},
"transient": {
"name": ""
},
"unwrapped": {
"key": ""
}
},
"surrogateInfoType": {}
},
"cryptoHashConfig": {
"cryptoKey": {}
},
"cryptoReplaceFfxFpeConfig": {
"commonAlphabet": "",
"context": {},
"cryptoKey": {},
"customAlphabet": "",
"radix": 0,
"surrogateInfoType": {}
},
"dateShiftConfig": {
"context": {},
"cryptoKey": {},
"lowerBoundDays": 0,
"upperBoundDays": 0
},
"fixedSizeBucketingConfig": {
"bucketSize": "",
"lowerBound": {},
"upperBound": {}
},
"redactConfig": {},
"replaceConfig": {
"newValue": {}
},
"replaceDictionaryConfig": {
"wordList": {
"words": []
}
},
"replaceWithInfoTypeConfig": {},
"timePartConfig": {
"partToExtract": ""
}
}
}
]
},
"recordTransformations": {
"fieldTransformations": [
{
"condition": {
"expressions": {
"conditions": {
"conditions": [
{
"field": {},
"operator": "",
"value": {}
}
]
},
"logicalOperator": ""
}
},
"fields": [
{}
],
"infoTypeTransformations": {},
"primitiveTransformation": {}
}
],
"recordSuppressions": [
{
"condition": {}
}
]
},
"transformationErrorHandling": {
"leaveUntransformed": {},
"throwError": {}
}
},
"deidentifyTemplateName": "",
"inspectConfig": {
"contentOptions": [],
"customInfoTypes": [
{
"detectionRules": [
{
"hotwordRule": {
"hotwordRegex": {
"groupIndexes": [],
"pattern": ""
},
"likelihoodAdjustment": {
"fixedLikelihood": "",
"relativeLikelihood": 0
},
"proximity": {
"windowAfter": 0,
"windowBefore": 0
}
}
}
],
"dictionary": {
"cloudStoragePath": {
"path": ""
},
"wordList": {}
},
"exclusionType": "",
"infoType": {},
"likelihood": "",
"regex": {},
"storedType": {
"createTime": "",
"name": ""
},
"surrogateType": {}
}
],
"excludeInfoTypes": false,
"includeQuote": false,
"infoTypes": [
{}
],
"limits": {
"maxFindingsPerInfoType": [
{
"infoType": {},
"maxFindings": 0
}
],
"maxFindingsPerItem": 0,
"maxFindingsPerRequest": 0
},
"minLikelihood": "",
"ruleSet": [
{
"infoTypes": [
{}
],
"rules": [
{
"exclusionRule": {
"dictionary": {},
"excludeByHotword": {
"hotwordRegex": {},
"proximity": {}
},
"excludeInfoTypes": {
"infoTypes": [
{}
]
},
"matchingType": "",
"regex": {}
},
"hotwordRule": {}
}
]
}
]
},
"inspectTemplateName": "",
"item": {
"byteItem": {
"data": "",
"type": ""
},
"table": {
"headers": [
{}
],
"rows": [
{
"values": [
{}
]
}
]
},
"value": ""
},
"locationId": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/:parent/content:deidentify' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"deidentifyConfig": {
"imageTransformations": {
"transforms": [
{
"allInfoTypes": {},
"allText": {},
"redactionColor": {
"blue": "",
"green": "",
"red": ""
},
"selectedInfoTypes": {
"infoTypes": [
{
"name": "",
"version": ""
}
]
}
}
]
},
"infoTypeTransformations": {
"transformations": [
{
"infoTypes": [
{}
],
"primitiveTransformation": {
"bucketingConfig": {
"buckets": [
{
"max": {
"booleanValue": false,
"dateValue": {
"day": 0,
"month": 0,
"year": 0
},
"dayOfWeekValue": "",
"floatValue": "",
"integerValue": "",
"stringValue": "",
"timeValue": {
"hours": 0,
"minutes": 0,
"nanos": 0,
"seconds": 0
},
"timestampValue": ""
},
"min": {},
"replacementValue": {}
}
]
},
"characterMaskConfig": {
"charactersToIgnore": [
{
"charactersToSkip": "",
"commonCharactersToIgnore": ""
}
],
"maskingCharacter": "",
"numberToMask": 0,
"reverseOrder": false
},
"cryptoDeterministicConfig": {
"context": {
"name": ""
},
"cryptoKey": {
"kmsWrapped": {
"cryptoKeyName": "",
"wrappedKey": ""
},
"transient": {
"name": ""
},
"unwrapped": {
"key": ""
}
},
"surrogateInfoType": {}
},
"cryptoHashConfig": {
"cryptoKey": {}
},
"cryptoReplaceFfxFpeConfig": {
"commonAlphabet": "",
"context": {},
"cryptoKey": {},
"customAlphabet": "",
"radix": 0,
"surrogateInfoType": {}
},
"dateShiftConfig": {
"context": {},
"cryptoKey": {},
"lowerBoundDays": 0,
"upperBoundDays": 0
},
"fixedSizeBucketingConfig": {
"bucketSize": "",
"lowerBound": {},
"upperBound": {}
},
"redactConfig": {},
"replaceConfig": {
"newValue": {}
},
"replaceDictionaryConfig": {
"wordList": {
"words": []
}
},
"replaceWithInfoTypeConfig": {},
"timePartConfig": {
"partToExtract": ""
}
}
}
]
},
"recordTransformations": {
"fieldTransformations": [
{
"condition": {
"expressions": {
"conditions": {
"conditions": [
{
"field": {},
"operator": "",
"value": {}
}
]
},
"logicalOperator": ""
}
},
"fields": [
{}
],
"infoTypeTransformations": {},
"primitiveTransformation": {}
}
],
"recordSuppressions": [
{
"condition": {}
}
]
},
"transformationErrorHandling": {
"leaveUntransformed": {},
"throwError": {}
}
},
"deidentifyTemplateName": "",
"inspectConfig": {
"contentOptions": [],
"customInfoTypes": [
{
"detectionRules": [
{
"hotwordRule": {
"hotwordRegex": {
"groupIndexes": [],
"pattern": ""
},
"likelihoodAdjustment": {
"fixedLikelihood": "",
"relativeLikelihood": 0
},
"proximity": {
"windowAfter": 0,
"windowBefore": 0
}
}
}
],
"dictionary": {
"cloudStoragePath": {
"path": ""
},
"wordList": {}
},
"exclusionType": "",
"infoType": {},
"likelihood": "",
"regex": {},
"storedType": {
"createTime": "",
"name": ""
},
"surrogateType": {}
}
],
"excludeInfoTypes": false,
"includeQuote": false,
"infoTypes": [
{}
],
"limits": {
"maxFindingsPerInfoType": [
{
"infoType": {},
"maxFindings": 0
}
],
"maxFindingsPerItem": 0,
"maxFindingsPerRequest": 0
},
"minLikelihood": "",
"ruleSet": [
{
"infoTypes": [
{}
],
"rules": [
{
"exclusionRule": {
"dictionary": {},
"excludeByHotword": {
"hotwordRegex": {},
"proximity": {}
},
"excludeInfoTypes": {
"infoTypes": [
{}
]
},
"matchingType": "",
"regex": {}
},
"hotwordRule": {}
}
]
}
]
},
"inspectTemplateName": "",
"item": {
"byteItem": {
"data": "",
"type": ""
},
"table": {
"headers": [
{}
],
"rows": [
{
"values": [
{}
]
}
]
},
"value": ""
},
"locationId": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"deidentifyConfig\": {\n \"imageTransformations\": {\n \"transforms\": [\n {\n \"allInfoTypes\": {},\n \"allText\": {},\n \"redactionColor\": {\n \"blue\": \"\",\n \"green\": \"\",\n \"red\": \"\"\n },\n \"selectedInfoTypes\": {\n \"infoTypes\": [\n {\n \"name\": \"\",\n \"version\": \"\"\n }\n ]\n }\n }\n ]\n },\n \"infoTypeTransformations\": {\n \"transformations\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"primitiveTransformation\": {\n \"bucketingConfig\": {\n \"buckets\": [\n {\n \"max\": {\n \"booleanValue\": false,\n \"dateValue\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"dayOfWeekValue\": \"\",\n \"floatValue\": \"\",\n \"integerValue\": \"\",\n \"stringValue\": \"\",\n \"timeValue\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"timestampValue\": \"\"\n },\n \"min\": {},\n \"replacementValue\": {}\n }\n ]\n },\n \"characterMaskConfig\": {\n \"charactersToIgnore\": [\n {\n \"charactersToSkip\": \"\",\n \"commonCharactersToIgnore\": \"\"\n }\n ],\n \"maskingCharacter\": \"\",\n \"numberToMask\": 0,\n \"reverseOrder\": false\n },\n \"cryptoDeterministicConfig\": {\n \"context\": {\n \"name\": \"\"\n },\n \"cryptoKey\": {\n \"kmsWrapped\": {\n \"cryptoKeyName\": \"\",\n \"wrappedKey\": \"\"\n },\n \"transient\": {\n \"name\": \"\"\n },\n \"unwrapped\": {\n \"key\": \"\"\n }\n },\n \"surrogateInfoType\": {}\n },\n \"cryptoHashConfig\": {\n \"cryptoKey\": {}\n },\n \"cryptoReplaceFfxFpeConfig\": {\n \"commonAlphabet\": \"\",\n \"context\": {},\n \"cryptoKey\": {},\n \"customAlphabet\": \"\",\n \"radix\": 0,\n \"surrogateInfoType\": {}\n },\n \"dateShiftConfig\": {\n \"context\": {},\n \"cryptoKey\": {},\n \"lowerBoundDays\": 0,\n \"upperBoundDays\": 0\n },\n \"fixedSizeBucketingConfig\": {\n \"bucketSize\": \"\",\n \"lowerBound\": {},\n \"upperBound\": {}\n },\n \"redactConfig\": {},\n \"replaceConfig\": {\n \"newValue\": {}\n },\n \"replaceDictionaryConfig\": {\n \"wordList\": {\n \"words\": []\n }\n },\n \"replaceWithInfoTypeConfig\": {},\n \"timePartConfig\": {\n \"partToExtract\": \"\"\n }\n }\n }\n ]\n },\n \"recordTransformations\": {\n \"fieldTransformations\": [\n {\n \"condition\": {\n \"expressions\": {\n \"conditions\": {\n \"conditions\": [\n {\n \"field\": {},\n \"operator\": \"\",\n \"value\": {}\n }\n ]\n },\n \"logicalOperator\": \"\"\n }\n },\n \"fields\": [\n {}\n ],\n \"infoTypeTransformations\": {},\n \"primitiveTransformation\": {}\n }\n ],\n \"recordSuppressions\": [\n {\n \"condition\": {}\n }\n ]\n },\n \"transformationErrorHandling\": {\n \"leaveUntransformed\": {},\n \"throwError\": {}\n }\n },\n \"deidentifyTemplateName\": \"\",\n \"inspectConfig\": {\n \"contentOptions\": [],\n \"customInfoTypes\": [\n {\n \"detectionRules\": [\n {\n \"hotwordRule\": {\n \"hotwordRegex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n },\n \"likelihoodAdjustment\": {\n \"fixedLikelihood\": \"\",\n \"relativeLikelihood\": 0\n },\n \"proximity\": {\n \"windowAfter\": 0,\n \"windowBefore\": 0\n }\n }\n }\n ],\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {}\n },\n \"exclusionType\": \"\",\n \"infoType\": {},\n \"likelihood\": \"\",\n \"regex\": {},\n \"storedType\": {\n \"createTime\": \"\",\n \"name\": \"\"\n },\n \"surrogateType\": {}\n }\n ],\n \"excludeInfoTypes\": false,\n \"includeQuote\": false,\n \"infoTypes\": [\n {}\n ],\n \"limits\": {\n \"maxFindingsPerInfoType\": [\n {\n \"infoType\": {},\n \"maxFindings\": 0\n }\n ],\n \"maxFindingsPerItem\": 0,\n \"maxFindingsPerRequest\": 0\n },\n \"minLikelihood\": \"\",\n \"ruleSet\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"rules\": [\n {\n \"exclusionRule\": {\n \"dictionary\": {},\n \"excludeByHotword\": {\n \"hotwordRegex\": {},\n \"proximity\": {}\n },\n \"excludeInfoTypes\": {\n \"infoTypes\": [\n {}\n ]\n },\n \"matchingType\": \"\",\n \"regex\": {}\n },\n \"hotwordRule\": {}\n }\n ]\n }\n ]\n },\n \"inspectTemplateName\": \"\",\n \"item\": {\n \"byteItem\": {\n \"data\": \"\",\n \"type\": \"\"\n },\n \"table\": {\n \"headers\": [\n {}\n ],\n \"rows\": [\n {\n \"values\": [\n {}\n ]\n }\n ]\n },\n \"value\": \"\"\n },\n \"locationId\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v2/:parent/content:deidentify", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/:parent/content:deidentify"
payload = {
"deidentifyConfig": {
"imageTransformations": { "transforms": [
{
"allInfoTypes": {},
"allText": {},
"redactionColor": {
"blue": "",
"green": "",
"red": ""
},
"selectedInfoTypes": { "infoTypes": [
{
"name": "",
"version": ""
}
] }
}
] },
"infoTypeTransformations": { "transformations": [
{
"infoTypes": [{}],
"primitiveTransformation": {
"bucketingConfig": { "buckets": [
{
"max": {
"booleanValue": False,
"dateValue": {
"day": 0,
"month": 0,
"year": 0
},
"dayOfWeekValue": "",
"floatValue": "",
"integerValue": "",
"stringValue": "",
"timeValue": {
"hours": 0,
"minutes": 0,
"nanos": 0,
"seconds": 0
},
"timestampValue": ""
},
"min": {},
"replacementValue": {}
}
] },
"characterMaskConfig": {
"charactersToIgnore": [
{
"charactersToSkip": "",
"commonCharactersToIgnore": ""
}
],
"maskingCharacter": "",
"numberToMask": 0,
"reverseOrder": False
},
"cryptoDeterministicConfig": {
"context": { "name": "" },
"cryptoKey": {
"kmsWrapped": {
"cryptoKeyName": "",
"wrappedKey": ""
},
"transient": { "name": "" },
"unwrapped": { "key": "" }
},
"surrogateInfoType": {}
},
"cryptoHashConfig": { "cryptoKey": {} },
"cryptoReplaceFfxFpeConfig": {
"commonAlphabet": "",
"context": {},
"cryptoKey": {},
"customAlphabet": "",
"radix": 0,
"surrogateInfoType": {}
},
"dateShiftConfig": {
"context": {},
"cryptoKey": {},
"lowerBoundDays": 0,
"upperBoundDays": 0
},
"fixedSizeBucketingConfig": {
"bucketSize": "",
"lowerBound": {},
"upperBound": {}
},
"redactConfig": {},
"replaceConfig": { "newValue": {} },
"replaceDictionaryConfig": { "wordList": { "words": [] } },
"replaceWithInfoTypeConfig": {},
"timePartConfig": { "partToExtract": "" }
}
}
] },
"recordTransformations": {
"fieldTransformations": [
{
"condition": { "expressions": {
"conditions": { "conditions": [
{
"field": {},
"operator": "",
"value": {}
}
] },
"logicalOperator": ""
} },
"fields": [{}],
"infoTypeTransformations": {},
"primitiveTransformation": {}
}
],
"recordSuppressions": [{ "condition": {} }]
},
"transformationErrorHandling": {
"leaveUntransformed": {},
"throwError": {}
}
},
"deidentifyTemplateName": "",
"inspectConfig": {
"contentOptions": [],
"customInfoTypes": [
{
"detectionRules": [{ "hotwordRule": {
"hotwordRegex": {
"groupIndexes": [],
"pattern": ""
},
"likelihoodAdjustment": {
"fixedLikelihood": "",
"relativeLikelihood": 0
},
"proximity": {
"windowAfter": 0,
"windowBefore": 0
}
} }],
"dictionary": {
"cloudStoragePath": { "path": "" },
"wordList": {}
},
"exclusionType": "",
"infoType": {},
"likelihood": "",
"regex": {},
"storedType": {
"createTime": "",
"name": ""
},
"surrogateType": {}
}
],
"excludeInfoTypes": False,
"includeQuote": False,
"infoTypes": [{}],
"limits": {
"maxFindingsPerInfoType": [
{
"infoType": {},
"maxFindings": 0
}
],
"maxFindingsPerItem": 0,
"maxFindingsPerRequest": 0
},
"minLikelihood": "",
"ruleSet": [
{
"infoTypes": [{}],
"rules": [
{
"exclusionRule": {
"dictionary": {},
"excludeByHotword": {
"hotwordRegex": {},
"proximity": {}
},
"excludeInfoTypes": { "infoTypes": [{}] },
"matchingType": "",
"regex": {}
},
"hotwordRule": {}
}
]
}
]
},
"inspectTemplateName": "",
"item": {
"byteItem": {
"data": "",
"type": ""
},
"table": {
"headers": [{}],
"rows": [{ "values": [{}] }]
},
"value": ""
},
"locationId": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/:parent/content:deidentify"
payload <- "{\n \"deidentifyConfig\": {\n \"imageTransformations\": {\n \"transforms\": [\n {\n \"allInfoTypes\": {},\n \"allText\": {},\n \"redactionColor\": {\n \"blue\": \"\",\n \"green\": \"\",\n \"red\": \"\"\n },\n \"selectedInfoTypes\": {\n \"infoTypes\": [\n {\n \"name\": \"\",\n \"version\": \"\"\n }\n ]\n }\n }\n ]\n },\n \"infoTypeTransformations\": {\n \"transformations\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"primitiveTransformation\": {\n \"bucketingConfig\": {\n \"buckets\": [\n {\n \"max\": {\n \"booleanValue\": false,\n \"dateValue\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"dayOfWeekValue\": \"\",\n \"floatValue\": \"\",\n \"integerValue\": \"\",\n \"stringValue\": \"\",\n \"timeValue\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"timestampValue\": \"\"\n },\n \"min\": {},\n \"replacementValue\": {}\n }\n ]\n },\n \"characterMaskConfig\": {\n \"charactersToIgnore\": [\n {\n \"charactersToSkip\": \"\",\n \"commonCharactersToIgnore\": \"\"\n }\n ],\n \"maskingCharacter\": \"\",\n \"numberToMask\": 0,\n \"reverseOrder\": false\n },\n \"cryptoDeterministicConfig\": {\n \"context\": {\n \"name\": \"\"\n },\n \"cryptoKey\": {\n \"kmsWrapped\": {\n \"cryptoKeyName\": \"\",\n \"wrappedKey\": \"\"\n },\n \"transient\": {\n \"name\": \"\"\n },\n \"unwrapped\": {\n \"key\": \"\"\n }\n },\n \"surrogateInfoType\": {}\n },\n \"cryptoHashConfig\": {\n \"cryptoKey\": {}\n },\n \"cryptoReplaceFfxFpeConfig\": {\n \"commonAlphabet\": \"\",\n \"context\": {},\n \"cryptoKey\": {},\n \"customAlphabet\": \"\",\n \"radix\": 0,\n \"surrogateInfoType\": {}\n },\n \"dateShiftConfig\": {\n \"context\": {},\n \"cryptoKey\": {},\n \"lowerBoundDays\": 0,\n \"upperBoundDays\": 0\n },\n \"fixedSizeBucketingConfig\": {\n \"bucketSize\": \"\",\n \"lowerBound\": {},\n \"upperBound\": {}\n },\n \"redactConfig\": {},\n \"replaceConfig\": {\n \"newValue\": {}\n },\n \"replaceDictionaryConfig\": {\n \"wordList\": {\n \"words\": []\n }\n },\n \"replaceWithInfoTypeConfig\": {},\n \"timePartConfig\": {\n \"partToExtract\": \"\"\n }\n }\n }\n ]\n },\n \"recordTransformations\": {\n \"fieldTransformations\": [\n {\n \"condition\": {\n \"expressions\": {\n \"conditions\": {\n \"conditions\": [\n {\n \"field\": {},\n \"operator\": \"\",\n \"value\": {}\n }\n ]\n },\n \"logicalOperator\": \"\"\n }\n },\n \"fields\": [\n {}\n ],\n \"infoTypeTransformations\": {},\n \"primitiveTransformation\": {}\n }\n ],\n \"recordSuppressions\": [\n {\n \"condition\": {}\n }\n ]\n },\n \"transformationErrorHandling\": {\n \"leaveUntransformed\": {},\n \"throwError\": {}\n }\n },\n \"deidentifyTemplateName\": \"\",\n \"inspectConfig\": {\n \"contentOptions\": [],\n \"customInfoTypes\": [\n {\n \"detectionRules\": [\n {\n \"hotwordRule\": {\n \"hotwordRegex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n },\n \"likelihoodAdjustment\": {\n \"fixedLikelihood\": \"\",\n \"relativeLikelihood\": 0\n },\n \"proximity\": {\n \"windowAfter\": 0,\n \"windowBefore\": 0\n }\n }\n }\n ],\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {}\n },\n \"exclusionType\": \"\",\n \"infoType\": {},\n \"likelihood\": \"\",\n \"regex\": {},\n \"storedType\": {\n \"createTime\": \"\",\n \"name\": \"\"\n },\n \"surrogateType\": {}\n }\n ],\n \"excludeInfoTypes\": false,\n \"includeQuote\": false,\n \"infoTypes\": [\n {}\n ],\n \"limits\": {\n \"maxFindingsPerInfoType\": [\n {\n \"infoType\": {},\n \"maxFindings\": 0\n }\n ],\n \"maxFindingsPerItem\": 0,\n \"maxFindingsPerRequest\": 0\n },\n \"minLikelihood\": \"\",\n \"ruleSet\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"rules\": [\n {\n \"exclusionRule\": {\n \"dictionary\": {},\n \"excludeByHotword\": {\n \"hotwordRegex\": {},\n \"proximity\": {}\n },\n \"excludeInfoTypes\": {\n \"infoTypes\": [\n {}\n ]\n },\n \"matchingType\": \"\",\n \"regex\": {}\n },\n \"hotwordRule\": {}\n }\n ]\n }\n ]\n },\n \"inspectTemplateName\": \"\",\n \"item\": {\n \"byteItem\": {\n \"data\": \"\",\n \"type\": \"\"\n },\n \"table\": {\n \"headers\": [\n {}\n ],\n \"rows\": [\n {\n \"values\": [\n {}\n ]\n }\n ]\n },\n \"value\": \"\"\n },\n \"locationId\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/:parent/content:deidentify")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"deidentifyConfig\": {\n \"imageTransformations\": {\n \"transforms\": [\n {\n \"allInfoTypes\": {},\n \"allText\": {},\n \"redactionColor\": {\n \"blue\": \"\",\n \"green\": \"\",\n \"red\": \"\"\n },\n \"selectedInfoTypes\": {\n \"infoTypes\": [\n {\n \"name\": \"\",\n \"version\": \"\"\n }\n ]\n }\n }\n ]\n },\n \"infoTypeTransformations\": {\n \"transformations\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"primitiveTransformation\": {\n \"bucketingConfig\": {\n \"buckets\": [\n {\n \"max\": {\n \"booleanValue\": false,\n \"dateValue\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"dayOfWeekValue\": \"\",\n \"floatValue\": \"\",\n \"integerValue\": \"\",\n \"stringValue\": \"\",\n \"timeValue\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"timestampValue\": \"\"\n },\n \"min\": {},\n \"replacementValue\": {}\n }\n ]\n },\n \"characterMaskConfig\": {\n \"charactersToIgnore\": [\n {\n \"charactersToSkip\": \"\",\n \"commonCharactersToIgnore\": \"\"\n }\n ],\n \"maskingCharacter\": \"\",\n \"numberToMask\": 0,\n \"reverseOrder\": false\n },\n \"cryptoDeterministicConfig\": {\n \"context\": {\n \"name\": \"\"\n },\n \"cryptoKey\": {\n \"kmsWrapped\": {\n \"cryptoKeyName\": \"\",\n \"wrappedKey\": \"\"\n },\n \"transient\": {\n \"name\": \"\"\n },\n \"unwrapped\": {\n \"key\": \"\"\n }\n },\n \"surrogateInfoType\": {}\n },\n \"cryptoHashConfig\": {\n \"cryptoKey\": {}\n },\n \"cryptoReplaceFfxFpeConfig\": {\n \"commonAlphabet\": \"\",\n \"context\": {},\n \"cryptoKey\": {},\n \"customAlphabet\": \"\",\n \"radix\": 0,\n \"surrogateInfoType\": {}\n },\n \"dateShiftConfig\": {\n \"context\": {},\n \"cryptoKey\": {},\n \"lowerBoundDays\": 0,\n \"upperBoundDays\": 0\n },\n \"fixedSizeBucketingConfig\": {\n \"bucketSize\": \"\",\n \"lowerBound\": {},\n \"upperBound\": {}\n },\n \"redactConfig\": {},\n \"replaceConfig\": {\n \"newValue\": {}\n },\n \"replaceDictionaryConfig\": {\n \"wordList\": {\n \"words\": []\n }\n },\n \"replaceWithInfoTypeConfig\": {},\n \"timePartConfig\": {\n \"partToExtract\": \"\"\n }\n }\n }\n ]\n },\n \"recordTransformations\": {\n \"fieldTransformations\": [\n {\n \"condition\": {\n \"expressions\": {\n \"conditions\": {\n \"conditions\": [\n {\n \"field\": {},\n \"operator\": \"\",\n \"value\": {}\n }\n ]\n },\n \"logicalOperator\": \"\"\n }\n },\n \"fields\": [\n {}\n ],\n \"infoTypeTransformations\": {},\n \"primitiveTransformation\": {}\n }\n ],\n \"recordSuppressions\": [\n {\n \"condition\": {}\n }\n ]\n },\n \"transformationErrorHandling\": {\n \"leaveUntransformed\": {},\n \"throwError\": {}\n }\n },\n \"deidentifyTemplateName\": \"\",\n \"inspectConfig\": {\n \"contentOptions\": [],\n \"customInfoTypes\": [\n {\n \"detectionRules\": [\n {\n \"hotwordRule\": {\n \"hotwordRegex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n },\n \"likelihoodAdjustment\": {\n \"fixedLikelihood\": \"\",\n \"relativeLikelihood\": 0\n },\n \"proximity\": {\n \"windowAfter\": 0,\n \"windowBefore\": 0\n }\n }\n }\n ],\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {}\n },\n \"exclusionType\": \"\",\n \"infoType\": {},\n \"likelihood\": \"\",\n \"regex\": {},\n \"storedType\": {\n \"createTime\": \"\",\n \"name\": \"\"\n },\n \"surrogateType\": {}\n }\n ],\n \"excludeInfoTypes\": false,\n \"includeQuote\": false,\n \"infoTypes\": [\n {}\n ],\n \"limits\": {\n \"maxFindingsPerInfoType\": [\n {\n \"infoType\": {},\n \"maxFindings\": 0\n }\n ],\n \"maxFindingsPerItem\": 0,\n \"maxFindingsPerRequest\": 0\n },\n \"minLikelihood\": \"\",\n \"ruleSet\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"rules\": [\n {\n \"exclusionRule\": {\n \"dictionary\": {},\n \"excludeByHotword\": {\n \"hotwordRegex\": {},\n \"proximity\": {}\n },\n \"excludeInfoTypes\": {\n \"infoTypes\": [\n {}\n ]\n },\n \"matchingType\": \"\",\n \"regex\": {}\n },\n \"hotwordRule\": {}\n }\n ]\n }\n ]\n },\n \"inspectTemplateName\": \"\",\n \"item\": {\n \"byteItem\": {\n \"data\": \"\",\n \"type\": \"\"\n },\n \"table\": {\n \"headers\": [\n {}\n ],\n \"rows\": [\n {\n \"values\": [\n {}\n ]\n }\n ]\n },\n \"value\": \"\"\n },\n \"locationId\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/v2/:parent/content:deidentify') do |req|
req.body = "{\n \"deidentifyConfig\": {\n \"imageTransformations\": {\n \"transforms\": [\n {\n \"allInfoTypes\": {},\n \"allText\": {},\n \"redactionColor\": {\n \"blue\": \"\",\n \"green\": \"\",\n \"red\": \"\"\n },\n \"selectedInfoTypes\": {\n \"infoTypes\": [\n {\n \"name\": \"\",\n \"version\": \"\"\n }\n ]\n }\n }\n ]\n },\n \"infoTypeTransformations\": {\n \"transformations\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"primitiveTransformation\": {\n \"bucketingConfig\": {\n \"buckets\": [\n {\n \"max\": {\n \"booleanValue\": false,\n \"dateValue\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"dayOfWeekValue\": \"\",\n \"floatValue\": \"\",\n \"integerValue\": \"\",\n \"stringValue\": \"\",\n \"timeValue\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"timestampValue\": \"\"\n },\n \"min\": {},\n \"replacementValue\": {}\n }\n ]\n },\n \"characterMaskConfig\": {\n \"charactersToIgnore\": [\n {\n \"charactersToSkip\": \"\",\n \"commonCharactersToIgnore\": \"\"\n }\n ],\n \"maskingCharacter\": \"\",\n \"numberToMask\": 0,\n \"reverseOrder\": false\n },\n \"cryptoDeterministicConfig\": {\n \"context\": {\n \"name\": \"\"\n },\n \"cryptoKey\": {\n \"kmsWrapped\": {\n \"cryptoKeyName\": \"\",\n \"wrappedKey\": \"\"\n },\n \"transient\": {\n \"name\": \"\"\n },\n \"unwrapped\": {\n \"key\": \"\"\n }\n },\n \"surrogateInfoType\": {}\n },\n \"cryptoHashConfig\": {\n \"cryptoKey\": {}\n },\n \"cryptoReplaceFfxFpeConfig\": {\n \"commonAlphabet\": \"\",\n \"context\": {},\n \"cryptoKey\": {},\n \"customAlphabet\": \"\",\n \"radix\": 0,\n \"surrogateInfoType\": {}\n },\n \"dateShiftConfig\": {\n \"context\": {},\n \"cryptoKey\": {},\n \"lowerBoundDays\": 0,\n \"upperBoundDays\": 0\n },\n \"fixedSizeBucketingConfig\": {\n \"bucketSize\": \"\",\n \"lowerBound\": {},\n \"upperBound\": {}\n },\n \"redactConfig\": {},\n \"replaceConfig\": {\n \"newValue\": {}\n },\n \"replaceDictionaryConfig\": {\n \"wordList\": {\n \"words\": []\n }\n },\n \"replaceWithInfoTypeConfig\": {},\n \"timePartConfig\": {\n \"partToExtract\": \"\"\n }\n }\n }\n ]\n },\n \"recordTransformations\": {\n \"fieldTransformations\": [\n {\n \"condition\": {\n \"expressions\": {\n \"conditions\": {\n \"conditions\": [\n {\n \"field\": {},\n \"operator\": \"\",\n \"value\": {}\n }\n ]\n },\n \"logicalOperator\": \"\"\n }\n },\n \"fields\": [\n {}\n ],\n \"infoTypeTransformations\": {},\n \"primitiveTransformation\": {}\n }\n ],\n \"recordSuppressions\": [\n {\n \"condition\": {}\n }\n ]\n },\n \"transformationErrorHandling\": {\n \"leaveUntransformed\": {},\n \"throwError\": {}\n }\n },\n \"deidentifyTemplateName\": \"\",\n \"inspectConfig\": {\n \"contentOptions\": [],\n \"customInfoTypes\": [\n {\n \"detectionRules\": [\n {\n \"hotwordRule\": {\n \"hotwordRegex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n },\n \"likelihoodAdjustment\": {\n \"fixedLikelihood\": \"\",\n \"relativeLikelihood\": 0\n },\n \"proximity\": {\n \"windowAfter\": 0,\n \"windowBefore\": 0\n }\n }\n }\n ],\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {}\n },\n \"exclusionType\": \"\",\n \"infoType\": {},\n \"likelihood\": \"\",\n \"regex\": {},\n \"storedType\": {\n \"createTime\": \"\",\n \"name\": \"\"\n },\n \"surrogateType\": {}\n }\n ],\n \"excludeInfoTypes\": false,\n \"includeQuote\": false,\n \"infoTypes\": [\n {}\n ],\n \"limits\": {\n \"maxFindingsPerInfoType\": [\n {\n \"infoType\": {},\n \"maxFindings\": 0\n }\n ],\n \"maxFindingsPerItem\": 0,\n \"maxFindingsPerRequest\": 0\n },\n \"minLikelihood\": \"\",\n \"ruleSet\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"rules\": [\n {\n \"exclusionRule\": {\n \"dictionary\": {},\n \"excludeByHotword\": {\n \"hotwordRegex\": {},\n \"proximity\": {}\n },\n \"excludeInfoTypes\": {\n \"infoTypes\": [\n {}\n ]\n },\n \"matchingType\": \"\",\n \"regex\": {}\n },\n \"hotwordRule\": {}\n }\n ]\n }\n ]\n },\n \"inspectTemplateName\": \"\",\n \"item\": {\n \"byteItem\": {\n \"data\": \"\",\n \"type\": \"\"\n },\n \"table\": {\n \"headers\": [\n {}\n ],\n \"rows\": [\n {\n \"values\": [\n {}\n ]\n }\n ]\n },\n \"value\": \"\"\n },\n \"locationId\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v2/:parent/content:deidentify";
let payload = json!({
"deidentifyConfig": json!({
"imageTransformations": json!({"transforms": (
json!({
"allInfoTypes": json!({}),
"allText": json!({}),
"redactionColor": json!({
"blue": "",
"green": "",
"red": ""
}),
"selectedInfoTypes": json!({"infoTypes": (
json!({
"name": "",
"version": ""
})
)})
})
)}),
"infoTypeTransformations": json!({"transformations": (
json!({
"infoTypes": (json!({})),
"primitiveTransformation": json!({
"bucketingConfig": json!({"buckets": (
json!({
"max": json!({
"booleanValue": false,
"dateValue": json!({
"day": 0,
"month": 0,
"year": 0
}),
"dayOfWeekValue": "",
"floatValue": "",
"integerValue": "",
"stringValue": "",
"timeValue": json!({
"hours": 0,
"minutes": 0,
"nanos": 0,
"seconds": 0
}),
"timestampValue": ""
}),
"min": json!({}),
"replacementValue": json!({})
})
)}),
"characterMaskConfig": json!({
"charactersToIgnore": (
json!({
"charactersToSkip": "",
"commonCharactersToIgnore": ""
})
),
"maskingCharacter": "",
"numberToMask": 0,
"reverseOrder": false
}),
"cryptoDeterministicConfig": json!({
"context": json!({"name": ""}),
"cryptoKey": json!({
"kmsWrapped": json!({
"cryptoKeyName": "",
"wrappedKey": ""
}),
"transient": json!({"name": ""}),
"unwrapped": json!({"key": ""})
}),
"surrogateInfoType": json!({})
}),
"cryptoHashConfig": json!({"cryptoKey": json!({})}),
"cryptoReplaceFfxFpeConfig": json!({
"commonAlphabet": "",
"context": json!({}),
"cryptoKey": json!({}),
"customAlphabet": "",
"radix": 0,
"surrogateInfoType": json!({})
}),
"dateShiftConfig": json!({
"context": json!({}),
"cryptoKey": json!({}),
"lowerBoundDays": 0,
"upperBoundDays": 0
}),
"fixedSizeBucketingConfig": json!({
"bucketSize": "",
"lowerBound": json!({}),
"upperBound": json!({})
}),
"redactConfig": json!({}),
"replaceConfig": json!({"newValue": json!({})}),
"replaceDictionaryConfig": json!({"wordList": json!({"words": ()})}),
"replaceWithInfoTypeConfig": json!({}),
"timePartConfig": json!({"partToExtract": ""})
})
})
)}),
"recordTransformations": json!({
"fieldTransformations": (
json!({
"condition": json!({"expressions": json!({
"conditions": json!({"conditions": (
json!({
"field": json!({}),
"operator": "",
"value": json!({})
})
)}),
"logicalOperator": ""
})}),
"fields": (json!({})),
"infoTypeTransformations": json!({}),
"primitiveTransformation": json!({})
})
),
"recordSuppressions": (json!({"condition": json!({})}))
}),
"transformationErrorHandling": json!({
"leaveUntransformed": json!({}),
"throwError": json!({})
})
}),
"deidentifyTemplateName": "",
"inspectConfig": json!({
"contentOptions": (),
"customInfoTypes": (
json!({
"detectionRules": (json!({"hotwordRule": json!({
"hotwordRegex": json!({
"groupIndexes": (),
"pattern": ""
}),
"likelihoodAdjustment": json!({
"fixedLikelihood": "",
"relativeLikelihood": 0
}),
"proximity": json!({
"windowAfter": 0,
"windowBefore": 0
})
})})),
"dictionary": json!({
"cloudStoragePath": json!({"path": ""}),
"wordList": json!({})
}),
"exclusionType": "",
"infoType": json!({}),
"likelihood": "",
"regex": json!({}),
"storedType": json!({
"createTime": "",
"name": ""
}),
"surrogateType": json!({})
})
),
"excludeInfoTypes": false,
"includeQuote": false,
"infoTypes": (json!({})),
"limits": json!({
"maxFindingsPerInfoType": (
json!({
"infoType": json!({}),
"maxFindings": 0
})
),
"maxFindingsPerItem": 0,
"maxFindingsPerRequest": 0
}),
"minLikelihood": "",
"ruleSet": (
json!({
"infoTypes": (json!({})),
"rules": (
json!({
"exclusionRule": json!({
"dictionary": json!({}),
"excludeByHotword": json!({
"hotwordRegex": json!({}),
"proximity": json!({})
}),
"excludeInfoTypes": json!({"infoTypes": (json!({}))}),
"matchingType": "",
"regex": json!({})
}),
"hotwordRule": json!({})
})
)
})
)
}),
"inspectTemplateName": "",
"item": json!({
"byteItem": json!({
"data": "",
"type": ""
}),
"table": json!({
"headers": (json!({})),
"rows": (json!({"values": (json!({}))}))
}),
"value": ""
}),
"locationId": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/v2/:parent/content:deidentify \
--header 'content-type: application/json' \
--data '{
"deidentifyConfig": {
"imageTransformations": {
"transforms": [
{
"allInfoTypes": {},
"allText": {},
"redactionColor": {
"blue": "",
"green": "",
"red": ""
},
"selectedInfoTypes": {
"infoTypes": [
{
"name": "",
"version": ""
}
]
}
}
]
},
"infoTypeTransformations": {
"transformations": [
{
"infoTypes": [
{}
],
"primitiveTransformation": {
"bucketingConfig": {
"buckets": [
{
"max": {
"booleanValue": false,
"dateValue": {
"day": 0,
"month": 0,
"year": 0
},
"dayOfWeekValue": "",
"floatValue": "",
"integerValue": "",
"stringValue": "",
"timeValue": {
"hours": 0,
"minutes": 0,
"nanos": 0,
"seconds": 0
},
"timestampValue": ""
},
"min": {},
"replacementValue": {}
}
]
},
"characterMaskConfig": {
"charactersToIgnore": [
{
"charactersToSkip": "",
"commonCharactersToIgnore": ""
}
],
"maskingCharacter": "",
"numberToMask": 0,
"reverseOrder": false
},
"cryptoDeterministicConfig": {
"context": {
"name": ""
},
"cryptoKey": {
"kmsWrapped": {
"cryptoKeyName": "",
"wrappedKey": ""
},
"transient": {
"name": ""
},
"unwrapped": {
"key": ""
}
},
"surrogateInfoType": {}
},
"cryptoHashConfig": {
"cryptoKey": {}
},
"cryptoReplaceFfxFpeConfig": {
"commonAlphabet": "",
"context": {},
"cryptoKey": {},
"customAlphabet": "",
"radix": 0,
"surrogateInfoType": {}
},
"dateShiftConfig": {
"context": {},
"cryptoKey": {},
"lowerBoundDays": 0,
"upperBoundDays": 0
},
"fixedSizeBucketingConfig": {
"bucketSize": "",
"lowerBound": {},
"upperBound": {}
},
"redactConfig": {},
"replaceConfig": {
"newValue": {}
},
"replaceDictionaryConfig": {
"wordList": {
"words": []
}
},
"replaceWithInfoTypeConfig": {},
"timePartConfig": {
"partToExtract": ""
}
}
}
]
},
"recordTransformations": {
"fieldTransformations": [
{
"condition": {
"expressions": {
"conditions": {
"conditions": [
{
"field": {},
"operator": "",
"value": {}
}
]
},
"logicalOperator": ""
}
},
"fields": [
{}
],
"infoTypeTransformations": {},
"primitiveTransformation": {}
}
],
"recordSuppressions": [
{
"condition": {}
}
]
},
"transformationErrorHandling": {
"leaveUntransformed": {},
"throwError": {}
}
},
"deidentifyTemplateName": "",
"inspectConfig": {
"contentOptions": [],
"customInfoTypes": [
{
"detectionRules": [
{
"hotwordRule": {
"hotwordRegex": {
"groupIndexes": [],
"pattern": ""
},
"likelihoodAdjustment": {
"fixedLikelihood": "",
"relativeLikelihood": 0
},
"proximity": {
"windowAfter": 0,
"windowBefore": 0
}
}
}
],
"dictionary": {
"cloudStoragePath": {
"path": ""
},
"wordList": {}
},
"exclusionType": "",
"infoType": {},
"likelihood": "",
"regex": {},
"storedType": {
"createTime": "",
"name": ""
},
"surrogateType": {}
}
],
"excludeInfoTypes": false,
"includeQuote": false,
"infoTypes": [
{}
],
"limits": {
"maxFindingsPerInfoType": [
{
"infoType": {},
"maxFindings": 0
}
],
"maxFindingsPerItem": 0,
"maxFindingsPerRequest": 0
},
"minLikelihood": "",
"ruleSet": [
{
"infoTypes": [
{}
],
"rules": [
{
"exclusionRule": {
"dictionary": {},
"excludeByHotword": {
"hotwordRegex": {},
"proximity": {}
},
"excludeInfoTypes": {
"infoTypes": [
{}
]
},
"matchingType": "",
"regex": {}
},
"hotwordRule": {}
}
]
}
]
},
"inspectTemplateName": "",
"item": {
"byteItem": {
"data": "",
"type": ""
},
"table": {
"headers": [
{}
],
"rows": [
{
"values": [
{}
]
}
]
},
"value": ""
},
"locationId": ""
}'
echo '{
"deidentifyConfig": {
"imageTransformations": {
"transforms": [
{
"allInfoTypes": {},
"allText": {},
"redactionColor": {
"blue": "",
"green": "",
"red": ""
},
"selectedInfoTypes": {
"infoTypes": [
{
"name": "",
"version": ""
}
]
}
}
]
},
"infoTypeTransformations": {
"transformations": [
{
"infoTypes": [
{}
],
"primitiveTransformation": {
"bucketingConfig": {
"buckets": [
{
"max": {
"booleanValue": false,
"dateValue": {
"day": 0,
"month": 0,
"year": 0
},
"dayOfWeekValue": "",
"floatValue": "",
"integerValue": "",
"stringValue": "",
"timeValue": {
"hours": 0,
"minutes": 0,
"nanos": 0,
"seconds": 0
},
"timestampValue": ""
},
"min": {},
"replacementValue": {}
}
]
},
"characterMaskConfig": {
"charactersToIgnore": [
{
"charactersToSkip": "",
"commonCharactersToIgnore": ""
}
],
"maskingCharacter": "",
"numberToMask": 0,
"reverseOrder": false
},
"cryptoDeterministicConfig": {
"context": {
"name": ""
},
"cryptoKey": {
"kmsWrapped": {
"cryptoKeyName": "",
"wrappedKey": ""
},
"transient": {
"name": ""
},
"unwrapped": {
"key": ""
}
},
"surrogateInfoType": {}
},
"cryptoHashConfig": {
"cryptoKey": {}
},
"cryptoReplaceFfxFpeConfig": {
"commonAlphabet": "",
"context": {},
"cryptoKey": {},
"customAlphabet": "",
"radix": 0,
"surrogateInfoType": {}
},
"dateShiftConfig": {
"context": {},
"cryptoKey": {},
"lowerBoundDays": 0,
"upperBoundDays": 0
},
"fixedSizeBucketingConfig": {
"bucketSize": "",
"lowerBound": {},
"upperBound": {}
},
"redactConfig": {},
"replaceConfig": {
"newValue": {}
},
"replaceDictionaryConfig": {
"wordList": {
"words": []
}
},
"replaceWithInfoTypeConfig": {},
"timePartConfig": {
"partToExtract": ""
}
}
}
]
},
"recordTransformations": {
"fieldTransformations": [
{
"condition": {
"expressions": {
"conditions": {
"conditions": [
{
"field": {},
"operator": "",
"value": {}
}
]
},
"logicalOperator": ""
}
},
"fields": [
{}
],
"infoTypeTransformations": {},
"primitiveTransformation": {}
}
],
"recordSuppressions": [
{
"condition": {}
}
]
},
"transformationErrorHandling": {
"leaveUntransformed": {},
"throwError": {}
}
},
"deidentifyTemplateName": "",
"inspectConfig": {
"contentOptions": [],
"customInfoTypes": [
{
"detectionRules": [
{
"hotwordRule": {
"hotwordRegex": {
"groupIndexes": [],
"pattern": ""
},
"likelihoodAdjustment": {
"fixedLikelihood": "",
"relativeLikelihood": 0
},
"proximity": {
"windowAfter": 0,
"windowBefore": 0
}
}
}
],
"dictionary": {
"cloudStoragePath": {
"path": ""
},
"wordList": {}
},
"exclusionType": "",
"infoType": {},
"likelihood": "",
"regex": {},
"storedType": {
"createTime": "",
"name": ""
},
"surrogateType": {}
}
],
"excludeInfoTypes": false,
"includeQuote": false,
"infoTypes": [
{}
],
"limits": {
"maxFindingsPerInfoType": [
{
"infoType": {},
"maxFindings": 0
}
],
"maxFindingsPerItem": 0,
"maxFindingsPerRequest": 0
},
"minLikelihood": "",
"ruleSet": [
{
"infoTypes": [
{}
],
"rules": [
{
"exclusionRule": {
"dictionary": {},
"excludeByHotword": {
"hotwordRegex": {},
"proximity": {}
},
"excludeInfoTypes": {
"infoTypes": [
{}
]
},
"matchingType": "",
"regex": {}
},
"hotwordRule": {}
}
]
}
]
},
"inspectTemplateName": "",
"item": {
"byteItem": {
"data": "",
"type": ""
},
"table": {
"headers": [
{}
],
"rows": [
{
"values": [
{}
]
}
]
},
"value": ""
},
"locationId": ""
}' | \
http POST {{baseUrl}}/v2/:parent/content:deidentify \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "deidentifyConfig": {\n "imageTransformations": {\n "transforms": [\n {\n "allInfoTypes": {},\n "allText": {},\n "redactionColor": {\n "blue": "",\n "green": "",\n "red": ""\n },\n "selectedInfoTypes": {\n "infoTypes": [\n {\n "name": "",\n "version": ""\n }\n ]\n }\n }\n ]\n },\n "infoTypeTransformations": {\n "transformations": [\n {\n "infoTypes": [\n {}\n ],\n "primitiveTransformation": {\n "bucketingConfig": {\n "buckets": [\n {\n "max": {\n "booleanValue": false,\n "dateValue": {\n "day": 0,\n "month": 0,\n "year": 0\n },\n "dayOfWeekValue": "",\n "floatValue": "",\n "integerValue": "",\n "stringValue": "",\n "timeValue": {\n "hours": 0,\n "minutes": 0,\n "nanos": 0,\n "seconds": 0\n },\n "timestampValue": ""\n },\n "min": {},\n "replacementValue": {}\n }\n ]\n },\n "characterMaskConfig": {\n "charactersToIgnore": [\n {\n "charactersToSkip": "",\n "commonCharactersToIgnore": ""\n }\n ],\n "maskingCharacter": "",\n "numberToMask": 0,\n "reverseOrder": false\n },\n "cryptoDeterministicConfig": {\n "context": {\n "name": ""\n },\n "cryptoKey": {\n "kmsWrapped": {\n "cryptoKeyName": "",\n "wrappedKey": ""\n },\n "transient": {\n "name": ""\n },\n "unwrapped": {\n "key": ""\n }\n },\n "surrogateInfoType": {}\n },\n "cryptoHashConfig": {\n "cryptoKey": {}\n },\n "cryptoReplaceFfxFpeConfig": {\n "commonAlphabet": "",\n "context": {},\n "cryptoKey": {},\n "customAlphabet": "",\n "radix": 0,\n "surrogateInfoType": {}\n },\n "dateShiftConfig": {\n "context": {},\n "cryptoKey": {},\n "lowerBoundDays": 0,\n "upperBoundDays": 0\n },\n "fixedSizeBucketingConfig": {\n "bucketSize": "",\n "lowerBound": {},\n "upperBound": {}\n },\n "redactConfig": {},\n "replaceConfig": {\n "newValue": {}\n },\n "replaceDictionaryConfig": {\n "wordList": {\n "words": []\n }\n },\n "replaceWithInfoTypeConfig": {},\n "timePartConfig": {\n "partToExtract": ""\n }\n }\n }\n ]\n },\n "recordTransformations": {\n "fieldTransformations": [\n {\n "condition": {\n "expressions": {\n "conditions": {\n "conditions": [\n {\n "field": {},\n "operator": "",\n "value": {}\n }\n ]\n },\n "logicalOperator": ""\n }\n },\n "fields": [\n {}\n ],\n "infoTypeTransformations": {},\n "primitiveTransformation": {}\n }\n ],\n "recordSuppressions": [\n {\n "condition": {}\n }\n ]\n },\n "transformationErrorHandling": {\n "leaveUntransformed": {},\n "throwError": {}\n }\n },\n "deidentifyTemplateName": "",\n "inspectConfig": {\n "contentOptions": [],\n "customInfoTypes": [\n {\n "detectionRules": [\n {\n "hotwordRule": {\n "hotwordRegex": {\n "groupIndexes": [],\n "pattern": ""\n },\n "likelihoodAdjustment": {\n "fixedLikelihood": "",\n "relativeLikelihood": 0\n },\n "proximity": {\n "windowAfter": 0,\n "windowBefore": 0\n }\n }\n }\n ],\n "dictionary": {\n "cloudStoragePath": {\n "path": ""\n },\n "wordList": {}\n },\n "exclusionType": "",\n "infoType": {},\n "likelihood": "",\n "regex": {},\n "storedType": {\n "createTime": "",\n "name": ""\n },\n "surrogateType": {}\n }\n ],\n "excludeInfoTypes": false,\n "includeQuote": false,\n "infoTypes": [\n {}\n ],\n "limits": {\n "maxFindingsPerInfoType": [\n {\n "infoType": {},\n "maxFindings": 0\n }\n ],\n "maxFindingsPerItem": 0,\n "maxFindingsPerRequest": 0\n },\n "minLikelihood": "",\n "ruleSet": [\n {\n "infoTypes": [\n {}\n ],\n "rules": [\n {\n "exclusionRule": {\n "dictionary": {},\n "excludeByHotword": {\n "hotwordRegex": {},\n "proximity": {}\n },\n "excludeInfoTypes": {\n "infoTypes": [\n {}\n ]\n },\n "matchingType": "",\n "regex": {}\n },\n "hotwordRule": {}\n }\n ]\n }\n ]\n },\n "inspectTemplateName": "",\n "item": {\n "byteItem": {\n "data": "",\n "type": ""\n },\n "table": {\n "headers": [\n {}\n ],\n "rows": [\n {\n "values": [\n {}\n ]\n }\n ]\n },\n "value": ""\n },\n "locationId": ""\n}' \
--output-document \
- {{baseUrl}}/v2/:parent/content:deidentify
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"deidentifyConfig": [
"imageTransformations": ["transforms": [
[
"allInfoTypes": [],
"allText": [],
"redactionColor": [
"blue": "",
"green": "",
"red": ""
],
"selectedInfoTypes": ["infoTypes": [
[
"name": "",
"version": ""
]
]]
]
]],
"infoTypeTransformations": ["transformations": [
[
"infoTypes": [[]],
"primitiveTransformation": [
"bucketingConfig": ["buckets": [
[
"max": [
"booleanValue": false,
"dateValue": [
"day": 0,
"month": 0,
"year": 0
],
"dayOfWeekValue": "",
"floatValue": "",
"integerValue": "",
"stringValue": "",
"timeValue": [
"hours": 0,
"minutes": 0,
"nanos": 0,
"seconds": 0
],
"timestampValue": ""
],
"min": [],
"replacementValue": []
]
]],
"characterMaskConfig": [
"charactersToIgnore": [
[
"charactersToSkip": "",
"commonCharactersToIgnore": ""
]
],
"maskingCharacter": "",
"numberToMask": 0,
"reverseOrder": false
],
"cryptoDeterministicConfig": [
"context": ["name": ""],
"cryptoKey": [
"kmsWrapped": [
"cryptoKeyName": "",
"wrappedKey": ""
],
"transient": ["name": ""],
"unwrapped": ["key": ""]
],
"surrogateInfoType": []
],
"cryptoHashConfig": ["cryptoKey": []],
"cryptoReplaceFfxFpeConfig": [
"commonAlphabet": "",
"context": [],
"cryptoKey": [],
"customAlphabet": "",
"radix": 0,
"surrogateInfoType": []
],
"dateShiftConfig": [
"context": [],
"cryptoKey": [],
"lowerBoundDays": 0,
"upperBoundDays": 0
],
"fixedSizeBucketingConfig": [
"bucketSize": "",
"lowerBound": [],
"upperBound": []
],
"redactConfig": [],
"replaceConfig": ["newValue": []],
"replaceDictionaryConfig": ["wordList": ["words": []]],
"replaceWithInfoTypeConfig": [],
"timePartConfig": ["partToExtract": ""]
]
]
]],
"recordTransformations": [
"fieldTransformations": [
[
"condition": ["expressions": [
"conditions": ["conditions": [
[
"field": [],
"operator": "",
"value": []
]
]],
"logicalOperator": ""
]],
"fields": [[]],
"infoTypeTransformations": [],
"primitiveTransformation": []
]
],
"recordSuppressions": [["condition": []]]
],
"transformationErrorHandling": [
"leaveUntransformed": [],
"throwError": []
]
],
"deidentifyTemplateName": "",
"inspectConfig": [
"contentOptions": [],
"customInfoTypes": [
[
"detectionRules": [["hotwordRule": [
"hotwordRegex": [
"groupIndexes": [],
"pattern": ""
],
"likelihoodAdjustment": [
"fixedLikelihood": "",
"relativeLikelihood": 0
],
"proximity": [
"windowAfter": 0,
"windowBefore": 0
]
]]],
"dictionary": [
"cloudStoragePath": ["path": ""],
"wordList": []
],
"exclusionType": "",
"infoType": [],
"likelihood": "",
"regex": [],
"storedType": [
"createTime": "",
"name": ""
],
"surrogateType": []
]
],
"excludeInfoTypes": false,
"includeQuote": false,
"infoTypes": [[]],
"limits": [
"maxFindingsPerInfoType": [
[
"infoType": [],
"maxFindings": 0
]
],
"maxFindingsPerItem": 0,
"maxFindingsPerRequest": 0
],
"minLikelihood": "",
"ruleSet": [
[
"infoTypes": [[]],
"rules": [
[
"exclusionRule": [
"dictionary": [],
"excludeByHotword": [
"hotwordRegex": [],
"proximity": []
],
"excludeInfoTypes": ["infoTypes": [[]]],
"matchingType": "",
"regex": []
],
"hotwordRule": []
]
]
]
]
],
"inspectTemplateName": "",
"item": [
"byteItem": [
"data": "",
"type": ""
],
"table": [
"headers": [[]],
"rows": [["values": [[]]]]
],
"value": ""
],
"locationId": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/:parent/content:deidentify")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
dlp.projects.locations.content.inspect
{{baseUrl}}/v2/:parent/content:inspect
QUERY PARAMS
parent
BODY json
{
"inspectConfig": {
"contentOptions": [],
"customInfoTypes": [
{
"detectionRules": [
{
"hotwordRule": {
"hotwordRegex": {
"groupIndexes": [],
"pattern": ""
},
"likelihoodAdjustment": {
"fixedLikelihood": "",
"relativeLikelihood": 0
},
"proximity": {
"windowAfter": 0,
"windowBefore": 0
}
}
}
],
"dictionary": {
"cloudStoragePath": {
"path": ""
},
"wordList": {
"words": []
}
},
"exclusionType": "",
"infoType": {
"name": "",
"version": ""
},
"likelihood": "",
"regex": {},
"storedType": {
"createTime": "",
"name": ""
},
"surrogateType": {}
}
],
"excludeInfoTypes": false,
"includeQuote": false,
"infoTypes": [
{}
],
"limits": {
"maxFindingsPerInfoType": [
{
"infoType": {},
"maxFindings": 0
}
],
"maxFindingsPerItem": 0,
"maxFindingsPerRequest": 0
},
"minLikelihood": "",
"ruleSet": [
{
"infoTypes": [
{}
],
"rules": [
{
"exclusionRule": {
"dictionary": {},
"excludeByHotword": {
"hotwordRegex": {},
"proximity": {}
},
"excludeInfoTypes": {
"infoTypes": [
{}
]
},
"matchingType": "",
"regex": {}
},
"hotwordRule": {}
}
]
}
]
},
"inspectTemplateName": "",
"item": {
"byteItem": {
"data": "",
"type": ""
},
"table": {
"headers": [
{
"name": ""
}
],
"rows": [
{
"values": [
{
"booleanValue": false,
"dateValue": {
"day": 0,
"month": 0,
"year": 0
},
"dayOfWeekValue": "",
"floatValue": "",
"integerValue": "",
"stringValue": "",
"timeValue": {
"hours": 0,
"minutes": 0,
"nanos": 0,
"seconds": 0
},
"timestampValue": ""
}
]
}
]
},
"value": ""
},
"locationId": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/:parent/content:inspect");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"inspectConfig\": {\n \"contentOptions\": [],\n \"customInfoTypes\": [\n {\n \"detectionRules\": [\n {\n \"hotwordRule\": {\n \"hotwordRegex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n },\n \"likelihoodAdjustment\": {\n \"fixedLikelihood\": \"\",\n \"relativeLikelihood\": 0\n },\n \"proximity\": {\n \"windowAfter\": 0,\n \"windowBefore\": 0\n }\n }\n }\n ],\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {\n \"words\": []\n }\n },\n \"exclusionType\": \"\",\n \"infoType\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"likelihood\": \"\",\n \"regex\": {},\n \"storedType\": {\n \"createTime\": \"\",\n \"name\": \"\"\n },\n \"surrogateType\": {}\n }\n ],\n \"excludeInfoTypes\": false,\n \"includeQuote\": false,\n \"infoTypes\": [\n {}\n ],\n \"limits\": {\n \"maxFindingsPerInfoType\": [\n {\n \"infoType\": {},\n \"maxFindings\": 0\n }\n ],\n \"maxFindingsPerItem\": 0,\n \"maxFindingsPerRequest\": 0\n },\n \"minLikelihood\": \"\",\n \"ruleSet\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"rules\": [\n {\n \"exclusionRule\": {\n \"dictionary\": {},\n \"excludeByHotword\": {\n \"hotwordRegex\": {},\n \"proximity\": {}\n },\n \"excludeInfoTypes\": {\n \"infoTypes\": [\n {}\n ]\n },\n \"matchingType\": \"\",\n \"regex\": {}\n },\n \"hotwordRule\": {}\n }\n ]\n }\n ]\n },\n \"inspectTemplateName\": \"\",\n \"item\": {\n \"byteItem\": {\n \"data\": \"\",\n \"type\": \"\"\n },\n \"table\": {\n \"headers\": [\n {\n \"name\": \"\"\n }\n ],\n \"rows\": [\n {\n \"values\": [\n {\n \"booleanValue\": false,\n \"dateValue\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"dayOfWeekValue\": \"\",\n \"floatValue\": \"\",\n \"integerValue\": \"\",\n \"stringValue\": \"\",\n \"timeValue\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"timestampValue\": \"\"\n }\n ]\n }\n ]\n },\n \"value\": \"\"\n },\n \"locationId\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v2/:parent/content:inspect" {:content-type :json
:form-params {:inspectConfig {:contentOptions []
:customInfoTypes [{:detectionRules [{:hotwordRule {:hotwordRegex {:groupIndexes []
:pattern ""}
:likelihoodAdjustment {:fixedLikelihood ""
:relativeLikelihood 0}
:proximity {:windowAfter 0
:windowBefore 0}}}]
:dictionary {:cloudStoragePath {:path ""}
:wordList {:words []}}
:exclusionType ""
:infoType {:name ""
:version ""}
:likelihood ""
:regex {}
:storedType {:createTime ""
:name ""}
:surrogateType {}}]
:excludeInfoTypes false
:includeQuote false
:infoTypes [{}]
:limits {:maxFindingsPerInfoType [{:infoType {}
:maxFindings 0}]
:maxFindingsPerItem 0
:maxFindingsPerRequest 0}
:minLikelihood ""
:ruleSet [{:infoTypes [{}]
:rules [{:exclusionRule {:dictionary {}
:excludeByHotword {:hotwordRegex {}
:proximity {}}
:excludeInfoTypes {:infoTypes [{}]}
:matchingType ""
:regex {}}
:hotwordRule {}}]}]}
:inspectTemplateName ""
:item {:byteItem {:data ""
:type ""}
:table {:headers [{:name ""}]
:rows [{:values [{:booleanValue false
:dateValue {:day 0
:month 0
:year 0}
:dayOfWeekValue ""
:floatValue ""
:integerValue ""
:stringValue ""
:timeValue {:hours 0
:minutes 0
:nanos 0
:seconds 0}
:timestampValue ""}]}]}
:value ""}
:locationId ""}})
require "http/client"
url = "{{baseUrl}}/v2/:parent/content:inspect"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"inspectConfig\": {\n \"contentOptions\": [],\n \"customInfoTypes\": [\n {\n \"detectionRules\": [\n {\n \"hotwordRule\": {\n \"hotwordRegex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n },\n \"likelihoodAdjustment\": {\n \"fixedLikelihood\": \"\",\n \"relativeLikelihood\": 0\n },\n \"proximity\": {\n \"windowAfter\": 0,\n \"windowBefore\": 0\n }\n }\n }\n ],\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {\n \"words\": []\n }\n },\n \"exclusionType\": \"\",\n \"infoType\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"likelihood\": \"\",\n \"regex\": {},\n \"storedType\": {\n \"createTime\": \"\",\n \"name\": \"\"\n },\n \"surrogateType\": {}\n }\n ],\n \"excludeInfoTypes\": false,\n \"includeQuote\": false,\n \"infoTypes\": [\n {}\n ],\n \"limits\": {\n \"maxFindingsPerInfoType\": [\n {\n \"infoType\": {},\n \"maxFindings\": 0\n }\n ],\n \"maxFindingsPerItem\": 0,\n \"maxFindingsPerRequest\": 0\n },\n \"minLikelihood\": \"\",\n \"ruleSet\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"rules\": [\n {\n \"exclusionRule\": {\n \"dictionary\": {},\n \"excludeByHotword\": {\n \"hotwordRegex\": {},\n \"proximity\": {}\n },\n \"excludeInfoTypes\": {\n \"infoTypes\": [\n {}\n ]\n },\n \"matchingType\": \"\",\n \"regex\": {}\n },\n \"hotwordRule\": {}\n }\n ]\n }\n ]\n },\n \"inspectTemplateName\": \"\",\n \"item\": {\n \"byteItem\": {\n \"data\": \"\",\n \"type\": \"\"\n },\n \"table\": {\n \"headers\": [\n {\n \"name\": \"\"\n }\n ],\n \"rows\": [\n {\n \"values\": [\n {\n \"booleanValue\": false,\n \"dateValue\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"dayOfWeekValue\": \"\",\n \"floatValue\": \"\",\n \"integerValue\": \"\",\n \"stringValue\": \"\",\n \"timeValue\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"timestampValue\": \"\"\n }\n ]\n }\n ]\n },\n \"value\": \"\"\n },\n \"locationId\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/v2/:parent/content:inspect"),
Content = new StringContent("{\n \"inspectConfig\": {\n \"contentOptions\": [],\n \"customInfoTypes\": [\n {\n \"detectionRules\": [\n {\n \"hotwordRule\": {\n \"hotwordRegex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n },\n \"likelihoodAdjustment\": {\n \"fixedLikelihood\": \"\",\n \"relativeLikelihood\": 0\n },\n \"proximity\": {\n \"windowAfter\": 0,\n \"windowBefore\": 0\n }\n }\n }\n ],\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {\n \"words\": []\n }\n },\n \"exclusionType\": \"\",\n \"infoType\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"likelihood\": \"\",\n \"regex\": {},\n \"storedType\": {\n \"createTime\": \"\",\n \"name\": \"\"\n },\n \"surrogateType\": {}\n }\n ],\n \"excludeInfoTypes\": false,\n \"includeQuote\": false,\n \"infoTypes\": [\n {}\n ],\n \"limits\": {\n \"maxFindingsPerInfoType\": [\n {\n \"infoType\": {},\n \"maxFindings\": 0\n }\n ],\n \"maxFindingsPerItem\": 0,\n \"maxFindingsPerRequest\": 0\n },\n \"minLikelihood\": \"\",\n \"ruleSet\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"rules\": [\n {\n \"exclusionRule\": {\n \"dictionary\": {},\n \"excludeByHotword\": {\n \"hotwordRegex\": {},\n \"proximity\": {}\n },\n \"excludeInfoTypes\": {\n \"infoTypes\": [\n {}\n ]\n },\n \"matchingType\": \"\",\n \"regex\": {}\n },\n \"hotwordRule\": {}\n }\n ]\n }\n ]\n },\n \"inspectTemplateName\": \"\",\n \"item\": {\n \"byteItem\": {\n \"data\": \"\",\n \"type\": \"\"\n },\n \"table\": {\n \"headers\": [\n {\n \"name\": \"\"\n }\n ],\n \"rows\": [\n {\n \"values\": [\n {\n \"booleanValue\": false,\n \"dateValue\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"dayOfWeekValue\": \"\",\n \"floatValue\": \"\",\n \"integerValue\": \"\",\n \"stringValue\": \"\",\n \"timeValue\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"timestampValue\": \"\"\n }\n ]\n }\n ]\n },\n \"value\": \"\"\n },\n \"locationId\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/:parent/content:inspect");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"inspectConfig\": {\n \"contentOptions\": [],\n \"customInfoTypes\": [\n {\n \"detectionRules\": [\n {\n \"hotwordRule\": {\n \"hotwordRegex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n },\n \"likelihoodAdjustment\": {\n \"fixedLikelihood\": \"\",\n \"relativeLikelihood\": 0\n },\n \"proximity\": {\n \"windowAfter\": 0,\n \"windowBefore\": 0\n }\n }\n }\n ],\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {\n \"words\": []\n }\n },\n \"exclusionType\": \"\",\n \"infoType\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"likelihood\": \"\",\n \"regex\": {},\n \"storedType\": {\n \"createTime\": \"\",\n \"name\": \"\"\n },\n \"surrogateType\": {}\n }\n ],\n \"excludeInfoTypes\": false,\n \"includeQuote\": false,\n \"infoTypes\": [\n {}\n ],\n \"limits\": {\n \"maxFindingsPerInfoType\": [\n {\n \"infoType\": {},\n \"maxFindings\": 0\n }\n ],\n \"maxFindingsPerItem\": 0,\n \"maxFindingsPerRequest\": 0\n },\n \"minLikelihood\": \"\",\n \"ruleSet\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"rules\": [\n {\n \"exclusionRule\": {\n \"dictionary\": {},\n \"excludeByHotword\": {\n \"hotwordRegex\": {},\n \"proximity\": {}\n },\n \"excludeInfoTypes\": {\n \"infoTypes\": [\n {}\n ]\n },\n \"matchingType\": \"\",\n \"regex\": {}\n },\n \"hotwordRule\": {}\n }\n ]\n }\n ]\n },\n \"inspectTemplateName\": \"\",\n \"item\": {\n \"byteItem\": {\n \"data\": \"\",\n \"type\": \"\"\n },\n \"table\": {\n \"headers\": [\n {\n \"name\": \"\"\n }\n ],\n \"rows\": [\n {\n \"values\": [\n {\n \"booleanValue\": false,\n \"dateValue\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"dayOfWeekValue\": \"\",\n \"floatValue\": \"\",\n \"integerValue\": \"\",\n \"stringValue\": \"\",\n \"timeValue\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"timestampValue\": \"\"\n }\n ]\n }\n ]\n },\n \"value\": \"\"\n },\n \"locationId\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/:parent/content:inspect"
payload := strings.NewReader("{\n \"inspectConfig\": {\n \"contentOptions\": [],\n \"customInfoTypes\": [\n {\n \"detectionRules\": [\n {\n \"hotwordRule\": {\n \"hotwordRegex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n },\n \"likelihoodAdjustment\": {\n \"fixedLikelihood\": \"\",\n \"relativeLikelihood\": 0\n },\n \"proximity\": {\n \"windowAfter\": 0,\n \"windowBefore\": 0\n }\n }\n }\n ],\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {\n \"words\": []\n }\n },\n \"exclusionType\": \"\",\n \"infoType\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"likelihood\": \"\",\n \"regex\": {},\n \"storedType\": {\n \"createTime\": \"\",\n \"name\": \"\"\n },\n \"surrogateType\": {}\n }\n ],\n \"excludeInfoTypes\": false,\n \"includeQuote\": false,\n \"infoTypes\": [\n {}\n ],\n \"limits\": {\n \"maxFindingsPerInfoType\": [\n {\n \"infoType\": {},\n \"maxFindings\": 0\n }\n ],\n \"maxFindingsPerItem\": 0,\n \"maxFindingsPerRequest\": 0\n },\n \"minLikelihood\": \"\",\n \"ruleSet\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"rules\": [\n {\n \"exclusionRule\": {\n \"dictionary\": {},\n \"excludeByHotword\": {\n \"hotwordRegex\": {},\n \"proximity\": {}\n },\n \"excludeInfoTypes\": {\n \"infoTypes\": [\n {}\n ]\n },\n \"matchingType\": \"\",\n \"regex\": {}\n },\n \"hotwordRule\": {}\n }\n ]\n }\n ]\n },\n \"inspectTemplateName\": \"\",\n \"item\": {\n \"byteItem\": {\n \"data\": \"\",\n \"type\": \"\"\n },\n \"table\": {\n \"headers\": [\n {\n \"name\": \"\"\n }\n ],\n \"rows\": [\n {\n \"values\": [\n {\n \"booleanValue\": false,\n \"dateValue\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"dayOfWeekValue\": \"\",\n \"floatValue\": \"\",\n \"integerValue\": \"\",\n \"stringValue\": \"\",\n \"timeValue\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"timestampValue\": \"\"\n }\n ]\n }\n ]\n },\n \"value\": \"\"\n },\n \"locationId\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/v2/:parent/content:inspect HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 2707
{
"inspectConfig": {
"contentOptions": [],
"customInfoTypes": [
{
"detectionRules": [
{
"hotwordRule": {
"hotwordRegex": {
"groupIndexes": [],
"pattern": ""
},
"likelihoodAdjustment": {
"fixedLikelihood": "",
"relativeLikelihood": 0
},
"proximity": {
"windowAfter": 0,
"windowBefore": 0
}
}
}
],
"dictionary": {
"cloudStoragePath": {
"path": ""
},
"wordList": {
"words": []
}
},
"exclusionType": "",
"infoType": {
"name": "",
"version": ""
},
"likelihood": "",
"regex": {},
"storedType": {
"createTime": "",
"name": ""
},
"surrogateType": {}
}
],
"excludeInfoTypes": false,
"includeQuote": false,
"infoTypes": [
{}
],
"limits": {
"maxFindingsPerInfoType": [
{
"infoType": {},
"maxFindings": 0
}
],
"maxFindingsPerItem": 0,
"maxFindingsPerRequest": 0
},
"minLikelihood": "",
"ruleSet": [
{
"infoTypes": [
{}
],
"rules": [
{
"exclusionRule": {
"dictionary": {},
"excludeByHotword": {
"hotwordRegex": {},
"proximity": {}
},
"excludeInfoTypes": {
"infoTypes": [
{}
]
},
"matchingType": "",
"regex": {}
},
"hotwordRule": {}
}
]
}
]
},
"inspectTemplateName": "",
"item": {
"byteItem": {
"data": "",
"type": ""
},
"table": {
"headers": [
{
"name": ""
}
],
"rows": [
{
"values": [
{
"booleanValue": false,
"dateValue": {
"day": 0,
"month": 0,
"year": 0
},
"dayOfWeekValue": "",
"floatValue": "",
"integerValue": "",
"stringValue": "",
"timeValue": {
"hours": 0,
"minutes": 0,
"nanos": 0,
"seconds": 0
},
"timestampValue": ""
}
]
}
]
},
"value": ""
},
"locationId": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v2/:parent/content:inspect")
.setHeader("content-type", "application/json")
.setBody("{\n \"inspectConfig\": {\n \"contentOptions\": [],\n \"customInfoTypes\": [\n {\n \"detectionRules\": [\n {\n \"hotwordRule\": {\n \"hotwordRegex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n },\n \"likelihoodAdjustment\": {\n \"fixedLikelihood\": \"\",\n \"relativeLikelihood\": 0\n },\n \"proximity\": {\n \"windowAfter\": 0,\n \"windowBefore\": 0\n }\n }\n }\n ],\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {\n \"words\": []\n }\n },\n \"exclusionType\": \"\",\n \"infoType\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"likelihood\": \"\",\n \"regex\": {},\n \"storedType\": {\n \"createTime\": \"\",\n \"name\": \"\"\n },\n \"surrogateType\": {}\n }\n ],\n \"excludeInfoTypes\": false,\n \"includeQuote\": false,\n \"infoTypes\": [\n {}\n ],\n \"limits\": {\n \"maxFindingsPerInfoType\": [\n {\n \"infoType\": {},\n \"maxFindings\": 0\n }\n ],\n \"maxFindingsPerItem\": 0,\n \"maxFindingsPerRequest\": 0\n },\n \"minLikelihood\": \"\",\n \"ruleSet\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"rules\": [\n {\n \"exclusionRule\": {\n \"dictionary\": {},\n \"excludeByHotword\": {\n \"hotwordRegex\": {},\n \"proximity\": {}\n },\n \"excludeInfoTypes\": {\n \"infoTypes\": [\n {}\n ]\n },\n \"matchingType\": \"\",\n \"regex\": {}\n },\n \"hotwordRule\": {}\n }\n ]\n }\n ]\n },\n \"inspectTemplateName\": \"\",\n \"item\": {\n \"byteItem\": {\n \"data\": \"\",\n \"type\": \"\"\n },\n \"table\": {\n \"headers\": [\n {\n \"name\": \"\"\n }\n ],\n \"rows\": [\n {\n \"values\": [\n {\n \"booleanValue\": false,\n \"dateValue\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"dayOfWeekValue\": \"\",\n \"floatValue\": \"\",\n \"integerValue\": \"\",\n \"stringValue\": \"\",\n \"timeValue\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"timestampValue\": \"\"\n }\n ]\n }\n ]\n },\n \"value\": \"\"\n },\n \"locationId\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/:parent/content:inspect"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"inspectConfig\": {\n \"contentOptions\": [],\n \"customInfoTypes\": [\n {\n \"detectionRules\": [\n {\n \"hotwordRule\": {\n \"hotwordRegex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n },\n \"likelihoodAdjustment\": {\n \"fixedLikelihood\": \"\",\n \"relativeLikelihood\": 0\n },\n \"proximity\": {\n \"windowAfter\": 0,\n \"windowBefore\": 0\n }\n }\n }\n ],\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {\n \"words\": []\n }\n },\n \"exclusionType\": \"\",\n \"infoType\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"likelihood\": \"\",\n \"regex\": {},\n \"storedType\": {\n \"createTime\": \"\",\n \"name\": \"\"\n },\n \"surrogateType\": {}\n }\n ],\n \"excludeInfoTypes\": false,\n \"includeQuote\": false,\n \"infoTypes\": [\n {}\n ],\n \"limits\": {\n \"maxFindingsPerInfoType\": [\n {\n \"infoType\": {},\n \"maxFindings\": 0\n }\n ],\n \"maxFindingsPerItem\": 0,\n \"maxFindingsPerRequest\": 0\n },\n \"minLikelihood\": \"\",\n \"ruleSet\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"rules\": [\n {\n \"exclusionRule\": {\n \"dictionary\": {},\n \"excludeByHotword\": {\n \"hotwordRegex\": {},\n \"proximity\": {}\n },\n \"excludeInfoTypes\": {\n \"infoTypes\": [\n {}\n ]\n },\n \"matchingType\": \"\",\n \"regex\": {}\n },\n \"hotwordRule\": {}\n }\n ]\n }\n ]\n },\n \"inspectTemplateName\": \"\",\n \"item\": {\n \"byteItem\": {\n \"data\": \"\",\n \"type\": \"\"\n },\n \"table\": {\n \"headers\": [\n {\n \"name\": \"\"\n }\n ],\n \"rows\": [\n {\n \"values\": [\n {\n \"booleanValue\": false,\n \"dateValue\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"dayOfWeekValue\": \"\",\n \"floatValue\": \"\",\n \"integerValue\": \"\",\n \"stringValue\": \"\",\n \"timeValue\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"timestampValue\": \"\"\n }\n ]\n }\n ]\n },\n \"value\": \"\"\n },\n \"locationId\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"inspectConfig\": {\n \"contentOptions\": [],\n \"customInfoTypes\": [\n {\n \"detectionRules\": [\n {\n \"hotwordRule\": {\n \"hotwordRegex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n },\n \"likelihoodAdjustment\": {\n \"fixedLikelihood\": \"\",\n \"relativeLikelihood\": 0\n },\n \"proximity\": {\n \"windowAfter\": 0,\n \"windowBefore\": 0\n }\n }\n }\n ],\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {\n \"words\": []\n }\n },\n \"exclusionType\": \"\",\n \"infoType\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"likelihood\": \"\",\n \"regex\": {},\n \"storedType\": {\n \"createTime\": \"\",\n \"name\": \"\"\n },\n \"surrogateType\": {}\n }\n ],\n \"excludeInfoTypes\": false,\n \"includeQuote\": false,\n \"infoTypes\": [\n {}\n ],\n \"limits\": {\n \"maxFindingsPerInfoType\": [\n {\n \"infoType\": {},\n \"maxFindings\": 0\n }\n ],\n \"maxFindingsPerItem\": 0,\n \"maxFindingsPerRequest\": 0\n },\n \"minLikelihood\": \"\",\n \"ruleSet\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"rules\": [\n {\n \"exclusionRule\": {\n \"dictionary\": {},\n \"excludeByHotword\": {\n \"hotwordRegex\": {},\n \"proximity\": {}\n },\n \"excludeInfoTypes\": {\n \"infoTypes\": [\n {}\n ]\n },\n \"matchingType\": \"\",\n \"regex\": {}\n },\n \"hotwordRule\": {}\n }\n ]\n }\n ]\n },\n \"inspectTemplateName\": \"\",\n \"item\": {\n \"byteItem\": {\n \"data\": \"\",\n \"type\": \"\"\n },\n \"table\": {\n \"headers\": [\n {\n \"name\": \"\"\n }\n ],\n \"rows\": [\n {\n \"values\": [\n {\n \"booleanValue\": false,\n \"dateValue\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"dayOfWeekValue\": \"\",\n \"floatValue\": \"\",\n \"integerValue\": \"\",\n \"stringValue\": \"\",\n \"timeValue\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"timestampValue\": \"\"\n }\n ]\n }\n ]\n },\n \"value\": \"\"\n },\n \"locationId\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v2/:parent/content:inspect")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v2/:parent/content:inspect")
.header("content-type", "application/json")
.body("{\n \"inspectConfig\": {\n \"contentOptions\": [],\n \"customInfoTypes\": [\n {\n \"detectionRules\": [\n {\n \"hotwordRule\": {\n \"hotwordRegex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n },\n \"likelihoodAdjustment\": {\n \"fixedLikelihood\": \"\",\n \"relativeLikelihood\": 0\n },\n \"proximity\": {\n \"windowAfter\": 0,\n \"windowBefore\": 0\n }\n }\n }\n ],\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {\n \"words\": []\n }\n },\n \"exclusionType\": \"\",\n \"infoType\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"likelihood\": \"\",\n \"regex\": {},\n \"storedType\": {\n \"createTime\": \"\",\n \"name\": \"\"\n },\n \"surrogateType\": {}\n }\n ],\n \"excludeInfoTypes\": false,\n \"includeQuote\": false,\n \"infoTypes\": [\n {}\n ],\n \"limits\": {\n \"maxFindingsPerInfoType\": [\n {\n \"infoType\": {},\n \"maxFindings\": 0\n }\n ],\n \"maxFindingsPerItem\": 0,\n \"maxFindingsPerRequest\": 0\n },\n \"minLikelihood\": \"\",\n \"ruleSet\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"rules\": [\n {\n \"exclusionRule\": {\n \"dictionary\": {},\n \"excludeByHotword\": {\n \"hotwordRegex\": {},\n \"proximity\": {}\n },\n \"excludeInfoTypes\": {\n \"infoTypes\": [\n {}\n ]\n },\n \"matchingType\": \"\",\n \"regex\": {}\n },\n \"hotwordRule\": {}\n }\n ]\n }\n ]\n },\n \"inspectTemplateName\": \"\",\n \"item\": {\n \"byteItem\": {\n \"data\": \"\",\n \"type\": \"\"\n },\n \"table\": {\n \"headers\": [\n {\n \"name\": \"\"\n }\n ],\n \"rows\": [\n {\n \"values\": [\n {\n \"booleanValue\": false,\n \"dateValue\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"dayOfWeekValue\": \"\",\n \"floatValue\": \"\",\n \"integerValue\": \"\",\n \"stringValue\": \"\",\n \"timeValue\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"timestampValue\": \"\"\n }\n ]\n }\n ]\n },\n \"value\": \"\"\n },\n \"locationId\": \"\"\n}")
.asString();
const data = JSON.stringify({
inspectConfig: {
contentOptions: [],
customInfoTypes: [
{
detectionRules: [
{
hotwordRule: {
hotwordRegex: {
groupIndexes: [],
pattern: ''
},
likelihoodAdjustment: {
fixedLikelihood: '',
relativeLikelihood: 0
},
proximity: {
windowAfter: 0,
windowBefore: 0
}
}
}
],
dictionary: {
cloudStoragePath: {
path: ''
},
wordList: {
words: []
}
},
exclusionType: '',
infoType: {
name: '',
version: ''
},
likelihood: '',
regex: {},
storedType: {
createTime: '',
name: ''
},
surrogateType: {}
}
],
excludeInfoTypes: false,
includeQuote: false,
infoTypes: [
{}
],
limits: {
maxFindingsPerInfoType: [
{
infoType: {},
maxFindings: 0
}
],
maxFindingsPerItem: 0,
maxFindingsPerRequest: 0
},
minLikelihood: '',
ruleSet: [
{
infoTypes: [
{}
],
rules: [
{
exclusionRule: {
dictionary: {},
excludeByHotword: {
hotwordRegex: {},
proximity: {}
},
excludeInfoTypes: {
infoTypes: [
{}
]
},
matchingType: '',
regex: {}
},
hotwordRule: {}
}
]
}
]
},
inspectTemplateName: '',
item: {
byteItem: {
data: '',
type: ''
},
table: {
headers: [
{
name: ''
}
],
rows: [
{
values: [
{
booleanValue: false,
dateValue: {
day: 0,
month: 0,
year: 0
},
dayOfWeekValue: '',
floatValue: '',
integerValue: '',
stringValue: '',
timeValue: {
hours: 0,
minutes: 0,
nanos: 0,
seconds: 0
},
timestampValue: ''
}
]
}
]
},
value: ''
},
locationId: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v2/:parent/content:inspect');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v2/:parent/content:inspect',
headers: {'content-type': 'application/json'},
data: {
inspectConfig: {
contentOptions: [],
customInfoTypes: [
{
detectionRules: [
{
hotwordRule: {
hotwordRegex: {groupIndexes: [], pattern: ''},
likelihoodAdjustment: {fixedLikelihood: '', relativeLikelihood: 0},
proximity: {windowAfter: 0, windowBefore: 0}
}
}
],
dictionary: {cloudStoragePath: {path: ''}, wordList: {words: []}},
exclusionType: '',
infoType: {name: '', version: ''},
likelihood: '',
regex: {},
storedType: {createTime: '', name: ''},
surrogateType: {}
}
],
excludeInfoTypes: false,
includeQuote: false,
infoTypes: [{}],
limits: {
maxFindingsPerInfoType: [{infoType: {}, maxFindings: 0}],
maxFindingsPerItem: 0,
maxFindingsPerRequest: 0
},
minLikelihood: '',
ruleSet: [
{
infoTypes: [{}],
rules: [
{
exclusionRule: {
dictionary: {},
excludeByHotword: {hotwordRegex: {}, proximity: {}},
excludeInfoTypes: {infoTypes: [{}]},
matchingType: '',
regex: {}
},
hotwordRule: {}
}
]
}
]
},
inspectTemplateName: '',
item: {
byteItem: {data: '', type: ''},
table: {
headers: [{name: ''}],
rows: [
{
values: [
{
booleanValue: false,
dateValue: {day: 0, month: 0, year: 0},
dayOfWeekValue: '',
floatValue: '',
integerValue: '',
stringValue: '',
timeValue: {hours: 0, minutes: 0, nanos: 0, seconds: 0},
timestampValue: ''
}
]
}
]
},
value: ''
},
locationId: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/:parent/content:inspect';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"inspectConfig":{"contentOptions":[],"customInfoTypes":[{"detectionRules":[{"hotwordRule":{"hotwordRegex":{"groupIndexes":[],"pattern":""},"likelihoodAdjustment":{"fixedLikelihood":"","relativeLikelihood":0},"proximity":{"windowAfter":0,"windowBefore":0}}}],"dictionary":{"cloudStoragePath":{"path":""},"wordList":{"words":[]}},"exclusionType":"","infoType":{"name":"","version":""},"likelihood":"","regex":{},"storedType":{"createTime":"","name":""},"surrogateType":{}}],"excludeInfoTypes":false,"includeQuote":false,"infoTypes":[{}],"limits":{"maxFindingsPerInfoType":[{"infoType":{},"maxFindings":0}],"maxFindingsPerItem":0,"maxFindingsPerRequest":0},"minLikelihood":"","ruleSet":[{"infoTypes":[{}],"rules":[{"exclusionRule":{"dictionary":{},"excludeByHotword":{"hotwordRegex":{},"proximity":{}},"excludeInfoTypes":{"infoTypes":[{}]},"matchingType":"","regex":{}},"hotwordRule":{}}]}]},"inspectTemplateName":"","item":{"byteItem":{"data":"","type":""},"table":{"headers":[{"name":""}],"rows":[{"values":[{"booleanValue":false,"dateValue":{"day":0,"month":0,"year":0},"dayOfWeekValue":"","floatValue":"","integerValue":"","stringValue":"","timeValue":{"hours":0,"minutes":0,"nanos":0,"seconds":0},"timestampValue":""}]}]},"value":""},"locationId":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v2/:parent/content:inspect',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "inspectConfig": {\n "contentOptions": [],\n "customInfoTypes": [\n {\n "detectionRules": [\n {\n "hotwordRule": {\n "hotwordRegex": {\n "groupIndexes": [],\n "pattern": ""\n },\n "likelihoodAdjustment": {\n "fixedLikelihood": "",\n "relativeLikelihood": 0\n },\n "proximity": {\n "windowAfter": 0,\n "windowBefore": 0\n }\n }\n }\n ],\n "dictionary": {\n "cloudStoragePath": {\n "path": ""\n },\n "wordList": {\n "words": []\n }\n },\n "exclusionType": "",\n "infoType": {\n "name": "",\n "version": ""\n },\n "likelihood": "",\n "regex": {},\n "storedType": {\n "createTime": "",\n "name": ""\n },\n "surrogateType": {}\n }\n ],\n "excludeInfoTypes": false,\n "includeQuote": false,\n "infoTypes": [\n {}\n ],\n "limits": {\n "maxFindingsPerInfoType": [\n {\n "infoType": {},\n "maxFindings": 0\n }\n ],\n "maxFindingsPerItem": 0,\n "maxFindingsPerRequest": 0\n },\n "minLikelihood": "",\n "ruleSet": [\n {\n "infoTypes": [\n {}\n ],\n "rules": [\n {\n "exclusionRule": {\n "dictionary": {},\n "excludeByHotword": {\n "hotwordRegex": {},\n "proximity": {}\n },\n "excludeInfoTypes": {\n "infoTypes": [\n {}\n ]\n },\n "matchingType": "",\n "regex": {}\n },\n "hotwordRule": {}\n }\n ]\n }\n ]\n },\n "inspectTemplateName": "",\n "item": {\n "byteItem": {\n "data": "",\n "type": ""\n },\n "table": {\n "headers": [\n {\n "name": ""\n }\n ],\n "rows": [\n {\n "values": [\n {\n "booleanValue": false,\n "dateValue": {\n "day": 0,\n "month": 0,\n "year": 0\n },\n "dayOfWeekValue": "",\n "floatValue": "",\n "integerValue": "",\n "stringValue": "",\n "timeValue": {\n "hours": 0,\n "minutes": 0,\n "nanos": 0,\n "seconds": 0\n },\n "timestampValue": ""\n }\n ]\n }\n ]\n },\n "value": ""\n },\n "locationId": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"inspectConfig\": {\n \"contentOptions\": [],\n \"customInfoTypes\": [\n {\n \"detectionRules\": [\n {\n \"hotwordRule\": {\n \"hotwordRegex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n },\n \"likelihoodAdjustment\": {\n \"fixedLikelihood\": \"\",\n \"relativeLikelihood\": 0\n },\n \"proximity\": {\n \"windowAfter\": 0,\n \"windowBefore\": 0\n }\n }\n }\n ],\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {\n \"words\": []\n }\n },\n \"exclusionType\": \"\",\n \"infoType\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"likelihood\": \"\",\n \"regex\": {},\n \"storedType\": {\n \"createTime\": \"\",\n \"name\": \"\"\n },\n \"surrogateType\": {}\n }\n ],\n \"excludeInfoTypes\": false,\n \"includeQuote\": false,\n \"infoTypes\": [\n {}\n ],\n \"limits\": {\n \"maxFindingsPerInfoType\": [\n {\n \"infoType\": {},\n \"maxFindings\": 0\n }\n ],\n \"maxFindingsPerItem\": 0,\n \"maxFindingsPerRequest\": 0\n },\n \"minLikelihood\": \"\",\n \"ruleSet\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"rules\": [\n {\n \"exclusionRule\": {\n \"dictionary\": {},\n \"excludeByHotword\": {\n \"hotwordRegex\": {},\n \"proximity\": {}\n },\n \"excludeInfoTypes\": {\n \"infoTypes\": [\n {}\n ]\n },\n \"matchingType\": \"\",\n \"regex\": {}\n },\n \"hotwordRule\": {}\n }\n ]\n }\n ]\n },\n \"inspectTemplateName\": \"\",\n \"item\": {\n \"byteItem\": {\n \"data\": \"\",\n \"type\": \"\"\n },\n \"table\": {\n \"headers\": [\n {\n \"name\": \"\"\n }\n ],\n \"rows\": [\n {\n \"values\": [\n {\n \"booleanValue\": false,\n \"dateValue\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"dayOfWeekValue\": \"\",\n \"floatValue\": \"\",\n \"integerValue\": \"\",\n \"stringValue\": \"\",\n \"timeValue\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"timestampValue\": \"\"\n }\n ]\n }\n ]\n },\n \"value\": \"\"\n },\n \"locationId\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v2/:parent/content:inspect")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/v2/:parent/content:inspect',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
inspectConfig: {
contentOptions: [],
customInfoTypes: [
{
detectionRules: [
{
hotwordRule: {
hotwordRegex: {groupIndexes: [], pattern: ''},
likelihoodAdjustment: {fixedLikelihood: '', relativeLikelihood: 0},
proximity: {windowAfter: 0, windowBefore: 0}
}
}
],
dictionary: {cloudStoragePath: {path: ''}, wordList: {words: []}},
exclusionType: '',
infoType: {name: '', version: ''},
likelihood: '',
regex: {},
storedType: {createTime: '', name: ''},
surrogateType: {}
}
],
excludeInfoTypes: false,
includeQuote: false,
infoTypes: [{}],
limits: {
maxFindingsPerInfoType: [{infoType: {}, maxFindings: 0}],
maxFindingsPerItem: 0,
maxFindingsPerRequest: 0
},
minLikelihood: '',
ruleSet: [
{
infoTypes: [{}],
rules: [
{
exclusionRule: {
dictionary: {},
excludeByHotword: {hotwordRegex: {}, proximity: {}},
excludeInfoTypes: {infoTypes: [{}]},
matchingType: '',
regex: {}
},
hotwordRule: {}
}
]
}
]
},
inspectTemplateName: '',
item: {
byteItem: {data: '', type: ''},
table: {
headers: [{name: ''}],
rows: [
{
values: [
{
booleanValue: false,
dateValue: {day: 0, month: 0, year: 0},
dayOfWeekValue: '',
floatValue: '',
integerValue: '',
stringValue: '',
timeValue: {hours: 0, minutes: 0, nanos: 0, seconds: 0},
timestampValue: ''
}
]
}
]
},
value: ''
},
locationId: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v2/:parent/content:inspect',
headers: {'content-type': 'application/json'},
body: {
inspectConfig: {
contentOptions: [],
customInfoTypes: [
{
detectionRules: [
{
hotwordRule: {
hotwordRegex: {groupIndexes: [], pattern: ''},
likelihoodAdjustment: {fixedLikelihood: '', relativeLikelihood: 0},
proximity: {windowAfter: 0, windowBefore: 0}
}
}
],
dictionary: {cloudStoragePath: {path: ''}, wordList: {words: []}},
exclusionType: '',
infoType: {name: '', version: ''},
likelihood: '',
regex: {},
storedType: {createTime: '', name: ''},
surrogateType: {}
}
],
excludeInfoTypes: false,
includeQuote: false,
infoTypes: [{}],
limits: {
maxFindingsPerInfoType: [{infoType: {}, maxFindings: 0}],
maxFindingsPerItem: 0,
maxFindingsPerRequest: 0
},
minLikelihood: '',
ruleSet: [
{
infoTypes: [{}],
rules: [
{
exclusionRule: {
dictionary: {},
excludeByHotword: {hotwordRegex: {}, proximity: {}},
excludeInfoTypes: {infoTypes: [{}]},
matchingType: '',
regex: {}
},
hotwordRule: {}
}
]
}
]
},
inspectTemplateName: '',
item: {
byteItem: {data: '', type: ''},
table: {
headers: [{name: ''}],
rows: [
{
values: [
{
booleanValue: false,
dateValue: {day: 0, month: 0, year: 0},
dayOfWeekValue: '',
floatValue: '',
integerValue: '',
stringValue: '',
timeValue: {hours: 0, minutes: 0, nanos: 0, seconds: 0},
timestampValue: ''
}
]
}
]
},
value: ''
},
locationId: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/v2/:parent/content:inspect');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
inspectConfig: {
contentOptions: [],
customInfoTypes: [
{
detectionRules: [
{
hotwordRule: {
hotwordRegex: {
groupIndexes: [],
pattern: ''
},
likelihoodAdjustment: {
fixedLikelihood: '',
relativeLikelihood: 0
},
proximity: {
windowAfter: 0,
windowBefore: 0
}
}
}
],
dictionary: {
cloudStoragePath: {
path: ''
},
wordList: {
words: []
}
},
exclusionType: '',
infoType: {
name: '',
version: ''
},
likelihood: '',
regex: {},
storedType: {
createTime: '',
name: ''
},
surrogateType: {}
}
],
excludeInfoTypes: false,
includeQuote: false,
infoTypes: [
{}
],
limits: {
maxFindingsPerInfoType: [
{
infoType: {},
maxFindings: 0
}
],
maxFindingsPerItem: 0,
maxFindingsPerRequest: 0
},
minLikelihood: '',
ruleSet: [
{
infoTypes: [
{}
],
rules: [
{
exclusionRule: {
dictionary: {},
excludeByHotword: {
hotwordRegex: {},
proximity: {}
},
excludeInfoTypes: {
infoTypes: [
{}
]
},
matchingType: '',
regex: {}
},
hotwordRule: {}
}
]
}
]
},
inspectTemplateName: '',
item: {
byteItem: {
data: '',
type: ''
},
table: {
headers: [
{
name: ''
}
],
rows: [
{
values: [
{
booleanValue: false,
dateValue: {
day: 0,
month: 0,
year: 0
},
dayOfWeekValue: '',
floatValue: '',
integerValue: '',
stringValue: '',
timeValue: {
hours: 0,
minutes: 0,
nanos: 0,
seconds: 0
},
timestampValue: ''
}
]
}
]
},
value: ''
},
locationId: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/v2/:parent/content:inspect',
headers: {'content-type': 'application/json'},
data: {
inspectConfig: {
contentOptions: [],
customInfoTypes: [
{
detectionRules: [
{
hotwordRule: {
hotwordRegex: {groupIndexes: [], pattern: ''},
likelihoodAdjustment: {fixedLikelihood: '', relativeLikelihood: 0},
proximity: {windowAfter: 0, windowBefore: 0}
}
}
],
dictionary: {cloudStoragePath: {path: ''}, wordList: {words: []}},
exclusionType: '',
infoType: {name: '', version: ''},
likelihood: '',
regex: {},
storedType: {createTime: '', name: ''},
surrogateType: {}
}
],
excludeInfoTypes: false,
includeQuote: false,
infoTypes: [{}],
limits: {
maxFindingsPerInfoType: [{infoType: {}, maxFindings: 0}],
maxFindingsPerItem: 0,
maxFindingsPerRequest: 0
},
minLikelihood: '',
ruleSet: [
{
infoTypes: [{}],
rules: [
{
exclusionRule: {
dictionary: {},
excludeByHotword: {hotwordRegex: {}, proximity: {}},
excludeInfoTypes: {infoTypes: [{}]},
matchingType: '',
regex: {}
},
hotwordRule: {}
}
]
}
]
},
inspectTemplateName: '',
item: {
byteItem: {data: '', type: ''},
table: {
headers: [{name: ''}],
rows: [
{
values: [
{
booleanValue: false,
dateValue: {day: 0, month: 0, year: 0},
dayOfWeekValue: '',
floatValue: '',
integerValue: '',
stringValue: '',
timeValue: {hours: 0, minutes: 0, nanos: 0, seconds: 0},
timestampValue: ''
}
]
}
]
},
value: ''
},
locationId: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/:parent/content:inspect';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"inspectConfig":{"contentOptions":[],"customInfoTypes":[{"detectionRules":[{"hotwordRule":{"hotwordRegex":{"groupIndexes":[],"pattern":""},"likelihoodAdjustment":{"fixedLikelihood":"","relativeLikelihood":0},"proximity":{"windowAfter":0,"windowBefore":0}}}],"dictionary":{"cloudStoragePath":{"path":""},"wordList":{"words":[]}},"exclusionType":"","infoType":{"name":"","version":""},"likelihood":"","regex":{},"storedType":{"createTime":"","name":""},"surrogateType":{}}],"excludeInfoTypes":false,"includeQuote":false,"infoTypes":[{}],"limits":{"maxFindingsPerInfoType":[{"infoType":{},"maxFindings":0}],"maxFindingsPerItem":0,"maxFindingsPerRequest":0},"minLikelihood":"","ruleSet":[{"infoTypes":[{}],"rules":[{"exclusionRule":{"dictionary":{},"excludeByHotword":{"hotwordRegex":{},"proximity":{}},"excludeInfoTypes":{"infoTypes":[{}]},"matchingType":"","regex":{}},"hotwordRule":{}}]}]},"inspectTemplateName":"","item":{"byteItem":{"data":"","type":""},"table":{"headers":[{"name":""}],"rows":[{"values":[{"booleanValue":false,"dateValue":{"day":0,"month":0,"year":0},"dayOfWeekValue":"","floatValue":"","integerValue":"","stringValue":"","timeValue":{"hours":0,"minutes":0,"nanos":0,"seconds":0},"timestampValue":""}]}]},"value":""},"locationId":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"inspectConfig": @{ @"contentOptions": @[ ], @"customInfoTypes": @[ @{ @"detectionRules": @[ @{ @"hotwordRule": @{ @"hotwordRegex": @{ @"groupIndexes": @[ ], @"pattern": @"" }, @"likelihoodAdjustment": @{ @"fixedLikelihood": @"", @"relativeLikelihood": @0 }, @"proximity": @{ @"windowAfter": @0, @"windowBefore": @0 } } } ], @"dictionary": @{ @"cloudStoragePath": @{ @"path": @"" }, @"wordList": @{ @"words": @[ ] } }, @"exclusionType": @"", @"infoType": @{ @"name": @"", @"version": @"" }, @"likelihood": @"", @"regex": @{ }, @"storedType": @{ @"createTime": @"", @"name": @"" }, @"surrogateType": @{ } } ], @"excludeInfoTypes": @NO, @"includeQuote": @NO, @"infoTypes": @[ @{ } ], @"limits": @{ @"maxFindingsPerInfoType": @[ @{ @"infoType": @{ }, @"maxFindings": @0 } ], @"maxFindingsPerItem": @0, @"maxFindingsPerRequest": @0 }, @"minLikelihood": @"", @"ruleSet": @[ @{ @"infoTypes": @[ @{ } ], @"rules": @[ @{ @"exclusionRule": @{ @"dictionary": @{ }, @"excludeByHotword": @{ @"hotwordRegex": @{ }, @"proximity": @{ } }, @"excludeInfoTypes": @{ @"infoTypes": @[ @{ } ] }, @"matchingType": @"", @"regex": @{ } }, @"hotwordRule": @{ } } ] } ] },
@"inspectTemplateName": @"",
@"item": @{ @"byteItem": @{ @"data": @"", @"type": @"" }, @"table": @{ @"headers": @[ @{ @"name": @"" } ], @"rows": @[ @{ @"values": @[ @{ @"booleanValue": @NO, @"dateValue": @{ @"day": @0, @"month": @0, @"year": @0 }, @"dayOfWeekValue": @"", @"floatValue": @"", @"integerValue": @"", @"stringValue": @"", @"timeValue": @{ @"hours": @0, @"minutes": @0, @"nanos": @0, @"seconds": @0 }, @"timestampValue": @"" } ] } ] }, @"value": @"" },
@"locationId": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v2/:parent/content:inspect"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v2/:parent/content:inspect" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"inspectConfig\": {\n \"contentOptions\": [],\n \"customInfoTypes\": [\n {\n \"detectionRules\": [\n {\n \"hotwordRule\": {\n \"hotwordRegex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n },\n \"likelihoodAdjustment\": {\n \"fixedLikelihood\": \"\",\n \"relativeLikelihood\": 0\n },\n \"proximity\": {\n \"windowAfter\": 0,\n \"windowBefore\": 0\n }\n }\n }\n ],\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {\n \"words\": []\n }\n },\n \"exclusionType\": \"\",\n \"infoType\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"likelihood\": \"\",\n \"regex\": {},\n \"storedType\": {\n \"createTime\": \"\",\n \"name\": \"\"\n },\n \"surrogateType\": {}\n }\n ],\n \"excludeInfoTypes\": false,\n \"includeQuote\": false,\n \"infoTypes\": [\n {}\n ],\n \"limits\": {\n \"maxFindingsPerInfoType\": [\n {\n \"infoType\": {},\n \"maxFindings\": 0\n }\n ],\n \"maxFindingsPerItem\": 0,\n \"maxFindingsPerRequest\": 0\n },\n \"minLikelihood\": \"\",\n \"ruleSet\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"rules\": [\n {\n \"exclusionRule\": {\n \"dictionary\": {},\n \"excludeByHotword\": {\n \"hotwordRegex\": {},\n \"proximity\": {}\n },\n \"excludeInfoTypes\": {\n \"infoTypes\": [\n {}\n ]\n },\n \"matchingType\": \"\",\n \"regex\": {}\n },\n \"hotwordRule\": {}\n }\n ]\n }\n ]\n },\n \"inspectTemplateName\": \"\",\n \"item\": {\n \"byteItem\": {\n \"data\": \"\",\n \"type\": \"\"\n },\n \"table\": {\n \"headers\": [\n {\n \"name\": \"\"\n }\n ],\n \"rows\": [\n {\n \"values\": [\n {\n \"booleanValue\": false,\n \"dateValue\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"dayOfWeekValue\": \"\",\n \"floatValue\": \"\",\n \"integerValue\": \"\",\n \"stringValue\": \"\",\n \"timeValue\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"timestampValue\": \"\"\n }\n ]\n }\n ]\n },\n \"value\": \"\"\n },\n \"locationId\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/:parent/content:inspect",
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([
'inspectConfig' => [
'contentOptions' => [
],
'customInfoTypes' => [
[
'detectionRules' => [
[
'hotwordRule' => [
'hotwordRegex' => [
'groupIndexes' => [
],
'pattern' => ''
],
'likelihoodAdjustment' => [
'fixedLikelihood' => '',
'relativeLikelihood' => 0
],
'proximity' => [
'windowAfter' => 0,
'windowBefore' => 0
]
]
]
],
'dictionary' => [
'cloudStoragePath' => [
'path' => ''
],
'wordList' => [
'words' => [
]
]
],
'exclusionType' => '',
'infoType' => [
'name' => '',
'version' => ''
],
'likelihood' => '',
'regex' => [
],
'storedType' => [
'createTime' => '',
'name' => ''
],
'surrogateType' => [
]
]
],
'excludeInfoTypes' => null,
'includeQuote' => null,
'infoTypes' => [
[
]
],
'limits' => [
'maxFindingsPerInfoType' => [
[
'infoType' => [
],
'maxFindings' => 0
]
],
'maxFindingsPerItem' => 0,
'maxFindingsPerRequest' => 0
],
'minLikelihood' => '',
'ruleSet' => [
[
'infoTypes' => [
[
]
],
'rules' => [
[
'exclusionRule' => [
'dictionary' => [
],
'excludeByHotword' => [
'hotwordRegex' => [
],
'proximity' => [
]
],
'excludeInfoTypes' => [
'infoTypes' => [
[
]
]
],
'matchingType' => '',
'regex' => [
]
],
'hotwordRule' => [
]
]
]
]
]
],
'inspectTemplateName' => '',
'item' => [
'byteItem' => [
'data' => '',
'type' => ''
],
'table' => [
'headers' => [
[
'name' => ''
]
],
'rows' => [
[
'values' => [
[
'booleanValue' => null,
'dateValue' => [
'day' => 0,
'month' => 0,
'year' => 0
],
'dayOfWeekValue' => '',
'floatValue' => '',
'integerValue' => '',
'stringValue' => '',
'timeValue' => [
'hours' => 0,
'minutes' => 0,
'nanos' => 0,
'seconds' => 0
],
'timestampValue' => ''
]
]
]
]
],
'value' => ''
],
'locationId' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/v2/:parent/content:inspect', [
'body' => '{
"inspectConfig": {
"contentOptions": [],
"customInfoTypes": [
{
"detectionRules": [
{
"hotwordRule": {
"hotwordRegex": {
"groupIndexes": [],
"pattern": ""
},
"likelihoodAdjustment": {
"fixedLikelihood": "",
"relativeLikelihood": 0
},
"proximity": {
"windowAfter": 0,
"windowBefore": 0
}
}
}
],
"dictionary": {
"cloudStoragePath": {
"path": ""
},
"wordList": {
"words": []
}
},
"exclusionType": "",
"infoType": {
"name": "",
"version": ""
},
"likelihood": "",
"regex": {},
"storedType": {
"createTime": "",
"name": ""
},
"surrogateType": {}
}
],
"excludeInfoTypes": false,
"includeQuote": false,
"infoTypes": [
{}
],
"limits": {
"maxFindingsPerInfoType": [
{
"infoType": {},
"maxFindings": 0
}
],
"maxFindingsPerItem": 0,
"maxFindingsPerRequest": 0
},
"minLikelihood": "",
"ruleSet": [
{
"infoTypes": [
{}
],
"rules": [
{
"exclusionRule": {
"dictionary": {},
"excludeByHotword": {
"hotwordRegex": {},
"proximity": {}
},
"excludeInfoTypes": {
"infoTypes": [
{}
]
},
"matchingType": "",
"regex": {}
},
"hotwordRule": {}
}
]
}
]
},
"inspectTemplateName": "",
"item": {
"byteItem": {
"data": "",
"type": ""
},
"table": {
"headers": [
{
"name": ""
}
],
"rows": [
{
"values": [
{
"booleanValue": false,
"dateValue": {
"day": 0,
"month": 0,
"year": 0
},
"dayOfWeekValue": "",
"floatValue": "",
"integerValue": "",
"stringValue": "",
"timeValue": {
"hours": 0,
"minutes": 0,
"nanos": 0,
"seconds": 0
},
"timestampValue": ""
}
]
}
]
},
"value": ""
},
"locationId": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v2/:parent/content:inspect');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'inspectConfig' => [
'contentOptions' => [
],
'customInfoTypes' => [
[
'detectionRules' => [
[
'hotwordRule' => [
'hotwordRegex' => [
'groupIndexes' => [
],
'pattern' => ''
],
'likelihoodAdjustment' => [
'fixedLikelihood' => '',
'relativeLikelihood' => 0
],
'proximity' => [
'windowAfter' => 0,
'windowBefore' => 0
]
]
]
],
'dictionary' => [
'cloudStoragePath' => [
'path' => ''
],
'wordList' => [
'words' => [
]
]
],
'exclusionType' => '',
'infoType' => [
'name' => '',
'version' => ''
],
'likelihood' => '',
'regex' => [
],
'storedType' => [
'createTime' => '',
'name' => ''
],
'surrogateType' => [
]
]
],
'excludeInfoTypes' => null,
'includeQuote' => null,
'infoTypes' => [
[
]
],
'limits' => [
'maxFindingsPerInfoType' => [
[
'infoType' => [
],
'maxFindings' => 0
]
],
'maxFindingsPerItem' => 0,
'maxFindingsPerRequest' => 0
],
'minLikelihood' => '',
'ruleSet' => [
[
'infoTypes' => [
[
]
],
'rules' => [
[
'exclusionRule' => [
'dictionary' => [
],
'excludeByHotword' => [
'hotwordRegex' => [
],
'proximity' => [
]
],
'excludeInfoTypes' => [
'infoTypes' => [
[
]
]
],
'matchingType' => '',
'regex' => [
]
],
'hotwordRule' => [
]
]
]
]
]
],
'inspectTemplateName' => '',
'item' => [
'byteItem' => [
'data' => '',
'type' => ''
],
'table' => [
'headers' => [
[
'name' => ''
]
],
'rows' => [
[
'values' => [
[
'booleanValue' => null,
'dateValue' => [
'day' => 0,
'month' => 0,
'year' => 0
],
'dayOfWeekValue' => '',
'floatValue' => '',
'integerValue' => '',
'stringValue' => '',
'timeValue' => [
'hours' => 0,
'minutes' => 0,
'nanos' => 0,
'seconds' => 0
],
'timestampValue' => ''
]
]
]
]
],
'value' => ''
],
'locationId' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'inspectConfig' => [
'contentOptions' => [
],
'customInfoTypes' => [
[
'detectionRules' => [
[
'hotwordRule' => [
'hotwordRegex' => [
'groupIndexes' => [
],
'pattern' => ''
],
'likelihoodAdjustment' => [
'fixedLikelihood' => '',
'relativeLikelihood' => 0
],
'proximity' => [
'windowAfter' => 0,
'windowBefore' => 0
]
]
]
],
'dictionary' => [
'cloudStoragePath' => [
'path' => ''
],
'wordList' => [
'words' => [
]
]
],
'exclusionType' => '',
'infoType' => [
'name' => '',
'version' => ''
],
'likelihood' => '',
'regex' => [
],
'storedType' => [
'createTime' => '',
'name' => ''
],
'surrogateType' => [
]
]
],
'excludeInfoTypes' => null,
'includeQuote' => null,
'infoTypes' => [
[
]
],
'limits' => [
'maxFindingsPerInfoType' => [
[
'infoType' => [
],
'maxFindings' => 0
]
],
'maxFindingsPerItem' => 0,
'maxFindingsPerRequest' => 0
],
'minLikelihood' => '',
'ruleSet' => [
[
'infoTypes' => [
[
]
],
'rules' => [
[
'exclusionRule' => [
'dictionary' => [
],
'excludeByHotword' => [
'hotwordRegex' => [
],
'proximity' => [
]
],
'excludeInfoTypes' => [
'infoTypes' => [
[
]
]
],
'matchingType' => '',
'regex' => [
]
],
'hotwordRule' => [
]
]
]
]
]
],
'inspectTemplateName' => '',
'item' => [
'byteItem' => [
'data' => '',
'type' => ''
],
'table' => [
'headers' => [
[
'name' => ''
]
],
'rows' => [
[
'values' => [
[
'booleanValue' => null,
'dateValue' => [
'day' => 0,
'month' => 0,
'year' => 0
],
'dayOfWeekValue' => '',
'floatValue' => '',
'integerValue' => '',
'stringValue' => '',
'timeValue' => [
'hours' => 0,
'minutes' => 0,
'nanos' => 0,
'seconds' => 0
],
'timestampValue' => ''
]
]
]
]
],
'value' => ''
],
'locationId' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v2/:parent/content:inspect');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v2/:parent/content:inspect' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"inspectConfig": {
"contentOptions": [],
"customInfoTypes": [
{
"detectionRules": [
{
"hotwordRule": {
"hotwordRegex": {
"groupIndexes": [],
"pattern": ""
},
"likelihoodAdjustment": {
"fixedLikelihood": "",
"relativeLikelihood": 0
},
"proximity": {
"windowAfter": 0,
"windowBefore": 0
}
}
}
],
"dictionary": {
"cloudStoragePath": {
"path": ""
},
"wordList": {
"words": []
}
},
"exclusionType": "",
"infoType": {
"name": "",
"version": ""
},
"likelihood": "",
"regex": {},
"storedType": {
"createTime": "",
"name": ""
},
"surrogateType": {}
}
],
"excludeInfoTypes": false,
"includeQuote": false,
"infoTypes": [
{}
],
"limits": {
"maxFindingsPerInfoType": [
{
"infoType": {},
"maxFindings": 0
}
],
"maxFindingsPerItem": 0,
"maxFindingsPerRequest": 0
},
"minLikelihood": "",
"ruleSet": [
{
"infoTypes": [
{}
],
"rules": [
{
"exclusionRule": {
"dictionary": {},
"excludeByHotword": {
"hotwordRegex": {},
"proximity": {}
},
"excludeInfoTypes": {
"infoTypes": [
{}
]
},
"matchingType": "",
"regex": {}
},
"hotwordRule": {}
}
]
}
]
},
"inspectTemplateName": "",
"item": {
"byteItem": {
"data": "",
"type": ""
},
"table": {
"headers": [
{
"name": ""
}
],
"rows": [
{
"values": [
{
"booleanValue": false,
"dateValue": {
"day": 0,
"month": 0,
"year": 0
},
"dayOfWeekValue": "",
"floatValue": "",
"integerValue": "",
"stringValue": "",
"timeValue": {
"hours": 0,
"minutes": 0,
"nanos": 0,
"seconds": 0
},
"timestampValue": ""
}
]
}
]
},
"value": ""
},
"locationId": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/:parent/content:inspect' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"inspectConfig": {
"contentOptions": [],
"customInfoTypes": [
{
"detectionRules": [
{
"hotwordRule": {
"hotwordRegex": {
"groupIndexes": [],
"pattern": ""
},
"likelihoodAdjustment": {
"fixedLikelihood": "",
"relativeLikelihood": 0
},
"proximity": {
"windowAfter": 0,
"windowBefore": 0
}
}
}
],
"dictionary": {
"cloudStoragePath": {
"path": ""
},
"wordList": {
"words": []
}
},
"exclusionType": "",
"infoType": {
"name": "",
"version": ""
},
"likelihood": "",
"regex": {},
"storedType": {
"createTime": "",
"name": ""
},
"surrogateType": {}
}
],
"excludeInfoTypes": false,
"includeQuote": false,
"infoTypes": [
{}
],
"limits": {
"maxFindingsPerInfoType": [
{
"infoType": {},
"maxFindings": 0
}
],
"maxFindingsPerItem": 0,
"maxFindingsPerRequest": 0
},
"minLikelihood": "",
"ruleSet": [
{
"infoTypes": [
{}
],
"rules": [
{
"exclusionRule": {
"dictionary": {},
"excludeByHotword": {
"hotwordRegex": {},
"proximity": {}
},
"excludeInfoTypes": {
"infoTypes": [
{}
]
},
"matchingType": "",
"regex": {}
},
"hotwordRule": {}
}
]
}
]
},
"inspectTemplateName": "",
"item": {
"byteItem": {
"data": "",
"type": ""
},
"table": {
"headers": [
{
"name": ""
}
],
"rows": [
{
"values": [
{
"booleanValue": false,
"dateValue": {
"day": 0,
"month": 0,
"year": 0
},
"dayOfWeekValue": "",
"floatValue": "",
"integerValue": "",
"stringValue": "",
"timeValue": {
"hours": 0,
"minutes": 0,
"nanos": 0,
"seconds": 0
},
"timestampValue": ""
}
]
}
]
},
"value": ""
},
"locationId": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"inspectConfig\": {\n \"contentOptions\": [],\n \"customInfoTypes\": [\n {\n \"detectionRules\": [\n {\n \"hotwordRule\": {\n \"hotwordRegex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n },\n \"likelihoodAdjustment\": {\n \"fixedLikelihood\": \"\",\n \"relativeLikelihood\": 0\n },\n \"proximity\": {\n \"windowAfter\": 0,\n \"windowBefore\": 0\n }\n }\n }\n ],\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {\n \"words\": []\n }\n },\n \"exclusionType\": \"\",\n \"infoType\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"likelihood\": \"\",\n \"regex\": {},\n \"storedType\": {\n \"createTime\": \"\",\n \"name\": \"\"\n },\n \"surrogateType\": {}\n }\n ],\n \"excludeInfoTypes\": false,\n \"includeQuote\": false,\n \"infoTypes\": [\n {}\n ],\n \"limits\": {\n \"maxFindingsPerInfoType\": [\n {\n \"infoType\": {},\n \"maxFindings\": 0\n }\n ],\n \"maxFindingsPerItem\": 0,\n \"maxFindingsPerRequest\": 0\n },\n \"minLikelihood\": \"\",\n \"ruleSet\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"rules\": [\n {\n \"exclusionRule\": {\n \"dictionary\": {},\n \"excludeByHotword\": {\n \"hotwordRegex\": {},\n \"proximity\": {}\n },\n \"excludeInfoTypes\": {\n \"infoTypes\": [\n {}\n ]\n },\n \"matchingType\": \"\",\n \"regex\": {}\n },\n \"hotwordRule\": {}\n }\n ]\n }\n ]\n },\n \"inspectTemplateName\": \"\",\n \"item\": {\n \"byteItem\": {\n \"data\": \"\",\n \"type\": \"\"\n },\n \"table\": {\n \"headers\": [\n {\n \"name\": \"\"\n }\n ],\n \"rows\": [\n {\n \"values\": [\n {\n \"booleanValue\": false,\n \"dateValue\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"dayOfWeekValue\": \"\",\n \"floatValue\": \"\",\n \"integerValue\": \"\",\n \"stringValue\": \"\",\n \"timeValue\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"timestampValue\": \"\"\n }\n ]\n }\n ]\n },\n \"value\": \"\"\n },\n \"locationId\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v2/:parent/content:inspect", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/:parent/content:inspect"
payload = {
"inspectConfig": {
"contentOptions": [],
"customInfoTypes": [
{
"detectionRules": [{ "hotwordRule": {
"hotwordRegex": {
"groupIndexes": [],
"pattern": ""
},
"likelihoodAdjustment": {
"fixedLikelihood": "",
"relativeLikelihood": 0
},
"proximity": {
"windowAfter": 0,
"windowBefore": 0
}
} }],
"dictionary": {
"cloudStoragePath": { "path": "" },
"wordList": { "words": [] }
},
"exclusionType": "",
"infoType": {
"name": "",
"version": ""
},
"likelihood": "",
"regex": {},
"storedType": {
"createTime": "",
"name": ""
},
"surrogateType": {}
}
],
"excludeInfoTypes": False,
"includeQuote": False,
"infoTypes": [{}],
"limits": {
"maxFindingsPerInfoType": [
{
"infoType": {},
"maxFindings": 0
}
],
"maxFindingsPerItem": 0,
"maxFindingsPerRequest": 0
},
"minLikelihood": "",
"ruleSet": [
{
"infoTypes": [{}],
"rules": [
{
"exclusionRule": {
"dictionary": {},
"excludeByHotword": {
"hotwordRegex": {},
"proximity": {}
},
"excludeInfoTypes": { "infoTypes": [{}] },
"matchingType": "",
"regex": {}
},
"hotwordRule": {}
}
]
}
]
},
"inspectTemplateName": "",
"item": {
"byteItem": {
"data": "",
"type": ""
},
"table": {
"headers": [{ "name": "" }],
"rows": [{ "values": [
{
"booleanValue": False,
"dateValue": {
"day": 0,
"month": 0,
"year": 0
},
"dayOfWeekValue": "",
"floatValue": "",
"integerValue": "",
"stringValue": "",
"timeValue": {
"hours": 0,
"minutes": 0,
"nanos": 0,
"seconds": 0
},
"timestampValue": ""
}
] }]
},
"value": ""
},
"locationId": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/:parent/content:inspect"
payload <- "{\n \"inspectConfig\": {\n \"contentOptions\": [],\n \"customInfoTypes\": [\n {\n \"detectionRules\": [\n {\n \"hotwordRule\": {\n \"hotwordRegex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n },\n \"likelihoodAdjustment\": {\n \"fixedLikelihood\": \"\",\n \"relativeLikelihood\": 0\n },\n \"proximity\": {\n \"windowAfter\": 0,\n \"windowBefore\": 0\n }\n }\n }\n ],\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {\n \"words\": []\n }\n },\n \"exclusionType\": \"\",\n \"infoType\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"likelihood\": \"\",\n \"regex\": {},\n \"storedType\": {\n \"createTime\": \"\",\n \"name\": \"\"\n },\n \"surrogateType\": {}\n }\n ],\n \"excludeInfoTypes\": false,\n \"includeQuote\": false,\n \"infoTypes\": [\n {}\n ],\n \"limits\": {\n \"maxFindingsPerInfoType\": [\n {\n \"infoType\": {},\n \"maxFindings\": 0\n }\n ],\n \"maxFindingsPerItem\": 0,\n \"maxFindingsPerRequest\": 0\n },\n \"minLikelihood\": \"\",\n \"ruleSet\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"rules\": [\n {\n \"exclusionRule\": {\n \"dictionary\": {},\n \"excludeByHotword\": {\n \"hotwordRegex\": {},\n \"proximity\": {}\n },\n \"excludeInfoTypes\": {\n \"infoTypes\": [\n {}\n ]\n },\n \"matchingType\": \"\",\n \"regex\": {}\n },\n \"hotwordRule\": {}\n }\n ]\n }\n ]\n },\n \"inspectTemplateName\": \"\",\n \"item\": {\n \"byteItem\": {\n \"data\": \"\",\n \"type\": \"\"\n },\n \"table\": {\n \"headers\": [\n {\n \"name\": \"\"\n }\n ],\n \"rows\": [\n {\n \"values\": [\n {\n \"booleanValue\": false,\n \"dateValue\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"dayOfWeekValue\": \"\",\n \"floatValue\": \"\",\n \"integerValue\": \"\",\n \"stringValue\": \"\",\n \"timeValue\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"timestampValue\": \"\"\n }\n ]\n }\n ]\n },\n \"value\": \"\"\n },\n \"locationId\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/:parent/content:inspect")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"inspectConfig\": {\n \"contentOptions\": [],\n \"customInfoTypes\": [\n {\n \"detectionRules\": [\n {\n \"hotwordRule\": {\n \"hotwordRegex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n },\n \"likelihoodAdjustment\": {\n \"fixedLikelihood\": \"\",\n \"relativeLikelihood\": 0\n },\n \"proximity\": {\n \"windowAfter\": 0,\n \"windowBefore\": 0\n }\n }\n }\n ],\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {\n \"words\": []\n }\n },\n \"exclusionType\": \"\",\n \"infoType\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"likelihood\": \"\",\n \"regex\": {},\n \"storedType\": {\n \"createTime\": \"\",\n \"name\": \"\"\n },\n \"surrogateType\": {}\n }\n ],\n \"excludeInfoTypes\": false,\n \"includeQuote\": false,\n \"infoTypes\": [\n {}\n ],\n \"limits\": {\n \"maxFindingsPerInfoType\": [\n {\n \"infoType\": {},\n \"maxFindings\": 0\n }\n ],\n \"maxFindingsPerItem\": 0,\n \"maxFindingsPerRequest\": 0\n },\n \"minLikelihood\": \"\",\n \"ruleSet\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"rules\": [\n {\n \"exclusionRule\": {\n \"dictionary\": {},\n \"excludeByHotword\": {\n \"hotwordRegex\": {},\n \"proximity\": {}\n },\n \"excludeInfoTypes\": {\n \"infoTypes\": [\n {}\n ]\n },\n \"matchingType\": \"\",\n \"regex\": {}\n },\n \"hotwordRule\": {}\n }\n ]\n }\n ]\n },\n \"inspectTemplateName\": \"\",\n \"item\": {\n \"byteItem\": {\n \"data\": \"\",\n \"type\": \"\"\n },\n \"table\": {\n \"headers\": [\n {\n \"name\": \"\"\n }\n ],\n \"rows\": [\n {\n \"values\": [\n {\n \"booleanValue\": false,\n \"dateValue\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"dayOfWeekValue\": \"\",\n \"floatValue\": \"\",\n \"integerValue\": \"\",\n \"stringValue\": \"\",\n \"timeValue\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"timestampValue\": \"\"\n }\n ]\n }\n ]\n },\n \"value\": \"\"\n },\n \"locationId\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/v2/:parent/content:inspect') do |req|
req.body = "{\n \"inspectConfig\": {\n \"contentOptions\": [],\n \"customInfoTypes\": [\n {\n \"detectionRules\": [\n {\n \"hotwordRule\": {\n \"hotwordRegex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n },\n \"likelihoodAdjustment\": {\n \"fixedLikelihood\": \"\",\n \"relativeLikelihood\": 0\n },\n \"proximity\": {\n \"windowAfter\": 0,\n \"windowBefore\": 0\n }\n }\n }\n ],\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {\n \"words\": []\n }\n },\n \"exclusionType\": \"\",\n \"infoType\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"likelihood\": \"\",\n \"regex\": {},\n \"storedType\": {\n \"createTime\": \"\",\n \"name\": \"\"\n },\n \"surrogateType\": {}\n }\n ],\n \"excludeInfoTypes\": false,\n \"includeQuote\": false,\n \"infoTypes\": [\n {}\n ],\n \"limits\": {\n \"maxFindingsPerInfoType\": [\n {\n \"infoType\": {},\n \"maxFindings\": 0\n }\n ],\n \"maxFindingsPerItem\": 0,\n \"maxFindingsPerRequest\": 0\n },\n \"minLikelihood\": \"\",\n \"ruleSet\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"rules\": [\n {\n \"exclusionRule\": {\n \"dictionary\": {},\n \"excludeByHotword\": {\n \"hotwordRegex\": {},\n \"proximity\": {}\n },\n \"excludeInfoTypes\": {\n \"infoTypes\": [\n {}\n ]\n },\n \"matchingType\": \"\",\n \"regex\": {}\n },\n \"hotwordRule\": {}\n }\n ]\n }\n ]\n },\n \"inspectTemplateName\": \"\",\n \"item\": {\n \"byteItem\": {\n \"data\": \"\",\n \"type\": \"\"\n },\n \"table\": {\n \"headers\": [\n {\n \"name\": \"\"\n }\n ],\n \"rows\": [\n {\n \"values\": [\n {\n \"booleanValue\": false,\n \"dateValue\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"dayOfWeekValue\": \"\",\n \"floatValue\": \"\",\n \"integerValue\": \"\",\n \"stringValue\": \"\",\n \"timeValue\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"timestampValue\": \"\"\n }\n ]\n }\n ]\n },\n \"value\": \"\"\n },\n \"locationId\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v2/:parent/content:inspect";
let payload = json!({
"inspectConfig": json!({
"contentOptions": (),
"customInfoTypes": (
json!({
"detectionRules": (json!({"hotwordRule": json!({
"hotwordRegex": json!({
"groupIndexes": (),
"pattern": ""
}),
"likelihoodAdjustment": json!({
"fixedLikelihood": "",
"relativeLikelihood": 0
}),
"proximity": json!({
"windowAfter": 0,
"windowBefore": 0
})
})})),
"dictionary": json!({
"cloudStoragePath": json!({"path": ""}),
"wordList": json!({"words": ()})
}),
"exclusionType": "",
"infoType": json!({
"name": "",
"version": ""
}),
"likelihood": "",
"regex": json!({}),
"storedType": json!({
"createTime": "",
"name": ""
}),
"surrogateType": json!({})
})
),
"excludeInfoTypes": false,
"includeQuote": false,
"infoTypes": (json!({})),
"limits": json!({
"maxFindingsPerInfoType": (
json!({
"infoType": json!({}),
"maxFindings": 0
})
),
"maxFindingsPerItem": 0,
"maxFindingsPerRequest": 0
}),
"minLikelihood": "",
"ruleSet": (
json!({
"infoTypes": (json!({})),
"rules": (
json!({
"exclusionRule": json!({
"dictionary": json!({}),
"excludeByHotword": json!({
"hotwordRegex": json!({}),
"proximity": json!({})
}),
"excludeInfoTypes": json!({"infoTypes": (json!({}))}),
"matchingType": "",
"regex": json!({})
}),
"hotwordRule": json!({})
})
)
})
)
}),
"inspectTemplateName": "",
"item": json!({
"byteItem": json!({
"data": "",
"type": ""
}),
"table": json!({
"headers": (json!({"name": ""})),
"rows": (json!({"values": (
json!({
"booleanValue": false,
"dateValue": json!({
"day": 0,
"month": 0,
"year": 0
}),
"dayOfWeekValue": "",
"floatValue": "",
"integerValue": "",
"stringValue": "",
"timeValue": json!({
"hours": 0,
"minutes": 0,
"nanos": 0,
"seconds": 0
}),
"timestampValue": ""
})
)}))
}),
"value": ""
}),
"locationId": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/v2/:parent/content:inspect \
--header 'content-type: application/json' \
--data '{
"inspectConfig": {
"contentOptions": [],
"customInfoTypes": [
{
"detectionRules": [
{
"hotwordRule": {
"hotwordRegex": {
"groupIndexes": [],
"pattern": ""
},
"likelihoodAdjustment": {
"fixedLikelihood": "",
"relativeLikelihood": 0
},
"proximity": {
"windowAfter": 0,
"windowBefore": 0
}
}
}
],
"dictionary": {
"cloudStoragePath": {
"path": ""
},
"wordList": {
"words": []
}
},
"exclusionType": "",
"infoType": {
"name": "",
"version": ""
},
"likelihood": "",
"regex": {},
"storedType": {
"createTime": "",
"name": ""
},
"surrogateType": {}
}
],
"excludeInfoTypes": false,
"includeQuote": false,
"infoTypes": [
{}
],
"limits": {
"maxFindingsPerInfoType": [
{
"infoType": {},
"maxFindings": 0
}
],
"maxFindingsPerItem": 0,
"maxFindingsPerRequest": 0
},
"minLikelihood": "",
"ruleSet": [
{
"infoTypes": [
{}
],
"rules": [
{
"exclusionRule": {
"dictionary": {},
"excludeByHotword": {
"hotwordRegex": {},
"proximity": {}
},
"excludeInfoTypes": {
"infoTypes": [
{}
]
},
"matchingType": "",
"regex": {}
},
"hotwordRule": {}
}
]
}
]
},
"inspectTemplateName": "",
"item": {
"byteItem": {
"data": "",
"type": ""
},
"table": {
"headers": [
{
"name": ""
}
],
"rows": [
{
"values": [
{
"booleanValue": false,
"dateValue": {
"day": 0,
"month": 0,
"year": 0
},
"dayOfWeekValue": "",
"floatValue": "",
"integerValue": "",
"stringValue": "",
"timeValue": {
"hours": 0,
"minutes": 0,
"nanos": 0,
"seconds": 0
},
"timestampValue": ""
}
]
}
]
},
"value": ""
},
"locationId": ""
}'
echo '{
"inspectConfig": {
"contentOptions": [],
"customInfoTypes": [
{
"detectionRules": [
{
"hotwordRule": {
"hotwordRegex": {
"groupIndexes": [],
"pattern": ""
},
"likelihoodAdjustment": {
"fixedLikelihood": "",
"relativeLikelihood": 0
},
"proximity": {
"windowAfter": 0,
"windowBefore": 0
}
}
}
],
"dictionary": {
"cloudStoragePath": {
"path": ""
},
"wordList": {
"words": []
}
},
"exclusionType": "",
"infoType": {
"name": "",
"version": ""
},
"likelihood": "",
"regex": {},
"storedType": {
"createTime": "",
"name": ""
},
"surrogateType": {}
}
],
"excludeInfoTypes": false,
"includeQuote": false,
"infoTypes": [
{}
],
"limits": {
"maxFindingsPerInfoType": [
{
"infoType": {},
"maxFindings": 0
}
],
"maxFindingsPerItem": 0,
"maxFindingsPerRequest": 0
},
"minLikelihood": "",
"ruleSet": [
{
"infoTypes": [
{}
],
"rules": [
{
"exclusionRule": {
"dictionary": {},
"excludeByHotword": {
"hotwordRegex": {},
"proximity": {}
},
"excludeInfoTypes": {
"infoTypes": [
{}
]
},
"matchingType": "",
"regex": {}
},
"hotwordRule": {}
}
]
}
]
},
"inspectTemplateName": "",
"item": {
"byteItem": {
"data": "",
"type": ""
},
"table": {
"headers": [
{
"name": ""
}
],
"rows": [
{
"values": [
{
"booleanValue": false,
"dateValue": {
"day": 0,
"month": 0,
"year": 0
},
"dayOfWeekValue": "",
"floatValue": "",
"integerValue": "",
"stringValue": "",
"timeValue": {
"hours": 0,
"minutes": 0,
"nanos": 0,
"seconds": 0
},
"timestampValue": ""
}
]
}
]
},
"value": ""
},
"locationId": ""
}' | \
http POST {{baseUrl}}/v2/:parent/content:inspect \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "inspectConfig": {\n "contentOptions": [],\n "customInfoTypes": [\n {\n "detectionRules": [\n {\n "hotwordRule": {\n "hotwordRegex": {\n "groupIndexes": [],\n "pattern": ""\n },\n "likelihoodAdjustment": {\n "fixedLikelihood": "",\n "relativeLikelihood": 0\n },\n "proximity": {\n "windowAfter": 0,\n "windowBefore": 0\n }\n }\n }\n ],\n "dictionary": {\n "cloudStoragePath": {\n "path": ""\n },\n "wordList": {\n "words": []\n }\n },\n "exclusionType": "",\n "infoType": {\n "name": "",\n "version": ""\n },\n "likelihood": "",\n "regex": {},\n "storedType": {\n "createTime": "",\n "name": ""\n },\n "surrogateType": {}\n }\n ],\n "excludeInfoTypes": false,\n "includeQuote": false,\n "infoTypes": [\n {}\n ],\n "limits": {\n "maxFindingsPerInfoType": [\n {\n "infoType": {},\n "maxFindings": 0\n }\n ],\n "maxFindingsPerItem": 0,\n "maxFindingsPerRequest": 0\n },\n "minLikelihood": "",\n "ruleSet": [\n {\n "infoTypes": [\n {}\n ],\n "rules": [\n {\n "exclusionRule": {\n "dictionary": {},\n "excludeByHotword": {\n "hotwordRegex": {},\n "proximity": {}\n },\n "excludeInfoTypes": {\n "infoTypes": [\n {}\n ]\n },\n "matchingType": "",\n "regex": {}\n },\n "hotwordRule": {}\n }\n ]\n }\n ]\n },\n "inspectTemplateName": "",\n "item": {\n "byteItem": {\n "data": "",\n "type": ""\n },\n "table": {\n "headers": [\n {\n "name": ""\n }\n ],\n "rows": [\n {\n "values": [\n {\n "booleanValue": false,\n "dateValue": {\n "day": 0,\n "month": 0,\n "year": 0\n },\n "dayOfWeekValue": "",\n "floatValue": "",\n "integerValue": "",\n "stringValue": "",\n "timeValue": {\n "hours": 0,\n "minutes": 0,\n "nanos": 0,\n "seconds": 0\n },\n "timestampValue": ""\n }\n ]\n }\n ]\n },\n "value": ""\n },\n "locationId": ""\n}' \
--output-document \
- {{baseUrl}}/v2/:parent/content:inspect
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"inspectConfig": [
"contentOptions": [],
"customInfoTypes": [
[
"detectionRules": [["hotwordRule": [
"hotwordRegex": [
"groupIndexes": [],
"pattern": ""
],
"likelihoodAdjustment": [
"fixedLikelihood": "",
"relativeLikelihood": 0
],
"proximity": [
"windowAfter": 0,
"windowBefore": 0
]
]]],
"dictionary": [
"cloudStoragePath": ["path": ""],
"wordList": ["words": []]
],
"exclusionType": "",
"infoType": [
"name": "",
"version": ""
],
"likelihood": "",
"regex": [],
"storedType": [
"createTime": "",
"name": ""
],
"surrogateType": []
]
],
"excludeInfoTypes": false,
"includeQuote": false,
"infoTypes": [[]],
"limits": [
"maxFindingsPerInfoType": [
[
"infoType": [],
"maxFindings": 0
]
],
"maxFindingsPerItem": 0,
"maxFindingsPerRequest": 0
],
"minLikelihood": "",
"ruleSet": [
[
"infoTypes": [[]],
"rules": [
[
"exclusionRule": [
"dictionary": [],
"excludeByHotword": [
"hotwordRegex": [],
"proximity": []
],
"excludeInfoTypes": ["infoTypes": [[]]],
"matchingType": "",
"regex": []
],
"hotwordRule": []
]
]
]
]
],
"inspectTemplateName": "",
"item": [
"byteItem": [
"data": "",
"type": ""
],
"table": [
"headers": [["name": ""]],
"rows": [["values": [
[
"booleanValue": false,
"dateValue": [
"day": 0,
"month": 0,
"year": 0
],
"dayOfWeekValue": "",
"floatValue": "",
"integerValue": "",
"stringValue": "",
"timeValue": [
"hours": 0,
"minutes": 0,
"nanos": 0,
"seconds": 0
],
"timestampValue": ""
]
]]]
],
"value": ""
],
"locationId": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/:parent/content:inspect")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
dlp.projects.locations.content.reidentify
{{baseUrl}}/v2/:parent/content:reidentify
QUERY PARAMS
parent
BODY json
{
"inspectConfig": {
"contentOptions": [],
"customInfoTypes": [
{
"detectionRules": [
{
"hotwordRule": {
"hotwordRegex": {
"groupIndexes": [],
"pattern": ""
},
"likelihoodAdjustment": {
"fixedLikelihood": "",
"relativeLikelihood": 0
},
"proximity": {
"windowAfter": 0,
"windowBefore": 0
}
}
}
],
"dictionary": {
"cloudStoragePath": {
"path": ""
},
"wordList": {
"words": []
}
},
"exclusionType": "",
"infoType": {
"name": "",
"version": ""
},
"likelihood": "",
"regex": {},
"storedType": {
"createTime": "",
"name": ""
},
"surrogateType": {}
}
],
"excludeInfoTypes": false,
"includeQuote": false,
"infoTypes": [
{}
],
"limits": {
"maxFindingsPerInfoType": [
{
"infoType": {},
"maxFindings": 0
}
],
"maxFindingsPerItem": 0,
"maxFindingsPerRequest": 0
},
"minLikelihood": "",
"ruleSet": [
{
"infoTypes": [
{}
],
"rules": [
{
"exclusionRule": {
"dictionary": {},
"excludeByHotword": {
"hotwordRegex": {},
"proximity": {}
},
"excludeInfoTypes": {
"infoTypes": [
{}
]
},
"matchingType": "",
"regex": {}
},
"hotwordRule": {}
}
]
}
]
},
"inspectTemplateName": "",
"item": {
"byteItem": {
"data": "",
"type": ""
},
"table": {
"headers": [
{
"name": ""
}
],
"rows": [
{
"values": [
{
"booleanValue": false,
"dateValue": {
"day": 0,
"month": 0,
"year": 0
},
"dayOfWeekValue": "",
"floatValue": "",
"integerValue": "",
"stringValue": "",
"timeValue": {
"hours": 0,
"minutes": 0,
"nanos": 0,
"seconds": 0
},
"timestampValue": ""
}
]
}
]
},
"value": ""
},
"locationId": "",
"reidentifyConfig": {
"imageTransformations": {
"transforms": [
{
"allInfoTypes": {},
"allText": {},
"redactionColor": {
"blue": "",
"green": "",
"red": ""
},
"selectedInfoTypes": {
"infoTypes": [
{}
]
}
}
]
},
"infoTypeTransformations": {
"transformations": [
{
"infoTypes": [
{}
],
"primitiveTransformation": {
"bucketingConfig": {
"buckets": [
{
"max": {},
"min": {},
"replacementValue": {}
}
]
},
"characterMaskConfig": {
"charactersToIgnore": [
{
"charactersToSkip": "",
"commonCharactersToIgnore": ""
}
],
"maskingCharacter": "",
"numberToMask": 0,
"reverseOrder": false
},
"cryptoDeterministicConfig": {
"context": {},
"cryptoKey": {
"kmsWrapped": {
"cryptoKeyName": "",
"wrappedKey": ""
},
"transient": {
"name": ""
},
"unwrapped": {
"key": ""
}
},
"surrogateInfoType": {}
},
"cryptoHashConfig": {
"cryptoKey": {}
},
"cryptoReplaceFfxFpeConfig": {
"commonAlphabet": "",
"context": {},
"cryptoKey": {},
"customAlphabet": "",
"radix": 0,
"surrogateInfoType": {}
},
"dateShiftConfig": {
"context": {},
"cryptoKey": {},
"lowerBoundDays": 0,
"upperBoundDays": 0
},
"fixedSizeBucketingConfig": {
"bucketSize": "",
"lowerBound": {},
"upperBound": {}
},
"redactConfig": {},
"replaceConfig": {
"newValue": {}
},
"replaceDictionaryConfig": {
"wordList": {}
},
"replaceWithInfoTypeConfig": {},
"timePartConfig": {
"partToExtract": ""
}
}
}
]
},
"recordTransformations": {
"fieldTransformations": [
{
"condition": {
"expressions": {
"conditions": {
"conditions": [
{
"field": {},
"operator": "",
"value": {}
}
]
},
"logicalOperator": ""
}
},
"fields": [
{}
],
"infoTypeTransformations": {},
"primitiveTransformation": {}
}
],
"recordSuppressions": [
{
"condition": {}
}
]
},
"transformationErrorHandling": {
"leaveUntransformed": {},
"throwError": {}
}
},
"reidentifyTemplateName": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/:parent/content:reidentify");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"inspectConfig\": {\n \"contentOptions\": [],\n \"customInfoTypes\": [\n {\n \"detectionRules\": [\n {\n \"hotwordRule\": {\n \"hotwordRegex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n },\n \"likelihoodAdjustment\": {\n \"fixedLikelihood\": \"\",\n \"relativeLikelihood\": 0\n },\n \"proximity\": {\n \"windowAfter\": 0,\n \"windowBefore\": 0\n }\n }\n }\n ],\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {\n \"words\": []\n }\n },\n \"exclusionType\": \"\",\n \"infoType\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"likelihood\": \"\",\n \"regex\": {},\n \"storedType\": {\n \"createTime\": \"\",\n \"name\": \"\"\n },\n \"surrogateType\": {}\n }\n ],\n \"excludeInfoTypes\": false,\n \"includeQuote\": false,\n \"infoTypes\": [\n {}\n ],\n \"limits\": {\n \"maxFindingsPerInfoType\": [\n {\n \"infoType\": {},\n \"maxFindings\": 0\n }\n ],\n \"maxFindingsPerItem\": 0,\n \"maxFindingsPerRequest\": 0\n },\n \"minLikelihood\": \"\",\n \"ruleSet\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"rules\": [\n {\n \"exclusionRule\": {\n \"dictionary\": {},\n \"excludeByHotword\": {\n \"hotwordRegex\": {},\n \"proximity\": {}\n },\n \"excludeInfoTypes\": {\n \"infoTypes\": [\n {}\n ]\n },\n \"matchingType\": \"\",\n \"regex\": {}\n },\n \"hotwordRule\": {}\n }\n ]\n }\n ]\n },\n \"inspectTemplateName\": \"\",\n \"item\": {\n \"byteItem\": {\n \"data\": \"\",\n \"type\": \"\"\n },\n \"table\": {\n \"headers\": [\n {\n \"name\": \"\"\n }\n ],\n \"rows\": [\n {\n \"values\": [\n {\n \"booleanValue\": false,\n \"dateValue\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"dayOfWeekValue\": \"\",\n \"floatValue\": \"\",\n \"integerValue\": \"\",\n \"stringValue\": \"\",\n \"timeValue\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"timestampValue\": \"\"\n }\n ]\n }\n ]\n },\n \"value\": \"\"\n },\n \"locationId\": \"\",\n \"reidentifyConfig\": {\n \"imageTransformations\": {\n \"transforms\": [\n {\n \"allInfoTypes\": {},\n \"allText\": {},\n \"redactionColor\": {\n \"blue\": \"\",\n \"green\": \"\",\n \"red\": \"\"\n },\n \"selectedInfoTypes\": {\n \"infoTypes\": [\n {}\n ]\n }\n }\n ]\n },\n \"infoTypeTransformations\": {\n \"transformations\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"primitiveTransformation\": {\n \"bucketingConfig\": {\n \"buckets\": [\n {\n \"max\": {},\n \"min\": {},\n \"replacementValue\": {}\n }\n ]\n },\n \"characterMaskConfig\": {\n \"charactersToIgnore\": [\n {\n \"charactersToSkip\": \"\",\n \"commonCharactersToIgnore\": \"\"\n }\n ],\n \"maskingCharacter\": \"\",\n \"numberToMask\": 0,\n \"reverseOrder\": false\n },\n \"cryptoDeterministicConfig\": {\n \"context\": {},\n \"cryptoKey\": {\n \"kmsWrapped\": {\n \"cryptoKeyName\": \"\",\n \"wrappedKey\": \"\"\n },\n \"transient\": {\n \"name\": \"\"\n },\n \"unwrapped\": {\n \"key\": \"\"\n }\n },\n \"surrogateInfoType\": {}\n },\n \"cryptoHashConfig\": {\n \"cryptoKey\": {}\n },\n \"cryptoReplaceFfxFpeConfig\": {\n \"commonAlphabet\": \"\",\n \"context\": {},\n \"cryptoKey\": {},\n \"customAlphabet\": \"\",\n \"radix\": 0,\n \"surrogateInfoType\": {}\n },\n \"dateShiftConfig\": {\n \"context\": {},\n \"cryptoKey\": {},\n \"lowerBoundDays\": 0,\n \"upperBoundDays\": 0\n },\n \"fixedSizeBucketingConfig\": {\n \"bucketSize\": \"\",\n \"lowerBound\": {},\n \"upperBound\": {}\n },\n \"redactConfig\": {},\n \"replaceConfig\": {\n \"newValue\": {}\n },\n \"replaceDictionaryConfig\": {\n \"wordList\": {}\n },\n \"replaceWithInfoTypeConfig\": {},\n \"timePartConfig\": {\n \"partToExtract\": \"\"\n }\n }\n }\n ]\n },\n \"recordTransformations\": {\n \"fieldTransformations\": [\n {\n \"condition\": {\n \"expressions\": {\n \"conditions\": {\n \"conditions\": [\n {\n \"field\": {},\n \"operator\": \"\",\n \"value\": {}\n }\n ]\n },\n \"logicalOperator\": \"\"\n }\n },\n \"fields\": [\n {}\n ],\n \"infoTypeTransformations\": {},\n \"primitiveTransformation\": {}\n }\n ],\n \"recordSuppressions\": [\n {\n \"condition\": {}\n }\n ]\n },\n \"transformationErrorHandling\": {\n \"leaveUntransformed\": {},\n \"throwError\": {}\n }\n },\n \"reidentifyTemplateName\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v2/:parent/content:reidentify" {:content-type :json
:form-params {:inspectConfig {:contentOptions []
:customInfoTypes [{:detectionRules [{:hotwordRule {:hotwordRegex {:groupIndexes []
:pattern ""}
:likelihoodAdjustment {:fixedLikelihood ""
:relativeLikelihood 0}
:proximity {:windowAfter 0
:windowBefore 0}}}]
:dictionary {:cloudStoragePath {:path ""}
:wordList {:words []}}
:exclusionType ""
:infoType {:name ""
:version ""}
:likelihood ""
:regex {}
:storedType {:createTime ""
:name ""}
:surrogateType {}}]
:excludeInfoTypes false
:includeQuote false
:infoTypes [{}]
:limits {:maxFindingsPerInfoType [{:infoType {}
:maxFindings 0}]
:maxFindingsPerItem 0
:maxFindingsPerRequest 0}
:minLikelihood ""
:ruleSet [{:infoTypes [{}]
:rules [{:exclusionRule {:dictionary {}
:excludeByHotword {:hotwordRegex {}
:proximity {}}
:excludeInfoTypes {:infoTypes [{}]}
:matchingType ""
:regex {}}
:hotwordRule {}}]}]}
:inspectTemplateName ""
:item {:byteItem {:data ""
:type ""}
:table {:headers [{:name ""}]
:rows [{:values [{:booleanValue false
:dateValue {:day 0
:month 0
:year 0}
:dayOfWeekValue ""
:floatValue ""
:integerValue ""
:stringValue ""
:timeValue {:hours 0
:minutes 0
:nanos 0
:seconds 0}
:timestampValue ""}]}]}
:value ""}
:locationId ""
:reidentifyConfig {:imageTransformations {:transforms [{:allInfoTypes {}
:allText {}
:redactionColor {:blue ""
:green ""
:red ""}
:selectedInfoTypes {:infoTypes [{}]}}]}
:infoTypeTransformations {:transformations [{:infoTypes [{}]
:primitiveTransformation {:bucketingConfig {:buckets [{:max {}
:min {}
:replacementValue {}}]}
:characterMaskConfig {:charactersToIgnore [{:charactersToSkip ""
:commonCharactersToIgnore ""}]
:maskingCharacter ""
:numberToMask 0
:reverseOrder false}
:cryptoDeterministicConfig {:context {}
:cryptoKey {:kmsWrapped {:cryptoKeyName ""
:wrappedKey ""}
:transient {:name ""}
:unwrapped {:key ""}}
:surrogateInfoType {}}
:cryptoHashConfig {:cryptoKey {}}
:cryptoReplaceFfxFpeConfig {:commonAlphabet ""
:context {}
:cryptoKey {}
:customAlphabet ""
:radix 0
:surrogateInfoType {}}
:dateShiftConfig {:context {}
:cryptoKey {}
:lowerBoundDays 0
:upperBoundDays 0}
:fixedSizeBucketingConfig {:bucketSize ""
:lowerBound {}
:upperBound {}}
:redactConfig {}
:replaceConfig {:newValue {}}
:replaceDictionaryConfig {:wordList {}}
:replaceWithInfoTypeConfig {}
:timePartConfig {:partToExtract ""}}}]}
:recordTransformations {:fieldTransformations [{:condition {:expressions {:conditions {:conditions [{:field {}
:operator ""
:value {}}]}
:logicalOperator ""}}
:fields [{}]
:infoTypeTransformations {}
:primitiveTransformation {}}]
:recordSuppressions [{:condition {}}]}
:transformationErrorHandling {:leaveUntransformed {}
:throwError {}}}
:reidentifyTemplateName ""}})
require "http/client"
url = "{{baseUrl}}/v2/:parent/content:reidentify"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"inspectConfig\": {\n \"contentOptions\": [],\n \"customInfoTypes\": [\n {\n \"detectionRules\": [\n {\n \"hotwordRule\": {\n \"hotwordRegex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n },\n \"likelihoodAdjustment\": {\n \"fixedLikelihood\": \"\",\n \"relativeLikelihood\": 0\n },\n \"proximity\": {\n \"windowAfter\": 0,\n \"windowBefore\": 0\n }\n }\n }\n ],\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {\n \"words\": []\n }\n },\n \"exclusionType\": \"\",\n \"infoType\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"likelihood\": \"\",\n \"regex\": {},\n \"storedType\": {\n \"createTime\": \"\",\n \"name\": \"\"\n },\n \"surrogateType\": {}\n }\n ],\n \"excludeInfoTypes\": false,\n \"includeQuote\": false,\n \"infoTypes\": [\n {}\n ],\n \"limits\": {\n \"maxFindingsPerInfoType\": [\n {\n \"infoType\": {},\n \"maxFindings\": 0\n }\n ],\n \"maxFindingsPerItem\": 0,\n \"maxFindingsPerRequest\": 0\n },\n \"minLikelihood\": \"\",\n \"ruleSet\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"rules\": [\n {\n \"exclusionRule\": {\n \"dictionary\": {},\n \"excludeByHotword\": {\n \"hotwordRegex\": {},\n \"proximity\": {}\n },\n \"excludeInfoTypes\": {\n \"infoTypes\": [\n {}\n ]\n },\n \"matchingType\": \"\",\n \"regex\": {}\n },\n \"hotwordRule\": {}\n }\n ]\n }\n ]\n },\n \"inspectTemplateName\": \"\",\n \"item\": {\n \"byteItem\": {\n \"data\": \"\",\n \"type\": \"\"\n },\n \"table\": {\n \"headers\": [\n {\n \"name\": \"\"\n }\n ],\n \"rows\": [\n {\n \"values\": [\n {\n \"booleanValue\": false,\n \"dateValue\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"dayOfWeekValue\": \"\",\n \"floatValue\": \"\",\n \"integerValue\": \"\",\n \"stringValue\": \"\",\n \"timeValue\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"timestampValue\": \"\"\n }\n ]\n }\n ]\n },\n \"value\": \"\"\n },\n \"locationId\": \"\",\n \"reidentifyConfig\": {\n \"imageTransformations\": {\n \"transforms\": [\n {\n \"allInfoTypes\": {},\n \"allText\": {},\n \"redactionColor\": {\n \"blue\": \"\",\n \"green\": \"\",\n \"red\": \"\"\n },\n \"selectedInfoTypes\": {\n \"infoTypes\": [\n {}\n ]\n }\n }\n ]\n },\n \"infoTypeTransformations\": {\n \"transformations\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"primitiveTransformation\": {\n \"bucketingConfig\": {\n \"buckets\": [\n {\n \"max\": {},\n \"min\": {},\n \"replacementValue\": {}\n }\n ]\n },\n \"characterMaskConfig\": {\n \"charactersToIgnore\": [\n {\n \"charactersToSkip\": \"\",\n \"commonCharactersToIgnore\": \"\"\n }\n ],\n \"maskingCharacter\": \"\",\n \"numberToMask\": 0,\n \"reverseOrder\": false\n },\n \"cryptoDeterministicConfig\": {\n \"context\": {},\n \"cryptoKey\": {\n \"kmsWrapped\": {\n \"cryptoKeyName\": \"\",\n \"wrappedKey\": \"\"\n },\n \"transient\": {\n \"name\": \"\"\n },\n \"unwrapped\": {\n \"key\": \"\"\n }\n },\n \"surrogateInfoType\": {}\n },\n \"cryptoHashConfig\": {\n \"cryptoKey\": {}\n },\n \"cryptoReplaceFfxFpeConfig\": {\n \"commonAlphabet\": \"\",\n \"context\": {},\n \"cryptoKey\": {},\n \"customAlphabet\": \"\",\n \"radix\": 0,\n \"surrogateInfoType\": {}\n },\n \"dateShiftConfig\": {\n \"context\": {},\n \"cryptoKey\": {},\n \"lowerBoundDays\": 0,\n \"upperBoundDays\": 0\n },\n \"fixedSizeBucketingConfig\": {\n \"bucketSize\": \"\",\n \"lowerBound\": {},\n \"upperBound\": {}\n },\n \"redactConfig\": {},\n \"replaceConfig\": {\n \"newValue\": {}\n },\n \"replaceDictionaryConfig\": {\n \"wordList\": {}\n },\n \"replaceWithInfoTypeConfig\": {},\n \"timePartConfig\": {\n \"partToExtract\": \"\"\n }\n }\n }\n ]\n },\n \"recordTransformations\": {\n \"fieldTransformations\": [\n {\n \"condition\": {\n \"expressions\": {\n \"conditions\": {\n \"conditions\": [\n {\n \"field\": {},\n \"operator\": \"\",\n \"value\": {}\n }\n ]\n },\n \"logicalOperator\": \"\"\n }\n },\n \"fields\": [\n {}\n ],\n \"infoTypeTransformations\": {},\n \"primitiveTransformation\": {}\n }\n ],\n \"recordSuppressions\": [\n {\n \"condition\": {}\n }\n ]\n },\n \"transformationErrorHandling\": {\n \"leaveUntransformed\": {},\n \"throwError\": {}\n }\n },\n \"reidentifyTemplateName\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/v2/:parent/content:reidentify"),
Content = new StringContent("{\n \"inspectConfig\": {\n \"contentOptions\": [],\n \"customInfoTypes\": [\n {\n \"detectionRules\": [\n {\n \"hotwordRule\": {\n \"hotwordRegex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n },\n \"likelihoodAdjustment\": {\n \"fixedLikelihood\": \"\",\n \"relativeLikelihood\": 0\n },\n \"proximity\": {\n \"windowAfter\": 0,\n \"windowBefore\": 0\n }\n }\n }\n ],\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {\n \"words\": []\n }\n },\n \"exclusionType\": \"\",\n \"infoType\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"likelihood\": \"\",\n \"regex\": {},\n \"storedType\": {\n \"createTime\": \"\",\n \"name\": \"\"\n },\n \"surrogateType\": {}\n }\n ],\n \"excludeInfoTypes\": false,\n \"includeQuote\": false,\n \"infoTypes\": [\n {}\n ],\n \"limits\": {\n \"maxFindingsPerInfoType\": [\n {\n \"infoType\": {},\n \"maxFindings\": 0\n }\n ],\n \"maxFindingsPerItem\": 0,\n \"maxFindingsPerRequest\": 0\n },\n \"minLikelihood\": \"\",\n \"ruleSet\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"rules\": [\n {\n \"exclusionRule\": {\n \"dictionary\": {},\n \"excludeByHotword\": {\n \"hotwordRegex\": {},\n \"proximity\": {}\n },\n \"excludeInfoTypes\": {\n \"infoTypes\": [\n {}\n ]\n },\n \"matchingType\": \"\",\n \"regex\": {}\n },\n \"hotwordRule\": {}\n }\n ]\n }\n ]\n },\n \"inspectTemplateName\": \"\",\n \"item\": {\n \"byteItem\": {\n \"data\": \"\",\n \"type\": \"\"\n },\n \"table\": {\n \"headers\": [\n {\n \"name\": \"\"\n }\n ],\n \"rows\": [\n {\n \"values\": [\n {\n \"booleanValue\": false,\n \"dateValue\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"dayOfWeekValue\": \"\",\n \"floatValue\": \"\",\n \"integerValue\": \"\",\n \"stringValue\": \"\",\n \"timeValue\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"timestampValue\": \"\"\n }\n ]\n }\n ]\n },\n \"value\": \"\"\n },\n \"locationId\": \"\",\n \"reidentifyConfig\": {\n \"imageTransformations\": {\n \"transforms\": [\n {\n \"allInfoTypes\": {},\n \"allText\": {},\n \"redactionColor\": {\n \"blue\": \"\",\n \"green\": \"\",\n \"red\": \"\"\n },\n \"selectedInfoTypes\": {\n \"infoTypes\": [\n {}\n ]\n }\n }\n ]\n },\n \"infoTypeTransformations\": {\n \"transformations\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"primitiveTransformation\": {\n \"bucketingConfig\": {\n \"buckets\": [\n {\n \"max\": {},\n \"min\": {},\n \"replacementValue\": {}\n }\n ]\n },\n \"characterMaskConfig\": {\n \"charactersToIgnore\": [\n {\n \"charactersToSkip\": \"\",\n \"commonCharactersToIgnore\": \"\"\n }\n ],\n \"maskingCharacter\": \"\",\n \"numberToMask\": 0,\n \"reverseOrder\": false\n },\n \"cryptoDeterministicConfig\": {\n \"context\": {},\n \"cryptoKey\": {\n \"kmsWrapped\": {\n \"cryptoKeyName\": \"\",\n \"wrappedKey\": \"\"\n },\n \"transient\": {\n \"name\": \"\"\n },\n \"unwrapped\": {\n \"key\": \"\"\n }\n },\n \"surrogateInfoType\": {}\n },\n \"cryptoHashConfig\": {\n \"cryptoKey\": {}\n },\n \"cryptoReplaceFfxFpeConfig\": {\n \"commonAlphabet\": \"\",\n \"context\": {},\n \"cryptoKey\": {},\n \"customAlphabet\": \"\",\n \"radix\": 0,\n \"surrogateInfoType\": {}\n },\n \"dateShiftConfig\": {\n \"context\": {},\n \"cryptoKey\": {},\n \"lowerBoundDays\": 0,\n \"upperBoundDays\": 0\n },\n \"fixedSizeBucketingConfig\": {\n \"bucketSize\": \"\",\n \"lowerBound\": {},\n \"upperBound\": {}\n },\n \"redactConfig\": {},\n \"replaceConfig\": {\n \"newValue\": {}\n },\n \"replaceDictionaryConfig\": {\n \"wordList\": {}\n },\n \"replaceWithInfoTypeConfig\": {},\n \"timePartConfig\": {\n \"partToExtract\": \"\"\n }\n }\n }\n ]\n },\n \"recordTransformations\": {\n \"fieldTransformations\": [\n {\n \"condition\": {\n \"expressions\": {\n \"conditions\": {\n \"conditions\": [\n {\n \"field\": {},\n \"operator\": \"\",\n \"value\": {}\n }\n ]\n },\n \"logicalOperator\": \"\"\n }\n },\n \"fields\": [\n {}\n ],\n \"infoTypeTransformations\": {},\n \"primitiveTransformation\": {}\n }\n ],\n \"recordSuppressions\": [\n {\n \"condition\": {}\n }\n ]\n },\n \"transformationErrorHandling\": {\n \"leaveUntransformed\": {},\n \"throwError\": {}\n }\n },\n \"reidentifyTemplateName\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/:parent/content:reidentify");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"inspectConfig\": {\n \"contentOptions\": [],\n \"customInfoTypes\": [\n {\n \"detectionRules\": [\n {\n \"hotwordRule\": {\n \"hotwordRegex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n },\n \"likelihoodAdjustment\": {\n \"fixedLikelihood\": \"\",\n \"relativeLikelihood\": 0\n },\n \"proximity\": {\n \"windowAfter\": 0,\n \"windowBefore\": 0\n }\n }\n }\n ],\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {\n \"words\": []\n }\n },\n \"exclusionType\": \"\",\n \"infoType\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"likelihood\": \"\",\n \"regex\": {},\n \"storedType\": {\n \"createTime\": \"\",\n \"name\": \"\"\n },\n \"surrogateType\": {}\n }\n ],\n \"excludeInfoTypes\": false,\n \"includeQuote\": false,\n \"infoTypes\": [\n {}\n ],\n \"limits\": {\n \"maxFindingsPerInfoType\": [\n {\n \"infoType\": {},\n \"maxFindings\": 0\n }\n ],\n \"maxFindingsPerItem\": 0,\n \"maxFindingsPerRequest\": 0\n },\n \"minLikelihood\": \"\",\n \"ruleSet\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"rules\": [\n {\n \"exclusionRule\": {\n \"dictionary\": {},\n \"excludeByHotword\": {\n \"hotwordRegex\": {},\n \"proximity\": {}\n },\n \"excludeInfoTypes\": {\n \"infoTypes\": [\n {}\n ]\n },\n \"matchingType\": \"\",\n \"regex\": {}\n },\n \"hotwordRule\": {}\n }\n ]\n }\n ]\n },\n \"inspectTemplateName\": \"\",\n \"item\": {\n \"byteItem\": {\n \"data\": \"\",\n \"type\": \"\"\n },\n \"table\": {\n \"headers\": [\n {\n \"name\": \"\"\n }\n ],\n \"rows\": [\n {\n \"values\": [\n {\n \"booleanValue\": false,\n \"dateValue\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"dayOfWeekValue\": \"\",\n \"floatValue\": \"\",\n \"integerValue\": \"\",\n \"stringValue\": \"\",\n \"timeValue\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"timestampValue\": \"\"\n }\n ]\n }\n ]\n },\n \"value\": \"\"\n },\n \"locationId\": \"\",\n \"reidentifyConfig\": {\n \"imageTransformations\": {\n \"transforms\": [\n {\n \"allInfoTypes\": {},\n \"allText\": {},\n \"redactionColor\": {\n \"blue\": \"\",\n \"green\": \"\",\n \"red\": \"\"\n },\n \"selectedInfoTypes\": {\n \"infoTypes\": [\n {}\n ]\n }\n }\n ]\n },\n \"infoTypeTransformations\": {\n \"transformations\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"primitiveTransformation\": {\n \"bucketingConfig\": {\n \"buckets\": [\n {\n \"max\": {},\n \"min\": {},\n \"replacementValue\": {}\n }\n ]\n },\n \"characterMaskConfig\": {\n \"charactersToIgnore\": [\n {\n \"charactersToSkip\": \"\",\n \"commonCharactersToIgnore\": \"\"\n }\n ],\n \"maskingCharacter\": \"\",\n \"numberToMask\": 0,\n \"reverseOrder\": false\n },\n \"cryptoDeterministicConfig\": {\n \"context\": {},\n \"cryptoKey\": {\n \"kmsWrapped\": {\n \"cryptoKeyName\": \"\",\n \"wrappedKey\": \"\"\n },\n \"transient\": {\n \"name\": \"\"\n },\n \"unwrapped\": {\n \"key\": \"\"\n }\n },\n \"surrogateInfoType\": {}\n },\n \"cryptoHashConfig\": {\n \"cryptoKey\": {}\n },\n \"cryptoReplaceFfxFpeConfig\": {\n \"commonAlphabet\": \"\",\n \"context\": {},\n \"cryptoKey\": {},\n \"customAlphabet\": \"\",\n \"radix\": 0,\n \"surrogateInfoType\": {}\n },\n \"dateShiftConfig\": {\n \"context\": {},\n \"cryptoKey\": {},\n \"lowerBoundDays\": 0,\n \"upperBoundDays\": 0\n },\n \"fixedSizeBucketingConfig\": {\n \"bucketSize\": \"\",\n \"lowerBound\": {},\n \"upperBound\": {}\n },\n \"redactConfig\": {},\n \"replaceConfig\": {\n \"newValue\": {}\n },\n \"replaceDictionaryConfig\": {\n \"wordList\": {}\n },\n \"replaceWithInfoTypeConfig\": {},\n \"timePartConfig\": {\n \"partToExtract\": \"\"\n }\n }\n }\n ]\n },\n \"recordTransformations\": {\n \"fieldTransformations\": [\n {\n \"condition\": {\n \"expressions\": {\n \"conditions\": {\n \"conditions\": [\n {\n \"field\": {},\n \"operator\": \"\",\n \"value\": {}\n }\n ]\n },\n \"logicalOperator\": \"\"\n }\n },\n \"fields\": [\n {}\n ],\n \"infoTypeTransformations\": {},\n \"primitiveTransformation\": {}\n }\n ],\n \"recordSuppressions\": [\n {\n \"condition\": {}\n }\n ]\n },\n \"transformationErrorHandling\": {\n \"leaveUntransformed\": {},\n \"throwError\": {}\n }\n },\n \"reidentifyTemplateName\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/:parent/content:reidentify"
payload := strings.NewReader("{\n \"inspectConfig\": {\n \"contentOptions\": [],\n \"customInfoTypes\": [\n {\n \"detectionRules\": [\n {\n \"hotwordRule\": {\n \"hotwordRegex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n },\n \"likelihoodAdjustment\": {\n \"fixedLikelihood\": \"\",\n \"relativeLikelihood\": 0\n },\n \"proximity\": {\n \"windowAfter\": 0,\n \"windowBefore\": 0\n }\n }\n }\n ],\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {\n \"words\": []\n }\n },\n \"exclusionType\": \"\",\n \"infoType\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"likelihood\": \"\",\n \"regex\": {},\n \"storedType\": {\n \"createTime\": \"\",\n \"name\": \"\"\n },\n \"surrogateType\": {}\n }\n ],\n \"excludeInfoTypes\": false,\n \"includeQuote\": false,\n \"infoTypes\": [\n {}\n ],\n \"limits\": {\n \"maxFindingsPerInfoType\": [\n {\n \"infoType\": {},\n \"maxFindings\": 0\n }\n ],\n \"maxFindingsPerItem\": 0,\n \"maxFindingsPerRequest\": 0\n },\n \"minLikelihood\": \"\",\n \"ruleSet\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"rules\": [\n {\n \"exclusionRule\": {\n \"dictionary\": {},\n \"excludeByHotword\": {\n \"hotwordRegex\": {},\n \"proximity\": {}\n },\n \"excludeInfoTypes\": {\n \"infoTypes\": [\n {}\n ]\n },\n \"matchingType\": \"\",\n \"regex\": {}\n },\n \"hotwordRule\": {}\n }\n ]\n }\n ]\n },\n \"inspectTemplateName\": \"\",\n \"item\": {\n \"byteItem\": {\n \"data\": \"\",\n \"type\": \"\"\n },\n \"table\": {\n \"headers\": [\n {\n \"name\": \"\"\n }\n ],\n \"rows\": [\n {\n \"values\": [\n {\n \"booleanValue\": false,\n \"dateValue\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"dayOfWeekValue\": \"\",\n \"floatValue\": \"\",\n \"integerValue\": \"\",\n \"stringValue\": \"\",\n \"timeValue\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"timestampValue\": \"\"\n }\n ]\n }\n ]\n },\n \"value\": \"\"\n },\n \"locationId\": \"\",\n \"reidentifyConfig\": {\n \"imageTransformations\": {\n \"transforms\": [\n {\n \"allInfoTypes\": {},\n \"allText\": {},\n \"redactionColor\": {\n \"blue\": \"\",\n \"green\": \"\",\n \"red\": \"\"\n },\n \"selectedInfoTypes\": {\n \"infoTypes\": [\n {}\n ]\n }\n }\n ]\n },\n \"infoTypeTransformations\": {\n \"transformations\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"primitiveTransformation\": {\n \"bucketingConfig\": {\n \"buckets\": [\n {\n \"max\": {},\n \"min\": {},\n \"replacementValue\": {}\n }\n ]\n },\n \"characterMaskConfig\": {\n \"charactersToIgnore\": [\n {\n \"charactersToSkip\": \"\",\n \"commonCharactersToIgnore\": \"\"\n }\n ],\n \"maskingCharacter\": \"\",\n \"numberToMask\": 0,\n \"reverseOrder\": false\n },\n \"cryptoDeterministicConfig\": {\n \"context\": {},\n \"cryptoKey\": {\n \"kmsWrapped\": {\n \"cryptoKeyName\": \"\",\n \"wrappedKey\": \"\"\n },\n \"transient\": {\n \"name\": \"\"\n },\n \"unwrapped\": {\n \"key\": \"\"\n }\n },\n \"surrogateInfoType\": {}\n },\n \"cryptoHashConfig\": {\n \"cryptoKey\": {}\n },\n \"cryptoReplaceFfxFpeConfig\": {\n \"commonAlphabet\": \"\",\n \"context\": {},\n \"cryptoKey\": {},\n \"customAlphabet\": \"\",\n \"radix\": 0,\n \"surrogateInfoType\": {}\n },\n \"dateShiftConfig\": {\n \"context\": {},\n \"cryptoKey\": {},\n \"lowerBoundDays\": 0,\n \"upperBoundDays\": 0\n },\n \"fixedSizeBucketingConfig\": {\n \"bucketSize\": \"\",\n \"lowerBound\": {},\n \"upperBound\": {}\n },\n \"redactConfig\": {},\n \"replaceConfig\": {\n \"newValue\": {}\n },\n \"replaceDictionaryConfig\": {\n \"wordList\": {}\n },\n \"replaceWithInfoTypeConfig\": {},\n \"timePartConfig\": {\n \"partToExtract\": \"\"\n }\n }\n }\n ]\n },\n \"recordTransformations\": {\n \"fieldTransformations\": [\n {\n \"condition\": {\n \"expressions\": {\n \"conditions\": {\n \"conditions\": [\n {\n \"field\": {},\n \"operator\": \"\",\n \"value\": {}\n }\n ]\n },\n \"logicalOperator\": \"\"\n }\n },\n \"fields\": [\n {}\n ],\n \"infoTypeTransformations\": {},\n \"primitiveTransformation\": {}\n }\n ],\n \"recordSuppressions\": [\n {\n \"condition\": {}\n }\n ]\n },\n \"transformationErrorHandling\": {\n \"leaveUntransformed\": {},\n \"throwError\": {}\n }\n },\n \"reidentifyTemplateName\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/v2/:parent/content:reidentify HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 6091
{
"inspectConfig": {
"contentOptions": [],
"customInfoTypes": [
{
"detectionRules": [
{
"hotwordRule": {
"hotwordRegex": {
"groupIndexes": [],
"pattern": ""
},
"likelihoodAdjustment": {
"fixedLikelihood": "",
"relativeLikelihood": 0
},
"proximity": {
"windowAfter": 0,
"windowBefore": 0
}
}
}
],
"dictionary": {
"cloudStoragePath": {
"path": ""
},
"wordList": {
"words": []
}
},
"exclusionType": "",
"infoType": {
"name": "",
"version": ""
},
"likelihood": "",
"regex": {},
"storedType": {
"createTime": "",
"name": ""
},
"surrogateType": {}
}
],
"excludeInfoTypes": false,
"includeQuote": false,
"infoTypes": [
{}
],
"limits": {
"maxFindingsPerInfoType": [
{
"infoType": {},
"maxFindings": 0
}
],
"maxFindingsPerItem": 0,
"maxFindingsPerRequest": 0
},
"minLikelihood": "",
"ruleSet": [
{
"infoTypes": [
{}
],
"rules": [
{
"exclusionRule": {
"dictionary": {},
"excludeByHotword": {
"hotwordRegex": {},
"proximity": {}
},
"excludeInfoTypes": {
"infoTypes": [
{}
]
},
"matchingType": "",
"regex": {}
},
"hotwordRule": {}
}
]
}
]
},
"inspectTemplateName": "",
"item": {
"byteItem": {
"data": "",
"type": ""
},
"table": {
"headers": [
{
"name": ""
}
],
"rows": [
{
"values": [
{
"booleanValue": false,
"dateValue": {
"day": 0,
"month": 0,
"year": 0
},
"dayOfWeekValue": "",
"floatValue": "",
"integerValue": "",
"stringValue": "",
"timeValue": {
"hours": 0,
"minutes": 0,
"nanos": 0,
"seconds": 0
},
"timestampValue": ""
}
]
}
]
},
"value": ""
},
"locationId": "",
"reidentifyConfig": {
"imageTransformations": {
"transforms": [
{
"allInfoTypes": {},
"allText": {},
"redactionColor": {
"blue": "",
"green": "",
"red": ""
},
"selectedInfoTypes": {
"infoTypes": [
{}
]
}
}
]
},
"infoTypeTransformations": {
"transformations": [
{
"infoTypes": [
{}
],
"primitiveTransformation": {
"bucketingConfig": {
"buckets": [
{
"max": {},
"min": {},
"replacementValue": {}
}
]
},
"characterMaskConfig": {
"charactersToIgnore": [
{
"charactersToSkip": "",
"commonCharactersToIgnore": ""
}
],
"maskingCharacter": "",
"numberToMask": 0,
"reverseOrder": false
},
"cryptoDeterministicConfig": {
"context": {},
"cryptoKey": {
"kmsWrapped": {
"cryptoKeyName": "",
"wrappedKey": ""
},
"transient": {
"name": ""
},
"unwrapped": {
"key": ""
}
},
"surrogateInfoType": {}
},
"cryptoHashConfig": {
"cryptoKey": {}
},
"cryptoReplaceFfxFpeConfig": {
"commonAlphabet": "",
"context": {},
"cryptoKey": {},
"customAlphabet": "",
"radix": 0,
"surrogateInfoType": {}
},
"dateShiftConfig": {
"context": {},
"cryptoKey": {},
"lowerBoundDays": 0,
"upperBoundDays": 0
},
"fixedSizeBucketingConfig": {
"bucketSize": "",
"lowerBound": {},
"upperBound": {}
},
"redactConfig": {},
"replaceConfig": {
"newValue": {}
},
"replaceDictionaryConfig": {
"wordList": {}
},
"replaceWithInfoTypeConfig": {},
"timePartConfig": {
"partToExtract": ""
}
}
}
]
},
"recordTransformations": {
"fieldTransformations": [
{
"condition": {
"expressions": {
"conditions": {
"conditions": [
{
"field": {},
"operator": "",
"value": {}
}
]
},
"logicalOperator": ""
}
},
"fields": [
{}
],
"infoTypeTransformations": {},
"primitiveTransformation": {}
}
],
"recordSuppressions": [
{
"condition": {}
}
]
},
"transformationErrorHandling": {
"leaveUntransformed": {},
"throwError": {}
}
},
"reidentifyTemplateName": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v2/:parent/content:reidentify")
.setHeader("content-type", "application/json")
.setBody("{\n \"inspectConfig\": {\n \"contentOptions\": [],\n \"customInfoTypes\": [\n {\n \"detectionRules\": [\n {\n \"hotwordRule\": {\n \"hotwordRegex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n },\n \"likelihoodAdjustment\": {\n \"fixedLikelihood\": \"\",\n \"relativeLikelihood\": 0\n },\n \"proximity\": {\n \"windowAfter\": 0,\n \"windowBefore\": 0\n }\n }\n }\n ],\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {\n \"words\": []\n }\n },\n \"exclusionType\": \"\",\n \"infoType\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"likelihood\": \"\",\n \"regex\": {},\n \"storedType\": {\n \"createTime\": \"\",\n \"name\": \"\"\n },\n \"surrogateType\": {}\n }\n ],\n \"excludeInfoTypes\": false,\n \"includeQuote\": false,\n \"infoTypes\": [\n {}\n ],\n \"limits\": {\n \"maxFindingsPerInfoType\": [\n {\n \"infoType\": {},\n \"maxFindings\": 0\n }\n ],\n \"maxFindingsPerItem\": 0,\n \"maxFindingsPerRequest\": 0\n },\n \"minLikelihood\": \"\",\n \"ruleSet\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"rules\": [\n {\n \"exclusionRule\": {\n \"dictionary\": {},\n \"excludeByHotword\": {\n \"hotwordRegex\": {},\n \"proximity\": {}\n },\n \"excludeInfoTypes\": {\n \"infoTypes\": [\n {}\n ]\n },\n \"matchingType\": \"\",\n \"regex\": {}\n },\n \"hotwordRule\": {}\n }\n ]\n }\n ]\n },\n \"inspectTemplateName\": \"\",\n \"item\": {\n \"byteItem\": {\n \"data\": \"\",\n \"type\": \"\"\n },\n \"table\": {\n \"headers\": [\n {\n \"name\": \"\"\n }\n ],\n \"rows\": [\n {\n \"values\": [\n {\n \"booleanValue\": false,\n \"dateValue\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"dayOfWeekValue\": \"\",\n \"floatValue\": \"\",\n \"integerValue\": \"\",\n \"stringValue\": \"\",\n \"timeValue\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"timestampValue\": \"\"\n }\n ]\n }\n ]\n },\n \"value\": \"\"\n },\n \"locationId\": \"\",\n \"reidentifyConfig\": {\n \"imageTransformations\": {\n \"transforms\": [\n {\n \"allInfoTypes\": {},\n \"allText\": {},\n \"redactionColor\": {\n \"blue\": \"\",\n \"green\": \"\",\n \"red\": \"\"\n },\n \"selectedInfoTypes\": {\n \"infoTypes\": [\n {}\n ]\n }\n }\n ]\n },\n \"infoTypeTransformations\": {\n \"transformations\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"primitiveTransformation\": {\n \"bucketingConfig\": {\n \"buckets\": [\n {\n \"max\": {},\n \"min\": {},\n \"replacementValue\": {}\n }\n ]\n },\n \"characterMaskConfig\": {\n \"charactersToIgnore\": [\n {\n \"charactersToSkip\": \"\",\n \"commonCharactersToIgnore\": \"\"\n }\n ],\n \"maskingCharacter\": \"\",\n \"numberToMask\": 0,\n \"reverseOrder\": false\n },\n \"cryptoDeterministicConfig\": {\n \"context\": {},\n \"cryptoKey\": {\n \"kmsWrapped\": {\n \"cryptoKeyName\": \"\",\n \"wrappedKey\": \"\"\n },\n \"transient\": {\n \"name\": \"\"\n },\n \"unwrapped\": {\n \"key\": \"\"\n }\n },\n \"surrogateInfoType\": {}\n },\n \"cryptoHashConfig\": {\n \"cryptoKey\": {}\n },\n \"cryptoReplaceFfxFpeConfig\": {\n \"commonAlphabet\": \"\",\n \"context\": {},\n \"cryptoKey\": {},\n \"customAlphabet\": \"\",\n \"radix\": 0,\n \"surrogateInfoType\": {}\n },\n \"dateShiftConfig\": {\n \"context\": {},\n \"cryptoKey\": {},\n \"lowerBoundDays\": 0,\n \"upperBoundDays\": 0\n },\n \"fixedSizeBucketingConfig\": {\n \"bucketSize\": \"\",\n \"lowerBound\": {},\n \"upperBound\": {}\n },\n \"redactConfig\": {},\n \"replaceConfig\": {\n \"newValue\": {}\n },\n \"replaceDictionaryConfig\": {\n \"wordList\": {}\n },\n \"replaceWithInfoTypeConfig\": {},\n \"timePartConfig\": {\n \"partToExtract\": \"\"\n }\n }\n }\n ]\n },\n \"recordTransformations\": {\n \"fieldTransformations\": [\n {\n \"condition\": {\n \"expressions\": {\n \"conditions\": {\n \"conditions\": [\n {\n \"field\": {},\n \"operator\": \"\",\n \"value\": {}\n }\n ]\n },\n \"logicalOperator\": \"\"\n }\n },\n \"fields\": [\n {}\n ],\n \"infoTypeTransformations\": {},\n \"primitiveTransformation\": {}\n }\n ],\n \"recordSuppressions\": [\n {\n \"condition\": {}\n }\n ]\n },\n \"transformationErrorHandling\": {\n \"leaveUntransformed\": {},\n \"throwError\": {}\n }\n },\n \"reidentifyTemplateName\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/:parent/content:reidentify"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"inspectConfig\": {\n \"contentOptions\": [],\n \"customInfoTypes\": [\n {\n \"detectionRules\": [\n {\n \"hotwordRule\": {\n \"hotwordRegex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n },\n \"likelihoodAdjustment\": {\n \"fixedLikelihood\": \"\",\n \"relativeLikelihood\": 0\n },\n \"proximity\": {\n \"windowAfter\": 0,\n \"windowBefore\": 0\n }\n }\n }\n ],\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {\n \"words\": []\n }\n },\n \"exclusionType\": \"\",\n \"infoType\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"likelihood\": \"\",\n \"regex\": {},\n \"storedType\": {\n \"createTime\": \"\",\n \"name\": \"\"\n },\n \"surrogateType\": {}\n }\n ],\n \"excludeInfoTypes\": false,\n \"includeQuote\": false,\n \"infoTypes\": [\n {}\n ],\n \"limits\": {\n \"maxFindingsPerInfoType\": [\n {\n \"infoType\": {},\n \"maxFindings\": 0\n }\n ],\n \"maxFindingsPerItem\": 0,\n \"maxFindingsPerRequest\": 0\n },\n \"minLikelihood\": \"\",\n \"ruleSet\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"rules\": [\n {\n \"exclusionRule\": {\n \"dictionary\": {},\n \"excludeByHotword\": {\n \"hotwordRegex\": {},\n \"proximity\": {}\n },\n \"excludeInfoTypes\": {\n \"infoTypes\": [\n {}\n ]\n },\n \"matchingType\": \"\",\n \"regex\": {}\n },\n \"hotwordRule\": {}\n }\n ]\n }\n ]\n },\n \"inspectTemplateName\": \"\",\n \"item\": {\n \"byteItem\": {\n \"data\": \"\",\n \"type\": \"\"\n },\n \"table\": {\n \"headers\": [\n {\n \"name\": \"\"\n }\n ],\n \"rows\": [\n {\n \"values\": [\n {\n \"booleanValue\": false,\n \"dateValue\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"dayOfWeekValue\": \"\",\n \"floatValue\": \"\",\n \"integerValue\": \"\",\n \"stringValue\": \"\",\n \"timeValue\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"timestampValue\": \"\"\n }\n ]\n }\n ]\n },\n \"value\": \"\"\n },\n \"locationId\": \"\",\n \"reidentifyConfig\": {\n \"imageTransformations\": {\n \"transforms\": [\n {\n \"allInfoTypes\": {},\n \"allText\": {},\n \"redactionColor\": {\n \"blue\": \"\",\n \"green\": \"\",\n \"red\": \"\"\n },\n \"selectedInfoTypes\": {\n \"infoTypes\": [\n {}\n ]\n }\n }\n ]\n },\n \"infoTypeTransformations\": {\n \"transformations\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"primitiveTransformation\": {\n \"bucketingConfig\": {\n \"buckets\": [\n {\n \"max\": {},\n \"min\": {},\n \"replacementValue\": {}\n }\n ]\n },\n \"characterMaskConfig\": {\n \"charactersToIgnore\": [\n {\n \"charactersToSkip\": \"\",\n \"commonCharactersToIgnore\": \"\"\n }\n ],\n \"maskingCharacter\": \"\",\n \"numberToMask\": 0,\n \"reverseOrder\": false\n },\n \"cryptoDeterministicConfig\": {\n \"context\": {},\n \"cryptoKey\": {\n \"kmsWrapped\": {\n \"cryptoKeyName\": \"\",\n \"wrappedKey\": \"\"\n },\n \"transient\": {\n \"name\": \"\"\n },\n \"unwrapped\": {\n \"key\": \"\"\n }\n },\n \"surrogateInfoType\": {}\n },\n \"cryptoHashConfig\": {\n \"cryptoKey\": {}\n },\n \"cryptoReplaceFfxFpeConfig\": {\n \"commonAlphabet\": \"\",\n \"context\": {},\n \"cryptoKey\": {},\n \"customAlphabet\": \"\",\n \"radix\": 0,\n \"surrogateInfoType\": {}\n },\n \"dateShiftConfig\": {\n \"context\": {},\n \"cryptoKey\": {},\n \"lowerBoundDays\": 0,\n \"upperBoundDays\": 0\n },\n \"fixedSizeBucketingConfig\": {\n \"bucketSize\": \"\",\n \"lowerBound\": {},\n \"upperBound\": {}\n },\n \"redactConfig\": {},\n \"replaceConfig\": {\n \"newValue\": {}\n },\n \"replaceDictionaryConfig\": {\n \"wordList\": {}\n },\n \"replaceWithInfoTypeConfig\": {},\n \"timePartConfig\": {\n \"partToExtract\": \"\"\n }\n }\n }\n ]\n },\n \"recordTransformations\": {\n \"fieldTransformations\": [\n {\n \"condition\": {\n \"expressions\": {\n \"conditions\": {\n \"conditions\": [\n {\n \"field\": {},\n \"operator\": \"\",\n \"value\": {}\n }\n ]\n },\n \"logicalOperator\": \"\"\n }\n },\n \"fields\": [\n {}\n ],\n \"infoTypeTransformations\": {},\n \"primitiveTransformation\": {}\n }\n ],\n \"recordSuppressions\": [\n {\n \"condition\": {}\n }\n ]\n },\n \"transformationErrorHandling\": {\n \"leaveUntransformed\": {},\n \"throwError\": {}\n }\n },\n \"reidentifyTemplateName\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"inspectConfig\": {\n \"contentOptions\": [],\n \"customInfoTypes\": [\n {\n \"detectionRules\": [\n {\n \"hotwordRule\": {\n \"hotwordRegex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n },\n \"likelihoodAdjustment\": {\n \"fixedLikelihood\": \"\",\n \"relativeLikelihood\": 0\n },\n \"proximity\": {\n \"windowAfter\": 0,\n \"windowBefore\": 0\n }\n }\n }\n ],\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {\n \"words\": []\n }\n },\n \"exclusionType\": \"\",\n \"infoType\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"likelihood\": \"\",\n \"regex\": {},\n \"storedType\": {\n \"createTime\": \"\",\n \"name\": \"\"\n },\n \"surrogateType\": {}\n }\n ],\n \"excludeInfoTypes\": false,\n \"includeQuote\": false,\n \"infoTypes\": [\n {}\n ],\n \"limits\": {\n \"maxFindingsPerInfoType\": [\n {\n \"infoType\": {},\n \"maxFindings\": 0\n }\n ],\n \"maxFindingsPerItem\": 0,\n \"maxFindingsPerRequest\": 0\n },\n \"minLikelihood\": \"\",\n \"ruleSet\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"rules\": [\n {\n \"exclusionRule\": {\n \"dictionary\": {},\n \"excludeByHotword\": {\n \"hotwordRegex\": {},\n \"proximity\": {}\n },\n \"excludeInfoTypes\": {\n \"infoTypes\": [\n {}\n ]\n },\n \"matchingType\": \"\",\n \"regex\": {}\n },\n \"hotwordRule\": {}\n }\n ]\n }\n ]\n },\n \"inspectTemplateName\": \"\",\n \"item\": {\n \"byteItem\": {\n \"data\": \"\",\n \"type\": \"\"\n },\n \"table\": {\n \"headers\": [\n {\n \"name\": \"\"\n }\n ],\n \"rows\": [\n {\n \"values\": [\n {\n \"booleanValue\": false,\n \"dateValue\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"dayOfWeekValue\": \"\",\n \"floatValue\": \"\",\n \"integerValue\": \"\",\n \"stringValue\": \"\",\n \"timeValue\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"timestampValue\": \"\"\n }\n ]\n }\n ]\n },\n \"value\": \"\"\n },\n \"locationId\": \"\",\n \"reidentifyConfig\": {\n \"imageTransformations\": {\n \"transforms\": [\n {\n \"allInfoTypes\": {},\n \"allText\": {},\n \"redactionColor\": {\n \"blue\": \"\",\n \"green\": \"\",\n \"red\": \"\"\n },\n \"selectedInfoTypes\": {\n \"infoTypes\": [\n {}\n ]\n }\n }\n ]\n },\n \"infoTypeTransformations\": {\n \"transformations\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"primitiveTransformation\": {\n \"bucketingConfig\": {\n \"buckets\": [\n {\n \"max\": {},\n \"min\": {},\n \"replacementValue\": {}\n }\n ]\n },\n \"characterMaskConfig\": {\n \"charactersToIgnore\": [\n {\n \"charactersToSkip\": \"\",\n \"commonCharactersToIgnore\": \"\"\n }\n ],\n \"maskingCharacter\": \"\",\n \"numberToMask\": 0,\n \"reverseOrder\": false\n },\n \"cryptoDeterministicConfig\": {\n \"context\": {},\n \"cryptoKey\": {\n \"kmsWrapped\": {\n \"cryptoKeyName\": \"\",\n \"wrappedKey\": \"\"\n },\n \"transient\": {\n \"name\": \"\"\n },\n \"unwrapped\": {\n \"key\": \"\"\n }\n },\n \"surrogateInfoType\": {}\n },\n \"cryptoHashConfig\": {\n \"cryptoKey\": {}\n },\n \"cryptoReplaceFfxFpeConfig\": {\n \"commonAlphabet\": \"\",\n \"context\": {},\n \"cryptoKey\": {},\n \"customAlphabet\": \"\",\n \"radix\": 0,\n \"surrogateInfoType\": {}\n },\n \"dateShiftConfig\": {\n \"context\": {},\n \"cryptoKey\": {},\n \"lowerBoundDays\": 0,\n \"upperBoundDays\": 0\n },\n \"fixedSizeBucketingConfig\": {\n \"bucketSize\": \"\",\n \"lowerBound\": {},\n \"upperBound\": {}\n },\n \"redactConfig\": {},\n \"replaceConfig\": {\n \"newValue\": {}\n },\n \"replaceDictionaryConfig\": {\n \"wordList\": {}\n },\n \"replaceWithInfoTypeConfig\": {},\n \"timePartConfig\": {\n \"partToExtract\": \"\"\n }\n }\n }\n ]\n },\n \"recordTransformations\": {\n \"fieldTransformations\": [\n {\n \"condition\": {\n \"expressions\": {\n \"conditions\": {\n \"conditions\": [\n {\n \"field\": {},\n \"operator\": \"\",\n \"value\": {}\n }\n ]\n },\n \"logicalOperator\": \"\"\n }\n },\n \"fields\": [\n {}\n ],\n \"infoTypeTransformations\": {},\n \"primitiveTransformation\": {}\n }\n ],\n \"recordSuppressions\": [\n {\n \"condition\": {}\n }\n ]\n },\n \"transformationErrorHandling\": {\n \"leaveUntransformed\": {},\n \"throwError\": {}\n }\n },\n \"reidentifyTemplateName\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v2/:parent/content:reidentify")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v2/:parent/content:reidentify")
.header("content-type", "application/json")
.body("{\n \"inspectConfig\": {\n \"contentOptions\": [],\n \"customInfoTypes\": [\n {\n \"detectionRules\": [\n {\n \"hotwordRule\": {\n \"hotwordRegex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n },\n \"likelihoodAdjustment\": {\n \"fixedLikelihood\": \"\",\n \"relativeLikelihood\": 0\n },\n \"proximity\": {\n \"windowAfter\": 0,\n \"windowBefore\": 0\n }\n }\n }\n ],\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {\n \"words\": []\n }\n },\n \"exclusionType\": \"\",\n \"infoType\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"likelihood\": \"\",\n \"regex\": {},\n \"storedType\": {\n \"createTime\": \"\",\n \"name\": \"\"\n },\n \"surrogateType\": {}\n }\n ],\n \"excludeInfoTypes\": false,\n \"includeQuote\": false,\n \"infoTypes\": [\n {}\n ],\n \"limits\": {\n \"maxFindingsPerInfoType\": [\n {\n \"infoType\": {},\n \"maxFindings\": 0\n }\n ],\n \"maxFindingsPerItem\": 0,\n \"maxFindingsPerRequest\": 0\n },\n \"minLikelihood\": \"\",\n \"ruleSet\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"rules\": [\n {\n \"exclusionRule\": {\n \"dictionary\": {},\n \"excludeByHotword\": {\n \"hotwordRegex\": {},\n \"proximity\": {}\n },\n \"excludeInfoTypes\": {\n \"infoTypes\": [\n {}\n ]\n },\n \"matchingType\": \"\",\n \"regex\": {}\n },\n \"hotwordRule\": {}\n }\n ]\n }\n ]\n },\n \"inspectTemplateName\": \"\",\n \"item\": {\n \"byteItem\": {\n \"data\": \"\",\n \"type\": \"\"\n },\n \"table\": {\n \"headers\": [\n {\n \"name\": \"\"\n }\n ],\n \"rows\": [\n {\n \"values\": [\n {\n \"booleanValue\": false,\n \"dateValue\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"dayOfWeekValue\": \"\",\n \"floatValue\": \"\",\n \"integerValue\": \"\",\n \"stringValue\": \"\",\n \"timeValue\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"timestampValue\": \"\"\n }\n ]\n }\n ]\n },\n \"value\": \"\"\n },\n \"locationId\": \"\",\n \"reidentifyConfig\": {\n \"imageTransformations\": {\n \"transforms\": [\n {\n \"allInfoTypes\": {},\n \"allText\": {},\n \"redactionColor\": {\n \"blue\": \"\",\n \"green\": \"\",\n \"red\": \"\"\n },\n \"selectedInfoTypes\": {\n \"infoTypes\": [\n {}\n ]\n }\n }\n ]\n },\n \"infoTypeTransformations\": {\n \"transformations\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"primitiveTransformation\": {\n \"bucketingConfig\": {\n \"buckets\": [\n {\n \"max\": {},\n \"min\": {},\n \"replacementValue\": {}\n }\n ]\n },\n \"characterMaskConfig\": {\n \"charactersToIgnore\": [\n {\n \"charactersToSkip\": \"\",\n \"commonCharactersToIgnore\": \"\"\n }\n ],\n \"maskingCharacter\": \"\",\n \"numberToMask\": 0,\n \"reverseOrder\": false\n },\n \"cryptoDeterministicConfig\": {\n \"context\": {},\n \"cryptoKey\": {\n \"kmsWrapped\": {\n \"cryptoKeyName\": \"\",\n \"wrappedKey\": \"\"\n },\n \"transient\": {\n \"name\": \"\"\n },\n \"unwrapped\": {\n \"key\": \"\"\n }\n },\n \"surrogateInfoType\": {}\n },\n \"cryptoHashConfig\": {\n \"cryptoKey\": {}\n },\n \"cryptoReplaceFfxFpeConfig\": {\n \"commonAlphabet\": \"\",\n \"context\": {},\n \"cryptoKey\": {},\n \"customAlphabet\": \"\",\n \"radix\": 0,\n \"surrogateInfoType\": {}\n },\n \"dateShiftConfig\": {\n \"context\": {},\n \"cryptoKey\": {},\n \"lowerBoundDays\": 0,\n \"upperBoundDays\": 0\n },\n \"fixedSizeBucketingConfig\": {\n \"bucketSize\": \"\",\n \"lowerBound\": {},\n \"upperBound\": {}\n },\n \"redactConfig\": {},\n \"replaceConfig\": {\n \"newValue\": {}\n },\n \"replaceDictionaryConfig\": {\n \"wordList\": {}\n },\n \"replaceWithInfoTypeConfig\": {},\n \"timePartConfig\": {\n \"partToExtract\": \"\"\n }\n }\n }\n ]\n },\n \"recordTransformations\": {\n \"fieldTransformations\": [\n {\n \"condition\": {\n \"expressions\": {\n \"conditions\": {\n \"conditions\": [\n {\n \"field\": {},\n \"operator\": \"\",\n \"value\": {}\n }\n ]\n },\n \"logicalOperator\": \"\"\n }\n },\n \"fields\": [\n {}\n ],\n \"infoTypeTransformations\": {},\n \"primitiveTransformation\": {}\n }\n ],\n \"recordSuppressions\": [\n {\n \"condition\": {}\n }\n ]\n },\n \"transformationErrorHandling\": {\n \"leaveUntransformed\": {},\n \"throwError\": {}\n }\n },\n \"reidentifyTemplateName\": \"\"\n}")
.asString();
const data = JSON.stringify({
inspectConfig: {
contentOptions: [],
customInfoTypes: [
{
detectionRules: [
{
hotwordRule: {
hotwordRegex: {
groupIndexes: [],
pattern: ''
},
likelihoodAdjustment: {
fixedLikelihood: '',
relativeLikelihood: 0
},
proximity: {
windowAfter: 0,
windowBefore: 0
}
}
}
],
dictionary: {
cloudStoragePath: {
path: ''
},
wordList: {
words: []
}
},
exclusionType: '',
infoType: {
name: '',
version: ''
},
likelihood: '',
regex: {},
storedType: {
createTime: '',
name: ''
},
surrogateType: {}
}
],
excludeInfoTypes: false,
includeQuote: false,
infoTypes: [
{}
],
limits: {
maxFindingsPerInfoType: [
{
infoType: {},
maxFindings: 0
}
],
maxFindingsPerItem: 0,
maxFindingsPerRequest: 0
},
minLikelihood: '',
ruleSet: [
{
infoTypes: [
{}
],
rules: [
{
exclusionRule: {
dictionary: {},
excludeByHotword: {
hotwordRegex: {},
proximity: {}
},
excludeInfoTypes: {
infoTypes: [
{}
]
},
matchingType: '',
regex: {}
},
hotwordRule: {}
}
]
}
]
},
inspectTemplateName: '',
item: {
byteItem: {
data: '',
type: ''
},
table: {
headers: [
{
name: ''
}
],
rows: [
{
values: [
{
booleanValue: false,
dateValue: {
day: 0,
month: 0,
year: 0
},
dayOfWeekValue: '',
floatValue: '',
integerValue: '',
stringValue: '',
timeValue: {
hours: 0,
minutes: 0,
nanos: 0,
seconds: 0
},
timestampValue: ''
}
]
}
]
},
value: ''
},
locationId: '',
reidentifyConfig: {
imageTransformations: {
transforms: [
{
allInfoTypes: {},
allText: {},
redactionColor: {
blue: '',
green: '',
red: ''
},
selectedInfoTypes: {
infoTypes: [
{}
]
}
}
]
},
infoTypeTransformations: {
transformations: [
{
infoTypes: [
{}
],
primitiveTransformation: {
bucketingConfig: {
buckets: [
{
max: {},
min: {},
replacementValue: {}
}
]
},
characterMaskConfig: {
charactersToIgnore: [
{
charactersToSkip: '',
commonCharactersToIgnore: ''
}
],
maskingCharacter: '',
numberToMask: 0,
reverseOrder: false
},
cryptoDeterministicConfig: {
context: {},
cryptoKey: {
kmsWrapped: {
cryptoKeyName: '',
wrappedKey: ''
},
transient: {
name: ''
},
unwrapped: {
key: ''
}
},
surrogateInfoType: {}
},
cryptoHashConfig: {
cryptoKey: {}
},
cryptoReplaceFfxFpeConfig: {
commonAlphabet: '',
context: {},
cryptoKey: {},
customAlphabet: '',
radix: 0,
surrogateInfoType: {}
},
dateShiftConfig: {
context: {},
cryptoKey: {},
lowerBoundDays: 0,
upperBoundDays: 0
},
fixedSizeBucketingConfig: {
bucketSize: '',
lowerBound: {},
upperBound: {}
},
redactConfig: {},
replaceConfig: {
newValue: {}
},
replaceDictionaryConfig: {
wordList: {}
},
replaceWithInfoTypeConfig: {},
timePartConfig: {
partToExtract: ''
}
}
}
]
},
recordTransformations: {
fieldTransformations: [
{
condition: {
expressions: {
conditions: {
conditions: [
{
field: {},
operator: '',
value: {}
}
]
},
logicalOperator: ''
}
},
fields: [
{}
],
infoTypeTransformations: {},
primitiveTransformation: {}
}
],
recordSuppressions: [
{
condition: {}
}
]
},
transformationErrorHandling: {
leaveUntransformed: {},
throwError: {}
}
},
reidentifyTemplateName: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v2/:parent/content:reidentify');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v2/:parent/content:reidentify',
headers: {'content-type': 'application/json'},
data: {
inspectConfig: {
contentOptions: [],
customInfoTypes: [
{
detectionRules: [
{
hotwordRule: {
hotwordRegex: {groupIndexes: [], pattern: ''},
likelihoodAdjustment: {fixedLikelihood: '', relativeLikelihood: 0},
proximity: {windowAfter: 0, windowBefore: 0}
}
}
],
dictionary: {cloudStoragePath: {path: ''}, wordList: {words: []}},
exclusionType: '',
infoType: {name: '', version: ''},
likelihood: '',
regex: {},
storedType: {createTime: '', name: ''},
surrogateType: {}
}
],
excludeInfoTypes: false,
includeQuote: false,
infoTypes: [{}],
limits: {
maxFindingsPerInfoType: [{infoType: {}, maxFindings: 0}],
maxFindingsPerItem: 0,
maxFindingsPerRequest: 0
},
minLikelihood: '',
ruleSet: [
{
infoTypes: [{}],
rules: [
{
exclusionRule: {
dictionary: {},
excludeByHotword: {hotwordRegex: {}, proximity: {}},
excludeInfoTypes: {infoTypes: [{}]},
matchingType: '',
regex: {}
},
hotwordRule: {}
}
]
}
]
},
inspectTemplateName: '',
item: {
byteItem: {data: '', type: ''},
table: {
headers: [{name: ''}],
rows: [
{
values: [
{
booleanValue: false,
dateValue: {day: 0, month: 0, year: 0},
dayOfWeekValue: '',
floatValue: '',
integerValue: '',
stringValue: '',
timeValue: {hours: 0, minutes: 0, nanos: 0, seconds: 0},
timestampValue: ''
}
]
}
]
},
value: ''
},
locationId: '',
reidentifyConfig: {
imageTransformations: {
transforms: [
{
allInfoTypes: {},
allText: {},
redactionColor: {blue: '', green: '', red: ''},
selectedInfoTypes: {infoTypes: [{}]}
}
]
},
infoTypeTransformations: {
transformations: [
{
infoTypes: [{}],
primitiveTransformation: {
bucketingConfig: {buckets: [{max: {}, min: {}, replacementValue: {}}]},
characterMaskConfig: {
charactersToIgnore: [{charactersToSkip: '', commonCharactersToIgnore: ''}],
maskingCharacter: '',
numberToMask: 0,
reverseOrder: false
},
cryptoDeterministicConfig: {
context: {},
cryptoKey: {
kmsWrapped: {cryptoKeyName: '', wrappedKey: ''},
transient: {name: ''},
unwrapped: {key: ''}
},
surrogateInfoType: {}
},
cryptoHashConfig: {cryptoKey: {}},
cryptoReplaceFfxFpeConfig: {
commonAlphabet: '',
context: {},
cryptoKey: {},
customAlphabet: '',
radix: 0,
surrogateInfoType: {}
},
dateShiftConfig: {context: {}, cryptoKey: {}, lowerBoundDays: 0, upperBoundDays: 0},
fixedSizeBucketingConfig: {bucketSize: '', lowerBound: {}, upperBound: {}},
redactConfig: {},
replaceConfig: {newValue: {}},
replaceDictionaryConfig: {wordList: {}},
replaceWithInfoTypeConfig: {},
timePartConfig: {partToExtract: ''}
}
}
]
},
recordTransformations: {
fieldTransformations: [
{
condition: {
expressions: {
conditions: {conditions: [{field: {}, operator: '', value: {}}]},
logicalOperator: ''
}
},
fields: [{}],
infoTypeTransformations: {},
primitiveTransformation: {}
}
],
recordSuppressions: [{condition: {}}]
},
transformationErrorHandling: {leaveUntransformed: {}, throwError: {}}
},
reidentifyTemplateName: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/:parent/content:reidentify';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"inspectConfig":{"contentOptions":[],"customInfoTypes":[{"detectionRules":[{"hotwordRule":{"hotwordRegex":{"groupIndexes":[],"pattern":""},"likelihoodAdjustment":{"fixedLikelihood":"","relativeLikelihood":0},"proximity":{"windowAfter":0,"windowBefore":0}}}],"dictionary":{"cloudStoragePath":{"path":""},"wordList":{"words":[]}},"exclusionType":"","infoType":{"name":"","version":""},"likelihood":"","regex":{},"storedType":{"createTime":"","name":""},"surrogateType":{}}],"excludeInfoTypes":false,"includeQuote":false,"infoTypes":[{}],"limits":{"maxFindingsPerInfoType":[{"infoType":{},"maxFindings":0}],"maxFindingsPerItem":0,"maxFindingsPerRequest":0},"minLikelihood":"","ruleSet":[{"infoTypes":[{}],"rules":[{"exclusionRule":{"dictionary":{},"excludeByHotword":{"hotwordRegex":{},"proximity":{}},"excludeInfoTypes":{"infoTypes":[{}]},"matchingType":"","regex":{}},"hotwordRule":{}}]}]},"inspectTemplateName":"","item":{"byteItem":{"data":"","type":""},"table":{"headers":[{"name":""}],"rows":[{"values":[{"booleanValue":false,"dateValue":{"day":0,"month":0,"year":0},"dayOfWeekValue":"","floatValue":"","integerValue":"","stringValue":"","timeValue":{"hours":0,"minutes":0,"nanos":0,"seconds":0},"timestampValue":""}]}]},"value":""},"locationId":"","reidentifyConfig":{"imageTransformations":{"transforms":[{"allInfoTypes":{},"allText":{},"redactionColor":{"blue":"","green":"","red":""},"selectedInfoTypes":{"infoTypes":[{}]}}]},"infoTypeTransformations":{"transformations":[{"infoTypes":[{}],"primitiveTransformation":{"bucketingConfig":{"buckets":[{"max":{},"min":{},"replacementValue":{}}]},"characterMaskConfig":{"charactersToIgnore":[{"charactersToSkip":"","commonCharactersToIgnore":""}],"maskingCharacter":"","numberToMask":0,"reverseOrder":false},"cryptoDeterministicConfig":{"context":{},"cryptoKey":{"kmsWrapped":{"cryptoKeyName":"","wrappedKey":""},"transient":{"name":""},"unwrapped":{"key":""}},"surrogateInfoType":{}},"cryptoHashConfig":{"cryptoKey":{}},"cryptoReplaceFfxFpeConfig":{"commonAlphabet":"","context":{},"cryptoKey":{},"customAlphabet":"","radix":0,"surrogateInfoType":{}},"dateShiftConfig":{"context":{},"cryptoKey":{},"lowerBoundDays":0,"upperBoundDays":0},"fixedSizeBucketingConfig":{"bucketSize":"","lowerBound":{},"upperBound":{}},"redactConfig":{},"replaceConfig":{"newValue":{}},"replaceDictionaryConfig":{"wordList":{}},"replaceWithInfoTypeConfig":{},"timePartConfig":{"partToExtract":""}}}]},"recordTransformations":{"fieldTransformations":[{"condition":{"expressions":{"conditions":{"conditions":[{"field":{},"operator":"","value":{}}]},"logicalOperator":""}},"fields":[{}],"infoTypeTransformations":{},"primitiveTransformation":{}}],"recordSuppressions":[{"condition":{}}]},"transformationErrorHandling":{"leaveUntransformed":{},"throwError":{}}},"reidentifyTemplateName":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v2/:parent/content:reidentify',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "inspectConfig": {\n "contentOptions": [],\n "customInfoTypes": [\n {\n "detectionRules": [\n {\n "hotwordRule": {\n "hotwordRegex": {\n "groupIndexes": [],\n "pattern": ""\n },\n "likelihoodAdjustment": {\n "fixedLikelihood": "",\n "relativeLikelihood": 0\n },\n "proximity": {\n "windowAfter": 0,\n "windowBefore": 0\n }\n }\n }\n ],\n "dictionary": {\n "cloudStoragePath": {\n "path": ""\n },\n "wordList": {\n "words": []\n }\n },\n "exclusionType": "",\n "infoType": {\n "name": "",\n "version": ""\n },\n "likelihood": "",\n "regex": {},\n "storedType": {\n "createTime": "",\n "name": ""\n },\n "surrogateType": {}\n }\n ],\n "excludeInfoTypes": false,\n "includeQuote": false,\n "infoTypes": [\n {}\n ],\n "limits": {\n "maxFindingsPerInfoType": [\n {\n "infoType": {},\n "maxFindings": 0\n }\n ],\n "maxFindingsPerItem": 0,\n "maxFindingsPerRequest": 0\n },\n "minLikelihood": "",\n "ruleSet": [\n {\n "infoTypes": [\n {}\n ],\n "rules": [\n {\n "exclusionRule": {\n "dictionary": {},\n "excludeByHotword": {\n "hotwordRegex": {},\n "proximity": {}\n },\n "excludeInfoTypes": {\n "infoTypes": [\n {}\n ]\n },\n "matchingType": "",\n "regex": {}\n },\n "hotwordRule": {}\n }\n ]\n }\n ]\n },\n "inspectTemplateName": "",\n "item": {\n "byteItem": {\n "data": "",\n "type": ""\n },\n "table": {\n "headers": [\n {\n "name": ""\n }\n ],\n "rows": [\n {\n "values": [\n {\n "booleanValue": false,\n "dateValue": {\n "day": 0,\n "month": 0,\n "year": 0\n },\n "dayOfWeekValue": "",\n "floatValue": "",\n "integerValue": "",\n "stringValue": "",\n "timeValue": {\n "hours": 0,\n "minutes": 0,\n "nanos": 0,\n "seconds": 0\n },\n "timestampValue": ""\n }\n ]\n }\n ]\n },\n "value": ""\n },\n "locationId": "",\n "reidentifyConfig": {\n "imageTransformations": {\n "transforms": [\n {\n "allInfoTypes": {},\n "allText": {},\n "redactionColor": {\n "blue": "",\n "green": "",\n "red": ""\n },\n "selectedInfoTypes": {\n "infoTypes": [\n {}\n ]\n }\n }\n ]\n },\n "infoTypeTransformations": {\n "transformations": [\n {\n "infoTypes": [\n {}\n ],\n "primitiveTransformation": {\n "bucketingConfig": {\n "buckets": [\n {\n "max": {},\n "min": {},\n "replacementValue": {}\n }\n ]\n },\n "characterMaskConfig": {\n "charactersToIgnore": [\n {\n "charactersToSkip": "",\n "commonCharactersToIgnore": ""\n }\n ],\n "maskingCharacter": "",\n "numberToMask": 0,\n "reverseOrder": false\n },\n "cryptoDeterministicConfig": {\n "context": {},\n "cryptoKey": {\n "kmsWrapped": {\n "cryptoKeyName": "",\n "wrappedKey": ""\n },\n "transient": {\n "name": ""\n },\n "unwrapped": {\n "key": ""\n }\n },\n "surrogateInfoType": {}\n },\n "cryptoHashConfig": {\n "cryptoKey": {}\n },\n "cryptoReplaceFfxFpeConfig": {\n "commonAlphabet": "",\n "context": {},\n "cryptoKey": {},\n "customAlphabet": "",\n "radix": 0,\n "surrogateInfoType": {}\n },\n "dateShiftConfig": {\n "context": {},\n "cryptoKey": {},\n "lowerBoundDays": 0,\n "upperBoundDays": 0\n },\n "fixedSizeBucketingConfig": {\n "bucketSize": "",\n "lowerBound": {},\n "upperBound": {}\n },\n "redactConfig": {},\n "replaceConfig": {\n "newValue": {}\n },\n "replaceDictionaryConfig": {\n "wordList": {}\n },\n "replaceWithInfoTypeConfig": {},\n "timePartConfig": {\n "partToExtract": ""\n }\n }\n }\n ]\n },\n "recordTransformations": {\n "fieldTransformations": [\n {\n "condition": {\n "expressions": {\n "conditions": {\n "conditions": [\n {\n "field": {},\n "operator": "",\n "value": {}\n }\n ]\n },\n "logicalOperator": ""\n }\n },\n "fields": [\n {}\n ],\n "infoTypeTransformations": {},\n "primitiveTransformation": {}\n }\n ],\n "recordSuppressions": [\n {\n "condition": {}\n }\n ]\n },\n "transformationErrorHandling": {\n "leaveUntransformed": {},\n "throwError": {}\n }\n },\n "reidentifyTemplateName": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"inspectConfig\": {\n \"contentOptions\": [],\n \"customInfoTypes\": [\n {\n \"detectionRules\": [\n {\n \"hotwordRule\": {\n \"hotwordRegex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n },\n \"likelihoodAdjustment\": {\n \"fixedLikelihood\": \"\",\n \"relativeLikelihood\": 0\n },\n \"proximity\": {\n \"windowAfter\": 0,\n \"windowBefore\": 0\n }\n }\n }\n ],\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {\n \"words\": []\n }\n },\n \"exclusionType\": \"\",\n \"infoType\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"likelihood\": \"\",\n \"regex\": {},\n \"storedType\": {\n \"createTime\": \"\",\n \"name\": \"\"\n },\n \"surrogateType\": {}\n }\n ],\n \"excludeInfoTypes\": false,\n \"includeQuote\": false,\n \"infoTypes\": [\n {}\n ],\n \"limits\": {\n \"maxFindingsPerInfoType\": [\n {\n \"infoType\": {},\n \"maxFindings\": 0\n }\n ],\n \"maxFindingsPerItem\": 0,\n \"maxFindingsPerRequest\": 0\n },\n \"minLikelihood\": \"\",\n \"ruleSet\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"rules\": [\n {\n \"exclusionRule\": {\n \"dictionary\": {},\n \"excludeByHotword\": {\n \"hotwordRegex\": {},\n \"proximity\": {}\n },\n \"excludeInfoTypes\": {\n \"infoTypes\": [\n {}\n ]\n },\n \"matchingType\": \"\",\n \"regex\": {}\n },\n \"hotwordRule\": {}\n }\n ]\n }\n ]\n },\n \"inspectTemplateName\": \"\",\n \"item\": {\n \"byteItem\": {\n \"data\": \"\",\n \"type\": \"\"\n },\n \"table\": {\n \"headers\": [\n {\n \"name\": \"\"\n }\n ],\n \"rows\": [\n {\n \"values\": [\n {\n \"booleanValue\": false,\n \"dateValue\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"dayOfWeekValue\": \"\",\n \"floatValue\": \"\",\n \"integerValue\": \"\",\n \"stringValue\": \"\",\n \"timeValue\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"timestampValue\": \"\"\n }\n ]\n }\n ]\n },\n \"value\": \"\"\n },\n \"locationId\": \"\",\n \"reidentifyConfig\": {\n \"imageTransformations\": {\n \"transforms\": [\n {\n \"allInfoTypes\": {},\n \"allText\": {},\n \"redactionColor\": {\n \"blue\": \"\",\n \"green\": \"\",\n \"red\": \"\"\n },\n \"selectedInfoTypes\": {\n \"infoTypes\": [\n {}\n ]\n }\n }\n ]\n },\n \"infoTypeTransformations\": {\n \"transformations\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"primitiveTransformation\": {\n \"bucketingConfig\": {\n \"buckets\": [\n {\n \"max\": {},\n \"min\": {},\n \"replacementValue\": {}\n }\n ]\n },\n \"characterMaskConfig\": {\n \"charactersToIgnore\": [\n {\n \"charactersToSkip\": \"\",\n \"commonCharactersToIgnore\": \"\"\n }\n ],\n \"maskingCharacter\": \"\",\n \"numberToMask\": 0,\n \"reverseOrder\": false\n },\n \"cryptoDeterministicConfig\": {\n \"context\": {},\n \"cryptoKey\": {\n \"kmsWrapped\": {\n \"cryptoKeyName\": \"\",\n \"wrappedKey\": \"\"\n },\n \"transient\": {\n \"name\": \"\"\n },\n \"unwrapped\": {\n \"key\": \"\"\n }\n },\n \"surrogateInfoType\": {}\n },\n \"cryptoHashConfig\": {\n \"cryptoKey\": {}\n },\n \"cryptoReplaceFfxFpeConfig\": {\n \"commonAlphabet\": \"\",\n \"context\": {},\n \"cryptoKey\": {},\n \"customAlphabet\": \"\",\n \"radix\": 0,\n \"surrogateInfoType\": {}\n },\n \"dateShiftConfig\": {\n \"context\": {},\n \"cryptoKey\": {},\n \"lowerBoundDays\": 0,\n \"upperBoundDays\": 0\n },\n \"fixedSizeBucketingConfig\": {\n \"bucketSize\": \"\",\n \"lowerBound\": {},\n \"upperBound\": {}\n },\n \"redactConfig\": {},\n \"replaceConfig\": {\n \"newValue\": {}\n },\n \"replaceDictionaryConfig\": {\n \"wordList\": {}\n },\n \"replaceWithInfoTypeConfig\": {},\n \"timePartConfig\": {\n \"partToExtract\": \"\"\n }\n }\n }\n ]\n },\n \"recordTransformations\": {\n \"fieldTransformations\": [\n {\n \"condition\": {\n \"expressions\": {\n \"conditions\": {\n \"conditions\": [\n {\n \"field\": {},\n \"operator\": \"\",\n \"value\": {}\n }\n ]\n },\n \"logicalOperator\": \"\"\n }\n },\n \"fields\": [\n {}\n ],\n \"infoTypeTransformations\": {},\n \"primitiveTransformation\": {}\n }\n ],\n \"recordSuppressions\": [\n {\n \"condition\": {}\n }\n ]\n },\n \"transformationErrorHandling\": {\n \"leaveUntransformed\": {},\n \"throwError\": {}\n }\n },\n \"reidentifyTemplateName\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v2/:parent/content:reidentify")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/v2/:parent/content:reidentify',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
inspectConfig: {
contentOptions: [],
customInfoTypes: [
{
detectionRules: [
{
hotwordRule: {
hotwordRegex: {groupIndexes: [], pattern: ''},
likelihoodAdjustment: {fixedLikelihood: '', relativeLikelihood: 0},
proximity: {windowAfter: 0, windowBefore: 0}
}
}
],
dictionary: {cloudStoragePath: {path: ''}, wordList: {words: []}},
exclusionType: '',
infoType: {name: '', version: ''},
likelihood: '',
regex: {},
storedType: {createTime: '', name: ''},
surrogateType: {}
}
],
excludeInfoTypes: false,
includeQuote: false,
infoTypes: [{}],
limits: {
maxFindingsPerInfoType: [{infoType: {}, maxFindings: 0}],
maxFindingsPerItem: 0,
maxFindingsPerRequest: 0
},
minLikelihood: '',
ruleSet: [
{
infoTypes: [{}],
rules: [
{
exclusionRule: {
dictionary: {},
excludeByHotword: {hotwordRegex: {}, proximity: {}},
excludeInfoTypes: {infoTypes: [{}]},
matchingType: '',
regex: {}
},
hotwordRule: {}
}
]
}
]
},
inspectTemplateName: '',
item: {
byteItem: {data: '', type: ''},
table: {
headers: [{name: ''}],
rows: [
{
values: [
{
booleanValue: false,
dateValue: {day: 0, month: 0, year: 0},
dayOfWeekValue: '',
floatValue: '',
integerValue: '',
stringValue: '',
timeValue: {hours: 0, minutes: 0, nanos: 0, seconds: 0},
timestampValue: ''
}
]
}
]
},
value: ''
},
locationId: '',
reidentifyConfig: {
imageTransformations: {
transforms: [
{
allInfoTypes: {},
allText: {},
redactionColor: {blue: '', green: '', red: ''},
selectedInfoTypes: {infoTypes: [{}]}
}
]
},
infoTypeTransformations: {
transformations: [
{
infoTypes: [{}],
primitiveTransformation: {
bucketingConfig: {buckets: [{max: {}, min: {}, replacementValue: {}}]},
characterMaskConfig: {
charactersToIgnore: [{charactersToSkip: '', commonCharactersToIgnore: ''}],
maskingCharacter: '',
numberToMask: 0,
reverseOrder: false
},
cryptoDeterministicConfig: {
context: {},
cryptoKey: {
kmsWrapped: {cryptoKeyName: '', wrappedKey: ''},
transient: {name: ''},
unwrapped: {key: ''}
},
surrogateInfoType: {}
},
cryptoHashConfig: {cryptoKey: {}},
cryptoReplaceFfxFpeConfig: {
commonAlphabet: '',
context: {},
cryptoKey: {},
customAlphabet: '',
radix: 0,
surrogateInfoType: {}
},
dateShiftConfig: {context: {}, cryptoKey: {}, lowerBoundDays: 0, upperBoundDays: 0},
fixedSizeBucketingConfig: {bucketSize: '', lowerBound: {}, upperBound: {}},
redactConfig: {},
replaceConfig: {newValue: {}},
replaceDictionaryConfig: {wordList: {}},
replaceWithInfoTypeConfig: {},
timePartConfig: {partToExtract: ''}
}
}
]
},
recordTransformations: {
fieldTransformations: [
{
condition: {
expressions: {
conditions: {conditions: [{field: {}, operator: '', value: {}}]},
logicalOperator: ''
}
},
fields: [{}],
infoTypeTransformations: {},
primitiveTransformation: {}
}
],
recordSuppressions: [{condition: {}}]
},
transformationErrorHandling: {leaveUntransformed: {}, throwError: {}}
},
reidentifyTemplateName: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v2/:parent/content:reidentify',
headers: {'content-type': 'application/json'},
body: {
inspectConfig: {
contentOptions: [],
customInfoTypes: [
{
detectionRules: [
{
hotwordRule: {
hotwordRegex: {groupIndexes: [], pattern: ''},
likelihoodAdjustment: {fixedLikelihood: '', relativeLikelihood: 0},
proximity: {windowAfter: 0, windowBefore: 0}
}
}
],
dictionary: {cloudStoragePath: {path: ''}, wordList: {words: []}},
exclusionType: '',
infoType: {name: '', version: ''},
likelihood: '',
regex: {},
storedType: {createTime: '', name: ''},
surrogateType: {}
}
],
excludeInfoTypes: false,
includeQuote: false,
infoTypes: [{}],
limits: {
maxFindingsPerInfoType: [{infoType: {}, maxFindings: 0}],
maxFindingsPerItem: 0,
maxFindingsPerRequest: 0
},
minLikelihood: '',
ruleSet: [
{
infoTypes: [{}],
rules: [
{
exclusionRule: {
dictionary: {},
excludeByHotword: {hotwordRegex: {}, proximity: {}},
excludeInfoTypes: {infoTypes: [{}]},
matchingType: '',
regex: {}
},
hotwordRule: {}
}
]
}
]
},
inspectTemplateName: '',
item: {
byteItem: {data: '', type: ''},
table: {
headers: [{name: ''}],
rows: [
{
values: [
{
booleanValue: false,
dateValue: {day: 0, month: 0, year: 0},
dayOfWeekValue: '',
floatValue: '',
integerValue: '',
stringValue: '',
timeValue: {hours: 0, minutes: 0, nanos: 0, seconds: 0},
timestampValue: ''
}
]
}
]
},
value: ''
},
locationId: '',
reidentifyConfig: {
imageTransformations: {
transforms: [
{
allInfoTypes: {},
allText: {},
redactionColor: {blue: '', green: '', red: ''},
selectedInfoTypes: {infoTypes: [{}]}
}
]
},
infoTypeTransformations: {
transformations: [
{
infoTypes: [{}],
primitiveTransformation: {
bucketingConfig: {buckets: [{max: {}, min: {}, replacementValue: {}}]},
characterMaskConfig: {
charactersToIgnore: [{charactersToSkip: '', commonCharactersToIgnore: ''}],
maskingCharacter: '',
numberToMask: 0,
reverseOrder: false
},
cryptoDeterministicConfig: {
context: {},
cryptoKey: {
kmsWrapped: {cryptoKeyName: '', wrappedKey: ''},
transient: {name: ''},
unwrapped: {key: ''}
},
surrogateInfoType: {}
},
cryptoHashConfig: {cryptoKey: {}},
cryptoReplaceFfxFpeConfig: {
commonAlphabet: '',
context: {},
cryptoKey: {},
customAlphabet: '',
radix: 0,
surrogateInfoType: {}
},
dateShiftConfig: {context: {}, cryptoKey: {}, lowerBoundDays: 0, upperBoundDays: 0},
fixedSizeBucketingConfig: {bucketSize: '', lowerBound: {}, upperBound: {}},
redactConfig: {},
replaceConfig: {newValue: {}},
replaceDictionaryConfig: {wordList: {}},
replaceWithInfoTypeConfig: {},
timePartConfig: {partToExtract: ''}
}
}
]
},
recordTransformations: {
fieldTransformations: [
{
condition: {
expressions: {
conditions: {conditions: [{field: {}, operator: '', value: {}}]},
logicalOperator: ''
}
},
fields: [{}],
infoTypeTransformations: {},
primitiveTransformation: {}
}
],
recordSuppressions: [{condition: {}}]
},
transformationErrorHandling: {leaveUntransformed: {}, throwError: {}}
},
reidentifyTemplateName: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/v2/:parent/content:reidentify');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
inspectConfig: {
contentOptions: [],
customInfoTypes: [
{
detectionRules: [
{
hotwordRule: {
hotwordRegex: {
groupIndexes: [],
pattern: ''
},
likelihoodAdjustment: {
fixedLikelihood: '',
relativeLikelihood: 0
},
proximity: {
windowAfter: 0,
windowBefore: 0
}
}
}
],
dictionary: {
cloudStoragePath: {
path: ''
},
wordList: {
words: []
}
},
exclusionType: '',
infoType: {
name: '',
version: ''
},
likelihood: '',
regex: {},
storedType: {
createTime: '',
name: ''
},
surrogateType: {}
}
],
excludeInfoTypes: false,
includeQuote: false,
infoTypes: [
{}
],
limits: {
maxFindingsPerInfoType: [
{
infoType: {},
maxFindings: 0
}
],
maxFindingsPerItem: 0,
maxFindingsPerRequest: 0
},
minLikelihood: '',
ruleSet: [
{
infoTypes: [
{}
],
rules: [
{
exclusionRule: {
dictionary: {},
excludeByHotword: {
hotwordRegex: {},
proximity: {}
},
excludeInfoTypes: {
infoTypes: [
{}
]
},
matchingType: '',
regex: {}
},
hotwordRule: {}
}
]
}
]
},
inspectTemplateName: '',
item: {
byteItem: {
data: '',
type: ''
},
table: {
headers: [
{
name: ''
}
],
rows: [
{
values: [
{
booleanValue: false,
dateValue: {
day: 0,
month: 0,
year: 0
},
dayOfWeekValue: '',
floatValue: '',
integerValue: '',
stringValue: '',
timeValue: {
hours: 0,
minutes: 0,
nanos: 0,
seconds: 0
},
timestampValue: ''
}
]
}
]
},
value: ''
},
locationId: '',
reidentifyConfig: {
imageTransformations: {
transforms: [
{
allInfoTypes: {},
allText: {},
redactionColor: {
blue: '',
green: '',
red: ''
},
selectedInfoTypes: {
infoTypes: [
{}
]
}
}
]
},
infoTypeTransformations: {
transformations: [
{
infoTypes: [
{}
],
primitiveTransformation: {
bucketingConfig: {
buckets: [
{
max: {},
min: {},
replacementValue: {}
}
]
},
characterMaskConfig: {
charactersToIgnore: [
{
charactersToSkip: '',
commonCharactersToIgnore: ''
}
],
maskingCharacter: '',
numberToMask: 0,
reverseOrder: false
},
cryptoDeterministicConfig: {
context: {},
cryptoKey: {
kmsWrapped: {
cryptoKeyName: '',
wrappedKey: ''
},
transient: {
name: ''
},
unwrapped: {
key: ''
}
},
surrogateInfoType: {}
},
cryptoHashConfig: {
cryptoKey: {}
},
cryptoReplaceFfxFpeConfig: {
commonAlphabet: '',
context: {},
cryptoKey: {},
customAlphabet: '',
radix: 0,
surrogateInfoType: {}
},
dateShiftConfig: {
context: {},
cryptoKey: {},
lowerBoundDays: 0,
upperBoundDays: 0
},
fixedSizeBucketingConfig: {
bucketSize: '',
lowerBound: {},
upperBound: {}
},
redactConfig: {},
replaceConfig: {
newValue: {}
},
replaceDictionaryConfig: {
wordList: {}
},
replaceWithInfoTypeConfig: {},
timePartConfig: {
partToExtract: ''
}
}
}
]
},
recordTransformations: {
fieldTransformations: [
{
condition: {
expressions: {
conditions: {
conditions: [
{
field: {},
operator: '',
value: {}
}
]
},
logicalOperator: ''
}
},
fields: [
{}
],
infoTypeTransformations: {},
primitiveTransformation: {}
}
],
recordSuppressions: [
{
condition: {}
}
]
},
transformationErrorHandling: {
leaveUntransformed: {},
throwError: {}
}
},
reidentifyTemplateName: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/v2/:parent/content:reidentify',
headers: {'content-type': 'application/json'},
data: {
inspectConfig: {
contentOptions: [],
customInfoTypes: [
{
detectionRules: [
{
hotwordRule: {
hotwordRegex: {groupIndexes: [], pattern: ''},
likelihoodAdjustment: {fixedLikelihood: '', relativeLikelihood: 0},
proximity: {windowAfter: 0, windowBefore: 0}
}
}
],
dictionary: {cloudStoragePath: {path: ''}, wordList: {words: []}},
exclusionType: '',
infoType: {name: '', version: ''},
likelihood: '',
regex: {},
storedType: {createTime: '', name: ''},
surrogateType: {}
}
],
excludeInfoTypes: false,
includeQuote: false,
infoTypes: [{}],
limits: {
maxFindingsPerInfoType: [{infoType: {}, maxFindings: 0}],
maxFindingsPerItem: 0,
maxFindingsPerRequest: 0
},
minLikelihood: '',
ruleSet: [
{
infoTypes: [{}],
rules: [
{
exclusionRule: {
dictionary: {},
excludeByHotword: {hotwordRegex: {}, proximity: {}},
excludeInfoTypes: {infoTypes: [{}]},
matchingType: '',
regex: {}
},
hotwordRule: {}
}
]
}
]
},
inspectTemplateName: '',
item: {
byteItem: {data: '', type: ''},
table: {
headers: [{name: ''}],
rows: [
{
values: [
{
booleanValue: false,
dateValue: {day: 0, month: 0, year: 0},
dayOfWeekValue: '',
floatValue: '',
integerValue: '',
stringValue: '',
timeValue: {hours: 0, minutes: 0, nanos: 0, seconds: 0},
timestampValue: ''
}
]
}
]
},
value: ''
},
locationId: '',
reidentifyConfig: {
imageTransformations: {
transforms: [
{
allInfoTypes: {},
allText: {},
redactionColor: {blue: '', green: '', red: ''},
selectedInfoTypes: {infoTypes: [{}]}
}
]
},
infoTypeTransformations: {
transformations: [
{
infoTypes: [{}],
primitiveTransformation: {
bucketingConfig: {buckets: [{max: {}, min: {}, replacementValue: {}}]},
characterMaskConfig: {
charactersToIgnore: [{charactersToSkip: '', commonCharactersToIgnore: ''}],
maskingCharacter: '',
numberToMask: 0,
reverseOrder: false
},
cryptoDeterministicConfig: {
context: {},
cryptoKey: {
kmsWrapped: {cryptoKeyName: '', wrappedKey: ''},
transient: {name: ''},
unwrapped: {key: ''}
},
surrogateInfoType: {}
},
cryptoHashConfig: {cryptoKey: {}},
cryptoReplaceFfxFpeConfig: {
commonAlphabet: '',
context: {},
cryptoKey: {},
customAlphabet: '',
radix: 0,
surrogateInfoType: {}
},
dateShiftConfig: {context: {}, cryptoKey: {}, lowerBoundDays: 0, upperBoundDays: 0},
fixedSizeBucketingConfig: {bucketSize: '', lowerBound: {}, upperBound: {}},
redactConfig: {},
replaceConfig: {newValue: {}},
replaceDictionaryConfig: {wordList: {}},
replaceWithInfoTypeConfig: {},
timePartConfig: {partToExtract: ''}
}
}
]
},
recordTransformations: {
fieldTransformations: [
{
condition: {
expressions: {
conditions: {conditions: [{field: {}, operator: '', value: {}}]},
logicalOperator: ''
}
},
fields: [{}],
infoTypeTransformations: {},
primitiveTransformation: {}
}
],
recordSuppressions: [{condition: {}}]
},
transformationErrorHandling: {leaveUntransformed: {}, throwError: {}}
},
reidentifyTemplateName: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/:parent/content:reidentify';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"inspectConfig":{"contentOptions":[],"customInfoTypes":[{"detectionRules":[{"hotwordRule":{"hotwordRegex":{"groupIndexes":[],"pattern":""},"likelihoodAdjustment":{"fixedLikelihood":"","relativeLikelihood":0},"proximity":{"windowAfter":0,"windowBefore":0}}}],"dictionary":{"cloudStoragePath":{"path":""},"wordList":{"words":[]}},"exclusionType":"","infoType":{"name":"","version":""},"likelihood":"","regex":{},"storedType":{"createTime":"","name":""},"surrogateType":{}}],"excludeInfoTypes":false,"includeQuote":false,"infoTypes":[{}],"limits":{"maxFindingsPerInfoType":[{"infoType":{},"maxFindings":0}],"maxFindingsPerItem":0,"maxFindingsPerRequest":0},"minLikelihood":"","ruleSet":[{"infoTypes":[{}],"rules":[{"exclusionRule":{"dictionary":{},"excludeByHotword":{"hotwordRegex":{},"proximity":{}},"excludeInfoTypes":{"infoTypes":[{}]},"matchingType":"","regex":{}},"hotwordRule":{}}]}]},"inspectTemplateName":"","item":{"byteItem":{"data":"","type":""},"table":{"headers":[{"name":""}],"rows":[{"values":[{"booleanValue":false,"dateValue":{"day":0,"month":0,"year":0},"dayOfWeekValue":"","floatValue":"","integerValue":"","stringValue":"","timeValue":{"hours":0,"minutes":0,"nanos":0,"seconds":0},"timestampValue":""}]}]},"value":""},"locationId":"","reidentifyConfig":{"imageTransformations":{"transforms":[{"allInfoTypes":{},"allText":{},"redactionColor":{"blue":"","green":"","red":""},"selectedInfoTypes":{"infoTypes":[{}]}}]},"infoTypeTransformations":{"transformations":[{"infoTypes":[{}],"primitiveTransformation":{"bucketingConfig":{"buckets":[{"max":{},"min":{},"replacementValue":{}}]},"characterMaskConfig":{"charactersToIgnore":[{"charactersToSkip":"","commonCharactersToIgnore":""}],"maskingCharacter":"","numberToMask":0,"reverseOrder":false},"cryptoDeterministicConfig":{"context":{},"cryptoKey":{"kmsWrapped":{"cryptoKeyName":"","wrappedKey":""},"transient":{"name":""},"unwrapped":{"key":""}},"surrogateInfoType":{}},"cryptoHashConfig":{"cryptoKey":{}},"cryptoReplaceFfxFpeConfig":{"commonAlphabet":"","context":{},"cryptoKey":{},"customAlphabet":"","radix":0,"surrogateInfoType":{}},"dateShiftConfig":{"context":{},"cryptoKey":{},"lowerBoundDays":0,"upperBoundDays":0},"fixedSizeBucketingConfig":{"bucketSize":"","lowerBound":{},"upperBound":{}},"redactConfig":{},"replaceConfig":{"newValue":{}},"replaceDictionaryConfig":{"wordList":{}},"replaceWithInfoTypeConfig":{},"timePartConfig":{"partToExtract":""}}}]},"recordTransformations":{"fieldTransformations":[{"condition":{"expressions":{"conditions":{"conditions":[{"field":{},"operator":"","value":{}}]},"logicalOperator":""}},"fields":[{}],"infoTypeTransformations":{},"primitiveTransformation":{}}],"recordSuppressions":[{"condition":{}}]},"transformationErrorHandling":{"leaveUntransformed":{},"throwError":{}}},"reidentifyTemplateName":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"inspectConfig": @{ @"contentOptions": @[ ], @"customInfoTypes": @[ @{ @"detectionRules": @[ @{ @"hotwordRule": @{ @"hotwordRegex": @{ @"groupIndexes": @[ ], @"pattern": @"" }, @"likelihoodAdjustment": @{ @"fixedLikelihood": @"", @"relativeLikelihood": @0 }, @"proximity": @{ @"windowAfter": @0, @"windowBefore": @0 } } } ], @"dictionary": @{ @"cloudStoragePath": @{ @"path": @"" }, @"wordList": @{ @"words": @[ ] } }, @"exclusionType": @"", @"infoType": @{ @"name": @"", @"version": @"" }, @"likelihood": @"", @"regex": @{ }, @"storedType": @{ @"createTime": @"", @"name": @"" }, @"surrogateType": @{ } } ], @"excludeInfoTypes": @NO, @"includeQuote": @NO, @"infoTypes": @[ @{ } ], @"limits": @{ @"maxFindingsPerInfoType": @[ @{ @"infoType": @{ }, @"maxFindings": @0 } ], @"maxFindingsPerItem": @0, @"maxFindingsPerRequest": @0 }, @"minLikelihood": @"", @"ruleSet": @[ @{ @"infoTypes": @[ @{ } ], @"rules": @[ @{ @"exclusionRule": @{ @"dictionary": @{ }, @"excludeByHotword": @{ @"hotwordRegex": @{ }, @"proximity": @{ } }, @"excludeInfoTypes": @{ @"infoTypes": @[ @{ } ] }, @"matchingType": @"", @"regex": @{ } }, @"hotwordRule": @{ } } ] } ] },
@"inspectTemplateName": @"",
@"item": @{ @"byteItem": @{ @"data": @"", @"type": @"" }, @"table": @{ @"headers": @[ @{ @"name": @"" } ], @"rows": @[ @{ @"values": @[ @{ @"booleanValue": @NO, @"dateValue": @{ @"day": @0, @"month": @0, @"year": @0 }, @"dayOfWeekValue": @"", @"floatValue": @"", @"integerValue": @"", @"stringValue": @"", @"timeValue": @{ @"hours": @0, @"minutes": @0, @"nanos": @0, @"seconds": @0 }, @"timestampValue": @"" } ] } ] }, @"value": @"" },
@"locationId": @"",
@"reidentifyConfig": @{ @"imageTransformations": @{ @"transforms": @[ @{ @"allInfoTypes": @{ }, @"allText": @{ }, @"redactionColor": @{ @"blue": @"", @"green": @"", @"red": @"" }, @"selectedInfoTypes": @{ @"infoTypes": @[ @{ } ] } } ] }, @"infoTypeTransformations": @{ @"transformations": @[ @{ @"infoTypes": @[ @{ } ], @"primitiveTransformation": @{ @"bucketingConfig": @{ @"buckets": @[ @{ @"max": @{ }, @"min": @{ }, @"replacementValue": @{ } } ] }, @"characterMaskConfig": @{ @"charactersToIgnore": @[ @{ @"charactersToSkip": @"", @"commonCharactersToIgnore": @"" } ], @"maskingCharacter": @"", @"numberToMask": @0, @"reverseOrder": @NO }, @"cryptoDeterministicConfig": @{ @"context": @{ }, @"cryptoKey": @{ @"kmsWrapped": @{ @"cryptoKeyName": @"", @"wrappedKey": @"" }, @"transient": @{ @"name": @"" }, @"unwrapped": @{ @"key": @"" } }, @"surrogateInfoType": @{ } }, @"cryptoHashConfig": @{ @"cryptoKey": @{ } }, @"cryptoReplaceFfxFpeConfig": @{ @"commonAlphabet": @"", @"context": @{ }, @"cryptoKey": @{ }, @"customAlphabet": @"", @"radix": @0, @"surrogateInfoType": @{ } }, @"dateShiftConfig": @{ @"context": @{ }, @"cryptoKey": @{ }, @"lowerBoundDays": @0, @"upperBoundDays": @0 }, @"fixedSizeBucketingConfig": @{ @"bucketSize": @"", @"lowerBound": @{ }, @"upperBound": @{ } }, @"redactConfig": @{ }, @"replaceConfig": @{ @"newValue": @{ } }, @"replaceDictionaryConfig": @{ @"wordList": @{ } }, @"replaceWithInfoTypeConfig": @{ }, @"timePartConfig": @{ @"partToExtract": @"" } } } ] }, @"recordTransformations": @{ @"fieldTransformations": @[ @{ @"condition": @{ @"expressions": @{ @"conditions": @{ @"conditions": @[ @{ @"field": @{ }, @"operator": @"", @"value": @{ } } ] }, @"logicalOperator": @"" } }, @"fields": @[ @{ } ], @"infoTypeTransformations": @{ }, @"primitiveTransformation": @{ } } ], @"recordSuppressions": @[ @{ @"condition": @{ } } ] }, @"transformationErrorHandling": @{ @"leaveUntransformed": @{ }, @"throwError": @{ } } },
@"reidentifyTemplateName": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v2/:parent/content:reidentify"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v2/:parent/content:reidentify" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"inspectConfig\": {\n \"contentOptions\": [],\n \"customInfoTypes\": [\n {\n \"detectionRules\": [\n {\n \"hotwordRule\": {\n \"hotwordRegex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n },\n \"likelihoodAdjustment\": {\n \"fixedLikelihood\": \"\",\n \"relativeLikelihood\": 0\n },\n \"proximity\": {\n \"windowAfter\": 0,\n \"windowBefore\": 0\n }\n }\n }\n ],\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {\n \"words\": []\n }\n },\n \"exclusionType\": \"\",\n \"infoType\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"likelihood\": \"\",\n \"regex\": {},\n \"storedType\": {\n \"createTime\": \"\",\n \"name\": \"\"\n },\n \"surrogateType\": {}\n }\n ],\n \"excludeInfoTypes\": false,\n \"includeQuote\": false,\n \"infoTypes\": [\n {}\n ],\n \"limits\": {\n \"maxFindingsPerInfoType\": [\n {\n \"infoType\": {},\n \"maxFindings\": 0\n }\n ],\n \"maxFindingsPerItem\": 0,\n \"maxFindingsPerRequest\": 0\n },\n \"minLikelihood\": \"\",\n \"ruleSet\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"rules\": [\n {\n \"exclusionRule\": {\n \"dictionary\": {},\n \"excludeByHotword\": {\n \"hotwordRegex\": {},\n \"proximity\": {}\n },\n \"excludeInfoTypes\": {\n \"infoTypes\": [\n {}\n ]\n },\n \"matchingType\": \"\",\n \"regex\": {}\n },\n \"hotwordRule\": {}\n }\n ]\n }\n ]\n },\n \"inspectTemplateName\": \"\",\n \"item\": {\n \"byteItem\": {\n \"data\": \"\",\n \"type\": \"\"\n },\n \"table\": {\n \"headers\": [\n {\n \"name\": \"\"\n }\n ],\n \"rows\": [\n {\n \"values\": [\n {\n \"booleanValue\": false,\n \"dateValue\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"dayOfWeekValue\": \"\",\n \"floatValue\": \"\",\n \"integerValue\": \"\",\n \"stringValue\": \"\",\n \"timeValue\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"timestampValue\": \"\"\n }\n ]\n }\n ]\n },\n \"value\": \"\"\n },\n \"locationId\": \"\",\n \"reidentifyConfig\": {\n \"imageTransformations\": {\n \"transforms\": [\n {\n \"allInfoTypes\": {},\n \"allText\": {},\n \"redactionColor\": {\n \"blue\": \"\",\n \"green\": \"\",\n \"red\": \"\"\n },\n \"selectedInfoTypes\": {\n \"infoTypes\": [\n {}\n ]\n }\n }\n ]\n },\n \"infoTypeTransformations\": {\n \"transformations\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"primitiveTransformation\": {\n \"bucketingConfig\": {\n \"buckets\": [\n {\n \"max\": {},\n \"min\": {},\n \"replacementValue\": {}\n }\n ]\n },\n \"characterMaskConfig\": {\n \"charactersToIgnore\": [\n {\n \"charactersToSkip\": \"\",\n \"commonCharactersToIgnore\": \"\"\n }\n ],\n \"maskingCharacter\": \"\",\n \"numberToMask\": 0,\n \"reverseOrder\": false\n },\n \"cryptoDeterministicConfig\": {\n \"context\": {},\n \"cryptoKey\": {\n \"kmsWrapped\": {\n \"cryptoKeyName\": \"\",\n \"wrappedKey\": \"\"\n },\n \"transient\": {\n \"name\": \"\"\n },\n \"unwrapped\": {\n \"key\": \"\"\n }\n },\n \"surrogateInfoType\": {}\n },\n \"cryptoHashConfig\": {\n \"cryptoKey\": {}\n },\n \"cryptoReplaceFfxFpeConfig\": {\n \"commonAlphabet\": \"\",\n \"context\": {},\n \"cryptoKey\": {},\n \"customAlphabet\": \"\",\n \"radix\": 0,\n \"surrogateInfoType\": {}\n },\n \"dateShiftConfig\": {\n \"context\": {},\n \"cryptoKey\": {},\n \"lowerBoundDays\": 0,\n \"upperBoundDays\": 0\n },\n \"fixedSizeBucketingConfig\": {\n \"bucketSize\": \"\",\n \"lowerBound\": {},\n \"upperBound\": {}\n },\n \"redactConfig\": {},\n \"replaceConfig\": {\n \"newValue\": {}\n },\n \"replaceDictionaryConfig\": {\n \"wordList\": {}\n },\n \"replaceWithInfoTypeConfig\": {},\n \"timePartConfig\": {\n \"partToExtract\": \"\"\n }\n }\n }\n ]\n },\n \"recordTransformations\": {\n \"fieldTransformations\": [\n {\n \"condition\": {\n \"expressions\": {\n \"conditions\": {\n \"conditions\": [\n {\n \"field\": {},\n \"operator\": \"\",\n \"value\": {}\n }\n ]\n },\n \"logicalOperator\": \"\"\n }\n },\n \"fields\": [\n {}\n ],\n \"infoTypeTransformations\": {},\n \"primitiveTransformation\": {}\n }\n ],\n \"recordSuppressions\": [\n {\n \"condition\": {}\n }\n ]\n },\n \"transformationErrorHandling\": {\n \"leaveUntransformed\": {},\n \"throwError\": {}\n }\n },\n \"reidentifyTemplateName\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/:parent/content:reidentify",
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([
'inspectConfig' => [
'contentOptions' => [
],
'customInfoTypes' => [
[
'detectionRules' => [
[
'hotwordRule' => [
'hotwordRegex' => [
'groupIndexes' => [
],
'pattern' => ''
],
'likelihoodAdjustment' => [
'fixedLikelihood' => '',
'relativeLikelihood' => 0
],
'proximity' => [
'windowAfter' => 0,
'windowBefore' => 0
]
]
]
],
'dictionary' => [
'cloudStoragePath' => [
'path' => ''
],
'wordList' => [
'words' => [
]
]
],
'exclusionType' => '',
'infoType' => [
'name' => '',
'version' => ''
],
'likelihood' => '',
'regex' => [
],
'storedType' => [
'createTime' => '',
'name' => ''
],
'surrogateType' => [
]
]
],
'excludeInfoTypes' => null,
'includeQuote' => null,
'infoTypes' => [
[
]
],
'limits' => [
'maxFindingsPerInfoType' => [
[
'infoType' => [
],
'maxFindings' => 0
]
],
'maxFindingsPerItem' => 0,
'maxFindingsPerRequest' => 0
],
'minLikelihood' => '',
'ruleSet' => [
[
'infoTypes' => [
[
]
],
'rules' => [
[
'exclusionRule' => [
'dictionary' => [
],
'excludeByHotword' => [
'hotwordRegex' => [
],
'proximity' => [
]
],
'excludeInfoTypes' => [
'infoTypes' => [
[
]
]
],
'matchingType' => '',
'regex' => [
]
],
'hotwordRule' => [
]
]
]
]
]
],
'inspectTemplateName' => '',
'item' => [
'byteItem' => [
'data' => '',
'type' => ''
],
'table' => [
'headers' => [
[
'name' => ''
]
],
'rows' => [
[
'values' => [
[
'booleanValue' => null,
'dateValue' => [
'day' => 0,
'month' => 0,
'year' => 0
],
'dayOfWeekValue' => '',
'floatValue' => '',
'integerValue' => '',
'stringValue' => '',
'timeValue' => [
'hours' => 0,
'minutes' => 0,
'nanos' => 0,
'seconds' => 0
],
'timestampValue' => ''
]
]
]
]
],
'value' => ''
],
'locationId' => '',
'reidentifyConfig' => [
'imageTransformations' => [
'transforms' => [
[
'allInfoTypes' => [
],
'allText' => [
],
'redactionColor' => [
'blue' => '',
'green' => '',
'red' => ''
],
'selectedInfoTypes' => [
'infoTypes' => [
[
]
]
]
]
]
],
'infoTypeTransformations' => [
'transformations' => [
[
'infoTypes' => [
[
]
],
'primitiveTransformation' => [
'bucketingConfig' => [
'buckets' => [
[
'max' => [
],
'min' => [
],
'replacementValue' => [
]
]
]
],
'characterMaskConfig' => [
'charactersToIgnore' => [
[
'charactersToSkip' => '',
'commonCharactersToIgnore' => ''
]
],
'maskingCharacter' => '',
'numberToMask' => 0,
'reverseOrder' => null
],
'cryptoDeterministicConfig' => [
'context' => [
],
'cryptoKey' => [
'kmsWrapped' => [
'cryptoKeyName' => '',
'wrappedKey' => ''
],
'transient' => [
'name' => ''
],
'unwrapped' => [
'key' => ''
]
],
'surrogateInfoType' => [
]
],
'cryptoHashConfig' => [
'cryptoKey' => [
]
],
'cryptoReplaceFfxFpeConfig' => [
'commonAlphabet' => '',
'context' => [
],
'cryptoKey' => [
],
'customAlphabet' => '',
'radix' => 0,
'surrogateInfoType' => [
]
],
'dateShiftConfig' => [
'context' => [
],
'cryptoKey' => [
],
'lowerBoundDays' => 0,
'upperBoundDays' => 0
],
'fixedSizeBucketingConfig' => [
'bucketSize' => '',
'lowerBound' => [
],
'upperBound' => [
]
],
'redactConfig' => [
],
'replaceConfig' => [
'newValue' => [
]
],
'replaceDictionaryConfig' => [
'wordList' => [
]
],
'replaceWithInfoTypeConfig' => [
],
'timePartConfig' => [
'partToExtract' => ''
]
]
]
]
],
'recordTransformations' => [
'fieldTransformations' => [
[
'condition' => [
'expressions' => [
'conditions' => [
'conditions' => [
[
'field' => [
],
'operator' => '',
'value' => [
]
]
]
],
'logicalOperator' => ''
]
],
'fields' => [
[
]
],
'infoTypeTransformations' => [
],
'primitiveTransformation' => [
]
]
],
'recordSuppressions' => [
[
'condition' => [
]
]
]
],
'transformationErrorHandling' => [
'leaveUntransformed' => [
],
'throwError' => [
]
]
],
'reidentifyTemplateName' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/v2/:parent/content:reidentify', [
'body' => '{
"inspectConfig": {
"contentOptions": [],
"customInfoTypes": [
{
"detectionRules": [
{
"hotwordRule": {
"hotwordRegex": {
"groupIndexes": [],
"pattern": ""
},
"likelihoodAdjustment": {
"fixedLikelihood": "",
"relativeLikelihood": 0
},
"proximity": {
"windowAfter": 0,
"windowBefore": 0
}
}
}
],
"dictionary": {
"cloudStoragePath": {
"path": ""
},
"wordList": {
"words": []
}
},
"exclusionType": "",
"infoType": {
"name": "",
"version": ""
},
"likelihood": "",
"regex": {},
"storedType": {
"createTime": "",
"name": ""
},
"surrogateType": {}
}
],
"excludeInfoTypes": false,
"includeQuote": false,
"infoTypes": [
{}
],
"limits": {
"maxFindingsPerInfoType": [
{
"infoType": {},
"maxFindings": 0
}
],
"maxFindingsPerItem": 0,
"maxFindingsPerRequest": 0
},
"minLikelihood": "",
"ruleSet": [
{
"infoTypes": [
{}
],
"rules": [
{
"exclusionRule": {
"dictionary": {},
"excludeByHotword": {
"hotwordRegex": {},
"proximity": {}
},
"excludeInfoTypes": {
"infoTypes": [
{}
]
},
"matchingType": "",
"regex": {}
},
"hotwordRule": {}
}
]
}
]
},
"inspectTemplateName": "",
"item": {
"byteItem": {
"data": "",
"type": ""
},
"table": {
"headers": [
{
"name": ""
}
],
"rows": [
{
"values": [
{
"booleanValue": false,
"dateValue": {
"day": 0,
"month": 0,
"year": 0
},
"dayOfWeekValue": "",
"floatValue": "",
"integerValue": "",
"stringValue": "",
"timeValue": {
"hours": 0,
"minutes": 0,
"nanos": 0,
"seconds": 0
},
"timestampValue": ""
}
]
}
]
},
"value": ""
},
"locationId": "",
"reidentifyConfig": {
"imageTransformations": {
"transforms": [
{
"allInfoTypes": {},
"allText": {},
"redactionColor": {
"blue": "",
"green": "",
"red": ""
},
"selectedInfoTypes": {
"infoTypes": [
{}
]
}
}
]
},
"infoTypeTransformations": {
"transformations": [
{
"infoTypes": [
{}
],
"primitiveTransformation": {
"bucketingConfig": {
"buckets": [
{
"max": {},
"min": {},
"replacementValue": {}
}
]
},
"characterMaskConfig": {
"charactersToIgnore": [
{
"charactersToSkip": "",
"commonCharactersToIgnore": ""
}
],
"maskingCharacter": "",
"numberToMask": 0,
"reverseOrder": false
},
"cryptoDeterministicConfig": {
"context": {},
"cryptoKey": {
"kmsWrapped": {
"cryptoKeyName": "",
"wrappedKey": ""
},
"transient": {
"name": ""
},
"unwrapped": {
"key": ""
}
},
"surrogateInfoType": {}
},
"cryptoHashConfig": {
"cryptoKey": {}
},
"cryptoReplaceFfxFpeConfig": {
"commonAlphabet": "",
"context": {},
"cryptoKey": {},
"customAlphabet": "",
"radix": 0,
"surrogateInfoType": {}
},
"dateShiftConfig": {
"context": {},
"cryptoKey": {},
"lowerBoundDays": 0,
"upperBoundDays": 0
},
"fixedSizeBucketingConfig": {
"bucketSize": "",
"lowerBound": {},
"upperBound": {}
},
"redactConfig": {},
"replaceConfig": {
"newValue": {}
},
"replaceDictionaryConfig": {
"wordList": {}
},
"replaceWithInfoTypeConfig": {},
"timePartConfig": {
"partToExtract": ""
}
}
}
]
},
"recordTransformations": {
"fieldTransformations": [
{
"condition": {
"expressions": {
"conditions": {
"conditions": [
{
"field": {},
"operator": "",
"value": {}
}
]
},
"logicalOperator": ""
}
},
"fields": [
{}
],
"infoTypeTransformations": {},
"primitiveTransformation": {}
}
],
"recordSuppressions": [
{
"condition": {}
}
]
},
"transformationErrorHandling": {
"leaveUntransformed": {},
"throwError": {}
}
},
"reidentifyTemplateName": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v2/:parent/content:reidentify');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'inspectConfig' => [
'contentOptions' => [
],
'customInfoTypes' => [
[
'detectionRules' => [
[
'hotwordRule' => [
'hotwordRegex' => [
'groupIndexes' => [
],
'pattern' => ''
],
'likelihoodAdjustment' => [
'fixedLikelihood' => '',
'relativeLikelihood' => 0
],
'proximity' => [
'windowAfter' => 0,
'windowBefore' => 0
]
]
]
],
'dictionary' => [
'cloudStoragePath' => [
'path' => ''
],
'wordList' => [
'words' => [
]
]
],
'exclusionType' => '',
'infoType' => [
'name' => '',
'version' => ''
],
'likelihood' => '',
'regex' => [
],
'storedType' => [
'createTime' => '',
'name' => ''
],
'surrogateType' => [
]
]
],
'excludeInfoTypes' => null,
'includeQuote' => null,
'infoTypes' => [
[
]
],
'limits' => [
'maxFindingsPerInfoType' => [
[
'infoType' => [
],
'maxFindings' => 0
]
],
'maxFindingsPerItem' => 0,
'maxFindingsPerRequest' => 0
],
'minLikelihood' => '',
'ruleSet' => [
[
'infoTypes' => [
[
]
],
'rules' => [
[
'exclusionRule' => [
'dictionary' => [
],
'excludeByHotword' => [
'hotwordRegex' => [
],
'proximity' => [
]
],
'excludeInfoTypes' => [
'infoTypes' => [
[
]
]
],
'matchingType' => '',
'regex' => [
]
],
'hotwordRule' => [
]
]
]
]
]
],
'inspectTemplateName' => '',
'item' => [
'byteItem' => [
'data' => '',
'type' => ''
],
'table' => [
'headers' => [
[
'name' => ''
]
],
'rows' => [
[
'values' => [
[
'booleanValue' => null,
'dateValue' => [
'day' => 0,
'month' => 0,
'year' => 0
],
'dayOfWeekValue' => '',
'floatValue' => '',
'integerValue' => '',
'stringValue' => '',
'timeValue' => [
'hours' => 0,
'minutes' => 0,
'nanos' => 0,
'seconds' => 0
],
'timestampValue' => ''
]
]
]
]
],
'value' => ''
],
'locationId' => '',
'reidentifyConfig' => [
'imageTransformations' => [
'transforms' => [
[
'allInfoTypes' => [
],
'allText' => [
],
'redactionColor' => [
'blue' => '',
'green' => '',
'red' => ''
],
'selectedInfoTypes' => [
'infoTypes' => [
[
]
]
]
]
]
],
'infoTypeTransformations' => [
'transformations' => [
[
'infoTypes' => [
[
]
],
'primitiveTransformation' => [
'bucketingConfig' => [
'buckets' => [
[
'max' => [
],
'min' => [
],
'replacementValue' => [
]
]
]
],
'characterMaskConfig' => [
'charactersToIgnore' => [
[
'charactersToSkip' => '',
'commonCharactersToIgnore' => ''
]
],
'maskingCharacter' => '',
'numberToMask' => 0,
'reverseOrder' => null
],
'cryptoDeterministicConfig' => [
'context' => [
],
'cryptoKey' => [
'kmsWrapped' => [
'cryptoKeyName' => '',
'wrappedKey' => ''
],
'transient' => [
'name' => ''
],
'unwrapped' => [
'key' => ''
]
],
'surrogateInfoType' => [
]
],
'cryptoHashConfig' => [
'cryptoKey' => [
]
],
'cryptoReplaceFfxFpeConfig' => [
'commonAlphabet' => '',
'context' => [
],
'cryptoKey' => [
],
'customAlphabet' => '',
'radix' => 0,
'surrogateInfoType' => [
]
],
'dateShiftConfig' => [
'context' => [
],
'cryptoKey' => [
],
'lowerBoundDays' => 0,
'upperBoundDays' => 0
],
'fixedSizeBucketingConfig' => [
'bucketSize' => '',
'lowerBound' => [
],
'upperBound' => [
]
],
'redactConfig' => [
],
'replaceConfig' => [
'newValue' => [
]
],
'replaceDictionaryConfig' => [
'wordList' => [
]
],
'replaceWithInfoTypeConfig' => [
],
'timePartConfig' => [
'partToExtract' => ''
]
]
]
]
],
'recordTransformations' => [
'fieldTransformations' => [
[
'condition' => [
'expressions' => [
'conditions' => [
'conditions' => [
[
'field' => [
],
'operator' => '',
'value' => [
]
]
]
],
'logicalOperator' => ''
]
],
'fields' => [
[
]
],
'infoTypeTransformations' => [
],
'primitiveTransformation' => [
]
]
],
'recordSuppressions' => [
[
'condition' => [
]
]
]
],
'transformationErrorHandling' => [
'leaveUntransformed' => [
],
'throwError' => [
]
]
],
'reidentifyTemplateName' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'inspectConfig' => [
'contentOptions' => [
],
'customInfoTypes' => [
[
'detectionRules' => [
[
'hotwordRule' => [
'hotwordRegex' => [
'groupIndexes' => [
],
'pattern' => ''
],
'likelihoodAdjustment' => [
'fixedLikelihood' => '',
'relativeLikelihood' => 0
],
'proximity' => [
'windowAfter' => 0,
'windowBefore' => 0
]
]
]
],
'dictionary' => [
'cloudStoragePath' => [
'path' => ''
],
'wordList' => [
'words' => [
]
]
],
'exclusionType' => '',
'infoType' => [
'name' => '',
'version' => ''
],
'likelihood' => '',
'regex' => [
],
'storedType' => [
'createTime' => '',
'name' => ''
],
'surrogateType' => [
]
]
],
'excludeInfoTypes' => null,
'includeQuote' => null,
'infoTypes' => [
[
]
],
'limits' => [
'maxFindingsPerInfoType' => [
[
'infoType' => [
],
'maxFindings' => 0
]
],
'maxFindingsPerItem' => 0,
'maxFindingsPerRequest' => 0
],
'minLikelihood' => '',
'ruleSet' => [
[
'infoTypes' => [
[
]
],
'rules' => [
[
'exclusionRule' => [
'dictionary' => [
],
'excludeByHotword' => [
'hotwordRegex' => [
],
'proximity' => [
]
],
'excludeInfoTypes' => [
'infoTypes' => [
[
]
]
],
'matchingType' => '',
'regex' => [
]
],
'hotwordRule' => [
]
]
]
]
]
],
'inspectTemplateName' => '',
'item' => [
'byteItem' => [
'data' => '',
'type' => ''
],
'table' => [
'headers' => [
[
'name' => ''
]
],
'rows' => [
[
'values' => [
[
'booleanValue' => null,
'dateValue' => [
'day' => 0,
'month' => 0,
'year' => 0
],
'dayOfWeekValue' => '',
'floatValue' => '',
'integerValue' => '',
'stringValue' => '',
'timeValue' => [
'hours' => 0,
'minutes' => 0,
'nanos' => 0,
'seconds' => 0
],
'timestampValue' => ''
]
]
]
]
],
'value' => ''
],
'locationId' => '',
'reidentifyConfig' => [
'imageTransformations' => [
'transforms' => [
[
'allInfoTypes' => [
],
'allText' => [
],
'redactionColor' => [
'blue' => '',
'green' => '',
'red' => ''
],
'selectedInfoTypes' => [
'infoTypes' => [
[
]
]
]
]
]
],
'infoTypeTransformations' => [
'transformations' => [
[
'infoTypes' => [
[
]
],
'primitiveTransformation' => [
'bucketingConfig' => [
'buckets' => [
[
'max' => [
],
'min' => [
],
'replacementValue' => [
]
]
]
],
'characterMaskConfig' => [
'charactersToIgnore' => [
[
'charactersToSkip' => '',
'commonCharactersToIgnore' => ''
]
],
'maskingCharacter' => '',
'numberToMask' => 0,
'reverseOrder' => null
],
'cryptoDeterministicConfig' => [
'context' => [
],
'cryptoKey' => [
'kmsWrapped' => [
'cryptoKeyName' => '',
'wrappedKey' => ''
],
'transient' => [
'name' => ''
],
'unwrapped' => [
'key' => ''
]
],
'surrogateInfoType' => [
]
],
'cryptoHashConfig' => [
'cryptoKey' => [
]
],
'cryptoReplaceFfxFpeConfig' => [
'commonAlphabet' => '',
'context' => [
],
'cryptoKey' => [
],
'customAlphabet' => '',
'radix' => 0,
'surrogateInfoType' => [
]
],
'dateShiftConfig' => [
'context' => [
],
'cryptoKey' => [
],
'lowerBoundDays' => 0,
'upperBoundDays' => 0
],
'fixedSizeBucketingConfig' => [
'bucketSize' => '',
'lowerBound' => [
],
'upperBound' => [
]
],
'redactConfig' => [
],
'replaceConfig' => [
'newValue' => [
]
],
'replaceDictionaryConfig' => [
'wordList' => [
]
],
'replaceWithInfoTypeConfig' => [
],
'timePartConfig' => [
'partToExtract' => ''
]
]
]
]
],
'recordTransformations' => [
'fieldTransformations' => [
[
'condition' => [
'expressions' => [
'conditions' => [
'conditions' => [
[
'field' => [
],
'operator' => '',
'value' => [
]
]
]
],
'logicalOperator' => ''
]
],
'fields' => [
[
]
],
'infoTypeTransformations' => [
],
'primitiveTransformation' => [
]
]
],
'recordSuppressions' => [
[
'condition' => [
]
]
]
],
'transformationErrorHandling' => [
'leaveUntransformed' => [
],
'throwError' => [
]
]
],
'reidentifyTemplateName' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v2/:parent/content:reidentify');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v2/:parent/content:reidentify' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"inspectConfig": {
"contentOptions": [],
"customInfoTypes": [
{
"detectionRules": [
{
"hotwordRule": {
"hotwordRegex": {
"groupIndexes": [],
"pattern": ""
},
"likelihoodAdjustment": {
"fixedLikelihood": "",
"relativeLikelihood": 0
},
"proximity": {
"windowAfter": 0,
"windowBefore": 0
}
}
}
],
"dictionary": {
"cloudStoragePath": {
"path": ""
},
"wordList": {
"words": []
}
},
"exclusionType": "",
"infoType": {
"name": "",
"version": ""
},
"likelihood": "",
"regex": {},
"storedType": {
"createTime": "",
"name": ""
},
"surrogateType": {}
}
],
"excludeInfoTypes": false,
"includeQuote": false,
"infoTypes": [
{}
],
"limits": {
"maxFindingsPerInfoType": [
{
"infoType": {},
"maxFindings": 0
}
],
"maxFindingsPerItem": 0,
"maxFindingsPerRequest": 0
},
"minLikelihood": "",
"ruleSet": [
{
"infoTypes": [
{}
],
"rules": [
{
"exclusionRule": {
"dictionary": {},
"excludeByHotword": {
"hotwordRegex": {},
"proximity": {}
},
"excludeInfoTypes": {
"infoTypes": [
{}
]
},
"matchingType": "",
"regex": {}
},
"hotwordRule": {}
}
]
}
]
},
"inspectTemplateName": "",
"item": {
"byteItem": {
"data": "",
"type": ""
},
"table": {
"headers": [
{
"name": ""
}
],
"rows": [
{
"values": [
{
"booleanValue": false,
"dateValue": {
"day": 0,
"month": 0,
"year": 0
},
"dayOfWeekValue": "",
"floatValue": "",
"integerValue": "",
"stringValue": "",
"timeValue": {
"hours": 0,
"minutes": 0,
"nanos": 0,
"seconds": 0
},
"timestampValue": ""
}
]
}
]
},
"value": ""
},
"locationId": "",
"reidentifyConfig": {
"imageTransformations": {
"transforms": [
{
"allInfoTypes": {},
"allText": {},
"redactionColor": {
"blue": "",
"green": "",
"red": ""
},
"selectedInfoTypes": {
"infoTypes": [
{}
]
}
}
]
},
"infoTypeTransformations": {
"transformations": [
{
"infoTypes": [
{}
],
"primitiveTransformation": {
"bucketingConfig": {
"buckets": [
{
"max": {},
"min": {},
"replacementValue": {}
}
]
},
"characterMaskConfig": {
"charactersToIgnore": [
{
"charactersToSkip": "",
"commonCharactersToIgnore": ""
}
],
"maskingCharacter": "",
"numberToMask": 0,
"reverseOrder": false
},
"cryptoDeterministicConfig": {
"context": {},
"cryptoKey": {
"kmsWrapped": {
"cryptoKeyName": "",
"wrappedKey": ""
},
"transient": {
"name": ""
},
"unwrapped": {
"key": ""
}
},
"surrogateInfoType": {}
},
"cryptoHashConfig": {
"cryptoKey": {}
},
"cryptoReplaceFfxFpeConfig": {
"commonAlphabet": "",
"context": {},
"cryptoKey": {},
"customAlphabet": "",
"radix": 0,
"surrogateInfoType": {}
},
"dateShiftConfig": {
"context": {},
"cryptoKey": {},
"lowerBoundDays": 0,
"upperBoundDays": 0
},
"fixedSizeBucketingConfig": {
"bucketSize": "",
"lowerBound": {},
"upperBound": {}
},
"redactConfig": {},
"replaceConfig": {
"newValue": {}
},
"replaceDictionaryConfig": {
"wordList": {}
},
"replaceWithInfoTypeConfig": {},
"timePartConfig": {
"partToExtract": ""
}
}
}
]
},
"recordTransformations": {
"fieldTransformations": [
{
"condition": {
"expressions": {
"conditions": {
"conditions": [
{
"field": {},
"operator": "",
"value": {}
}
]
},
"logicalOperator": ""
}
},
"fields": [
{}
],
"infoTypeTransformations": {},
"primitiveTransformation": {}
}
],
"recordSuppressions": [
{
"condition": {}
}
]
},
"transformationErrorHandling": {
"leaveUntransformed": {},
"throwError": {}
}
},
"reidentifyTemplateName": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/:parent/content:reidentify' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"inspectConfig": {
"contentOptions": [],
"customInfoTypes": [
{
"detectionRules": [
{
"hotwordRule": {
"hotwordRegex": {
"groupIndexes": [],
"pattern": ""
},
"likelihoodAdjustment": {
"fixedLikelihood": "",
"relativeLikelihood": 0
},
"proximity": {
"windowAfter": 0,
"windowBefore": 0
}
}
}
],
"dictionary": {
"cloudStoragePath": {
"path": ""
},
"wordList": {
"words": []
}
},
"exclusionType": "",
"infoType": {
"name": "",
"version": ""
},
"likelihood": "",
"regex": {},
"storedType": {
"createTime": "",
"name": ""
},
"surrogateType": {}
}
],
"excludeInfoTypes": false,
"includeQuote": false,
"infoTypes": [
{}
],
"limits": {
"maxFindingsPerInfoType": [
{
"infoType": {},
"maxFindings": 0
}
],
"maxFindingsPerItem": 0,
"maxFindingsPerRequest": 0
},
"minLikelihood": "",
"ruleSet": [
{
"infoTypes": [
{}
],
"rules": [
{
"exclusionRule": {
"dictionary": {},
"excludeByHotword": {
"hotwordRegex": {},
"proximity": {}
},
"excludeInfoTypes": {
"infoTypes": [
{}
]
},
"matchingType": "",
"regex": {}
},
"hotwordRule": {}
}
]
}
]
},
"inspectTemplateName": "",
"item": {
"byteItem": {
"data": "",
"type": ""
},
"table": {
"headers": [
{
"name": ""
}
],
"rows": [
{
"values": [
{
"booleanValue": false,
"dateValue": {
"day": 0,
"month": 0,
"year": 0
},
"dayOfWeekValue": "",
"floatValue": "",
"integerValue": "",
"stringValue": "",
"timeValue": {
"hours": 0,
"minutes": 0,
"nanos": 0,
"seconds": 0
},
"timestampValue": ""
}
]
}
]
},
"value": ""
},
"locationId": "",
"reidentifyConfig": {
"imageTransformations": {
"transforms": [
{
"allInfoTypes": {},
"allText": {},
"redactionColor": {
"blue": "",
"green": "",
"red": ""
},
"selectedInfoTypes": {
"infoTypes": [
{}
]
}
}
]
},
"infoTypeTransformations": {
"transformations": [
{
"infoTypes": [
{}
],
"primitiveTransformation": {
"bucketingConfig": {
"buckets": [
{
"max": {},
"min": {},
"replacementValue": {}
}
]
},
"characterMaskConfig": {
"charactersToIgnore": [
{
"charactersToSkip": "",
"commonCharactersToIgnore": ""
}
],
"maskingCharacter": "",
"numberToMask": 0,
"reverseOrder": false
},
"cryptoDeterministicConfig": {
"context": {},
"cryptoKey": {
"kmsWrapped": {
"cryptoKeyName": "",
"wrappedKey": ""
},
"transient": {
"name": ""
},
"unwrapped": {
"key": ""
}
},
"surrogateInfoType": {}
},
"cryptoHashConfig": {
"cryptoKey": {}
},
"cryptoReplaceFfxFpeConfig": {
"commonAlphabet": "",
"context": {},
"cryptoKey": {},
"customAlphabet": "",
"radix": 0,
"surrogateInfoType": {}
},
"dateShiftConfig": {
"context": {},
"cryptoKey": {},
"lowerBoundDays": 0,
"upperBoundDays": 0
},
"fixedSizeBucketingConfig": {
"bucketSize": "",
"lowerBound": {},
"upperBound": {}
},
"redactConfig": {},
"replaceConfig": {
"newValue": {}
},
"replaceDictionaryConfig": {
"wordList": {}
},
"replaceWithInfoTypeConfig": {},
"timePartConfig": {
"partToExtract": ""
}
}
}
]
},
"recordTransformations": {
"fieldTransformations": [
{
"condition": {
"expressions": {
"conditions": {
"conditions": [
{
"field": {},
"operator": "",
"value": {}
}
]
},
"logicalOperator": ""
}
},
"fields": [
{}
],
"infoTypeTransformations": {},
"primitiveTransformation": {}
}
],
"recordSuppressions": [
{
"condition": {}
}
]
},
"transformationErrorHandling": {
"leaveUntransformed": {},
"throwError": {}
}
},
"reidentifyTemplateName": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"inspectConfig\": {\n \"contentOptions\": [],\n \"customInfoTypes\": [\n {\n \"detectionRules\": [\n {\n \"hotwordRule\": {\n \"hotwordRegex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n },\n \"likelihoodAdjustment\": {\n \"fixedLikelihood\": \"\",\n \"relativeLikelihood\": 0\n },\n \"proximity\": {\n \"windowAfter\": 0,\n \"windowBefore\": 0\n }\n }\n }\n ],\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {\n \"words\": []\n }\n },\n \"exclusionType\": \"\",\n \"infoType\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"likelihood\": \"\",\n \"regex\": {},\n \"storedType\": {\n \"createTime\": \"\",\n \"name\": \"\"\n },\n \"surrogateType\": {}\n }\n ],\n \"excludeInfoTypes\": false,\n \"includeQuote\": false,\n \"infoTypes\": [\n {}\n ],\n \"limits\": {\n \"maxFindingsPerInfoType\": [\n {\n \"infoType\": {},\n \"maxFindings\": 0\n }\n ],\n \"maxFindingsPerItem\": 0,\n \"maxFindingsPerRequest\": 0\n },\n \"minLikelihood\": \"\",\n \"ruleSet\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"rules\": [\n {\n \"exclusionRule\": {\n \"dictionary\": {},\n \"excludeByHotword\": {\n \"hotwordRegex\": {},\n \"proximity\": {}\n },\n \"excludeInfoTypes\": {\n \"infoTypes\": [\n {}\n ]\n },\n \"matchingType\": \"\",\n \"regex\": {}\n },\n \"hotwordRule\": {}\n }\n ]\n }\n ]\n },\n \"inspectTemplateName\": \"\",\n \"item\": {\n \"byteItem\": {\n \"data\": \"\",\n \"type\": \"\"\n },\n \"table\": {\n \"headers\": [\n {\n \"name\": \"\"\n }\n ],\n \"rows\": [\n {\n \"values\": [\n {\n \"booleanValue\": false,\n \"dateValue\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"dayOfWeekValue\": \"\",\n \"floatValue\": \"\",\n \"integerValue\": \"\",\n \"stringValue\": \"\",\n \"timeValue\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"timestampValue\": \"\"\n }\n ]\n }\n ]\n },\n \"value\": \"\"\n },\n \"locationId\": \"\",\n \"reidentifyConfig\": {\n \"imageTransformations\": {\n \"transforms\": [\n {\n \"allInfoTypes\": {},\n \"allText\": {},\n \"redactionColor\": {\n \"blue\": \"\",\n \"green\": \"\",\n \"red\": \"\"\n },\n \"selectedInfoTypes\": {\n \"infoTypes\": [\n {}\n ]\n }\n }\n ]\n },\n \"infoTypeTransformations\": {\n \"transformations\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"primitiveTransformation\": {\n \"bucketingConfig\": {\n \"buckets\": [\n {\n \"max\": {},\n \"min\": {},\n \"replacementValue\": {}\n }\n ]\n },\n \"characterMaskConfig\": {\n \"charactersToIgnore\": [\n {\n \"charactersToSkip\": \"\",\n \"commonCharactersToIgnore\": \"\"\n }\n ],\n \"maskingCharacter\": \"\",\n \"numberToMask\": 0,\n \"reverseOrder\": false\n },\n \"cryptoDeterministicConfig\": {\n \"context\": {},\n \"cryptoKey\": {\n \"kmsWrapped\": {\n \"cryptoKeyName\": \"\",\n \"wrappedKey\": \"\"\n },\n \"transient\": {\n \"name\": \"\"\n },\n \"unwrapped\": {\n \"key\": \"\"\n }\n },\n \"surrogateInfoType\": {}\n },\n \"cryptoHashConfig\": {\n \"cryptoKey\": {}\n },\n \"cryptoReplaceFfxFpeConfig\": {\n \"commonAlphabet\": \"\",\n \"context\": {},\n \"cryptoKey\": {},\n \"customAlphabet\": \"\",\n \"radix\": 0,\n \"surrogateInfoType\": {}\n },\n \"dateShiftConfig\": {\n \"context\": {},\n \"cryptoKey\": {},\n \"lowerBoundDays\": 0,\n \"upperBoundDays\": 0\n },\n \"fixedSizeBucketingConfig\": {\n \"bucketSize\": \"\",\n \"lowerBound\": {},\n \"upperBound\": {}\n },\n \"redactConfig\": {},\n \"replaceConfig\": {\n \"newValue\": {}\n },\n \"replaceDictionaryConfig\": {\n \"wordList\": {}\n },\n \"replaceWithInfoTypeConfig\": {},\n \"timePartConfig\": {\n \"partToExtract\": \"\"\n }\n }\n }\n ]\n },\n \"recordTransformations\": {\n \"fieldTransformations\": [\n {\n \"condition\": {\n \"expressions\": {\n \"conditions\": {\n \"conditions\": [\n {\n \"field\": {},\n \"operator\": \"\",\n \"value\": {}\n }\n ]\n },\n \"logicalOperator\": \"\"\n }\n },\n \"fields\": [\n {}\n ],\n \"infoTypeTransformations\": {},\n \"primitiveTransformation\": {}\n }\n ],\n \"recordSuppressions\": [\n {\n \"condition\": {}\n }\n ]\n },\n \"transformationErrorHandling\": {\n \"leaveUntransformed\": {},\n \"throwError\": {}\n }\n },\n \"reidentifyTemplateName\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v2/:parent/content:reidentify", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/:parent/content:reidentify"
payload = {
"inspectConfig": {
"contentOptions": [],
"customInfoTypes": [
{
"detectionRules": [{ "hotwordRule": {
"hotwordRegex": {
"groupIndexes": [],
"pattern": ""
},
"likelihoodAdjustment": {
"fixedLikelihood": "",
"relativeLikelihood": 0
},
"proximity": {
"windowAfter": 0,
"windowBefore": 0
}
} }],
"dictionary": {
"cloudStoragePath": { "path": "" },
"wordList": { "words": [] }
},
"exclusionType": "",
"infoType": {
"name": "",
"version": ""
},
"likelihood": "",
"regex": {},
"storedType": {
"createTime": "",
"name": ""
},
"surrogateType": {}
}
],
"excludeInfoTypes": False,
"includeQuote": False,
"infoTypes": [{}],
"limits": {
"maxFindingsPerInfoType": [
{
"infoType": {},
"maxFindings": 0
}
],
"maxFindingsPerItem": 0,
"maxFindingsPerRequest": 0
},
"minLikelihood": "",
"ruleSet": [
{
"infoTypes": [{}],
"rules": [
{
"exclusionRule": {
"dictionary": {},
"excludeByHotword": {
"hotwordRegex": {},
"proximity": {}
},
"excludeInfoTypes": { "infoTypes": [{}] },
"matchingType": "",
"regex": {}
},
"hotwordRule": {}
}
]
}
]
},
"inspectTemplateName": "",
"item": {
"byteItem": {
"data": "",
"type": ""
},
"table": {
"headers": [{ "name": "" }],
"rows": [{ "values": [
{
"booleanValue": False,
"dateValue": {
"day": 0,
"month": 0,
"year": 0
},
"dayOfWeekValue": "",
"floatValue": "",
"integerValue": "",
"stringValue": "",
"timeValue": {
"hours": 0,
"minutes": 0,
"nanos": 0,
"seconds": 0
},
"timestampValue": ""
}
] }]
},
"value": ""
},
"locationId": "",
"reidentifyConfig": {
"imageTransformations": { "transforms": [
{
"allInfoTypes": {},
"allText": {},
"redactionColor": {
"blue": "",
"green": "",
"red": ""
},
"selectedInfoTypes": { "infoTypes": [{}] }
}
] },
"infoTypeTransformations": { "transformations": [
{
"infoTypes": [{}],
"primitiveTransformation": {
"bucketingConfig": { "buckets": [
{
"max": {},
"min": {},
"replacementValue": {}
}
] },
"characterMaskConfig": {
"charactersToIgnore": [
{
"charactersToSkip": "",
"commonCharactersToIgnore": ""
}
],
"maskingCharacter": "",
"numberToMask": 0,
"reverseOrder": False
},
"cryptoDeterministicConfig": {
"context": {},
"cryptoKey": {
"kmsWrapped": {
"cryptoKeyName": "",
"wrappedKey": ""
},
"transient": { "name": "" },
"unwrapped": { "key": "" }
},
"surrogateInfoType": {}
},
"cryptoHashConfig": { "cryptoKey": {} },
"cryptoReplaceFfxFpeConfig": {
"commonAlphabet": "",
"context": {},
"cryptoKey": {},
"customAlphabet": "",
"radix": 0,
"surrogateInfoType": {}
},
"dateShiftConfig": {
"context": {},
"cryptoKey": {},
"lowerBoundDays": 0,
"upperBoundDays": 0
},
"fixedSizeBucketingConfig": {
"bucketSize": "",
"lowerBound": {},
"upperBound": {}
},
"redactConfig": {},
"replaceConfig": { "newValue": {} },
"replaceDictionaryConfig": { "wordList": {} },
"replaceWithInfoTypeConfig": {},
"timePartConfig": { "partToExtract": "" }
}
}
] },
"recordTransformations": {
"fieldTransformations": [
{
"condition": { "expressions": {
"conditions": { "conditions": [
{
"field": {},
"operator": "",
"value": {}
}
] },
"logicalOperator": ""
} },
"fields": [{}],
"infoTypeTransformations": {},
"primitiveTransformation": {}
}
],
"recordSuppressions": [{ "condition": {} }]
},
"transformationErrorHandling": {
"leaveUntransformed": {},
"throwError": {}
}
},
"reidentifyTemplateName": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/:parent/content:reidentify"
payload <- "{\n \"inspectConfig\": {\n \"contentOptions\": [],\n \"customInfoTypes\": [\n {\n \"detectionRules\": [\n {\n \"hotwordRule\": {\n \"hotwordRegex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n },\n \"likelihoodAdjustment\": {\n \"fixedLikelihood\": \"\",\n \"relativeLikelihood\": 0\n },\n \"proximity\": {\n \"windowAfter\": 0,\n \"windowBefore\": 0\n }\n }\n }\n ],\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {\n \"words\": []\n }\n },\n \"exclusionType\": \"\",\n \"infoType\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"likelihood\": \"\",\n \"regex\": {},\n \"storedType\": {\n \"createTime\": \"\",\n \"name\": \"\"\n },\n \"surrogateType\": {}\n }\n ],\n \"excludeInfoTypes\": false,\n \"includeQuote\": false,\n \"infoTypes\": [\n {}\n ],\n \"limits\": {\n \"maxFindingsPerInfoType\": [\n {\n \"infoType\": {},\n \"maxFindings\": 0\n }\n ],\n \"maxFindingsPerItem\": 0,\n \"maxFindingsPerRequest\": 0\n },\n \"minLikelihood\": \"\",\n \"ruleSet\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"rules\": [\n {\n \"exclusionRule\": {\n \"dictionary\": {},\n \"excludeByHotword\": {\n \"hotwordRegex\": {},\n \"proximity\": {}\n },\n \"excludeInfoTypes\": {\n \"infoTypes\": [\n {}\n ]\n },\n \"matchingType\": \"\",\n \"regex\": {}\n },\n \"hotwordRule\": {}\n }\n ]\n }\n ]\n },\n \"inspectTemplateName\": \"\",\n \"item\": {\n \"byteItem\": {\n \"data\": \"\",\n \"type\": \"\"\n },\n \"table\": {\n \"headers\": [\n {\n \"name\": \"\"\n }\n ],\n \"rows\": [\n {\n \"values\": [\n {\n \"booleanValue\": false,\n \"dateValue\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"dayOfWeekValue\": \"\",\n \"floatValue\": \"\",\n \"integerValue\": \"\",\n \"stringValue\": \"\",\n \"timeValue\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"timestampValue\": \"\"\n }\n ]\n }\n ]\n },\n \"value\": \"\"\n },\n \"locationId\": \"\",\n \"reidentifyConfig\": {\n \"imageTransformations\": {\n \"transforms\": [\n {\n \"allInfoTypes\": {},\n \"allText\": {},\n \"redactionColor\": {\n \"blue\": \"\",\n \"green\": \"\",\n \"red\": \"\"\n },\n \"selectedInfoTypes\": {\n \"infoTypes\": [\n {}\n ]\n }\n }\n ]\n },\n \"infoTypeTransformations\": {\n \"transformations\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"primitiveTransformation\": {\n \"bucketingConfig\": {\n \"buckets\": [\n {\n \"max\": {},\n \"min\": {},\n \"replacementValue\": {}\n }\n ]\n },\n \"characterMaskConfig\": {\n \"charactersToIgnore\": [\n {\n \"charactersToSkip\": \"\",\n \"commonCharactersToIgnore\": \"\"\n }\n ],\n \"maskingCharacter\": \"\",\n \"numberToMask\": 0,\n \"reverseOrder\": false\n },\n \"cryptoDeterministicConfig\": {\n \"context\": {},\n \"cryptoKey\": {\n \"kmsWrapped\": {\n \"cryptoKeyName\": \"\",\n \"wrappedKey\": \"\"\n },\n \"transient\": {\n \"name\": \"\"\n },\n \"unwrapped\": {\n \"key\": \"\"\n }\n },\n \"surrogateInfoType\": {}\n },\n \"cryptoHashConfig\": {\n \"cryptoKey\": {}\n },\n \"cryptoReplaceFfxFpeConfig\": {\n \"commonAlphabet\": \"\",\n \"context\": {},\n \"cryptoKey\": {},\n \"customAlphabet\": \"\",\n \"radix\": 0,\n \"surrogateInfoType\": {}\n },\n \"dateShiftConfig\": {\n \"context\": {},\n \"cryptoKey\": {},\n \"lowerBoundDays\": 0,\n \"upperBoundDays\": 0\n },\n \"fixedSizeBucketingConfig\": {\n \"bucketSize\": \"\",\n \"lowerBound\": {},\n \"upperBound\": {}\n },\n \"redactConfig\": {},\n \"replaceConfig\": {\n \"newValue\": {}\n },\n \"replaceDictionaryConfig\": {\n \"wordList\": {}\n },\n \"replaceWithInfoTypeConfig\": {},\n \"timePartConfig\": {\n \"partToExtract\": \"\"\n }\n }\n }\n ]\n },\n \"recordTransformations\": {\n \"fieldTransformations\": [\n {\n \"condition\": {\n \"expressions\": {\n \"conditions\": {\n \"conditions\": [\n {\n \"field\": {},\n \"operator\": \"\",\n \"value\": {}\n }\n ]\n },\n \"logicalOperator\": \"\"\n }\n },\n \"fields\": [\n {}\n ],\n \"infoTypeTransformations\": {},\n \"primitiveTransformation\": {}\n }\n ],\n \"recordSuppressions\": [\n {\n \"condition\": {}\n }\n ]\n },\n \"transformationErrorHandling\": {\n \"leaveUntransformed\": {},\n \"throwError\": {}\n }\n },\n \"reidentifyTemplateName\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/:parent/content:reidentify")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"inspectConfig\": {\n \"contentOptions\": [],\n \"customInfoTypes\": [\n {\n \"detectionRules\": [\n {\n \"hotwordRule\": {\n \"hotwordRegex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n },\n \"likelihoodAdjustment\": {\n \"fixedLikelihood\": \"\",\n \"relativeLikelihood\": 0\n },\n \"proximity\": {\n \"windowAfter\": 0,\n \"windowBefore\": 0\n }\n }\n }\n ],\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {\n \"words\": []\n }\n },\n \"exclusionType\": \"\",\n \"infoType\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"likelihood\": \"\",\n \"regex\": {},\n \"storedType\": {\n \"createTime\": \"\",\n \"name\": \"\"\n },\n \"surrogateType\": {}\n }\n ],\n \"excludeInfoTypes\": false,\n \"includeQuote\": false,\n \"infoTypes\": [\n {}\n ],\n \"limits\": {\n \"maxFindingsPerInfoType\": [\n {\n \"infoType\": {},\n \"maxFindings\": 0\n }\n ],\n \"maxFindingsPerItem\": 0,\n \"maxFindingsPerRequest\": 0\n },\n \"minLikelihood\": \"\",\n \"ruleSet\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"rules\": [\n {\n \"exclusionRule\": {\n \"dictionary\": {},\n \"excludeByHotword\": {\n \"hotwordRegex\": {},\n \"proximity\": {}\n },\n \"excludeInfoTypes\": {\n \"infoTypes\": [\n {}\n ]\n },\n \"matchingType\": \"\",\n \"regex\": {}\n },\n \"hotwordRule\": {}\n }\n ]\n }\n ]\n },\n \"inspectTemplateName\": \"\",\n \"item\": {\n \"byteItem\": {\n \"data\": \"\",\n \"type\": \"\"\n },\n \"table\": {\n \"headers\": [\n {\n \"name\": \"\"\n }\n ],\n \"rows\": [\n {\n \"values\": [\n {\n \"booleanValue\": false,\n \"dateValue\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"dayOfWeekValue\": \"\",\n \"floatValue\": \"\",\n \"integerValue\": \"\",\n \"stringValue\": \"\",\n \"timeValue\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"timestampValue\": \"\"\n }\n ]\n }\n ]\n },\n \"value\": \"\"\n },\n \"locationId\": \"\",\n \"reidentifyConfig\": {\n \"imageTransformations\": {\n \"transforms\": [\n {\n \"allInfoTypes\": {},\n \"allText\": {},\n \"redactionColor\": {\n \"blue\": \"\",\n \"green\": \"\",\n \"red\": \"\"\n },\n \"selectedInfoTypes\": {\n \"infoTypes\": [\n {}\n ]\n }\n }\n ]\n },\n \"infoTypeTransformations\": {\n \"transformations\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"primitiveTransformation\": {\n \"bucketingConfig\": {\n \"buckets\": [\n {\n \"max\": {},\n \"min\": {},\n \"replacementValue\": {}\n }\n ]\n },\n \"characterMaskConfig\": {\n \"charactersToIgnore\": [\n {\n \"charactersToSkip\": \"\",\n \"commonCharactersToIgnore\": \"\"\n }\n ],\n \"maskingCharacter\": \"\",\n \"numberToMask\": 0,\n \"reverseOrder\": false\n },\n \"cryptoDeterministicConfig\": {\n \"context\": {},\n \"cryptoKey\": {\n \"kmsWrapped\": {\n \"cryptoKeyName\": \"\",\n \"wrappedKey\": \"\"\n },\n \"transient\": {\n \"name\": \"\"\n },\n \"unwrapped\": {\n \"key\": \"\"\n }\n },\n \"surrogateInfoType\": {}\n },\n \"cryptoHashConfig\": {\n \"cryptoKey\": {}\n },\n \"cryptoReplaceFfxFpeConfig\": {\n \"commonAlphabet\": \"\",\n \"context\": {},\n \"cryptoKey\": {},\n \"customAlphabet\": \"\",\n \"radix\": 0,\n \"surrogateInfoType\": {}\n },\n \"dateShiftConfig\": {\n \"context\": {},\n \"cryptoKey\": {},\n \"lowerBoundDays\": 0,\n \"upperBoundDays\": 0\n },\n \"fixedSizeBucketingConfig\": {\n \"bucketSize\": \"\",\n \"lowerBound\": {},\n \"upperBound\": {}\n },\n \"redactConfig\": {},\n \"replaceConfig\": {\n \"newValue\": {}\n },\n \"replaceDictionaryConfig\": {\n \"wordList\": {}\n },\n \"replaceWithInfoTypeConfig\": {},\n \"timePartConfig\": {\n \"partToExtract\": \"\"\n }\n }\n }\n ]\n },\n \"recordTransformations\": {\n \"fieldTransformations\": [\n {\n \"condition\": {\n \"expressions\": {\n \"conditions\": {\n \"conditions\": [\n {\n \"field\": {},\n \"operator\": \"\",\n \"value\": {}\n }\n ]\n },\n \"logicalOperator\": \"\"\n }\n },\n \"fields\": [\n {}\n ],\n \"infoTypeTransformations\": {},\n \"primitiveTransformation\": {}\n }\n ],\n \"recordSuppressions\": [\n {\n \"condition\": {}\n }\n ]\n },\n \"transformationErrorHandling\": {\n \"leaveUntransformed\": {},\n \"throwError\": {}\n }\n },\n \"reidentifyTemplateName\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/v2/:parent/content:reidentify') do |req|
req.body = "{\n \"inspectConfig\": {\n \"contentOptions\": [],\n \"customInfoTypes\": [\n {\n \"detectionRules\": [\n {\n \"hotwordRule\": {\n \"hotwordRegex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n },\n \"likelihoodAdjustment\": {\n \"fixedLikelihood\": \"\",\n \"relativeLikelihood\": 0\n },\n \"proximity\": {\n \"windowAfter\": 0,\n \"windowBefore\": 0\n }\n }\n }\n ],\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {\n \"words\": []\n }\n },\n \"exclusionType\": \"\",\n \"infoType\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"likelihood\": \"\",\n \"regex\": {},\n \"storedType\": {\n \"createTime\": \"\",\n \"name\": \"\"\n },\n \"surrogateType\": {}\n }\n ],\n \"excludeInfoTypes\": false,\n \"includeQuote\": false,\n \"infoTypes\": [\n {}\n ],\n \"limits\": {\n \"maxFindingsPerInfoType\": [\n {\n \"infoType\": {},\n \"maxFindings\": 0\n }\n ],\n \"maxFindingsPerItem\": 0,\n \"maxFindingsPerRequest\": 0\n },\n \"minLikelihood\": \"\",\n \"ruleSet\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"rules\": [\n {\n \"exclusionRule\": {\n \"dictionary\": {},\n \"excludeByHotword\": {\n \"hotwordRegex\": {},\n \"proximity\": {}\n },\n \"excludeInfoTypes\": {\n \"infoTypes\": [\n {}\n ]\n },\n \"matchingType\": \"\",\n \"regex\": {}\n },\n \"hotwordRule\": {}\n }\n ]\n }\n ]\n },\n \"inspectTemplateName\": \"\",\n \"item\": {\n \"byteItem\": {\n \"data\": \"\",\n \"type\": \"\"\n },\n \"table\": {\n \"headers\": [\n {\n \"name\": \"\"\n }\n ],\n \"rows\": [\n {\n \"values\": [\n {\n \"booleanValue\": false,\n \"dateValue\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"dayOfWeekValue\": \"\",\n \"floatValue\": \"\",\n \"integerValue\": \"\",\n \"stringValue\": \"\",\n \"timeValue\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"timestampValue\": \"\"\n }\n ]\n }\n ]\n },\n \"value\": \"\"\n },\n \"locationId\": \"\",\n \"reidentifyConfig\": {\n \"imageTransformations\": {\n \"transforms\": [\n {\n \"allInfoTypes\": {},\n \"allText\": {},\n \"redactionColor\": {\n \"blue\": \"\",\n \"green\": \"\",\n \"red\": \"\"\n },\n \"selectedInfoTypes\": {\n \"infoTypes\": [\n {}\n ]\n }\n }\n ]\n },\n \"infoTypeTransformations\": {\n \"transformations\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"primitiveTransformation\": {\n \"bucketingConfig\": {\n \"buckets\": [\n {\n \"max\": {},\n \"min\": {},\n \"replacementValue\": {}\n }\n ]\n },\n \"characterMaskConfig\": {\n \"charactersToIgnore\": [\n {\n \"charactersToSkip\": \"\",\n \"commonCharactersToIgnore\": \"\"\n }\n ],\n \"maskingCharacter\": \"\",\n \"numberToMask\": 0,\n \"reverseOrder\": false\n },\n \"cryptoDeterministicConfig\": {\n \"context\": {},\n \"cryptoKey\": {\n \"kmsWrapped\": {\n \"cryptoKeyName\": \"\",\n \"wrappedKey\": \"\"\n },\n \"transient\": {\n \"name\": \"\"\n },\n \"unwrapped\": {\n \"key\": \"\"\n }\n },\n \"surrogateInfoType\": {}\n },\n \"cryptoHashConfig\": {\n \"cryptoKey\": {}\n },\n \"cryptoReplaceFfxFpeConfig\": {\n \"commonAlphabet\": \"\",\n \"context\": {},\n \"cryptoKey\": {},\n \"customAlphabet\": \"\",\n \"radix\": 0,\n \"surrogateInfoType\": {}\n },\n \"dateShiftConfig\": {\n \"context\": {},\n \"cryptoKey\": {},\n \"lowerBoundDays\": 0,\n \"upperBoundDays\": 0\n },\n \"fixedSizeBucketingConfig\": {\n \"bucketSize\": \"\",\n \"lowerBound\": {},\n \"upperBound\": {}\n },\n \"redactConfig\": {},\n \"replaceConfig\": {\n \"newValue\": {}\n },\n \"replaceDictionaryConfig\": {\n \"wordList\": {}\n },\n \"replaceWithInfoTypeConfig\": {},\n \"timePartConfig\": {\n \"partToExtract\": \"\"\n }\n }\n }\n ]\n },\n \"recordTransformations\": {\n \"fieldTransformations\": [\n {\n \"condition\": {\n \"expressions\": {\n \"conditions\": {\n \"conditions\": [\n {\n \"field\": {},\n \"operator\": \"\",\n \"value\": {}\n }\n ]\n },\n \"logicalOperator\": \"\"\n }\n },\n \"fields\": [\n {}\n ],\n \"infoTypeTransformations\": {},\n \"primitiveTransformation\": {}\n }\n ],\n \"recordSuppressions\": [\n {\n \"condition\": {}\n }\n ]\n },\n \"transformationErrorHandling\": {\n \"leaveUntransformed\": {},\n \"throwError\": {}\n }\n },\n \"reidentifyTemplateName\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v2/:parent/content:reidentify";
let payload = json!({
"inspectConfig": json!({
"contentOptions": (),
"customInfoTypes": (
json!({
"detectionRules": (json!({"hotwordRule": json!({
"hotwordRegex": json!({
"groupIndexes": (),
"pattern": ""
}),
"likelihoodAdjustment": json!({
"fixedLikelihood": "",
"relativeLikelihood": 0
}),
"proximity": json!({
"windowAfter": 0,
"windowBefore": 0
})
})})),
"dictionary": json!({
"cloudStoragePath": json!({"path": ""}),
"wordList": json!({"words": ()})
}),
"exclusionType": "",
"infoType": json!({
"name": "",
"version": ""
}),
"likelihood": "",
"regex": json!({}),
"storedType": json!({
"createTime": "",
"name": ""
}),
"surrogateType": json!({})
})
),
"excludeInfoTypes": false,
"includeQuote": false,
"infoTypes": (json!({})),
"limits": json!({
"maxFindingsPerInfoType": (
json!({
"infoType": json!({}),
"maxFindings": 0
})
),
"maxFindingsPerItem": 0,
"maxFindingsPerRequest": 0
}),
"minLikelihood": "",
"ruleSet": (
json!({
"infoTypes": (json!({})),
"rules": (
json!({
"exclusionRule": json!({
"dictionary": json!({}),
"excludeByHotword": json!({
"hotwordRegex": json!({}),
"proximity": json!({})
}),
"excludeInfoTypes": json!({"infoTypes": (json!({}))}),
"matchingType": "",
"regex": json!({})
}),
"hotwordRule": json!({})
})
)
})
)
}),
"inspectTemplateName": "",
"item": json!({
"byteItem": json!({
"data": "",
"type": ""
}),
"table": json!({
"headers": (json!({"name": ""})),
"rows": (json!({"values": (
json!({
"booleanValue": false,
"dateValue": json!({
"day": 0,
"month": 0,
"year": 0
}),
"dayOfWeekValue": "",
"floatValue": "",
"integerValue": "",
"stringValue": "",
"timeValue": json!({
"hours": 0,
"minutes": 0,
"nanos": 0,
"seconds": 0
}),
"timestampValue": ""
})
)}))
}),
"value": ""
}),
"locationId": "",
"reidentifyConfig": json!({
"imageTransformations": json!({"transforms": (
json!({
"allInfoTypes": json!({}),
"allText": json!({}),
"redactionColor": json!({
"blue": "",
"green": "",
"red": ""
}),
"selectedInfoTypes": json!({"infoTypes": (json!({}))})
})
)}),
"infoTypeTransformations": json!({"transformations": (
json!({
"infoTypes": (json!({})),
"primitiveTransformation": json!({
"bucketingConfig": json!({"buckets": (
json!({
"max": json!({}),
"min": json!({}),
"replacementValue": json!({})
})
)}),
"characterMaskConfig": json!({
"charactersToIgnore": (
json!({
"charactersToSkip": "",
"commonCharactersToIgnore": ""
})
),
"maskingCharacter": "",
"numberToMask": 0,
"reverseOrder": false
}),
"cryptoDeterministicConfig": json!({
"context": json!({}),
"cryptoKey": json!({
"kmsWrapped": json!({
"cryptoKeyName": "",
"wrappedKey": ""
}),
"transient": json!({"name": ""}),
"unwrapped": json!({"key": ""})
}),
"surrogateInfoType": json!({})
}),
"cryptoHashConfig": json!({"cryptoKey": json!({})}),
"cryptoReplaceFfxFpeConfig": json!({
"commonAlphabet": "",
"context": json!({}),
"cryptoKey": json!({}),
"customAlphabet": "",
"radix": 0,
"surrogateInfoType": json!({})
}),
"dateShiftConfig": json!({
"context": json!({}),
"cryptoKey": json!({}),
"lowerBoundDays": 0,
"upperBoundDays": 0
}),
"fixedSizeBucketingConfig": json!({
"bucketSize": "",
"lowerBound": json!({}),
"upperBound": json!({})
}),
"redactConfig": json!({}),
"replaceConfig": json!({"newValue": json!({})}),
"replaceDictionaryConfig": json!({"wordList": json!({})}),
"replaceWithInfoTypeConfig": json!({}),
"timePartConfig": json!({"partToExtract": ""})
})
})
)}),
"recordTransformations": json!({
"fieldTransformations": (
json!({
"condition": json!({"expressions": json!({
"conditions": json!({"conditions": (
json!({
"field": json!({}),
"operator": "",
"value": json!({})
})
)}),
"logicalOperator": ""
})}),
"fields": (json!({})),
"infoTypeTransformations": json!({}),
"primitiveTransformation": json!({})
})
),
"recordSuppressions": (json!({"condition": json!({})}))
}),
"transformationErrorHandling": json!({
"leaveUntransformed": json!({}),
"throwError": json!({})
})
}),
"reidentifyTemplateName": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/v2/:parent/content:reidentify \
--header 'content-type: application/json' \
--data '{
"inspectConfig": {
"contentOptions": [],
"customInfoTypes": [
{
"detectionRules": [
{
"hotwordRule": {
"hotwordRegex": {
"groupIndexes": [],
"pattern": ""
},
"likelihoodAdjustment": {
"fixedLikelihood": "",
"relativeLikelihood": 0
},
"proximity": {
"windowAfter": 0,
"windowBefore": 0
}
}
}
],
"dictionary": {
"cloudStoragePath": {
"path": ""
},
"wordList": {
"words": []
}
},
"exclusionType": "",
"infoType": {
"name": "",
"version": ""
},
"likelihood": "",
"regex": {},
"storedType": {
"createTime": "",
"name": ""
},
"surrogateType": {}
}
],
"excludeInfoTypes": false,
"includeQuote": false,
"infoTypes": [
{}
],
"limits": {
"maxFindingsPerInfoType": [
{
"infoType": {},
"maxFindings": 0
}
],
"maxFindingsPerItem": 0,
"maxFindingsPerRequest": 0
},
"minLikelihood": "",
"ruleSet": [
{
"infoTypes": [
{}
],
"rules": [
{
"exclusionRule": {
"dictionary": {},
"excludeByHotword": {
"hotwordRegex": {},
"proximity": {}
},
"excludeInfoTypes": {
"infoTypes": [
{}
]
},
"matchingType": "",
"regex": {}
},
"hotwordRule": {}
}
]
}
]
},
"inspectTemplateName": "",
"item": {
"byteItem": {
"data": "",
"type": ""
},
"table": {
"headers": [
{
"name": ""
}
],
"rows": [
{
"values": [
{
"booleanValue": false,
"dateValue": {
"day": 0,
"month": 0,
"year": 0
},
"dayOfWeekValue": "",
"floatValue": "",
"integerValue": "",
"stringValue": "",
"timeValue": {
"hours": 0,
"minutes": 0,
"nanos": 0,
"seconds": 0
},
"timestampValue": ""
}
]
}
]
},
"value": ""
},
"locationId": "",
"reidentifyConfig": {
"imageTransformations": {
"transforms": [
{
"allInfoTypes": {},
"allText": {},
"redactionColor": {
"blue": "",
"green": "",
"red": ""
},
"selectedInfoTypes": {
"infoTypes": [
{}
]
}
}
]
},
"infoTypeTransformations": {
"transformations": [
{
"infoTypes": [
{}
],
"primitiveTransformation": {
"bucketingConfig": {
"buckets": [
{
"max": {},
"min": {},
"replacementValue": {}
}
]
},
"characterMaskConfig": {
"charactersToIgnore": [
{
"charactersToSkip": "",
"commonCharactersToIgnore": ""
}
],
"maskingCharacter": "",
"numberToMask": 0,
"reverseOrder": false
},
"cryptoDeterministicConfig": {
"context": {},
"cryptoKey": {
"kmsWrapped": {
"cryptoKeyName": "",
"wrappedKey": ""
},
"transient": {
"name": ""
},
"unwrapped": {
"key": ""
}
},
"surrogateInfoType": {}
},
"cryptoHashConfig": {
"cryptoKey": {}
},
"cryptoReplaceFfxFpeConfig": {
"commonAlphabet": "",
"context": {},
"cryptoKey": {},
"customAlphabet": "",
"radix": 0,
"surrogateInfoType": {}
},
"dateShiftConfig": {
"context": {},
"cryptoKey": {},
"lowerBoundDays": 0,
"upperBoundDays": 0
},
"fixedSizeBucketingConfig": {
"bucketSize": "",
"lowerBound": {},
"upperBound": {}
},
"redactConfig": {},
"replaceConfig": {
"newValue": {}
},
"replaceDictionaryConfig": {
"wordList": {}
},
"replaceWithInfoTypeConfig": {},
"timePartConfig": {
"partToExtract": ""
}
}
}
]
},
"recordTransformations": {
"fieldTransformations": [
{
"condition": {
"expressions": {
"conditions": {
"conditions": [
{
"field": {},
"operator": "",
"value": {}
}
]
},
"logicalOperator": ""
}
},
"fields": [
{}
],
"infoTypeTransformations": {},
"primitiveTransformation": {}
}
],
"recordSuppressions": [
{
"condition": {}
}
]
},
"transformationErrorHandling": {
"leaveUntransformed": {},
"throwError": {}
}
},
"reidentifyTemplateName": ""
}'
echo '{
"inspectConfig": {
"contentOptions": [],
"customInfoTypes": [
{
"detectionRules": [
{
"hotwordRule": {
"hotwordRegex": {
"groupIndexes": [],
"pattern": ""
},
"likelihoodAdjustment": {
"fixedLikelihood": "",
"relativeLikelihood": 0
},
"proximity": {
"windowAfter": 0,
"windowBefore": 0
}
}
}
],
"dictionary": {
"cloudStoragePath": {
"path": ""
},
"wordList": {
"words": []
}
},
"exclusionType": "",
"infoType": {
"name": "",
"version": ""
},
"likelihood": "",
"regex": {},
"storedType": {
"createTime": "",
"name": ""
},
"surrogateType": {}
}
],
"excludeInfoTypes": false,
"includeQuote": false,
"infoTypes": [
{}
],
"limits": {
"maxFindingsPerInfoType": [
{
"infoType": {},
"maxFindings": 0
}
],
"maxFindingsPerItem": 0,
"maxFindingsPerRequest": 0
},
"minLikelihood": "",
"ruleSet": [
{
"infoTypes": [
{}
],
"rules": [
{
"exclusionRule": {
"dictionary": {},
"excludeByHotword": {
"hotwordRegex": {},
"proximity": {}
},
"excludeInfoTypes": {
"infoTypes": [
{}
]
},
"matchingType": "",
"regex": {}
},
"hotwordRule": {}
}
]
}
]
},
"inspectTemplateName": "",
"item": {
"byteItem": {
"data": "",
"type": ""
},
"table": {
"headers": [
{
"name": ""
}
],
"rows": [
{
"values": [
{
"booleanValue": false,
"dateValue": {
"day": 0,
"month": 0,
"year": 0
},
"dayOfWeekValue": "",
"floatValue": "",
"integerValue": "",
"stringValue": "",
"timeValue": {
"hours": 0,
"minutes": 0,
"nanos": 0,
"seconds": 0
},
"timestampValue": ""
}
]
}
]
},
"value": ""
},
"locationId": "",
"reidentifyConfig": {
"imageTransformations": {
"transforms": [
{
"allInfoTypes": {},
"allText": {},
"redactionColor": {
"blue": "",
"green": "",
"red": ""
},
"selectedInfoTypes": {
"infoTypes": [
{}
]
}
}
]
},
"infoTypeTransformations": {
"transformations": [
{
"infoTypes": [
{}
],
"primitiveTransformation": {
"bucketingConfig": {
"buckets": [
{
"max": {},
"min": {},
"replacementValue": {}
}
]
},
"characterMaskConfig": {
"charactersToIgnore": [
{
"charactersToSkip": "",
"commonCharactersToIgnore": ""
}
],
"maskingCharacter": "",
"numberToMask": 0,
"reverseOrder": false
},
"cryptoDeterministicConfig": {
"context": {},
"cryptoKey": {
"kmsWrapped": {
"cryptoKeyName": "",
"wrappedKey": ""
},
"transient": {
"name": ""
},
"unwrapped": {
"key": ""
}
},
"surrogateInfoType": {}
},
"cryptoHashConfig": {
"cryptoKey": {}
},
"cryptoReplaceFfxFpeConfig": {
"commonAlphabet": "",
"context": {},
"cryptoKey": {},
"customAlphabet": "",
"radix": 0,
"surrogateInfoType": {}
},
"dateShiftConfig": {
"context": {},
"cryptoKey": {},
"lowerBoundDays": 0,
"upperBoundDays": 0
},
"fixedSizeBucketingConfig": {
"bucketSize": "",
"lowerBound": {},
"upperBound": {}
},
"redactConfig": {},
"replaceConfig": {
"newValue": {}
},
"replaceDictionaryConfig": {
"wordList": {}
},
"replaceWithInfoTypeConfig": {},
"timePartConfig": {
"partToExtract": ""
}
}
}
]
},
"recordTransformations": {
"fieldTransformations": [
{
"condition": {
"expressions": {
"conditions": {
"conditions": [
{
"field": {},
"operator": "",
"value": {}
}
]
},
"logicalOperator": ""
}
},
"fields": [
{}
],
"infoTypeTransformations": {},
"primitiveTransformation": {}
}
],
"recordSuppressions": [
{
"condition": {}
}
]
},
"transformationErrorHandling": {
"leaveUntransformed": {},
"throwError": {}
}
},
"reidentifyTemplateName": ""
}' | \
http POST {{baseUrl}}/v2/:parent/content:reidentify \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "inspectConfig": {\n "contentOptions": [],\n "customInfoTypes": [\n {\n "detectionRules": [\n {\n "hotwordRule": {\n "hotwordRegex": {\n "groupIndexes": [],\n "pattern": ""\n },\n "likelihoodAdjustment": {\n "fixedLikelihood": "",\n "relativeLikelihood": 0\n },\n "proximity": {\n "windowAfter": 0,\n "windowBefore": 0\n }\n }\n }\n ],\n "dictionary": {\n "cloudStoragePath": {\n "path": ""\n },\n "wordList": {\n "words": []\n }\n },\n "exclusionType": "",\n "infoType": {\n "name": "",\n "version": ""\n },\n "likelihood": "",\n "regex": {},\n "storedType": {\n "createTime": "",\n "name": ""\n },\n "surrogateType": {}\n }\n ],\n "excludeInfoTypes": false,\n "includeQuote": false,\n "infoTypes": [\n {}\n ],\n "limits": {\n "maxFindingsPerInfoType": [\n {\n "infoType": {},\n "maxFindings": 0\n }\n ],\n "maxFindingsPerItem": 0,\n "maxFindingsPerRequest": 0\n },\n "minLikelihood": "",\n "ruleSet": [\n {\n "infoTypes": [\n {}\n ],\n "rules": [\n {\n "exclusionRule": {\n "dictionary": {},\n "excludeByHotword": {\n "hotwordRegex": {},\n "proximity": {}\n },\n "excludeInfoTypes": {\n "infoTypes": [\n {}\n ]\n },\n "matchingType": "",\n "regex": {}\n },\n "hotwordRule": {}\n }\n ]\n }\n ]\n },\n "inspectTemplateName": "",\n "item": {\n "byteItem": {\n "data": "",\n "type": ""\n },\n "table": {\n "headers": [\n {\n "name": ""\n }\n ],\n "rows": [\n {\n "values": [\n {\n "booleanValue": false,\n "dateValue": {\n "day": 0,\n "month": 0,\n "year": 0\n },\n "dayOfWeekValue": "",\n "floatValue": "",\n "integerValue": "",\n "stringValue": "",\n "timeValue": {\n "hours": 0,\n "minutes": 0,\n "nanos": 0,\n "seconds": 0\n },\n "timestampValue": ""\n }\n ]\n }\n ]\n },\n "value": ""\n },\n "locationId": "",\n "reidentifyConfig": {\n "imageTransformations": {\n "transforms": [\n {\n "allInfoTypes": {},\n "allText": {},\n "redactionColor": {\n "blue": "",\n "green": "",\n "red": ""\n },\n "selectedInfoTypes": {\n "infoTypes": [\n {}\n ]\n }\n }\n ]\n },\n "infoTypeTransformations": {\n "transformations": [\n {\n "infoTypes": [\n {}\n ],\n "primitiveTransformation": {\n "bucketingConfig": {\n "buckets": [\n {\n "max": {},\n "min": {},\n "replacementValue": {}\n }\n ]\n },\n "characterMaskConfig": {\n "charactersToIgnore": [\n {\n "charactersToSkip": "",\n "commonCharactersToIgnore": ""\n }\n ],\n "maskingCharacter": "",\n "numberToMask": 0,\n "reverseOrder": false\n },\n "cryptoDeterministicConfig": {\n "context": {},\n "cryptoKey": {\n "kmsWrapped": {\n "cryptoKeyName": "",\n "wrappedKey": ""\n },\n "transient": {\n "name": ""\n },\n "unwrapped": {\n "key": ""\n }\n },\n "surrogateInfoType": {}\n },\n "cryptoHashConfig": {\n "cryptoKey": {}\n },\n "cryptoReplaceFfxFpeConfig": {\n "commonAlphabet": "",\n "context": {},\n "cryptoKey": {},\n "customAlphabet": "",\n "radix": 0,\n "surrogateInfoType": {}\n },\n "dateShiftConfig": {\n "context": {},\n "cryptoKey": {},\n "lowerBoundDays": 0,\n "upperBoundDays": 0\n },\n "fixedSizeBucketingConfig": {\n "bucketSize": "",\n "lowerBound": {},\n "upperBound": {}\n },\n "redactConfig": {},\n "replaceConfig": {\n "newValue": {}\n },\n "replaceDictionaryConfig": {\n "wordList": {}\n },\n "replaceWithInfoTypeConfig": {},\n "timePartConfig": {\n "partToExtract": ""\n }\n }\n }\n ]\n },\n "recordTransformations": {\n "fieldTransformations": [\n {\n "condition": {\n "expressions": {\n "conditions": {\n "conditions": [\n {\n "field": {},\n "operator": "",\n "value": {}\n }\n ]\n },\n "logicalOperator": ""\n }\n },\n "fields": [\n {}\n ],\n "infoTypeTransformations": {},\n "primitiveTransformation": {}\n }\n ],\n "recordSuppressions": [\n {\n "condition": {}\n }\n ]\n },\n "transformationErrorHandling": {\n "leaveUntransformed": {},\n "throwError": {}\n }\n },\n "reidentifyTemplateName": ""\n}' \
--output-document \
- {{baseUrl}}/v2/:parent/content:reidentify
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"inspectConfig": [
"contentOptions": [],
"customInfoTypes": [
[
"detectionRules": [["hotwordRule": [
"hotwordRegex": [
"groupIndexes": [],
"pattern": ""
],
"likelihoodAdjustment": [
"fixedLikelihood": "",
"relativeLikelihood": 0
],
"proximity": [
"windowAfter": 0,
"windowBefore": 0
]
]]],
"dictionary": [
"cloudStoragePath": ["path": ""],
"wordList": ["words": []]
],
"exclusionType": "",
"infoType": [
"name": "",
"version": ""
],
"likelihood": "",
"regex": [],
"storedType": [
"createTime": "",
"name": ""
],
"surrogateType": []
]
],
"excludeInfoTypes": false,
"includeQuote": false,
"infoTypes": [[]],
"limits": [
"maxFindingsPerInfoType": [
[
"infoType": [],
"maxFindings": 0
]
],
"maxFindingsPerItem": 0,
"maxFindingsPerRequest": 0
],
"minLikelihood": "",
"ruleSet": [
[
"infoTypes": [[]],
"rules": [
[
"exclusionRule": [
"dictionary": [],
"excludeByHotword": [
"hotwordRegex": [],
"proximity": []
],
"excludeInfoTypes": ["infoTypes": [[]]],
"matchingType": "",
"regex": []
],
"hotwordRule": []
]
]
]
]
],
"inspectTemplateName": "",
"item": [
"byteItem": [
"data": "",
"type": ""
],
"table": [
"headers": [["name": ""]],
"rows": [["values": [
[
"booleanValue": false,
"dateValue": [
"day": 0,
"month": 0,
"year": 0
],
"dayOfWeekValue": "",
"floatValue": "",
"integerValue": "",
"stringValue": "",
"timeValue": [
"hours": 0,
"minutes": 0,
"nanos": 0,
"seconds": 0
],
"timestampValue": ""
]
]]]
],
"value": ""
],
"locationId": "",
"reidentifyConfig": [
"imageTransformations": ["transforms": [
[
"allInfoTypes": [],
"allText": [],
"redactionColor": [
"blue": "",
"green": "",
"red": ""
],
"selectedInfoTypes": ["infoTypes": [[]]]
]
]],
"infoTypeTransformations": ["transformations": [
[
"infoTypes": [[]],
"primitiveTransformation": [
"bucketingConfig": ["buckets": [
[
"max": [],
"min": [],
"replacementValue": []
]
]],
"characterMaskConfig": [
"charactersToIgnore": [
[
"charactersToSkip": "",
"commonCharactersToIgnore": ""
]
],
"maskingCharacter": "",
"numberToMask": 0,
"reverseOrder": false
],
"cryptoDeterministicConfig": [
"context": [],
"cryptoKey": [
"kmsWrapped": [
"cryptoKeyName": "",
"wrappedKey": ""
],
"transient": ["name": ""],
"unwrapped": ["key": ""]
],
"surrogateInfoType": []
],
"cryptoHashConfig": ["cryptoKey": []],
"cryptoReplaceFfxFpeConfig": [
"commonAlphabet": "",
"context": [],
"cryptoKey": [],
"customAlphabet": "",
"radix": 0,
"surrogateInfoType": []
],
"dateShiftConfig": [
"context": [],
"cryptoKey": [],
"lowerBoundDays": 0,
"upperBoundDays": 0
],
"fixedSizeBucketingConfig": [
"bucketSize": "",
"lowerBound": [],
"upperBound": []
],
"redactConfig": [],
"replaceConfig": ["newValue": []],
"replaceDictionaryConfig": ["wordList": []],
"replaceWithInfoTypeConfig": [],
"timePartConfig": ["partToExtract": ""]
]
]
]],
"recordTransformations": [
"fieldTransformations": [
[
"condition": ["expressions": [
"conditions": ["conditions": [
[
"field": [],
"operator": "",
"value": []
]
]],
"logicalOperator": ""
]],
"fields": [[]],
"infoTypeTransformations": [],
"primitiveTransformation": []
]
],
"recordSuppressions": [["condition": []]]
],
"transformationErrorHandling": [
"leaveUntransformed": [],
"throwError": []
]
],
"reidentifyTemplateName": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/:parent/content:reidentify")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
dlp.projects.locations.deidentifyTemplates.create
{{baseUrl}}/v2/:parent/deidentifyTemplates
QUERY PARAMS
parent
BODY json
{
"deidentifyTemplate": {
"createTime": "",
"deidentifyConfig": {
"imageTransformations": {
"transforms": [
{
"allInfoTypes": {},
"allText": {},
"redactionColor": {
"blue": "",
"green": "",
"red": ""
},
"selectedInfoTypes": {
"infoTypes": [
{
"name": "",
"version": ""
}
]
}
}
]
},
"infoTypeTransformations": {
"transformations": [
{
"infoTypes": [
{}
],
"primitiveTransformation": {
"bucketingConfig": {
"buckets": [
{
"max": {
"booleanValue": false,
"dateValue": {
"day": 0,
"month": 0,
"year": 0
},
"dayOfWeekValue": "",
"floatValue": "",
"integerValue": "",
"stringValue": "",
"timeValue": {
"hours": 0,
"minutes": 0,
"nanos": 0,
"seconds": 0
},
"timestampValue": ""
},
"min": {},
"replacementValue": {}
}
]
},
"characterMaskConfig": {
"charactersToIgnore": [
{
"charactersToSkip": "",
"commonCharactersToIgnore": ""
}
],
"maskingCharacter": "",
"numberToMask": 0,
"reverseOrder": false
},
"cryptoDeterministicConfig": {
"context": {
"name": ""
},
"cryptoKey": {
"kmsWrapped": {
"cryptoKeyName": "",
"wrappedKey": ""
},
"transient": {
"name": ""
},
"unwrapped": {
"key": ""
}
},
"surrogateInfoType": {}
},
"cryptoHashConfig": {
"cryptoKey": {}
},
"cryptoReplaceFfxFpeConfig": {
"commonAlphabet": "",
"context": {},
"cryptoKey": {},
"customAlphabet": "",
"radix": 0,
"surrogateInfoType": {}
},
"dateShiftConfig": {
"context": {},
"cryptoKey": {},
"lowerBoundDays": 0,
"upperBoundDays": 0
},
"fixedSizeBucketingConfig": {
"bucketSize": "",
"lowerBound": {},
"upperBound": {}
},
"redactConfig": {},
"replaceConfig": {
"newValue": {}
},
"replaceDictionaryConfig": {
"wordList": {
"words": []
}
},
"replaceWithInfoTypeConfig": {},
"timePartConfig": {
"partToExtract": ""
}
}
}
]
},
"recordTransformations": {
"fieldTransformations": [
{
"condition": {
"expressions": {
"conditions": {
"conditions": [
{
"field": {},
"operator": "",
"value": {}
}
]
},
"logicalOperator": ""
}
},
"fields": [
{}
],
"infoTypeTransformations": {},
"primitiveTransformation": {}
}
],
"recordSuppressions": [
{
"condition": {}
}
]
},
"transformationErrorHandling": {
"leaveUntransformed": {},
"throwError": {}
}
},
"description": "",
"displayName": "",
"name": "",
"updateTime": ""
},
"locationId": "",
"templateId": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/:parent/deidentifyTemplates");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"deidentifyTemplate\": {\n \"createTime\": \"\",\n \"deidentifyConfig\": {\n \"imageTransformations\": {\n \"transforms\": [\n {\n \"allInfoTypes\": {},\n \"allText\": {},\n \"redactionColor\": {\n \"blue\": \"\",\n \"green\": \"\",\n \"red\": \"\"\n },\n \"selectedInfoTypes\": {\n \"infoTypes\": [\n {\n \"name\": \"\",\n \"version\": \"\"\n }\n ]\n }\n }\n ]\n },\n \"infoTypeTransformations\": {\n \"transformations\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"primitiveTransformation\": {\n \"bucketingConfig\": {\n \"buckets\": [\n {\n \"max\": {\n \"booleanValue\": false,\n \"dateValue\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"dayOfWeekValue\": \"\",\n \"floatValue\": \"\",\n \"integerValue\": \"\",\n \"stringValue\": \"\",\n \"timeValue\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"timestampValue\": \"\"\n },\n \"min\": {},\n \"replacementValue\": {}\n }\n ]\n },\n \"characterMaskConfig\": {\n \"charactersToIgnore\": [\n {\n \"charactersToSkip\": \"\",\n \"commonCharactersToIgnore\": \"\"\n }\n ],\n \"maskingCharacter\": \"\",\n \"numberToMask\": 0,\n \"reverseOrder\": false\n },\n \"cryptoDeterministicConfig\": {\n \"context\": {\n \"name\": \"\"\n },\n \"cryptoKey\": {\n \"kmsWrapped\": {\n \"cryptoKeyName\": \"\",\n \"wrappedKey\": \"\"\n },\n \"transient\": {\n \"name\": \"\"\n },\n \"unwrapped\": {\n \"key\": \"\"\n }\n },\n \"surrogateInfoType\": {}\n },\n \"cryptoHashConfig\": {\n \"cryptoKey\": {}\n },\n \"cryptoReplaceFfxFpeConfig\": {\n \"commonAlphabet\": \"\",\n \"context\": {},\n \"cryptoKey\": {},\n \"customAlphabet\": \"\",\n \"radix\": 0,\n \"surrogateInfoType\": {}\n },\n \"dateShiftConfig\": {\n \"context\": {},\n \"cryptoKey\": {},\n \"lowerBoundDays\": 0,\n \"upperBoundDays\": 0\n },\n \"fixedSizeBucketingConfig\": {\n \"bucketSize\": \"\",\n \"lowerBound\": {},\n \"upperBound\": {}\n },\n \"redactConfig\": {},\n \"replaceConfig\": {\n \"newValue\": {}\n },\n \"replaceDictionaryConfig\": {\n \"wordList\": {\n \"words\": []\n }\n },\n \"replaceWithInfoTypeConfig\": {},\n \"timePartConfig\": {\n \"partToExtract\": \"\"\n }\n }\n }\n ]\n },\n \"recordTransformations\": {\n \"fieldTransformations\": [\n {\n \"condition\": {\n \"expressions\": {\n \"conditions\": {\n \"conditions\": [\n {\n \"field\": {},\n \"operator\": \"\",\n \"value\": {}\n }\n ]\n },\n \"logicalOperator\": \"\"\n }\n },\n \"fields\": [\n {}\n ],\n \"infoTypeTransformations\": {},\n \"primitiveTransformation\": {}\n }\n ],\n \"recordSuppressions\": [\n {\n \"condition\": {}\n }\n ]\n },\n \"transformationErrorHandling\": {\n \"leaveUntransformed\": {},\n \"throwError\": {}\n }\n },\n \"description\": \"\",\n \"displayName\": \"\",\n \"name\": \"\",\n \"updateTime\": \"\"\n },\n \"locationId\": \"\",\n \"templateId\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v2/:parent/deidentifyTemplates" {:content-type :json
:form-params {:deidentifyTemplate {:createTime ""
:deidentifyConfig {:imageTransformations {:transforms [{:allInfoTypes {}
:allText {}
:redactionColor {:blue ""
:green ""
:red ""}
:selectedInfoTypes {:infoTypes [{:name ""
:version ""}]}}]}
:infoTypeTransformations {:transformations [{:infoTypes [{}]
:primitiveTransformation {:bucketingConfig {:buckets [{:max {:booleanValue false
:dateValue {:day 0
:month 0
:year 0}
:dayOfWeekValue ""
:floatValue ""
:integerValue ""
:stringValue ""
:timeValue {:hours 0
:minutes 0
:nanos 0
:seconds 0}
:timestampValue ""}
:min {}
:replacementValue {}}]}
:characterMaskConfig {:charactersToIgnore [{:charactersToSkip ""
:commonCharactersToIgnore ""}]
:maskingCharacter ""
:numberToMask 0
:reverseOrder false}
:cryptoDeterministicConfig {:context {:name ""}
:cryptoKey {:kmsWrapped {:cryptoKeyName ""
:wrappedKey ""}
:transient {:name ""}
:unwrapped {:key ""}}
:surrogateInfoType {}}
:cryptoHashConfig {:cryptoKey {}}
:cryptoReplaceFfxFpeConfig {:commonAlphabet ""
:context {}
:cryptoKey {}
:customAlphabet ""
:radix 0
:surrogateInfoType {}}
:dateShiftConfig {:context {}
:cryptoKey {}
:lowerBoundDays 0
:upperBoundDays 0}
:fixedSizeBucketingConfig {:bucketSize ""
:lowerBound {}
:upperBound {}}
:redactConfig {}
:replaceConfig {:newValue {}}
:replaceDictionaryConfig {:wordList {:words []}}
:replaceWithInfoTypeConfig {}
:timePartConfig {:partToExtract ""}}}]}
:recordTransformations {:fieldTransformations [{:condition {:expressions {:conditions {:conditions [{:field {}
:operator ""
:value {}}]}
:logicalOperator ""}}
:fields [{}]
:infoTypeTransformations {}
:primitiveTransformation {}}]
:recordSuppressions [{:condition {}}]}
:transformationErrorHandling {:leaveUntransformed {}
:throwError {}}}
:description ""
:displayName ""
:name ""
:updateTime ""}
:locationId ""
:templateId ""}})
require "http/client"
url = "{{baseUrl}}/v2/:parent/deidentifyTemplates"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"deidentifyTemplate\": {\n \"createTime\": \"\",\n \"deidentifyConfig\": {\n \"imageTransformations\": {\n \"transforms\": [\n {\n \"allInfoTypes\": {},\n \"allText\": {},\n \"redactionColor\": {\n \"blue\": \"\",\n \"green\": \"\",\n \"red\": \"\"\n },\n \"selectedInfoTypes\": {\n \"infoTypes\": [\n {\n \"name\": \"\",\n \"version\": \"\"\n }\n ]\n }\n }\n ]\n },\n \"infoTypeTransformations\": {\n \"transformations\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"primitiveTransformation\": {\n \"bucketingConfig\": {\n \"buckets\": [\n {\n \"max\": {\n \"booleanValue\": false,\n \"dateValue\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"dayOfWeekValue\": \"\",\n \"floatValue\": \"\",\n \"integerValue\": \"\",\n \"stringValue\": \"\",\n \"timeValue\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"timestampValue\": \"\"\n },\n \"min\": {},\n \"replacementValue\": {}\n }\n ]\n },\n \"characterMaskConfig\": {\n \"charactersToIgnore\": [\n {\n \"charactersToSkip\": \"\",\n \"commonCharactersToIgnore\": \"\"\n }\n ],\n \"maskingCharacter\": \"\",\n \"numberToMask\": 0,\n \"reverseOrder\": false\n },\n \"cryptoDeterministicConfig\": {\n \"context\": {\n \"name\": \"\"\n },\n \"cryptoKey\": {\n \"kmsWrapped\": {\n \"cryptoKeyName\": \"\",\n \"wrappedKey\": \"\"\n },\n \"transient\": {\n \"name\": \"\"\n },\n \"unwrapped\": {\n \"key\": \"\"\n }\n },\n \"surrogateInfoType\": {}\n },\n \"cryptoHashConfig\": {\n \"cryptoKey\": {}\n },\n \"cryptoReplaceFfxFpeConfig\": {\n \"commonAlphabet\": \"\",\n \"context\": {},\n \"cryptoKey\": {},\n \"customAlphabet\": \"\",\n \"radix\": 0,\n \"surrogateInfoType\": {}\n },\n \"dateShiftConfig\": {\n \"context\": {},\n \"cryptoKey\": {},\n \"lowerBoundDays\": 0,\n \"upperBoundDays\": 0\n },\n \"fixedSizeBucketingConfig\": {\n \"bucketSize\": \"\",\n \"lowerBound\": {},\n \"upperBound\": {}\n },\n \"redactConfig\": {},\n \"replaceConfig\": {\n \"newValue\": {}\n },\n \"replaceDictionaryConfig\": {\n \"wordList\": {\n \"words\": []\n }\n },\n \"replaceWithInfoTypeConfig\": {},\n \"timePartConfig\": {\n \"partToExtract\": \"\"\n }\n }\n }\n ]\n },\n \"recordTransformations\": {\n \"fieldTransformations\": [\n {\n \"condition\": {\n \"expressions\": {\n \"conditions\": {\n \"conditions\": [\n {\n \"field\": {},\n \"operator\": \"\",\n \"value\": {}\n }\n ]\n },\n \"logicalOperator\": \"\"\n }\n },\n \"fields\": [\n {}\n ],\n \"infoTypeTransformations\": {},\n \"primitiveTransformation\": {}\n }\n ],\n \"recordSuppressions\": [\n {\n \"condition\": {}\n }\n ]\n },\n \"transformationErrorHandling\": {\n \"leaveUntransformed\": {},\n \"throwError\": {}\n }\n },\n \"description\": \"\",\n \"displayName\": \"\",\n \"name\": \"\",\n \"updateTime\": \"\"\n },\n \"locationId\": \"\",\n \"templateId\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/v2/:parent/deidentifyTemplates"),
Content = new StringContent("{\n \"deidentifyTemplate\": {\n \"createTime\": \"\",\n \"deidentifyConfig\": {\n \"imageTransformations\": {\n \"transforms\": [\n {\n \"allInfoTypes\": {},\n \"allText\": {},\n \"redactionColor\": {\n \"blue\": \"\",\n \"green\": \"\",\n \"red\": \"\"\n },\n \"selectedInfoTypes\": {\n \"infoTypes\": [\n {\n \"name\": \"\",\n \"version\": \"\"\n }\n ]\n }\n }\n ]\n },\n \"infoTypeTransformations\": {\n \"transformations\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"primitiveTransformation\": {\n \"bucketingConfig\": {\n \"buckets\": [\n {\n \"max\": {\n \"booleanValue\": false,\n \"dateValue\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"dayOfWeekValue\": \"\",\n \"floatValue\": \"\",\n \"integerValue\": \"\",\n \"stringValue\": \"\",\n \"timeValue\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"timestampValue\": \"\"\n },\n \"min\": {},\n \"replacementValue\": {}\n }\n ]\n },\n \"characterMaskConfig\": {\n \"charactersToIgnore\": [\n {\n \"charactersToSkip\": \"\",\n \"commonCharactersToIgnore\": \"\"\n }\n ],\n \"maskingCharacter\": \"\",\n \"numberToMask\": 0,\n \"reverseOrder\": false\n },\n \"cryptoDeterministicConfig\": {\n \"context\": {\n \"name\": \"\"\n },\n \"cryptoKey\": {\n \"kmsWrapped\": {\n \"cryptoKeyName\": \"\",\n \"wrappedKey\": \"\"\n },\n \"transient\": {\n \"name\": \"\"\n },\n \"unwrapped\": {\n \"key\": \"\"\n }\n },\n \"surrogateInfoType\": {}\n },\n \"cryptoHashConfig\": {\n \"cryptoKey\": {}\n },\n \"cryptoReplaceFfxFpeConfig\": {\n \"commonAlphabet\": \"\",\n \"context\": {},\n \"cryptoKey\": {},\n \"customAlphabet\": \"\",\n \"radix\": 0,\n \"surrogateInfoType\": {}\n },\n \"dateShiftConfig\": {\n \"context\": {},\n \"cryptoKey\": {},\n \"lowerBoundDays\": 0,\n \"upperBoundDays\": 0\n },\n \"fixedSizeBucketingConfig\": {\n \"bucketSize\": \"\",\n \"lowerBound\": {},\n \"upperBound\": {}\n },\n \"redactConfig\": {},\n \"replaceConfig\": {\n \"newValue\": {}\n },\n \"replaceDictionaryConfig\": {\n \"wordList\": {\n \"words\": []\n }\n },\n \"replaceWithInfoTypeConfig\": {},\n \"timePartConfig\": {\n \"partToExtract\": \"\"\n }\n }\n }\n ]\n },\n \"recordTransformations\": {\n \"fieldTransformations\": [\n {\n \"condition\": {\n \"expressions\": {\n \"conditions\": {\n \"conditions\": [\n {\n \"field\": {},\n \"operator\": \"\",\n \"value\": {}\n }\n ]\n },\n \"logicalOperator\": \"\"\n }\n },\n \"fields\": [\n {}\n ],\n \"infoTypeTransformations\": {},\n \"primitiveTransformation\": {}\n }\n ],\n \"recordSuppressions\": [\n {\n \"condition\": {}\n }\n ]\n },\n \"transformationErrorHandling\": {\n \"leaveUntransformed\": {},\n \"throwError\": {}\n }\n },\n \"description\": \"\",\n \"displayName\": \"\",\n \"name\": \"\",\n \"updateTime\": \"\"\n },\n \"locationId\": \"\",\n \"templateId\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/:parent/deidentifyTemplates");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"deidentifyTemplate\": {\n \"createTime\": \"\",\n \"deidentifyConfig\": {\n \"imageTransformations\": {\n \"transforms\": [\n {\n \"allInfoTypes\": {},\n \"allText\": {},\n \"redactionColor\": {\n \"blue\": \"\",\n \"green\": \"\",\n \"red\": \"\"\n },\n \"selectedInfoTypes\": {\n \"infoTypes\": [\n {\n \"name\": \"\",\n \"version\": \"\"\n }\n ]\n }\n }\n ]\n },\n \"infoTypeTransformations\": {\n \"transformations\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"primitiveTransformation\": {\n \"bucketingConfig\": {\n \"buckets\": [\n {\n \"max\": {\n \"booleanValue\": false,\n \"dateValue\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"dayOfWeekValue\": \"\",\n \"floatValue\": \"\",\n \"integerValue\": \"\",\n \"stringValue\": \"\",\n \"timeValue\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"timestampValue\": \"\"\n },\n \"min\": {},\n \"replacementValue\": {}\n }\n ]\n },\n \"characterMaskConfig\": {\n \"charactersToIgnore\": [\n {\n \"charactersToSkip\": \"\",\n \"commonCharactersToIgnore\": \"\"\n }\n ],\n \"maskingCharacter\": \"\",\n \"numberToMask\": 0,\n \"reverseOrder\": false\n },\n \"cryptoDeterministicConfig\": {\n \"context\": {\n \"name\": \"\"\n },\n \"cryptoKey\": {\n \"kmsWrapped\": {\n \"cryptoKeyName\": \"\",\n \"wrappedKey\": \"\"\n },\n \"transient\": {\n \"name\": \"\"\n },\n \"unwrapped\": {\n \"key\": \"\"\n }\n },\n \"surrogateInfoType\": {}\n },\n \"cryptoHashConfig\": {\n \"cryptoKey\": {}\n },\n \"cryptoReplaceFfxFpeConfig\": {\n \"commonAlphabet\": \"\",\n \"context\": {},\n \"cryptoKey\": {},\n \"customAlphabet\": \"\",\n \"radix\": 0,\n \"surrogateInfoType\": {}\n },\n \"dateShiftConfig\": {\n \"context\": {},\n \"cryptoKey\": {},\n \"lowerBoundDays\": 0,\n \"upperBoundDays\": 0\n },\n \"fixedSizeBucketingConfig\": {\n \"bucketSize\": \"\",\n \"lowerBound\": {},\n \"upperBound\": {}\n },\n \"redactConfig\": {},\n \"replaceConfig\": {\n \"newValue\": {}\n },\n \"replaceDictionaryConfig\": {\n \"wordList\": {\n \"words\": []\n }\n },\n \"replaceWithInfoTypeConfig\": {},\n \"timePartConfig\": {\n \"partToExtract\": \"\"\n }\n }\n }\n ]\n },\n \"recordTransformations\": {\n \"fieldTransformations\": [\n {\n \"condition\": {\n \"expressions\": {\n \"conditions\": {\n \"conditions\": [\n {\n \"field\": {},\n \"operator\": \"\",\n \"value\": {}\n }\n ]\n },\n \"logicalOperator\": \"\"\n }\n },\n \"fields\": [\n {}\n ],\n \"infoTypeTransformations\": {},\n \"primitiveTransformation\": {}\n }\n ],\n \"recordSuppressions\": [\n {\n \"condition\": {}\n }\n ]\n },\n \"transformationErrorHandling\": {\n \"leaveUntransformed\": {},\n \"throwError\": {}\n }\n },\n \"description\": \"\",\n \"displayName\": \"\",\n \"name\": \"\",\n \"updateTime\": \"\"\n },\n \"locationId\": \"\",\n \"templateId\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/:parent/deidentifyTemplates"
payload := strings.NewReader("{\n \"deidentifyTemplate\": {\n \"createTime\": \"\",\n \"deidentifyConfig\": {\n \"imageTransformations\": {\n \"transforms\": [\n {\n \"allInfoTypes\": {},\n \"allText\": {},\n \"redactionColor\": {\n \"blue\": \"\",\n \"green\": \"\",\n \"red\": \"\"\n },\n \"selectedInfoTypes\": {\n \"infoTypes\": [\n {\n \"name\": \"\",\n \"version\": \"\"\n }\n ]\n }\n }\n ]\n },\n \"infoTypeTransformations\": {\n \"transformations\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"primitiveTransformation\": {\n \"bucketingConfig\": {\n \"buckets\": [\n {\n \"max\": {\n \"booleanValue\": false,\n \"dateValue\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"dayOfWeekValue\": \"\",\n \"floatValue\": \"\",\n \"integerValue\": \"\",\n \"stringValue\": \"\",\n \"timeValue\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"timestampValue\": \"\"\n },\n \"min\": {},\n \"replacementValue\": {}\n }\n ]\n },\n \"characterMaskConfig\": {\n \"charactersToIgnore\": [\n {\n \"charactersToSkip\": \"\",\n \"commonCharactersToIgnore\": \"\"\n }\n ],\n \"maskingCharacter\": \"\",\n \"numberToMask\": 0,\n \"reverseOrder\": false\n },\n \"cryptoDeterministicConfig\": {\n \"context\": {\n \"name\": \"\"\n },\n \"cryptoKey\": {\n \"kmsWrapped\": {\n \"cryptoKeyName\": \"\",\n \"wrappedKey\": \"\"\n },\n \"transient\": {\n \"name\": \"\"\n },\n \"unwrapped\": {\n \"key\": \"\"\n }\n },\n \"surrogateInfoType\": {}\n },\n \"cryptoHashConfig\": {\n \"cryptoKey\": {}\n },\n \"cryptoReplaceFfxFpeConfig\": {\n \"commonAlphabet\": \"\",\n \"context\": {},\n \"cryptoKey\": {},\n \"customAlphabet\": \"\",\n \"radix\": 0,\n \"surrogateInfoType\": {}\n },\n \"dateShiftConfig\": {\n \"context\": {},\n \"cryptoKey\": {},\n \"lowerBoundDays\": 0,\n \"upperBoundDays\": 0\n },\n \"fixedSizeBucketingConfig\": {\n \"bucketSize\": \"\",\n \"lowerBound\": {},\n \"upperBound\": {}\n },\n \"redactConfig\": {},\n \"replaceConfig\": {\n \"newValue\": {}\n },\n \"replaceDictionaryConfig\": {\n \"wordList\": {\n \"words\": []\n }\n },\n \"replaceWithInfoTypeConfig\": {},\n \"timePartConfig\": {\n \"partToExtract\": \"\"\n }\n }\n }\n ]\n },\n \"recordTransformations\": {\n \"fieldTransformations\": [\n {\n \"condition\": {\n \"expressions\": {\n \"conditions\": {\n \"conditions\": [\n {\n \"field\": {},\n \"operator\": \"\",\n \"value\": {}\n }\n ]\n },\n \"logicalOperator\": \"\"\n }\n },\n \"fields\": [\n {}\n ],\n \"infoTypeTransformations\": {},\n \"primitiveTransformation\": {}\n }\n ],\n \"recordSuppressions\": [\n {\n \"condition\": {}\n }\n ]\n },\n \"transformationErrorHandling\": {\n \"leaveUntransformed\": {},\n \"throwError\": {}\n }\n },\n \"description\": \"\",\n \"displayName\": \"\",\n \"name\": \"\",\n \"updateTime\": \"\"\n },\n \"locationId\": \"\",\n \"templateId\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/v2/:parent/deidentifyTemplates HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 4621
{
"deidentifyTemplate": {
"createTime": "",
"deidentifyConfig": {
"imageTransformations": {
"transforms": [
{
"allInfoTypes": {},
"allText": {},
"redactionColor": {
"blue": "",
"green": "",
"red": ""
},
"selectedInfoTypes": {
"infoTypes": [
{
"name": "",
"version": ""
}
]
}
}
]
},
"infoTypeTransformations": {
"transformations": [
{
"infoTypes": [
{}
],
"primitiveTransformation": {
"bucketingConfig": {
"buckets": [
{
"max": {
"booleanValue": false,
"dateValue": {
"day": 0,
"month": 0,
"year": 0
},
"dayOfWeekValue": "",
"floatValue": "",
"integerValue": "",
"stringValue": "",
"timeValue": {
"hours": 0,
"minutes": 0,
"nanos": 0,
"seconds": 0
},
"timestampValue": ""
},
"min": {},
"replacementValue": {}
}
]
},
"characterMaskConfig": {
"charactersToIgnore": [
{
"charactersToSkip": "",
"commonCharactersToIgnore": ""
}
],
"maskingCharacter": "",
"numberToMask": 0,
"reverseOrder": false
},
"cryptoDeterministicConfig": {
"context": {
"name": ""
},
"cryptoKey": {
"kmsWrapped": {
"cryptoKeyName": "",
"wrappedKey": ""
},
"transient": {
"name": ""
},
"unwrapped": {
"key": ""
}
},
"surrogateInfoType": {}
},
"cryptoHashConfig": {
"cryptoKey": {}
},
"cryptoReplaceFfxFpeConfig": {
"commonAlphabet": "",
"context": {},
"cryptoKey": {},
"customAlphabet": "",
"radix": 0,
"surrogateInfoType": {}
},
"dateShiftConfig": {
"context": {},
"cryptoKey": {},
"lowerBoundDays": 0,
"upperBoundDays": 0
},
"fixedSizeBucketingConfig": {
"bucketSize": "",
"lowerBound": {},
"upperBound": {}
},
"redactConfig": {},
"replaceConfig": {
"newValue": {}
},
"replaceDictionaryConfig": {
"wordList": {
"words": []
}
},
"replaceWithInfoTypeConfig": {},
"timePartConfig": {
"partToExtract": ""
}
}
}
]
},
"recordTransformations": {
"fieldTransformations": [
{
"condition": {
"expressions": {
"conditions": {
"conditions": [
{
"field": {},
"operator": "",
"value": {}
}
]
},
"logicalOperator": ""
}
},
"fields": [
{}
],
"infoTypeTransformations": {},
"primitiveTransformation": {}
}
],
"recordSuppressions": [
{
"condition": {}
}
]
},
"transformationErrorHandling": {
"leaveUntransformed": {},
"throwError": {}
}
},
"description": "",
"displayName": "",
"name": "",
"updateTime": ""
},
"locationId": "",
"templateId": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v2/:parent/deidentifyTemplates")
.setHeader("content-type", "application/json")
.setBody("{\n \"deidentifyTemplate\": {\n \"createTime\": \"\",\n \"deidentifyConfig\": {\n \"imageTransformations\": {\n \"transforms\": [\n {\n \"allInfoTypes\": {},\n \"allText\": {},\n \"redactionColor\": {\n \"blue\": \"\",\n \"green\": \"\",\n \"red\": \"\"\n },\n \"selectedInfoTypes\": {\n \"infoTypes\": [\n {\n \"name\": \"\",\n \"version\": \"\"\n }\n ]\n }\n }\n ]\n },\n \"infoTypeTransformations\": {\n \"transformations\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"primitiveTransformation\": {\n \"bucketingConfig\": {\n \"buckets\": [\n {\n \"max\": {\n \"booleanValue\": false,\n \"dateValue\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"dayOfWeekValue\": \"\",\n \"floatValue\": \"\",\n \"integerValue\": \"\",\n \"stringValue\": \"\",\n \"timeValue\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"timestampValue\": \"\"\n },\n \"min\": {},\n \"replacementValue\": {}\n }\n ]\n },\n \"characterMaskConfig\": {\n \"charactersToIgnore\": [\n {\n \"charactersToSkip\": \"\",\n \"commonCharactersToIgnore\": \"\"\n }\n ],\n \"maskingCharacter\": \"\",\n \"numberToMask\": 0,\n \"reverseOrder\": false\n },\n \"cryptoDeterministicConfig\": {\n \"context\": {\n \"name\": \"\"\n },\n \"cryptoKey\": {\n \"kmsWrapped\": {\n \"cryptoKeyName\": \"\",\n \"wrappedKey\": \"\"\n },\n \"transient\": {\n \"name\": \"\"\n },\n \"unwrapped\": {\n \"key\": \"\"\n }\n },\n \"surrogateInfoType\": {}\n },\n \"cryptoHashConfig\": {\n \"cryptoKey\": {}\n },\n \"cryptoReplaceFfxFpeConfig\": {\n \"commonAlphabet\": \"\",\n \"context\": {},\n \"cryptoKey\": {},\n \"customAlphabet\": \"\",\n \"radix\": 0,\n \"surrogateInfoType\": {}\n },\n \"dateShiftConfig\": {\n \"context\": {},\n \"cryptoKey\": {},\n \"lowerBoundDays\": 0,\n \"upperBoundDays\": 0\n },\n \"fixedSizeBucketingConfig\": {\n \"bucketSize\": \"\",\n \"lowerBound\": {},\n \"upperBound\": {}\n },\n \"redactConfig\": {},\n \"replaceConfig\": {\n \"newValue\": {}\n },\n \"replaceDictionaryConfig\": {\n \"wordList\": {\n \"words\": []\n }\n },\n \"replaceWithInfoTypeConfig\": {},\n \"timePartConfig\": {\n \"partToExtract\": \"\"\n }\n }\n }\n ]\n },\n \"recordTransformations\": {\n \"fieldTransformations\": [\n {\n \"condition\": {\n \"expressions\": {\n \"conditions\": {\n \"conditions\": [\n {\n \"field\": {},\n \"operator\": \"\",\n \"value\": {}\n }\n ]\n },\n \"logicalOperator\": \"\"\n }\n },\n \"fields\": [\n {}\n ],\n \"infoTypeTransformations\": {},\n \"primitiveTransformation\": {}\n }\n ],\n \"recordSuppressions\": [\n {\n \"condition\": {}\n }\n ]\n },\n \"transformationErrorHandling\": {\n \"leaveUntransformed\": {},\n \"throwError\": {}\n }\n },\n \"description\": \"\",\n \"displayName\": \"\",\n \"name\": \"\",\n \"updateTime\": \"\"\n },\n \"locationId\": \"\",\n \"templateId\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/:parent/deidentifyTemplates"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"deidentifyTemplate\": {\n \"createTime\": \"\",\n \"deidentifyConfig\": {\n \"imageTransformations\": {\n \"transforms\": [\n {\n \"allInfoTypes\": {},\n \"allText\": {},\n \"redactionColor\": {\n \"blue\": \"\",\n \"green\": \"\",\n \"red\": \"\"\n },\n \"selectedInfoTypes\": {\n \"infoTypes\": [\n {\n \"name\": \"\",\n \"version\": \"\"\n }\n ]\n }\n }\n ]\n },\n \"infoTypeTransformations\": {\n \"transformations\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"primitiveTransformation\": {\n \"bucketingConfig\": {\n \"buckets\": [\n {\n \"max\": {\n \"booleanValue\": false,\n \"dateValue\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"dayOfWeekValue\": \"\",\n \"floatValue\": \"\",\n \"integerValue\": \"\",\n \"stringValue\": \"\",\n \"timeValue\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"timestampValue\": \"\"\n },\n \"min\": {},\n \"replacementValue\": {}\n }\n ]\n },\n \"characterMaskConfig\": {\n \"charactersToIgnore\": [\n {\n \"charactersToSkip\": \"\",\n \"commonCharactersToIgnore\": \"\"\n }\n ],\n \"maskingCharacter\": \"\",\n \"numberToMask\": 0,\n \"reverseOrder\": false\n },\n \"cryptoDeterministicConfig\": {\n \"context\": {\n \"name\": \"\"\n },\n \"cryptoKey\": {\n \"kmsWrapped\": {\n \"cryptoKeyName\": \"\",\n \"wrappedKey\": \"\"\n },\n \"transient\": {\n \"name\": \"\"\n },\n \"unwrapped\": {\n \"key\": \"\"\n }\n },\n \"surrogateInfoType\": {}\n },\n \"cryptoHashConfig\": {\n \"cryptoKey\": {}\n },\n \"cryptoReplaceFfxFpeConfig\": {\n \"commonAlphabet\": \"\",\n \"context\": {},\n \"cryptoKey\": {},\n \"customAlphabet\": \"\",\n \"radix\": 0,\n \"surrogateInfoType\": {}\n },\n \"dateShiftConfig\": {\n \"context\": {},\n \"cryptoKey\": {},\n \"lowerBoundDays\": 0,\n \"upperBoundDays\": 0\n },\n \"fixedSizeBucketingConfig\": {\n \"bucketSize\": \"\",\n \"lowerBound\": {},\n \"upperBound\": {}\n },\n \"redactConfig\": {},\n \"replaceConfig\": {\n \"newValue\": {}\n },\n \"replaceDictionaryConfig\": {\n \"wordList\": {\n \"words\": []\n }\n },\n \"replaceWithInfoTypeConfig\": {},\n \"timePartConfig\": {\n \"partToExtract\": \"\"\n }\n }\n }\n ]\n },\n \"recordTransformations\": {\n \"fieldTransformations\": [\n {\n \"condition\": {\n \"expressions\": {\n \"conditions\": {\n \"conditions\": [\n {\n \"field\": {},\n \"operator\": \"\",\n \"value\": {}\n }\n ]\n },\n \"logicalOperator\": \"\"\n }\n },\n \"fields\": [\n {}\n ],\n \"infoTypeTransformations\": {},\n \"primitiveTransformation\": {}\n }\n ],\n \"recordSuppressions\": [\n {\n \"condition\": {}\n }\n ]\n },\n \"transformationErrorHandling\": {\n \"leaveUntransformed\": {},\n \"throwError\": {}\n }\n },\n \"description\": \"\",\n \"displayName\": \"\",\n \"name\": \"\",\n \"updateTime\": \"\"\n },\n \"locationId\": \"\",\n \"templateId\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"deidentifyTemplate\": {\n \"createTime\": \"\",\n \"deidentifyConfig\": {\n \"imageTransformations\": {\n \"transforms\": [\n {\n \"allInfoTypes\": {},\n \"allText\": {},\n \"redactionColor\": {\n \"blue\": \"\",\n \"green\": \"\",\n \"red\": \"\"\n },\n \"selectedInfoTypes\": {\n \"infoTypes\": [\n {\n \"name\": \"\",\n \"version\": \"\"\n }\n ]\n }\n }\n ]\n },\n \"infoTypeTransformations\": {\n \"transformations\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"primitiveTransformation\": {\n \"bucketingConfig\": {\n \"buckets\": [\n {\n \"max\": {\n \"booleanValue\": false,\n \"dateValue\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"dayOfWeekValue\": \"\",\n \"floatValue\": \"\",\n \"integerValue\": \"\",\n \"stringValue\": \"\",\n \"timeValue\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"timestampValue\": \"\"\n },\n \"min\": {},\n \"replacementValue\": {}\n }\n ]\n },\n \"characterMaskConfig\": {\n \"charactersToIgnore\": [\n {\n \"charactersToSkip\": \"\",\n \"commonCharactersToIgnore\": \"\"\n }\n ],\n \"maskingCharacter\": \"\",\n \"numberToMask\": 0,\n \"reverseOrder\": false\n },\n \"cryptoDeterministicConfig\": {\n \"context\": {\n \"name\": \"\"\n },\n \"cryptoKey\": {\n \"kmsWrapped\": {\n \"cryptoKeyName\": \"\",\n \"wrappedKey\": \"\"\n },\n \"transient\": {\n \"name\": \"\"\n },\n \"unwrapped\": {\n \"key\": \"\"\n }\n },\n \"surrogateInfoType\": {}\n },\n \"cryptoHashConfig\": {\n \"cryptoKey\": {}\n },\n \"cryptoReplaceFfxFpeConfig\": {\n \"commonAlphabet\": \"\",\n \"context\": {},\n \"cryptoKey\": {},\n \"customAlphabet\": \"\",\n \"radix\": 0,\n \"surrogateInfoType\": {}\n },\n \"dateShiftConfig\": {\n \"context\": {},\n \"cryptoKey\": {},\n \"lowerBoundDays\": 0,\n \"upperBoundDays\": 0\n },\n \"fixedSizeBucketingConfig\": {\n \"bucketSize\": \"\",\n \"lowerBound\": {},\n \"upperBound\": {}\n },\n \"redactConfig\": {},\n \"replaceConfig\": {\n \"newValue\": {}\n },\n \"replaceDictionaryConfig\": {\n \"wordList\": {\n \"words\": []\n }\n },\n \"replaceWithInfoTypeConfig\": {},\n \"timePartConfig\": {\n \"partToExtract\": \"\"\n }\n }\n }\n ]\n },\n \"recordTransformations\": {\n \"fieldTransformations\": [\n {\n \"condition\": {\n \"expressions\": {\n \"conditions\": {\n \"conditions\": [\n {\n \"field\": {},\n \"operator\": \"\",\n \"value\": {}\n }\n ]\n },\n \"logicalOperator\": \"\"\n }\n },\n \"fields\": [\n {}\n ],\n \"infoTypeTransformations\": {},\n \"primitiveTransformation\": {}\n }\n ],\n \"recordSuppressions\": [\n {\n \"condition\": {}\n }\n ]\n },\n \"transformationErrorHandling\": {\n \"leaveUntransformed\": {},\n \"throwError\": {}\n }\n },\n \"description\": \"\",\n \"displayName\": \"\",\n \"name\": \"\",\n \"updateTime\": \"\"\n },\n \"locationId\": \"\",\n \"templateId\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v2/:parent/deidentifyTemplates")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v2/:parent/deidentifyTemplates")
.header("content-type", "application/json")
.body("{\n \"deidentifyTemplate\": {\n \"createTime\": \"\",\n \"deidentifyConfig\": {\n \"imageTransformations\": {\n \"transforms\": [\n {\n \"allInfoTypes\": {},\n \"allText\": {},\n \"redactionColor\": {\n \"blue\": \"\",\n \"green\": \"\",\n \"red\": \"\"\n },\n \"selectedInfoTypes\": {\n \"infoTypes\": [\n {\n \"name\": \"\",\n \"version\": \"\"\n }\n ]\n }\n }\n ]\n },\n \"infoTypeTransformations\": {\n \"transformations\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"primitiveTransformation\": {\n \"bucketingConfig\": {\n \"buckets\": [\n {\n \"max\": {\n \"booleanValue\": false,\n \"dateValue\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"dayOfWeekValue\": \"\",\n \"floatValue\": \"\",\n \"integerValue\": \"\",\n \"stringValue\": \"\",\n \"timeValue\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"timestampValue\": \"\"\n },\n \"min\": {},\n \"replacementValue\": {}\n }\n ]\n },\n \"characterMaskConfig\": {\n \"charactersToIgnore\": [\n {\n \"charactersToSkip\": \"\",\n \"commonCharactersToIgnore\": \"\"\n }\n ],\n \"maskingCharacter\": \"\",\n \"numberToMask\": 0,\n \"reverseOrder\": false\n },\n \"cryptoDeterministicConfig\": {\n \"context\": {\n \"name\": \"\"\n },\n \"cryptoKey\": {\n \"kmsWrapped\": {\n \"cryptoKeyName\": \"\",\n \"wrappedKey\": \"\"\n },\n \"transient\": {\n \"name\": \"\"\n },\n \"unwrapped\": {\n \"key\": \"\"\n }\n },\n \"surrogateInfoType\": {}\n },\n \"cryptoHashConfig\": {\n \"cryptoKey\": {}\n },\n \"cryptoReplaceFfxFpeConfig\": {\n \"commonAlphabet\": \"\",\n \"context\": {},\n \"cryptoKey\": {},\n \"customAlphabet\": \"\",\n \"radix\": 0,\n \"surrogateInfoType\": {}\n },\n \"dateShiftConfig\": {\n \"context\": {},\n \"cryptoKey\": {},\n \"lowerBoundDays\": 0,\n \"upperBoundDays\": 0\n },\n \"fixedSizeBucketingConfig\": {\n \"bucketSize\": \"\",\n \"lowerBound\": {},\n \"upperBound\": {}\n },\n \"redactConfig\": {},\n \"replaceConfig\": {\n \"newValue\": {}\n },\n \"replaceDictionaryConfig\": {\n \"wordList\": {\n \"words\": []\n }\n },\n \"replaceWithInfoTypeConfig\": {},\n \"timePartConfig\": {\n \"partToExtract\": \"\"\n }\n }\n }\n ]\n },\n \"recordTransformations\": {\n \"fieldTransformations\": [\n {\n \"condition\": {\n \"expressions\": {\n \"conditions\": {\n \"conditions\": [\n {\n \"field\": {},\n \"operator\": \"\",\n \"value\": {}\n }\n ]\n },\n \"logicalOperator\": \"\"\n }\n },\n \"fields\": [\n {}\n ],\n \"infoTypeTransformations\": {},\n \"primitiveTransformation\": {}\n }\n ],\n \"recordSuppressions\": [\n {\n \"condition\": {}\n }\n ]\n },\n \"transformationErrorHandling\": {\n \"leaveUntransformed\": {},\n \"throwError\": {}\n }\n },\n \"description\": \"\",\n \"displayName\": \"\",\n \"name\": \"\",\n \"updateTime\": \"\"\n },\n \"locationId\": \"\",\n \"templateId\": \"\"\n}")
.asString();
const data = JSON.stringify({
deidentifyTemplate: {
createTime: '',
deidentifyConfig: {
imageTransformations: {
transforms: [
{
allInfoTypes: {},
allText: {},
redactionColor: {
blue: '',
green: '',
red: ''
},
selectedInfoTypes: {
infoTypes: [
{
name: '',
version: ''
}
]
}
}
]
},
infoTypeTransformations: {
transformations: [
{
infoTypes: [
{}
],
primitiveTransformation: {
bucketingConfig: {
buckets: [
{
max: {
booleanValue: false,
dateValue: {
day: 0,
month: 0,
year: 0
},
dayOfWeekValue: '',
floatValue: '',
integerValue: '',
stringValue: '',
timeValue: {
hours: 0,
minutes: 0,
nanos: 0,
seconds: 0
},
timestampValue: ''
},
min: {},
replacementValue: {}
}
]
},
characterMaskConfig: {
charactersToIgnore: [
{
charactersToSkip: '',
commonCharactersToIgnore: ''
}
],
maskingCharacter: '',
numberToMask: 0,
reverseOrder: false
},
cryptoDeterministicConfig: {
context: {
name: ''
},
cryptoKey: {
kmsWrapped: {
cryptoKeyName: '',
wrappedKey: ''
},
transient: {
name: ''
},
unwrapped: {
key: ''
}
},
surrogateInfoType: {}
},
cryptoHashConfig: {
cryptoKey: {}
},
cryptoReplaceFfxFpeConfig: {
commonAlphabet: '',
context: {},
cryptoKey: {},
customAlphabet: '',
radix: 0,
surrogateInfoType: {}
},
dateShiftConfig: {
context: {},
cryptoKey: {},
lowerBoundDays: 0,
upperBoundDays: 0
},
fixedSizeBucketingConfig: {
bucketSize: '',
lowerBound: {},
upperBound: {}
},
redactConfig: {},
replaceConfig: {
newValue: {}
},
replaceDictionaryConfig: {
wordList: {
words: []
}
},
replaceWithInfoTypeConfig: {},
timePartConfig: {
partToExtract: ''
}
}
}
]
},
recordTransformations: {
fieldTransformations: [
{
condition: {
expressions: {
conditions: {
conditions: [
{
field: {},
operator: '',
value: {}
}
]
},
logicalOperator: ''
}
},
fields: [
{}
],
infoTypeTransformations: {},
primitiveTransformation: {}
}
],
recordSuppressions: [
{
condition: {}
}
]
},
transformationErrorHandling: {
leaveUntransformed: {},
throwError: {}
}
},
description: '',
displayName: '',
name: '',
updateTime: ''
},
locationId: '',
templateId: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v2/:parent/deidentifyTemplates');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v2/:parent/deidentifyTemplates',
headers: {'content-type': 'application/json'},
data: {
deidentifyTemplate: {
createTime: '',
deidentifyConfig: {
imageTransformations: {
transforms: [
{
allInfoTypes: {},
allText: {},
redactionColor: {blue: '', green: '', red: ''},
selectedInfoTypes: {infoTypes: [{name: '', version: ''}]}
}
]
},
infoTypeTransformations: {
transformations: [
{
infoTypes: [{}],
primitiveTransformation: {
bucketingConfig: {
buckets: [
{
max: {
booleanValue: false,
dateValue: {day: 0, month: 0, year: 0},
dayOfWeekValue: '',
floatValue: '',
integerValue: '',
stringValue: '',
timeValue: {hours: 0, minutes: 0, nanos: 0, seconds: 0},
timestampValue: ''
},
min: {},
replacementValue: {}
}
]
},
characterMaskConfig: {
charactersToIgnore: [{charactersToSkip: '', commonCharactersToIgnore: ''}],
maskingCharacter: '',
numberToMask: 0,
reverseOrder: false
},
cryptoDeterministicConfig: {
context: {name: ''},
cryptoKey: {
kmsWrapped: {cryptoKeyName: '', wrappedKey: ''},
transient: {name: ''},
unwrapped: {key: ''}
},
surrogateInfoType: {}
},
cryptoHashConfig: {cryptoKey: {}},
cryptoReplaceFfxFpeConfig: {
commonAlphabet: '',
context: {},
cryptoKey: {},
customAlphabet: '',
radix: 0,
surrogateInfoType: {}
},
dateShiftConfig: {context: {}, cryptoKey: {}, lowerBoundDays: 0, upperBoundDays: 0},
fixedSizeBucketingConfig: {bucketSize: '', lowerBound: {}, upperBound: {}},
redactConfig: {},
replaceConfig: {newValue: {}},
replaceDictionaryConfig: {wordList: {words: []}},
replaceWithInfoTypeConfig: {},
timePartConfig: {partToExtract: ''}
}
}
]
},
recordTransformations: {
fieldTransformations: [
{
condition: {
expressions: {
conditions: {conditions: [{field: {}, operator: '', value: {}}]},
logicalOperator: ''
}
},
fields: [{}],
infoTypeTransformations: {},
primitiveTransformation: {}
}
],
recordSuppressions: [{condition: {}}]
},
transformationErrorHandling: {leaveUntransformed: {}, throwError: {}}
},
description: '',
displayName: '',
name: '',
updateTime: ''
},
locationId: '',
templateId: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/:parent/deidentifyTemplates';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"deidentifyTemplate":{"createTime":"","deidentifyConfig":{"imageTransformations":{"transforms":[{"allInfoTypes":{},"allText":{},"redactionColor":{"blue":"","green":"","red":""},"selectedInfoTypes":{"infoTypes":[{"name":"","version":""}]}}]},"infoTypeTransformations":{"transformations":[{"infoTypes":[{}],"primitiveTransformation":{"bucketingConfig":{"buckets":[{"max":{"booleanValue":false,"dateValue":{"day":0,"month":0,"year":0},"dayOfWeekValue":"","floatValue":"","integerValue":"","stringValue":"","timeValue":{"hours":0,"minutes":0,"nanos":0,"seconds":0},"timestampValue":""},"min":{},"replacementValue":{}}]},"characterMaskConfig":{"charactersToIgnore":[{"charactersToSkip":"","commonCharactersToIgnore":""}],"maskingCharacter":"","numberToMask":0,"reverseOrder":false},"cryptoDeterministicConfig":{"context":{"name":""},"cryptoKey":{"kmsWrapped":{"cryptoKeyName":"","wrappedKey":""},"transient":{"name":""},"unwrapped":{"key":""}},"surrogateInfoType":{}},"cryptoHashConfig":{"cryptoKey":{}},"cryptoReplaceFfxFpeConfig":{"commonAlphabet":"","context":{},"cryptoKey":{},"customAlphabet":"","radix":0,"surrogateInfoType":{}},"dateShiftConfig":{"context":{},"cryptoKey":{},"lowerBoundDays":0,"upperBoundDays":0},"fixedSizeBucketingConfig":{"bucketSize":"","lowerBound":{},"upperBound":{}},"redactConfig":{},"replaceConfig":{"newValue":{}},"replaceDictionaryConfig":{"wordList":{"words":[]}},"replaceWithInfoTypeConfig":{},"timePartConfig":{"partToExtract":""}}}]},"recordTransformations":{"fieldTransformations":[{"condition":{"expressions":{"conditions":{"conditions":[{"field":{},"operator":"","value":{}}]},"logicalOperator":""}},"fields":[{}],"infoTypeTransformations":{},"primitiveTransformation":{}}],"recordSuppressions":[{"condition":{}}]},"transformationErrorHandling":{"leaveUntransformed":{},"throwError":{}}},"description":"","displayName":"","name":"","updateTime":""},"locationId":"","templateId":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v2/:parent/deidentifyTemplates',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "deidentifyTemplate": {\n "createTime": "",\n "deidentifyConfig": {\n "imageTransformations": {\n "transforms": [\n {\n "allInfoTypes": {},\n "allText": {},\n "redactionColor": {\n "blue": "",\n "green": "",\n "red": ""\n },\n "selectedInfoTypes": {\n "infoTypes": [\n {\n "name": "",\n "version": ""\n }\n ]\n }\n }\n ]\n },\n "infoTypeTransformations": {\n "transformations": [\n {\n "infoTypes": [\n {}\n ],\n "primitiveTransformation": {\n "bucketingConfig": {\n "buckets": [\n {\n "max": {\n "booleanValue": false,\n "dateValue": {\n "day": 0,\n "month": 0,\n "year": 0\n },\n "dayOfWeekValue": "",\n "floatValue": "",\n "integerValue": "",\n "stringValue": "",\n "timeValue": {\n "hours": 0,\n "minutes": 0,\n "nanos": 0,\n "seconds": 0\n },\n "timestampValue": ""\n },\n "min": {},\n "replacementValue": {}\n }\n ]\n },\n "characterMaskConfig": {\n "charactersToIgnore": [\n {\n "charactersToSkip": "",\n "commonCharactersToIgnore": ""\n }\n ],\n "maskingCharacter": "",\n "numberToMask": 0,\n "reverseOrder": false\n },\n "cryptoDeterministicConfig": {\n "context": {\n "name": ""\n },\n "cryptoKey": {\n "kmsWrapped": {\n "cryptoKeyName": "",\n "wrappedKey": ""\n },\n "transient": {\n "name": ""\n },\n "unwrapped": {\n "key": ""\n }\n },\n "surrogateInfoType": {}\n },\n "cryptoHashConfig": {\n "cryptoKey": {}\n },\n "cryptoReplaceFfxFpeConfig": {\n "commonAlphabet": "",\n "context": {},\n "cryptoKey": {},\n "customAlphabet": "",\n "radix": 0,\n "surrogateInfoType": {}\n },\n "dateShiftConfig": {\n "context": {},\n "cryptoKey": {},\n "lowerBoundDays": 0,\n "upperBoundDays": 0\n },\n "fixedSizeBucketingConfig": {\n "bucketSize": "",\n "lowerBound": {},\n "upperBound": {}\n },\n "redactConfig": {},\n "replaceConfig": {\n "newValue": {}\n },\n "replaceDictionaryConfig": {\n "wordList": {\n "words": []\n }\n },\n "replaceWithInfoTypeConfig": {},\n "timePartConfig": {\n "partToExtract": ""\n }\n }\n }\n ]\n },\n "recordTransformations": {\n "fieldTransformations": [\n {\n "condition": {\n "expressions": {\n "conditions": {\n "conditions": [\n {\n "field": {},\n "operator": "",\n "value": {}\n }\n ]\n },\n "logicalOperator": ""\n }\n },\n "fields": [\n {}\n ],\n "infoTypeTransformations": {},\n "primitiveTransformation": {}\n }\n ],\n "recordSuppressions": [\n {\n "condition": {}\n }\n ]\n },\n "transformationErrorHandling": {\n "leaveUntransformed": {},\n "throwError": {}\n }\n },\n "description": "",\n "displayName": "",\n "name": "",\n "updateTime": ""\n },\n "locationId": "",\n "templateId": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"deidentifyTemplate\": {\n \"createTime\": \"\",\n \"deidentifyConfig\": {\n \"imageTransformations\": {\n \"transforms\": [\n {\n \"allInfoTypes\": {},\n \"allText\": {},\n \"redactionColor\": {\n \"blue\": \"\",\n \"green\": \"\",\n \"red\": \"\"\n },\n \"selectedInfoTypes\": {\n \"infoTypes\": [\n {\n \"name\": \"\",\n \"version\": \"\"\n }\n ]\n }\n }\n ]\n },\n \"infoTypeTransformations\": {\n \"transformations\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"primitiveTransformation\": {\n \"bucketingConfig\": {\n \"buckets\": [\n {\n \"max\": {\n \"booleanValue\": false,\n \"dateValue\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"dayOfWeekValue\": \"\",\n \"floatValue\": \"\",\n \"integerValue\": \"\",\n \"stringValue\": \"\",\n \"timeValue\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"timestampValue\": \"\"\n },\n \"min\": {},\n \"replacementValue\": {}\n }\n ]\n },\n \"characterMaskConfig\": {\n \"charactersToIgnore\": [\n {\n \"charactersToSkip\": \"\",\n \"commonCharactersToIgnore\": \"\"\n }\n ],\n \"maskingCharacter\": \"\",\n \"numberToMask\": 0,\n \"reverseOrder\": false\n },\n \"cryptoDeterministicConfig\": {\n \"context\": {\n \"name\": \"\"\n },\n \"cryptoKey\": {\n \"kmsWrapped\": {\n \"cryptoKeyName\": \"\",\n \"wrappedKey\": \"\"\n },\n \"transient\": {\n \"name\": \"\"\n },\n \"unwrapped\": {\n \"key\": \"\"\n }\n },\n \"surrogateInfoType\": {}\n },\n \"cryptoHashConfig\": {\n \"cryptoKey\": {}\n },\n \"cryptoReplaceFfxFpeConfig\": {\n \"commonAlphabet\": \"\",\n \"context\": {},\n \"cryptoKey\": {},\n \"customAlphabet\": \"\",\n \"radix\": 0,\n \"surrogateInfoType\": {}\n },\n \"dateShiftConfig\": {\n \"context\": {},\n \"cryptoKey\": {},\n \"lowerBoundDays\": 0,\n \"upperBoundDays\": 0\n },\n \"fixedSizeBucketingConfig\": {\n \"bucketSize\": \"\",\n \"lowerBound\": {},\n \"upperBound\": {}\n },\n \"redactConfig\": {},\n \"replaceConfig\": {\n \"newValue\": {}\n },\n \"replaceDictionaryConfig\": {\n \"wordList\": {\n \"words\": []\n }\n },\n \"replaceWithInfoTypeConfig\": {},\n \"timePartConfig\": {\n \"partToExtract\": \"\"\n }\n }\n }\n ]\n },\n \"recordTransformations\": {\n \"fieldTransformations\": [\n {\n \"condition\": {\n \"expressions\": {\n \"conditions\": {\n \"conditions\": [\n {\n \"field\": {},\n \"operator\": \"\",\n \"value\": {}\n }\n ]\n },\n \"logicalOperator\": \"\"\n }\n },\n \"fields\": [\n {}\n ],\n \"infoTypeTransformations\": {},\n \"primitiveTransformation\": {}\n }\n ],\n \"recordSuppressions\": [\n {\n \"condition\": {}\n }\n ]\n },\n \"transformationErrorHandling\": {\n \"leaveUntransformed\": {},\n \"throwError\": {}\n }\n },\n \"description\": \"\",\n \"displayName\": \"\",\n \"name\": \"\",\n \"updateTime\": \"\"\n },\n \"locationId\": \"\",\n \"templateId\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v2/:parent/deidentifyTemplates")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/v2/:parent/deidentifyTemplates',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
deidentifyTemplate: {
createTime: '',
deidentifyConfig: {
imageTransformations: {
transforms: [
{
allInfoTypes: {},
allText: {},
redactionColor: {blue: '', green: '', red: ''},
selectedInfoTypes: {infoTypes: [{name: '', version: ''}]}
}
]
},
infoTypeTransformations: {
transformations: [
{
infoTypes: [{}],
primitiveTransformation: {
bucketingConfig: {
buckets: [
{
max: {
booleanValue: false,
dateValue: {day: 0, month: 0, year: 0},
dayOfWeekValue: '',
floatValue: '',
integerValue: '',
stringValue: '',
timeValue: {hours: 0, minutes: 0, nanos: 0, seconds: 0},
timestampValue: ''
},
min: {},
replacementValue: {}
}
]
},
characterMaskConfig: {
charactersToIgnore: [{charactersToSkip: '', commonCharactersToIgnore: ''}],
maskingCharacter: '',
numberToMask: 0,
reverseOrder: false
},
cryptoDeterministicConfig: {
context: {name: ''},
cryptoKey: {
kmsWrapped: {cryptoKeyName: '', wrappedKey: ''},
transient: {name: ''},
unwrapped: {key: ''}
},
surrogateInfoType: {}
},
cryptoHashConfig: {cryptoKey: {}},
cryptoReplaceFfxFpeConfig: {
commonAlphabet: '',
context: {},
cryptoKey: {},
customAlphabet: '',
radix: 0,
surrogateInfoType: {}
},
dateShiftConfig: {context: {}, cryptoKey: {}, lowerBoundDays: 0, upperBoundDays: 0},
fixedSizeBucketingConfig: {bucketSize: '', lowerBound: {}, upperBound: {}},
redactConfig: {},
replaceConfig: {newValue: {}},
replaceDictionaryConfig: {wordList: {words: []}},
replaceWithInfoTypeConfig: {},
timePartConfig: {partToExtract: ''}
}
}
]
},
recordTransformations: {
fieldTransformations: [
{
condition: {
expressions: {
conditions: {conditions: [{field: {}, operator: '', value: {}}]},
logicalOperator: ''
}
},
fields: [{}],
infoTypeTransformations: {},
primitiveTransformation: {}
}
],
recordSuppressions: [{condition: {}}]
},
transformationErrorHandling: {leaveUntransformed: {}, throwError: {}}
},
description: '',
displayName: '',
name: '',
updateTime: ''
},
locationId: '',
templateId: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v2/:parent/deidentifyTemplates',
headers: {'content-type': 'application/json'},
body: {
deidentifyTemplate: {
createTime: '',
deidentifyConfig: {
imageTransformations: {
transforms: [
{
allInfoTypes: {},
allText: {},
redactionColor: {blue: '', green: '', red: ''},
selectedInfoTypes: {infoTypes: [{name: '', version: ''}]}
}
]
},
infoTypeTransformations: {
transformations: [
{
infoTypes: [{}],
primitiveTransformation: {
bucketingConfig: {
buckets: [
{
max: {
booleanValue: false,
dateValue: {day: 0, month: 0, year: 0},
dayOfWeekValue: '',
floatValue: '',
integerValue: '',
stringValue: '',
timeValue: {hours: 0, minutes: 0, nanos: 0, seconds: 0},
timestampValue: ''
},
min: {},
replacementValue: {}
}
]
},
characterMaskConfig: {
charactersToIgnore: [{charactersToSkip: '', commonCharactersToIgnore: ''}],
maskingCharacter: '',
numberToMask: 0,
reverseOrder: false
},
cryptoDeterministicConfig: {
context: {name: ''},
cryptoKey: {
kmsWrapped: {cryptoKeyName: '', wrappedKey: ''},
transient: {name: ''},
unwrapped: {key: ''}
},
surrogateInfoType: {}
},
cryptoHashConfig: {cryptoKey: {}},
cryptoReplaceFfxFpeConfig: {
commonAlphabet: '',
context: {},
cryptoKey: {},
customAlphabet: '',
radix: 0,
surrogateInfoType: {}
},
dateShiftConfig: {context: {}, cryptoKey: {}, lowerBoundDays: 0, upperBoundDays: 0},
fixedSizeBucketingConfig: {bucketSize: '', lowerBound: {}, upperBound: {}},
redactConfig: {},
replaceConfig: {newValue: {}},
replaceDictionaryConfig: {wordList: {words: []}},
replaceWithInfoTypeConfig: {},
timePartConfig: {partToExtract: ''}
}
}
]
},
recordTransformations: {
fieldTransformations: [
{
condition: {
expressions: {
conditions: {conditions: [{field: {}, operator: '', value: {}}]},
logicalOperator: ''
}
},
fields: [{}],
infoTypeTransformations: {},
primitiveTransformation: {}
}
],
recordSuppressions: [{condition: {}}]
},
transformationErrorHandling: {leaveUntransformed: {}, throwError: {}}
},
description: '',
displayName: '',
name: '',
updateTime: ''
},
locationId: '',
templateId: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/v2/:parent/deidentifyTemplates');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
deidentifyTemplate: {
createTime: '',
deidentifyConfig: {
imageTransformations: {
transforms: [
{
allInfoTypes: {},
allText: {},
redactionColor: {
blue: '',
green: '',
red: ''
},
selectedInfoTypes: {
infoTypes: [
{
name: '',
version: ''
}
]
}
}
]
},
infoTypeTransformations: {
transformations: [
{
infoTypes: [
{}
],
primitiveTransformation: {
bucketingConfig: {
buckets: [
{
max: {
booleanValue: false,
dateValue: {
day: 0,
month: 0,
year: 0
},
dayOfWeekValue: '',
floatValue: '',
integerValue: '',
stringValue: '',
timeValue: {
hours: 0,
minutes: 0,
nanos: 0,
seconds: 0
},
timestampValue: ''
},
min: {},
replacementValue: {}
}
]
},
characterMaskConfig: {
charactersToIgnore: [
{
charactersToSkip: '',
commonCharactersToIgnore: ''
}
],
maskingCharacter: '',
numberToMask: 0,
reverseOrder: false
},
cryptoDeterministicConfig: {
context: {
name: ''
},
cryptoKey: {
kmsWrapped: {
cryptoKeyName: '',
wrappedKey: ''
},
transient: {
name: ''
},
unwrapped: {
key: ''
}
},
surrogateInfoType: {}
},
cryptoHashConfig: {
cryptoKey: {}
},
cryptoReplaceFfxFpeConfig: {
commonAlphabet: '',
context: {},
cryptoKey: {},
customAlphabet: '',
radix: 0,
surrogateInfoType: {}
},
dateShiftConfig: {
context: {},
cryptoKey: {},
lowerBoundDays: 0,
upperBoundDays: 0
},
fixedSizeBucketingConfig: {
bucketSize: '',
lowerBound: {},
upperBound: {}
},
redactConfig: {},
replaceConfig: {
newValue: {}
},
replaceDictionaryConfig: {
wordList: {
words: []
}
},
replaceWithInfoTypeConfig: {},
timePartConfig: {
partToExtract: ''
}
}
}
]
},
recordTransformations: {
fieldTransformations: [
{
condition: {
expressions: {
conditions: {
conditions: [
{
field: {},
operator: '',
value: {}
}
]
},
logicalOperator: ''
}
},
fields: [
{}
],
infoTypeTransformations: {},
primitiveTransformation: {}
}
],
recordSuppressions: [
{
condition: {}
}
]
},
transformationErrorHandling: {
leaveUntransformed: {},
throwError: {}
}
},
description: '',
displayName: '',
name: '',
updateTime: ''
},
locationId: '',
templateId: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/v2/:parent/deidentifyTemplates',
headers: {'content-type': 'application/json'},
data: {
deidentifyTemplate: {
createTime: '',
deidentifyConfig: {
imageTransformations: {
transforms: [
{
allInfoTypes: {},
allText: {},
redactionColor: {blue: '', green: '', red: ''},
selectedInfoTypes: {infoTypes: [{name: '', version: ''}]}
}
]
},
infoTypeTransformations: {
transformations: [
{
infoTypes: [{}],
primitiveTransformation: {
bucketingConfig: {
buckets: [
{
max: {
booleanValue: false,
dateValue: {day: 0, month: 0, year: 0},
dayOfWeekValue: '',
floatValue: '',
integerValue: '',
stringValue: '',
timeValue: {hours: 0, minutes: 0, nanos: 0, seconds: 0},
timestampValue: ''
},
min: {},
replacementValue: {}
}
]
},
characterMaskConfig: {
charactersToIgnore: [{charactersToSkip: '', commonCharactersToIgnore: ''}],
maskingCharacter: '',
numberToMask: 0,
reverseOrder: false
},
cryptoDeterministicConfig: {
context: {name: ''},
cryptoKey: {
kmsWrapped: {cryptoKeyName: '', wrappedKey: ''},
transient: {name: ''},
unwrapped: {key: ''}
},
surrogateInfoType: {}
},
cryptoHashConfig: {cryptoKey: {}},
cryptoReplaceFfxFpeConfig: {
commonAlphabet: '',
context: {},
cryptoKey: {},
customAlphabet: '',
radix: 0,
surrogateInfoType: {}
},
dateShiftConfig: {context: {}, cryptoKey: {}, lowerBoundDays: 0, upperBoundDays: 0},
fixedSizeBucketingConfig: {bucketSize: '', lowerBound: {}, upperBound: {}},
redactConfig: {},
replaceConfig: {newValue: {}},
replaceDictionaryConfig: {wordList: {words: []}},
replaceWithInfoTypeConfig: {},
timePartConfig: {partToExtract: ''}
}
}
]
},
recordTransformations: {
fieldTransformations: [
{
condition: {
expressions: {
conditions: {conditions: [{field: {}, operator: '', value: {}}]},
logicalOperator: ''
}
},
fields: [{}],
infoTypeTransformations: {},
primitiveTransformation: {}
}
],
recordSuppressions: [{condition: {}}]
},
transformationErrorHandling: {leaveUntransformed: {}, throwError: {}}
},
description: '',
displayName: '',
name: '',
updateTime: ''
},
locationId: '',
templateId: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/:parent/deidentifyTemplates';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"deidentifyTemplate":{"createTime":"","deidentifyConfig":{"imageTransformations":{"transforms":[{"allInfoTypes":{},"allText":{},"redactionColor":{"blue":"","green":"","red":""},"selectedInfoTypes":{"infoTypes":[{"name":"","version":""}]}}]},"infoTypeTransformations":{"transformations":[{"infoTypes":[{}],"primitiveTransformation":{"bucketingConfig":{"buckets":[{"max":{"booleanValue":false,"dateValue":{"day":0,"month":0,"year":0},"dayOfWeekValue":"","floatValue":"","integerValue":"","stringValue":"","timeValue":{"hours":0,"minutes":0,"nanos":0,"seconds":0},"timestampValue":""},"min":{},"replacementValue":{}}]},"characterMaskConfig":{"charactersToIgnore":[{"charactersToSkip":"","commonCharactersToIgnore":""}],"maskingCharacter":"","numberToMask":0,"reverseOrder":false},"cryptoDeterministicConfig":{"context":{"name":""},"cryptoKey":{"kmsWrapped":{"cryptoKeyName":"","wrappedKey":""},"transient":{"name":""},"unwrapped":{"key":""}},"surrogateInfoType":{}},"cryptoHashConfig":{"cryptoKey":{}},"cryptoReplaceFfxFpeConfig":{"commonAlphabet":"","context":{},"cryptoKey":{},"customAlphabet":"","radix":0,"surrogateInfoType":{}},"dateShiftConfig":{"context":{},"cryptoKey":{},"lowerBoundDays":0,"upperBoundDays":0},"fixedSizeBucketingConfig":{"bucketSize":"","lowerBound":{},"upperBound":{}},"redactConfig":{},"replaceConfig":{"newValue":{}},"replaceDictionaryConfig":{"wordList":{"words":[]}},"replaceWithInfoTypeConfig":{},"timePartConfig":{"partToExtract":""}}}]},"recordTransformations":{"fieldTransformations":[{"condition":{"expressions":{"conditions":{"conditions":[{"field":{},"operator":"","value":{}}]},"logicalOperator":""}},"fields":[{}],"infoTypeTransformations":{},"primitiveTransformation":{}}],"recordSuppressions":[{"condition":{}}]},"transformationErrorHandling":{"leaveUntransformed":{},"throwError":{}}},"description":"","displayName":"","name":"","updateTime":""},"locationId":"","templateId":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"deidentifyTemplate": @{ @"createTime": @"", @"deidentifyConfig": @{ @"imageTransformations": @{ @"transforms": @[ @{ @"allInfoTypes": @{ }, @"allText": @{ }, @"redactionColor": @{ @"blue": @"", @"green": @"", @"red": @"" }, @"selectedInfoTypes": @{ @"infoTypes": @[ @{ @"name": @"", @"version": @"" } ] } } ] }, @"infoTypeTransformations": @{ @"transformations": @[ @{ @"infoTypes": @[ @{ } ], @"primitiveTransformation": @{ @"bucketingConfig": @{ @"buckets": @[ @{ @"max": @{ @"booleanValue": @NO, @"dateValue": @{ @"day": @0, @"month": @0, @"year": @0 }, @"dayOfWeekValue": @"", @"floatValue": @"", @"integerValue": @"", @"stringValue": @"", @"timeValue": @{ @"hours": @0, @"minutes": @0, @"nanos": @0, @"seconds": @0 }, @"timestampValue": @"" }, @"min": @{ }, @"replacementValue": @{ } } ] }, @"characterMaskConfig": @{ @"charactersToIgnore": @[ @{ @"charactersToSkip": @"", @"commonCharactersToIgnore": @"" } ], @"maskingCharacter": @"", @"numberToMask": @0, @"reverseOrder": @NO }, @"cryptoDeterministicConfig": @{ @"context": @{ @"name": @"" }, @"cryptoKey": @{ @"kmsWrapped": @{ @"cryptoKeyName": @"", @"wrappedKey": @"" }, @"transient": @{ @"name": @"" }, @"unwrapped": @{ @"key": @"" } }, @"surrogateInfoType": @{ } }, @"cryptoHashConfig": @{ @"cryptoKey": @{ } }, @"cryptoReplaceFfxFpeConfig": @{ @"commonAlphabet": @"", @"context": @{ }, @"cryptoKey": @{ }, @"customAlphabet": @"", @"radix": @0, @"surrogateInfoType": @{ } }, @"dateShiftConfig": @{ @"context": @{ }, @"cryptoKey": @{ }, @"lowerBoundDays": @0, @"upperBoundDays": @0 }, @"fixedSizeBucketingConfig": @{ @"bucketSize": @"", @"lowerBound": @{ }, @"upperBound": @{ } }, @"redactConfig": @{ }, @"replaceConfig": @{ @"newValue": @{ } }, @"replaceDictionaryConfig": @{ @"wordList": @{ @"words": @[ ] } }, @"replaceWithInfoTypeConfig": @{ }, @"timePartConfig": @{ @"partToExtract": @"" } } } ] }, @"recordTransformations": @{ @"fieldTransformations": @[ @{ @"condition": @{ @"expressions": @{ @"conditions": @{ @"conditions": @[ @{ @"field": @{ }, @"operator": @"", @"value": @{ } } ] }, @"logicalOperator": @"" } }, @"fields": @[ @{ } ], @"infoTypeTransformations": @{ }, @"primitiveTransformation": @{ } } ], @"recordSuppressions": @[ @{ @"condition": @{ } } ] }, @"transformationErrorHandling": @{ @"leaveUntransformed": @{ }, @"throwError": @{ } } }, @"description": @"", @"displayName": @"", @"name": @"", @"updateTime": @"" },
@"locationId": @"",
@"templateId": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v2/:parent/deidentifyTemplates"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v2/:parent/deidentifyTemplates" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"deidentifyTemplate\": {\n \"createTime\": \"\",\n \"deidentifyConfig\": {\n \"imageTransformations\": {\n \"transforms\": [\n {\n \"allInfoTypes\": {},\n \"allText\": {},\n \"redactionColor\": {\n \"blue\": \"\",\n \"green\": \"\",\n \"red\": \"\"\n },\n \"selectedInfoTypes\": {\n \"infoTypes\": [\n {\n \"name\": \"\",\n \"version\": \"\"\n }\n ]\n }\n }\n ]\n },\n \"infoTypeTransformations\": {\n \"transformations\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"primitiveTransformation\": {\n \"bucketingConfig\": {\n \"buckets\": [\n {\n \"max\": {\n \"booleanValue\": false,\n \"dateValue\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"dayOfWeekValue\": \"\",\n \"floatValue\": \"\",\n \"integerValue\": \"\",\n \"stringValue\": \"\",\n \"timeValue\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"timestampValue\": \"\"\n },\n \"min\": {},\n \"replacementValue\": {}\n }\n ]\n },\n \"characterMaskConfig\": {\n \"charactersToIgnore\": [\n {\n \"charactersToSkip\": \"\",\n \"commonCharactersToIgnore\": \"\"\n }\n ],\n \"maskingCharacter\": \"\",\n \"numberToMask\": 0,\n \"reverseOrder\": false\n },\n \"cryptoDeterministicConfig\": {\n \"context\": {\n \"name\": \"\"\n },\n \"cryptoKey\": {\n \"kmsWrapped\": {\n \"cryptoKeyName\": \"\",\n \"wrappedKey\": \"\"\n },\n \"transient\": {\n \"name\": \"\"\n },\n \"unwrapped\": {\n \"key\": \"\"\n }\n },\n \"surrogateInfoType\": {}\n },\n \"cryptoHashConfig\": {\n \"cryptoKey\": {}\n },\n \"cryptoReplaceFfxFpeConfig\": {\n \"commonAlphabet\": \"\",\n \"context\": {},\n \"cryptoKey\": {},\n \"customAlphabet\": \"\",\n \"radix\": 0,\n \"surrogateInfoType\": {}\n },\n \"dateShiftConfig\": {\n \"context\": {},\n \"cryptoKey\": {},\n \"lowerBoundDays\": 0,\n \"upperBoundDays\": 0\n },\n \"fixedSizeBucketingConfig\": {\n \"bucketSize\": \"\",\n \"lowerBound\": {},\n \"upperBound\": {}\n },\n \"redactConfig\": {},\n \"replaceConfig\": {\n \"newValue\": {}\n },\n \"replaceDictionaryConfig\": {\n \"wordList\": {\n \"words\": []\n }\n },\n \"replaceWithInfoTypeConfig\": {},\n \"timePartConfig\": {\n \"partToExtract\": \"\"\n }\n }\n }\n ]\n },\n \"recordTransformations\": {\n \"fieldTransformations\": [\n {\n \"condition\": {\n \"expressions\": {\n \"conditions\": {\n \"conditions\": [\n {\n \"field\": {},\n \"operator\": \"\",\n \"value\": {}\n }\n ]\n },\n \"logicalOperator\": \"\"\n }\n },\n \"fields\": [\n {}\n ],\n \"infoTypeTransformations\": {},\n \"primitiveTransformation\": {}\n }\n ],\n \"recordSuppressions\": [\n {\n \"condition\": {}\n }\n ]\n },\n \"transformationErrorHandling\": {\n \"leaveUntransformed\": {},\n \"throwError\": {}\n }\n },\n \"description\": \"\",\n \"displayName\": \"\",\n \"name\": \"\",\n \"updateTime\": \"\"\n },\n \"locationId\": \"\",\n \"templateId\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/:parent/deidentifyTemplates",
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([
'deidentifyTemplate' => [
'createTime' => '',
'deidentifyConfig' => [
'imageTransformations' => [
'transforms' => [
[
'allInfoTypes' => [
],
'allText' => [
],
'redactionColor' => [
'blue' => '',
'green' => '',
'red' => ''
],
'selectedInfoTypes' => [
'infoTypes' => [
[
'name' => '',
'version' => ''
]
]
]
]
]
],
'infoTypeTransformations' => [
'transformations' => [
[
'infoTypes' => [
[
]
],
'primitiveTransformation' => [
'bucketingConfig' => [
'buckets' => [
[
'max' => [
'booleanValue' => null,
'dateValue' => [
'day' => 0,
'month' => 0,
'year' => 0
],
'dayOfWeekValue' => '',
'floatValue' => '',
'integerValue' => '',
'stringValue' => '',
'timeValue' => [
'hours' => 0,
'minutes' => 0,
'nanos' => 0,
'seconds' => 0
],
'timestampValue' => ''
],
'min' => [
],
'replacementValue' => [
]
]
]
],
'characterMaskConfig' => [
'charactersToIgnore' => [
[
'charactersToSkip' => '',
'commonCharactersToIgnore' => ''
]
],
'maskingCharacter' => '',
'numberToMask' => 0,
'reverseOrder' => null
],
'cryptoDeterministicConfig' => [
'context' => [
'name' => ''
],
'cryptoKey' => [
'kmsWrapped' => [
'cryptoKeyName' => '',
'wrappedKey' => ''
],
'transient' => [
'name' => ''
],
'unwrapped' => [
'key' => ''
]
],
'surrogateInfoType' => [
]
],
'cryptoHashConfig' => [
'cryptoKey' => [
]
],
'cryptoReplaceFfxFpeConfig' => [
'commonAlphabet' => '',
'context' => [
],
'cryptoKey' => [
],
'customAlphabet' => '',
'radix' => 0,
'surrogateInfoType' => [
]
],
'dateShiftConfig' => [
'context' => [
],
'cryptoKey' => [
],
'lowerBoundDays' => 0,
'upperBoundDays' => 0
],
'fixedSizeBucketingConfig' => [
'bucketSize' => '',
'lowerBound' => [
],
'upperBound' => [
]
],
'redactConfig' => [
],
'replaceConfig' => [
'newValue' => [
]
],
'replaceDictionaryConfig' => [
'wordList' => [
'words' => [
]
]
],
'replaceWithInfoTypeConfig' => [
],
'timePartConfig' => [
'partToExtract' => ''
]
]
]
]
],
'recordTransformations' => [
'fieldTransformations' => [
[
'condition' => [
'expressions' => [
'conditions' => [
'conditions' => [
[
'field' => [
],
'operator' => '',
'value' => [
]
]
]
],
'logicalOperator' => ''
]
],
'fields' => [
[
]
],
'infoTypeTransformations' => [
],
'primitiveTransformation' => [
]
]
],
'recordSuppressions' => [
[
'condition' => [
]
]
]
],
'transformationErrorHandling' => [
'leaveUntransformed' => [
],
'throwError' => [
]
]
],
'description' => '',
'displayName' => '',
'name' => '',
'updateTime' => ''
],
'locationId' => '',
'templateId' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/v2/:parent/deidentifyTemplates', [
'body' => '{
"deidentifyTemplate": {
"createTime": "",
"deidentifyConfig": {
"imageTransformations": {
"transforms": [
{
"allInfoTypes": {},
"allText": {},
"redactionColor": {
"blue": "",
"green": "",
"red": ""
},
"selectedInfoTypes": {
"infoTypes": [
{
"name": "",
"version": ""
}
]
}
}
]
},
"infoTypeTransformations": {
"transformations": [
{
"infoTypes": [
{}
],
"primitiveTransformation": {
"bucketingConfig": {
"buckets": [
{
"max": {
"booleanValue": false,
"dateValue": {
"day": 0,
"month": 0,
"year": 0
},
"dayOfWeekValue": "",
"floatValue": "",
"integerValue": "",
"stringValue": "",
"timeValue": {
"hours": 0,
"minutes": 0,
"nanos": 0,
"seconds": 0
},
"timestampValue": ""
},
"min": {},
"replacementValue": {}
}
]
},
"characterMaskConfig": {
"charactersToIgnore": [
{
"charactersToSkip": "",
"commonCharactersToIgnore": ""
}
],
"maskingCharacter": "",
"numberToMask": 0,
"reverseOrder": false
},
"cryptoDeterministicConfig": {
"context": {
"name": ""
},
"cryptoKey": {
"kmsWrapped": {
"cryptoKeyName": "",
"wrappedKey": ""
},
"transient": {
"name": ""
},
"unwrapped": {
"key": ""
}
},
"surrogateInfoType": {}
},
"cryptoHashConfig": {
"cryptoKey": {}
},
"cryptoReplaceFfxFpeConfig": {
"commonAlphabet": "",
"context": {},
"cryptoKey": {},
"customAlphabet": "",
"radix": 0,
"surrogateInfoType": {}
},
"dateShiftConfig": {
"context": {},
"cryptoKey": {},
"lowerBoundDays": 0,
"upperBoundDays": 0
},
"fixedSizeBucketingConfig": {
"bucketSize": "",
"lowerBound": {},
"upperBound": {}
},
"redactConfig": {},
"replaceConfig": {
"newValue": {}
},
"replaceDictionaryConfig": {
"wordList": {
"words": []
}
},
"replaceWithInfoTypeConfig": {},
"timePartConfig": {
"partToExtract": ""
}
}
}
]
},
"recordTransformations": {
"fieldTransformations": [
{
"condition": {
"expressions": {
"conditions": {
"conditions": [
{
"field": {},
"operator": "",
"value": {}
}
]
},
"logicalOperator": ""
}
},
"fields": [
{}
],
"infoTypeTransformations": {},
"primitiveTransformation": {}
}
],
"recordSuppressions": [
{
"condition": {}
}
]
},
"transformationErrorHandling": {
"leaveUntransformed": {},
"throwError": {}
}
},
"description": "",
"displayName": "",
"name": "",
"updateTime": ""
},
"locationId": "",
"templateId": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v2/:parent/deidentifyTemplates');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'deidentifyTemplate' => [
'createTime' => '',
'deidentifyConfig' => [
'imageTransformations' => [
'transforms' => [
[
'allInfoTypes' => [
],
'allText' => [
],
'redactionColor' => [
'blue' => '',
'green' => '',
'red' => ''
],
'selectedInfoTypes' => [
'infoTypes' => [
[
'name' => '',
'version' => ''
]
]
]
]
]
],
'infoTypeTransformations' => [
'transformations' => [
[
'infoTypes' => [
[
]
],
'primitiveTransformation' => [
'bucketingConfig' => [
'buckets' => [
[
'max' => [
'booleanValue' => null,
'dateValue' => [
'day' => 0,
'month' => 0,
'year' => 0
],
'dayOfWeekValue' => '',
'floatValue' => '',
'integerValue' => '',
'stringValue' => '',
'timeValue' => [
'hours' => 0,
'minutes' => 0,
'nanos' => 0,
'seconds' => 0
],
'timestampValue' => ''
],
'min' => [
],
'replacementValue' => [
]
]
]
],
'characterMaskConfig' => [
'charactersToIgnore' => [
[
'charactersToSkip' => '',
'commonCharactersToIgnore' => ''
]
],
'maskingCharacter' => '',
'numberToMask' => 0,
'reverseOrder' => null
],
'cryptoDeterministicConfig' => [
'context' => [
'name' => ''
],
'cryptoKey' => [
'kmsWrapped' => [
'cryptoKeyName' => '',
'wrappedKey' => ''
],
'transient' => [
'name' => ''
],
'unwrapped' => [
'key' => ''
]
],
'surrogateInfoType' => [
]
],
'cryptoHashConfig' => [
'cryptoKey' => [
]
],
'cryptoReplaceFfxFpeConfig' => [
'commonAlphabet' => '',
'context' => [
],
'cryptoKey' => [
],
'customAlphabet' => '',
'radix' => 0,
'surrogateInfoType' => [
]
],
'dateShiftConfig' => [
'context' => [
],
'cryptoKey' => [
],
'lowerBoundDays' => 0,
'upperBoundDays' => 0
],
'fixedSizeBucketingConfig' => [
'bucketSize' => '',
'lowerBound' => [
],
'upperBound' => [
]
],
'redactConfig' => [
],
'replaceConfig' => [
'newValue' => [
]
],
'replaceDictionaryConfig' => [
'wordList' => [
'words' => [
]
]
],
'replaceWithInfoTypeConfig' => [
],
'timePartConfig' => [
'partToExtract' => ''
]
]
]
]
],
'recordTransformations' => [
'fieldTransformations' => [
[
'condition' => [
'expressions' => [
'conditions' => [
'conditions' => [
[
'field' => [
],
'operator' => '',
'value' => [
]
]
]
],
'logicalOperator' => ''
]
],
'fields' => [
[
]
],
'infoTypeTransformations' => [
],
'primitiveTransformation' => [
]
]
],
'recordSuppressions' => [
[
'condition' => [
]
]
]
],
'transformationErrorHandling' => [
'leaveUntransformed' => [
],
'throwError' => [
]
]
],
'description' => '',
'displayName' => '',
'name' => '',
'updateTime' => ''
],
'locationId' => '',
'templateId' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'deidentifyTemplate' => [
'createTime' => '',
'deidentifyConfig' => [
'imageTransformations' => [
'transforms' => [
[
'allInfoTypes' => [
],
'allText' => [
],
'redactionColor' => [
'blue' => '',
'green' => '',
'red' => ''
],
'selectedInfoTypes' => [
'infoTypes' => [
[
'name' => '',
'version' => ''
]
]
]
]
]
],
'infoTypeTransformations' => [
'transformations' => [
[
'infoTypes' => [
[
]
],
'primitiveTransformation' => [
'bucketingConfig' => [
'buckets' => [
[
'max' => [
'booleanValue' => null,
'dateValue' => [
'day' => 0,
'month' => 0,
'year' => 0
],
'dayOfWeekValue' => '',
'floatValue' => '',
'integerValue' => '',
'stringValue' => '',
'timeValue' => [
'hours' => 0,
'minutes' => 0,
'nanos' => 0,
'seconds' => 0
],
'timestampValue' => ''
],
'min' => [
],
'replacementValue' => [
]
]
]
],
'characterMaskConfig' => [
'charactersToIgnore' => [
[
'charactersToSkip' => '',
'commonCharactersToIgnore' => ''
]
],
'maskingCharacter' => '',
'numberToMask' => 0,
'reverseOrder' => null
],
'cryptoDeterministicConfig' => [
'context' => [
'name' => ''
],
'cryptoKey' => [
'kmsWrapped' => [
'cryptoKeyName' => '',
'wrappedKey' => ''
],
'transient' => [
'name' => ''
],
'unwrapped' => [
'key' => ''
]
],
'surrogateInfoType' => [
]
],
'cryptoHashConfig' => [
'cryptoKey' => [
]
],
'cryptoReplaceFfxFpeConfig' => [
'commonAlphabet' => '',
'context' => [
],
'cryptoKey' => [
],
'customAlphabet' => '',
'radix' => 0,
'surrogateInfoType' => [
]
],
'dateShiftConfig' => [
'context' => [
],
'cryptoKey' => [
],
'lowerBoundDays' => 0,
'upperBoundDays' => 0
],
'fixedSizeBucketingConfig' => [
'bucketSize' => '',
'lowerBound' => [
],
'upperBound' => [
]
],
'redactConfig' => [
],
'replaceConfig' => [
'newValue' => [
]
],
'replaceDictionaryConfig' => [
'wordList' => [
'words' => [
]
]
],
'replaceWithInfoTypeConfig' => [
],
'timePartConfig' => [
'partToExtract' => ''
]
]
]
]
],
'recordTransformations' => [
'fieldTransformations' => [
[
'condition' => [
'expressions' => [
'conditions' => [
'conditions' => [
[
'field' => [
],
'operator' => '',
'value' => [
]
]
]
],
'logicalOperator' => ''
]
],
'fields' => [
[
]
],
'infoTypeTransformations' => [
],
'primitiveTransformation' => [
]
]
],
'recordSuppressions' => [
[
'condition' => [
]
]
]
],
'transformationErrorHandling' => [
'leaveUntransformed' => [
],
'throwError' => [
]
]
],
'description' => '',
'displayName' => '',
'name' => '',
'updateTime' => ''
],
'locationId' => '',
'templateId' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v2/:parent/deidentifyTemplates');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v2/:parent/deidentifyTemplates' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"deidentifyTemplate": {
"createTime": "",
"deidentifyConfig": {
"imageTransformations": {
"transforms": [
{
"allInfoTypes": {},
"allText": {},
"redactionColor": {
"blue": "",
"green": "",
"red": ""
},
"selectedInfoTypes": {
"infoTypes": [
{
"name": "",
"version": ""
}
]
}
}
]
},
"infoTypeTransformations": {
"transformations": [
{
"infoTypes": [
{}
],
"primitiveTransformation": {
"bucketingConfig": {
"buckets": [
{
"max": {
"booleanValue": false,
"dateValue": {
"day": 0,
"month": 0,
"year": 0
},
"dayOfWeekValue": "",
"floatValue": "",
"integerValue": "",
"stringValue": "",
"timeValue": {
"hours": 0,
"minutes": 0,
"nanos": 0,
"seconds": 0
},
"timestampValue": ""
},
"min": {},
"replacementValue": {}
}
]
},
"characterMaskConfig": {
"charactersToIgnore": [
{
"charactersToSkip": "",
"commonCharactersToIgnore": ""
}
],
"maskingCharacter": "",
"numberToMask": 0,
"reverseOrder": false
},
"cryptoDeterministicConfig": {
"context": {
"name": ""
},
"cryptoKey": {
"kmsWrapped": {
"cryptoKeyName": "",
"wrappedKey": ""
},
"transient": {
"name": ""
},
"unwrapped": {
"key": ""
}
},
"surrogateInfoType": {}
},
"cryptoHashConfig": {
"cryptoKey": {}
},
"cryptoReplaceFfxFpeConfig": {
"commonAlphabet": "",
"context": {},
"cryptoKey": {},
"customAlphabet": "",
"radix": 0,
"surrogateInfoType": {}
},
"dateShiftConfig": {
"context": {},
"cryptoKey": {},
"lowerBoundDays": 0,
"upperBoundDays": 0
},
"fixedSizeBucketingConfig": {
"bucketSize": "",
"lowerBound": {},
"upperBound": {}
},
"redactConfig": {},
"replaceConfig": {
"newValue": {}
},
"replaceDictionaryConfig": {
"wordList": {
"words": []
}
},
"replaceWithInfoTypeConfig": {},
"timePartConfig": {
"partToExtract": ""
}
}
}
]
},
"recordTransformations": {
"fieldTransformations": [
{
"condition": {
"expressions": {
"conditions": {
"conditions": [
{
"field": {},
"operator": "",
"value": {}
}
]
},
"logicalOperator": ""
}
},
"fields": [
{}
],
"infoTypeTransformations": {},
"primitiveTransformation": {}
}
],
"recordSuppressions": [
{
"condition": {}
}
]
},
"transformationErrorHandling": {
"leaveUntransformed": {},
"throwError": {}
}
},
"description": "",
"displayName": "",
"name": "",
"updateTime": ""
},
"locationId": "",
"templateId": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/:parent/deidentifyTemplates' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"deidentifyTemplate": {
"createTime": "",
"deidentifyConfig": {
"imageTransformations": {
"transforms": [
{
"allInfoTypes": {},
"allText": {},
"redactionColor": {
"blue": "",
"green": "",
"red": ""
},
"selectedInfoTypes": {
"infoTypes": [
{
"name": "",
"version": ""
}
]
}
}
]
},
"infoTypeTransformations": {
"transformations": [
{
"infoTypes": [
{}
],
"primitiveTransformation": {
"bucketingConfig": {
"buckets": [
{
"max": {
"booleanValue": false,
"dateValue": {
"day": 0,
"month": 0,
"year": 0
},
"dayOfWeekValue": "",
"floatValue": "",
"integerValue": "",
"stringValue": "",
"timeValue": {
"hours": 0,
"minutes": 0,
"nanos": 0,
"seconds": 0
},
"timestampValue": ""
},
"min": {},
"replacementValue": {}
}
]
},
"characterMaskConfig": {
"charactersToIgnore": [
{
"charactersToSkip": "",
"commonCharactersToIgnore": ""
}
],
"maskingCharacter": "",
"numberToMask": 0,
"reverseOrder": false
},
"cryptoDeterministicConfig": {
"context": {
"name": ""
},
"cryptoKey": {
"kmsWrapped": {
"cryptoKeyName": "",
"wrappedKey": ""
},
"transient": {
"name": ""
},
"unwrapped": {
"key": ""
}
},
"surrogateInfoType": {}
},
"cryptoHashConfig": {
"cryptoKey": {}
},
"cryptoReplaceFfxFpeConfig": {
"commonAlphabet": "",
"context": {},
"cryptoKey": {},
"customAlphabet": "",
"radix": 0,
"surrogateInfoType": {}
},
"dateShiftConfig": {
"context": {},
"cryptoKey": {},
"lowerBoundDays": 0,
"upperBoundDays": 0
},
"fixedSizeBucketingConfig": {
"bucketSize": "",
"lowerBound": {},
"upperBound": {}
},
"redactConfig": {},
"replaceConfig": {
"newValue": {}
},
"replaceDictionaryConfig": {
"wordList": {
"words": []
}
},
"replaceWithInfoTypeConfig": {},
"timePartConfig": {
"partToExtract": ""
}
}
}
]
},
"recordTransformations": {
"fieldTransformations": [
{
"condition": {
"expressions": {
"conditions": {
"conditions": [
{
"field": {},
"operator": "",
"value": {}
}
]
},
"logicalOperator": ""
}
},
"fields": [
{}
],
"infoTypeTransformations": {},
"primitiveTransformation": {}
}
],
"recordSuppressions": [
{
"condition": {}
}
]
},
"transformationErrorHandling": {
"leaveUntransformed": {},
"throwError": {}
}
},
"description": "",
"displayName": "",
"name": "",
"updateTime": ""
},
"locationId": "",
"templateId": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"deidentifyTemplate\": {\n \"createTime\": \"\",\n \"deidentifyConfig\": {\n \"imageTransformations\": {\n \"transforms\": [\n {\n \"allInfoTypes\": {},\n \"allText\": {},\n \"redactionColor\": {\n \"blue\": \"\",\n \"green\": \"\",\n \"red\": \"\"\n },\n \"selectedInfoTypes\": {\n \"infoTypes\": [\n {\n \"name\": \"\",\n \"version\": \"\"\n }\n ]\n }\n }\n ]\n },\n \"infoTypeTransformations\": {\n \"transformations\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"primitiveTransformation\": {\n \"bucketingConfig\": {\n \"buckets\": [\n {\n \"max\": {\n \"booleanValue\": false,\n \"dateValue\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"dayOfWeekValue\": \"\",\n \"floatValue\": \"\",\n \"integerValue\": \"\",\n \"stringValue\": \"\",\n \"timeValue\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"timestampValue\": \"\"\n },\n \"min\": {},\n \"replacementValue\": {}\n }\n ]\n },\n \"characterMaskConfig\": {\n \"charactersToIgnore\": [\n {\n \"charactersToSkip\": \"\",\n \"commonCharactersToIgnore\": \"\"\n }\n ],\n \"maskingCharacter\": \"\",\n \"numberToMask\": 0,\n \"reverseOrder\": false\n },\n \"cryptoDeterministicConfig\": {\n \"context\": {\n \"name\": \"\"\n },\n \"cryptoKey\": {\n \"kmsWrapped\": {\n \"cryptoKeyName\": \"\",\n \"wrappedKey\": \"\"\n },\n \"transient\": {\n \"name\": \"\"\n },\n \"unwrapped\": {\n \"key\": \"\"\n }\n },\n \"surrogateInfoType\": {}\n },\n \"cryptoHashConfig\": {\n \"cryptoKey\": {}\n },\n \"cryptoReplaceFfxFpeConfig\": {\n \"commonAlphabet\": \"\",\n \"context\": {},\n \"cryptoKey\": {},\n \"customAlphabet\": \"\",\n \"radix\": 0,\n \"surrogateInfoType\": {}\n },\n \"dateShiftConfig\": {\n \"context\": {},\n \"cryptoKey\": {},\n \"lowerBoundDays\": 0,\n \"upperBoundDays\": 0\n },\n \"fixedSizeBucketingConfig\": {\n \"bucketSize\": \"\",\n \"lowerBound\": {},\n \"upperBound\": {}\n },\n \"redactConfig\": {},\n \"replaceConfig\": {\n \"newValue\": {}\n },\n \"replaceDictionaryConfig\": {\n \"wordList\": {\n \"words\": []\n }\n },\n \"replaceWithInfoTypeConfig\": {},\n \"timePartConfig\": {\n \"partToExtract\": \"\"\n }\n }\n }\n ]\n },\n \"recordTransformations\": {\n \"fieldTransformations\": [\n {\n \"condition\": {\n \"expressions\": {\n \"conditions\": {\n \"conditions\": [\n {\n \"field\": {},\n \"operator\": \"\",\n \"value\": {}\n }\n ]\n },\n \"logicalOperator\": \"\"\n }\n },\n \"fields\": [\n {}\n ],\n \"infoTypeTransformations\": {},\n \"primitiveTransformation\": {}\n }\n ],\n \"recordSuppressions\": [\n {\n \"condition\": {}\n }\n ]\n },\n \"transformationErrorHandling\": {\n \"leaveUntransformed\": {},\n \"throwError\": {}\n }\n },\n \"description\": \"\",\n \"displayName\": \"\",\n \"name\": \"\",\n \"updateTime\": \"\"\n },\n \"locationId\": \"\",\n \"templateId\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v2/:parent/deidentifyTemplates", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/:parent/deidentifyTemplates"
payload = {
"deidentifyTemplate": {
"createTime": "",
"deidentifyConfig": {
"imageTransformations": { "transforms": [
{
"allInfoTypes": {},
"allText": {},
"redactionColor": {
"blue": "",
"green": "",
"red": ""
},
"selectedInfoTypes": { "infoTypes": [
{
"name": "",
"version": ""
}
] }
}
] },
"infoTypeTransformations": { "transformations": [
{
"infoTypes": [{}],
"primitiveTransformation": {
"bucketingConfig": { "buckets": [
{
"max": {
"booleanValue": False,
"dateValue": {
"day": 0,
"month": 0,
"year": 0
},
"dayOfWeekValue": "",
"floatValue": "",
"integerValue": "",
"stringValue": "",
"timeValue": {
"hours": 0,
"minutes": 0,
"nanos": 0,
"seconds": 0
},
"timestampValue": ""
},
"min": {},
"replacementValue": {}
}
] },
"characterMaskConfig": {
"charactersToIgnore": [
{
"charactersToSkip": "",
"commonCharactersToIgnore": ""
}
],
"maskingCharacter": "",
"numberToMask": 0,
"reverseOrder": False
},
"cryptoDeterministicConfig": {
"context": { "name": "" },
"cryptoKey": {
"kmsWrapped": {
"cryptoKeyName": "",
"wrappedKey": ""
},
"transient": { "name": "" },
"unwrapped": { "key": "" }
},
"surrogateInfoType": {}
},
"cryptoHashConfig": { "cryptoKey": {} },
"cryptoReplaceFfxFpeConfig": {
"commonAlphabet": "",
"context": {},
"cryptoKey": {},
"customAlphabet": "",
"radix": 0,
"surrogateInfoType": {}
},
"dateShiftConfig": {
"context": {},
"cryptoKey": {},
"lowerBoundDays": 0,
"upperBoundDays": 0
},
"fixedSizeBucketingConfig": {
"bucketSize": "",
"lowerBound": {},
"upperBound": {}
},
"redactConfig": {},
"replaceConfig": { "newValue": {} },
"replaceDictionaryConfig": { "wordList": { "words": [] } },
"replaceWithInfoTypeConfig": {},
"timePartConfig": { "partToExtract": "" }
}
}
] },
"recordTransformations": {
"fieldTransformations": [
{
"condition": { "expressions": {
"conditions": { "conditions": [
{
"field": {},
"operator": "",
"value": {}
}
] },
"logicalOperator": ""
} },
"fields": [{}],
"infoTypeTransformations": {},
"primitiveTransformation": {}
}
],
"recordSuppressions": [{ "condition": {} }]
},
"transformationErrorHandling": {
"leaveUntransformed": {},
"throwError": {}
}
},
"description": "",
"displayName": "",
"name": "",
"updateTime": ""
},
"locationId": "",
"templateId": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/:parent/deidentifyTemplates"
payload <- "{\n \"deidentifyTemplate\": {\n \"createTime\": \"\",\n \"deidentifyConfig\": {\n \"imageTransformations\": {\n \"transforms\": [\n {\n \"allInfoTypes\": {},\n \"allText\": {},\n \"redactionColor\": {\n \"blue\": \"\",\n \"green\": \"\",\n \"red\": \"\"\n },\n \"selectedInfoTypes\": {\n \"infoTypes\": [\n {\n \"name\": \"\",\n \"version\": \"\"\n }\n ]\n }\n }\n ]\n },\n \"infoTypeTransformations\": {\n \"transformations\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"primitiveTransformation\": {\n \"bucketingConfig\": {\n \"buckets\": [\n {\n \"max\": {\n \"booleanValue\": false,\n \"dateValue\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"dayOfWeekValue\": \"\",\n \"floatValue\": \"\",\n \"integerValue\": \"\",\n \"stringValue\": \"\",\n \"timeValue\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"timestampValue\": \"\"\n },\n \"min\": {},\n \"replacementValue\": {}\n }\n ]\n },\n \"characterMaskConfig\": {\n \"charactersToIgnore\": [\n {\n \"charactersToSkip\": \"\",\n \"commonCharactersToIgnore\": \"\"\n }\n ],\n \"maskingCharacter\": \"\",\n \"numberToMask\": 0,\n \"reverseOrder\": false\n },\n \"cryptoDeterministicConfig\": {\n \"context\": {\n \"name\": \"\"\n },\n \"cryptoKey\": {\n \"kmsWrapped\": {\n \"cryptoKeyName\": \"\",\n \"wrappedKey\": \"\"\n },\n \"transient\": {\n \"name\": \"\"\n },\n \"unwrapped\": {\n \"key\": \"\"\n }\n },\n \"surrogateInfoType\": {}\n },\n \"cryptoHashConfig\": {\n \"cryptoKey\": {}\n },\n \"cryptoReplaceFfxFpeConfig\": {\n \"commonAlphabet\": \"\",\n \"context\": {},\n \"cryptoKey\": {},\n \"customAlphabet\": \"\",\n \"radix\": 0,\n \"surrogateInfoType\": {}\n },\n \"dateShiftConfig\": {\n \"context\": {},\n \"cryptoKey\": {},\n \"lowerBoundDays\": 0,\n \"upperBoundDays\": 0\n },\n \"fixedSizeBucketingConfig\": {\n \"bucketSize\": \"\",\n \"lowerBound\": {},\n \"upperBound\": {}\n },\n \"redactConfig\": {},\n \"replaceConfig\": {\n \"newValue\": {}\n },\n \"replaceDictionaryConfig\": {\n \"wordList\": {\n \"words\": []\n }\n },\n \"replaceWithInfoTypeConfig\": {},\n \"timePartConfig\": {\n \"partToExtract\": \"\"\n }\n }\n }\n ]\n },\n \"recordTransformations\": {\n \"fieldTransformations\": [\n {\n \"condition\": {\n \"expressions\": {\n \"conditions\": {\n \"conditions\": [\n {\n \"field\": {},\n \"operator\": \"\",\n \"value\": {}\n }\n ]\n },\n \"logicalOperator\": \"\"\n }\n },\n \"fields\": [\n {}\n ],\n \"infoTypeTransformations\": {},\n \"primitiveTransformation\": {}\n }\n ],\n \"recordSuppressions\": [\n {\n \"condition\": {}\n }\n ]\n },\n \"transformationErrorHandling\": {\n \"leaveUntransformed\": {},\n \"throwError\": {}\n }\n },\n \"description\": \"\",\n \"displayName\": \"\",\n \"name\": \"\",\n \"updateTime\": \"\"\n },\n \"locationId\": \"\",\n \"templateId\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/:parent/deidentifyTemplates")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"deidentifyTemplate\": {\n \"createTime\": \"\",\n \"deidentifyConfig\": {\n \"imageTransformations\": {\n \"transforms\": [\n {\n \"allInfoTypes\": {},\n \"allText\": {},\n \"redactionColor\": {\n \"blue\": \"\",\n \"green\": \"\",\n \"red\": \"\"\n },\n \"selectedInfoTypes\": {\n \"infoTypes\": [\n {\n \"name\": \"\",\n \"version\": \"\"\n }\n ]\n }\n }\n ]\n },\n \"infoTypeTransformations\": {\n \"transformations\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"primitiveTransformation\": {\n \"bucketingConfig\": {\n \"buckets\": [\n {\n \"max\": {\n \"booleanValue\": false,\n \"dateValue\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"dayOfWeekValue\": \"\",\n \"floatValue\": \"\",\n \"integerValue\": \"\",\n \"stringValue\": \"\",\n \"timeValue\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"timestampValue\": \"\"\n },\n \"min\": {},\n \"replacementValue\": {}\n }\n ]\n },\n \"characterMaskConfig\": {\n \"charactersToIgnore\": [\n {\n \"charactersToSkip\": \"\",\n \"commonCharactersToIgnore\": \"\"\n }\n ],\n \"maskingCharacter\": \"\",\n \"numberToMask\": 0,\n \"reverseOrder\": false\n },\n \"cryptoDeterministicConfig\": {\n \"context\": {\n \"name\": \"\"\n },\n \"cryptoKey\": {\n \"kmsWrapped\": {\n \"cryptoKeyName\": \"\",\n \"wrappedKey\": \"\"\n },\n \"transient\": {\n \"name\": \"\"\n },\n \"unwrapped\": {\n \"key\": \"\"\n }\n },\n \"surrogateInfoType\": {}\n },\n \"cryptoHashConfig\": {\n \"cryptoKey\": {}\n },\n \"cryptoReplaceFfxFpeConfig\": {\n \"commonAlphabet\": \"\",\n \"context\": {},\n \"cryptoKey\": {},\n \"customAlphabet\": \"\",\n \"radix\": 0,\n \"surrogateInfoType\": {}\n },\n \"dateShiftConfig\": {\n \"context\": {},\n \"cryptoKey\": {},\n \"lowerBoundDays\": 0,\n \"upperBoundDays\": 0\n },\n \"fixedSizeBucketingConfig\": {\n \"bucketSize\": \"\",\n \"lowerBound\": {},\n \"upperBound\": {}\n },\n \"redactConfig\": {},\n \"replaceConfig\": {\n \"newValue\": {}\n },\n \"replaceDictionaryConfig\": {\n \"wordList\": {\n \"words\": []\n }\n },\n \"replaceWithInfoTypeConfig\": {},\n \"timePartConfig\": {\n \"partToExtract\": \"\"\n }\n }\n }\n ]\n },\n \"recordTransformations\": {\n \"fieldTransformations\": [\n {\n \"condition\": {\n \"expressions\": {\n \"conditions\": {\n \"conditions\": [\n {\n \"field\": {},\n \"operator\": \"\",\n \"value\": {}\n }\n ]\n },\n \"logicalOperator\": \"\"\n }\n },\n \"fields\": [\n {}\n ],\n \"infoTypeTransformations\": {},\n \"primitiveTransformation\": {}\n }\n ],\n \"recordSuppressions\": [\n {\n \"condition\": {}\n }\n ]\n },\n \"transformationErrorHandling\": {\n \"leaveUntransformed\": {},\n \"throwError\": {}\n }\n },\n \"description\": \"\",\n \"displayName\": \"\",\n \"name\": \"\",\n \"updateTime\": \"\"\n },\n \"locationId\": \"\",\n \"templateId\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/v2/:parent/deidentifyTemplates') do |req|
req.body = "{\n \"deidentifyTemplate\": {\n \"createTime\": \"\",\n \"deidentifyConfig\": {\n \"imageTransformations\": {\n \"transforms\": [\n {\n \"allInfoTypes\": {},\n \"allText\": {},\n \"redactionColor\": {\n \"blue\": \"\",\n \"green\": \"\",\n \"red\": \"\"\n },\n \"selectedInfoTypes\": {\n \"infoTypes\": [\n {\n \"name\": \"\",\n \"version\": \"\"\n }\n ]\n }\n }\n ]\n },\n \"infoTypeTransformations\": {\n \"transformations\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"primitiveTransformation\": {\n \"bucketingConfig\": {\n \"buckets\": [\n {\n \"max\": {\n \"booleanValue\": false,\n \"dateValue\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"dayOfWeekValue\": \"\",\n \"floatValue\": \"\",\n \"integerValue\": \"\",\n \"stringValue\": \"\",\n \"timeValue\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"timestampValue\": \"\"\n },\n \"min\": {},\n \"replacementValue\": {}\n }\n ]\n },\n \"characterMaskConfig\": {\n \"charactersToIgnore\": [\n {\n \"charactersToSkip\": \"\",\n \"commonCharactersToIgnore\": \"\"\n }\n ],\n \"maskingCharacter\": \"\",\n \"numberToMask\": 0,\n \"reverseOrder\": false\n },\n \"cryptoDeterministicConfig\": {\n \"context\": {\n \"name\": \"\"\n },\n \"cryptoKey\": {\n \"kmsWrapped\": {\n \"cryptoKeyName\": \"\",\n \"wrappedKey\": \"\"\n },\n \"transient\": {\n \"name\": \"\"\n },\n \"unwrapped\": {\n \"key\": \"\"\n }\n },\n \"surrogateInfoType\": {}\n },\n \"cryptoHashConfig\": {\n \"cryptoKey\": {}\n },\n \"cryptoReplaceFfxFpeConfig\": {\n \"commonAlphabet\": \"\",\n \"context\": {},\n \"cryptoKey\": {},\n \"customAlphabet\": \"\",\n \"radix\": 0,\n \"surrogateInfoType\": {}\n },\n \"dateShiftConfig\": {\n \"context\": {},\n \"cryptoKey\": {},\n \"lowerBoundDays\": 0,\n \"upperBoundDays\": 0\n },\n \"fixedSizeBucketingConfig\": {\n \"bucketSize\": \"\",\n \"lowerBound\": {},\n \"upperBound\": {}\n },\n \"redactConfig\": {},\n \"replaceConfig\": {\n \"newValue\": {}\n },\n \"replaceDictionaryConfig\": {\n \"wordList\": {\n \"words\": []\n }\n },\n \"replaceWithInfoTypeConfig\": {},\n \"timePartConfig\": {\n \"partToExtract\": \"\"\n }\n }\n }\n ]\n },\n \"recordTransformations\": {\n \"fieldTransformations\": [\n {\n \"condition\": {\n \"expressions\": {\n \"conditions\": {\n \"conditions\": [\n {\n \"field\": {},\n \"operator\": \"\",\n \"value\": {}\n }\n ]\n },\n \"logicalOperator\": \"\"\n }\n },\n \"fields\": [\n {}\n ],\n \"infoTypeTransformations\": {},\n \"primitiveTransformation\": {}\n }\n ],\n \"recordSuppressions\": [\n {\n \"condition\": {}\n }\n ]\n },\n \"transformationErrorHandling\": {\n \"leaveUntransformed\": {},\n \"throwError\": {}\n }\n },\n \"description\": \"\",\n \"displayName\": \"\",\n \"name\": \"\",\n \"updateTime\": \"\"\n },\n \"locationId\": \"\",\n \"templateId\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v2/:parent/deidentifyTemplates";
let payload = json!({
"deidentifyTemplate": json!({
"createTime": "",
"deidentifyConfig": json!({
"imageTransformations": json!({"transforms": (
json!({
"allInfoTypes": json!({}),
"allText": json!({}),
"redactionColor": json!({
"blue": "",
"green": "",
"red": ""
}),
"selectedInfoTypes": json!({"infoTypes": (
json!({
"name": "",
"version": ""
})
)})
})
)}),
"infoTypeTransformations": json!({"transformations": (
json!({
"infoTypes": (json!({})),
"primitiveTransformation": json!({
"bucketingConfig": json!({"buckets": (
json!({
"max": json!({
"booleanValue": false,
"dateValue": json!({
"day": 0,
"month": 0,
"year": 0
}),
"dayOfWeekValue": "",
"floatValue": "",
"integerValue": "",
"stringValue": "",
"timeValue": json!({
"hours": 0,
"minutes": 0,
"nanos": 0,
"seconds": 0
}),
"timestampValue": ""
}),
"min": json!({}),
"replacementValue": json!({})
})
)}),
"characterMaskConfig": json!({
"charactersToIgnore": (
json!({
"charactersToSkip": "",
"commonCharactersToIgnore": ""
})
),
"maskingCharacter": "",
"numberToMask": 0,
"reverseOrder": false
}),
"cryptoDeterministicConfig": json!({
"context": json!({"name": ""}),
"cryptoKey": json!({
"kmsWrapped": json!({
"cryptoKeyName": "",
"wrappedKey": ""
}),
"transient": json!({"name": ""}),
"unwrapped": json!({"key": ""})
}),
"surrogateInfoType": json!({})
}),
"cryptoHashConfig": json!({"cryptoKey": json!({})}),
"cryptoReplaceFfxFpeConfig": json!({
"commonAlphabet": "",
"context": json!({}),
"cryptoKey": json!({}),
"customAlphabet": "",
"radix": 0,
"surrogateInfoType": json!({})
}),
"dateShiftConfig": json!({
"context": json!({}),
"cryptoKey": json!({}),
"lowerBoundDays": 0,
"upperBoundDays": 0
}),
"fixedSizeBucketingConfig": json!({
"bucketSize": "",
"lowerBound": json!({}),
"upperBound": json!({})
}),
"redactConfig": json!({}),
"replaceConfig": json!({"newValue": json!({})}),
"replaceDictionaryConfig": json!({"wordList": json!({"words": ()})}),
"replaceWithInfoTypeConfig": json!({}),
"timePartConfig": json!({"partToExtract": ""})
})
})
)}),
"recordTransformations": json!({
"fieldTransformations": (
json!({
"condition": json!({"expressions": json!({
"conditions": json!({"conditions": (
json!({
"field": json!({}),
"operator": "",
"value": json!({})
})
)}),
"logicalOperator": ""
})}),
"fields": (json!({})),
"infoTypeTransformations": json!({}),
"primitiveTransformation": json!({})
})
),
"recordSuppressions": (json!({"condition": json!({})}))
}),
"transformationErrorHandling": json!({
"leaveUntransformed": json!({}),
"throwError": json!({})
})
}),
"description": "",
"displayName": "",
"name": "",
"updateTime": ""
}),
"locationId": "",
"templateId": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/v2/:parent/deidentifyTemplates \
--header 'content-type: application/json' \
--data '{
"deidentifyTemplate": {
"createTime": "",
"deidentifyConfig": {
"imageTransformations": {
"transforms": [
{
"allInfoTypes": {},
"allText": {},
"redactionColor": {
"blue": "",
"green": "",
"red": ""
},
"selectedInfoTypes": {
"infoTypes": [
{
"name": "",
"version": ""
}
]
}
}
]
},
"infoTypeTransformations": {
"transformations": [
{
"infoTypes": [
{}
],
"primitiveTransformation": {
"bucketingConfig": {
"buckets": [
{
"max": {
"booleanValue": false,
"dateValue": {
"day": 0,
"month": 0,
"year": 0
},
"dayOfWeekValue": "",
"floatValue": "",
"integerValue": "",
"stringValue": "",
"timeValue": {
"hours": 0,
"minutes": 0,
"nanos": 0,
"seconds": 0
},
"timestampValue": ""
},
"min": {},
"replacementValue": {}
}
]
},
"characterMaskConfig": {
"charactersToIgnore": [
{
"charactersToSkip": "",
"commonCharactersToIgnore": ""
}
],
"maskingCharacter": "",
"numberToMask": 0,
"reverseOrder": false
},
"cryptoDeterministicConfig": {
"context": {
"name": ""
},
"cryptoKey": {
"kmsWrapped": {
"cryptoKeyName": "",
"wrappedKey": ""
},
"transient": {
"name": ""
},
"unwrapped": {
"key": ""
}
},
"surrogateInfoType": {}
},
"cryptoHashConfig": {
"cryptoKey": {}
},
"cryptoReplaceFfxFpeConfig": {
"commonAlphabet": "",
"context": {},
"cryptoKey": {},
"customAlphabet": "",
"radix": 0,
"surrogateInfoType": {}
},
"dateShiftConfig": {
"context": {},
"cryptoKey": {},
"lowerBoundDays": 0,
"upperBoundDays": 0
},
"fixedSizeBucketingConfig": {
"bucketSize": "",
"lowerBound": {},
"upperBound": {}
},
"redactConfig": {},
"replaceConfig": {
"newValue": {}
},
"replaceDictionaryConfig": {
"wordList": {
"words": []
}
},
"replaceWithInfoTypeConfig": {},
"timePartConfig": {
"partToExtract": ""
}
}
}
]
},
"recordTransformations": {
"fieldTransformations": [
{
"condition": {
"expressions": {
"conditions": {
"conditions": [
{
"field": {},
"operator": "",
"value": {}
}
]
},
"logicalOperator": ""
}
},
"fields": [
{}
],
"infoTypeTransformations": {},
"primitiveTransformation": {}
}
],
"recordSuppressions": [
{
"condition": {}
}
]
},
"transformationErrorHandling": {
"leaveUntransformed": {},
"throwError": {}
}
},
"description": "",
"displayName": "",
"name": "",
"updateTime": ""
},
"locationId": "",
"templateId": ""
}'
echo '{
"deidentifyTemplate": {
"createTime": "",
"deidentifyConfig": {
"imageTransformations": {
"transforms": [
{
"allInfoTypes": {},
"allText": {},
"redactionColor": {
"blue": "",
"green": "",
"red": ""
},
"selectedInfoTypes": {
"infoTypes": [
{
"name": "",
"version": ""
}
]
}
}
]
},
"infoTypeTransformations": {
"transformations": [
{
"infoTypes": [
{}
],
"primitiveTransformation": {
"bucketingConfig": {
"buckets": [
{
"max": {
"booleanValue": false,
"dateValue": {
"day": 0,
"month": 0,
"year": 0
},
"dayOfWeekValue": "",
"floatValue": "",
"integerValue": "",
"stringValue": "",
"timeValue": {
"hours": 0,
"minutes": 0,
"nanos": 0,
"seconds": 0
},
"timestampValue": ""
},
"min": {},
"replacementValue": {}
}
]
},
"characterMaskConfig": {
"charactersToIgnore": [
{
"charactersToSkip": "",
"commonCharactersToIgnore": ""
}
],
"maskingCharacter": "",
"numberToMask": 0,
"reverseOrder": false
},
"cryptoDeterministicConfig": {
"context": {
"name": ""
},
"cryptoKey": {
"kmsWrapped": {
"cryptoKeyName": "",
"wrappedKey": ""
},
"transient": {
"name": ""
},
"unwrapped": {
"key": ""
}
},
"surrogateInfoType": {}
},
"cryptoHashConfig": {
"cryptoKey": {}
},
"cryptoReplaceFfxFpeConfig": {
"commonAlphabet": "",
"context": {},
"cryptoKey": {},
"customAlphabet": "",
"radix": 0,
"surrogateInfoType": {}
},
"dateShiftConfig": {
"context": {},
"cryptoKey": {},
"lowerBoundDays": 0,
"upperBoundDays": 0
},
"fixedSizeBucketingConfig": {
"bucketSize": "",
"lowerBound": {},
"upperBound": {}
},
"redactConfig": {},
"replaceConfig": {
"newValue": {}
},
"replaceDictionaryConfig": {
"wordList": {
"words": []
}
},
"replaceWithInfoTypeConfig": {},
"timePartConfig": {
"partToExtract": ""
}
}
}
]
},
"recordTransformations": {
"fieldTransformations": [
{
"condition": {
"expressions": {
"conditions": {
"conditions": [
{
"field": {},
"operator": "",
"value": {}
}
]
},
"logicalOperator": ""
}
},
"fields": [
{}
],
"infoTypeTransformations": {},
"primitiveTransformation": {}
}
],
"recordSuppressions": [
{
"condition": {}
}
]
},
"transformationErrorHandling": {
"leaveUntransformed": {},
"throwError": {}
}
},
"description": "",
"displayName": "",
"name": "",
"updateTime": ""
},
"locationId": "",
"templateId": ""
}' | \
http POST {{baseUrl}}/v2/:parent/deidentifyTemplates \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "deidentifyTemplate": {\n "createTime": "",\n "deidentifyConfig": {\n "imageTransformations": {\n "transforms": [\n {\n "allInfoTypes": {},\n "allText": {},\n "redactionColor": {\n "blue": "",\n "green": "",\n "red": ""\n },\n "selectedInfoTypes": {\n "infoTypes": [\n {\n "name": "",\n "version": ""\n }\n ]\n }\n }\n ]\n },\n "infoTypeTransformations": {\n "transformations": [\n {\n "infoTypes": [\n {}\n ],\n "primitiveTransformation": {\n "bucketingConfig": {\n "buckets": [\n {\n "max": {\n "booleanValue": false,\n "dateValue": {\n "day": 0,\n "month": 0,\n "year": 0\n },\n "dayOfWeekValue": "",\n "floatValue": "",\n "integerValue": "",\n "stringValue": "",\n "timeValue": {\n "hours": 0,\n "minutes": 0,\n "nanos": 0,\n "seconds": 0\n },\n "timestampValue": ""\n },\n "min": {},\n "replacementValue": {}\n }\n ]\n },\n "characterMaskConfig": {\n "charactersToIgnore": [\n {\n "charactersToSkip": "",\n "commonCharactersToIgnore": ""\n }\n ],\n "maskingCharacter": "",\n "numberToMask": 0,\n "reverseOrder": false\n },\n "cryptoDeterministicConfig": {\n "context": {\n "name": ""\n },\n "cryptoKey": {\n "kmsWrapped": {\n "cryptoKeyName": "",\n "wrappedKey": ""\n },\n "transient": {\n "name": ""\n },\n "unwrapped": {\n "key": ""\n }\n },\n "surrogateInfoType": {}\n },\n "cryptoHashConfig": {\n "cryptoKey": {}\n },\n "cryptoReplaceFfxFpeConfig": {\n "commonAlphabet": "",\n "context": {},\n "cryptoKey": {},\n "customAlphabet": "",\n "radix": 0,\n "surrogateInfoType": {}\n },\n "dateShiftConfig": {\n "context": {},\n "cryptoKey": {},\n "lowerBoundDays": 0,\n "upperBoundDays": 0\n },\n "fixedSizeBucketingConfig": {\n "bucketSize": "",\n "lowerBound": {},\n "upperBound": {}\n },\n "redactConfig": {},\n "replaceConfig": {\n "newValue": {}\n },\n "replaceDictionaryConfig": {\n "wordList": {\n "words": []\n }\n },\n "replaceWithInfoTypeConfig": {},\n "timePartConfig": {\n "partToExtract": ""\n }\n }\n }\n ]\n },\n "recordTransformations": {\n "fieldTransformations": [\n {\n "condition": {\n "expressions": {\n "conditions": {\n "conditions": [\n {\n "field": {},\n "operator": "",\n "value": {}\n }\n ]\n },\n "logicalOperator": ""\n }\n },\n "fields": [\n {}\n ],\n "infoTypeTransformations": {},\n "primitiveTransformation": {}\n }\n ],\n "recordSuppressions": [\n {\n "condition": {}\n }\n ]\n },\n "transformationErrorHandling": {\n "leaveUntransformed": {},\n "throwError": {}\n }\n },\n "description": "",\n "displayName": "",\n "name": "",\n "updateTime": ""\n },\n "locationId": "",\n "templateId": ""\n}' \
--output-document \
- {{baseUrl}}/v2/:parent/deidentifyTemplates
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"deidentifyTemplate": [
"createTime": "",
"deidentifyConfig": [
"imageTransformations": ["transforms": [
[
"allInfoTypes": [],
"allText": [],
"redactionColor": [
"blue": "",
"green": "",
"red": ""
],
"selectedInfoTypes": ["infoTypes": [
[
"name": "",
"version": ""
]
]]
]
]],
"infoTypeTransformations": ["transformations": [
[
"infoTypes": [[]],
"primitiveTransformation": [
"bucketingConfig": ["buckets": [
[
"max": [
"booleanValue": false,
"dateValue": [
"day": 0,
"month": 0,
"year": 0
],
"dayOfWeekValue": "",
"floatValue": "",
"integerValue": "",
"stringValue": "",
"timeValue": [
"hours": 0,
"minutes": 0,
"nanos": 0,
"seconds": 0
],
"timestampValue": ""
],
"min": [],
"replacementValue": []
]
]],
"characterMaskConfig": [
"charactersToIgnore": [
[
"charactersToSkip": "",
"commonCharactersToIgnore": ""
]
],
"maskingCharacter": "",
"numberToMask": 0,
"reverseOrder": false
],
"cryptoDeterministicConfig": [
"context": ["name": ""],
"cryptoKey": [
"kmsWrapped": [
"cryptoKeyName": "",
"wrappedKey": ""
],
"transient": ["name": ""],
"unwrapped": ["key": ""]
],
"surrogateInfoType": []
],
"cryptoHashConfig": ["cryptoKey": []],
"cryptoReplaceFfxFpeConfig": [
"commonAlphabet": "",
"context": [],
"cryptoKey": [],
"customAlphabet": "",
"radix": 0,
"surrogateInfoType": []
],
"dateShiftConfig": [
"context": [],
"cryptoKey": [],
"lowerBoundDays": 0,
"upperBoundDays": 0
],
"fixedSizeBucketingConfig": [
"bucketSize": "",
"lowerBound": [],
"upperBound": []
],
"redactConfig": [],
"replaceConfig": ["newValue": []],
"replaceDictionaryConfig": ["wordList": ["words": []]],
"replaceWithInfoTypeConfig": [],
"timePartConfig": ["partToExtract": ""]
]
]
]],
"recordTransformations": [
"fieldTransformations": [
[
"condition": ["expressions": [
"conditions": ["conditions": [
[
"field": [],
"operator": "",
"value": []
]
]],
"logicalOperator": ""
]],
"fields": [[]],
"infoTypeTransformations": [],
"primitiveTransformation": []
]
],
"recordSuppressions": [["condition": []]]
],
"transformationErrorHandling": [
"leaveUntransformed": [],
"throwError": []
]
],
"description": "",
"displayName": "",
"name": "",
"updateTime": ""
],
"locationId": "",
"templateId": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/:parent/deidentifyTemplates")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
dlp.projects.locations.deidentifyTemplates.list
{{baseUrl}}/v2/:parent/deidentifyTemplates
QUERY PARAMS
parent
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/:parent/deidentifyTemplates");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v2/:parent/deidentifyTemplates")
require "http/client"
url = "{{baseUrl}}/v2/:parent/deidentifyTemplates"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/v2/:parent/deidentifyTemplates"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/:parent/deidentifyTemplates");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/:parent/deidentifyTemplates"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/v2/:parent/deidentifyTemplates HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v2/:parent/deidentifyTemplates")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/:parent/deidentifyTemplates"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/v2/:parent/deidentifyTemplates")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v2/:parent/deidentifyTemplates")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/v2/:parent/deidentifyTemplates');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/v2/:parent/deidentifyTemplates'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/:parent/deidentifyTemplates';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v2/:parent/deidentifyTemplates',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v2/:parent/deidentifyTemplates")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v2/:parent/deidentifyTemplates',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/v2/:parent/deidentifyTemplates'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v2/:parent/deidentifyTemplates');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/v2/:parent/deidentifyTemplates'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/:parent/deidentifyTemplates';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v2/:parent/deidentifyTemplates"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v2/:parent/deidentifyTemplates" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/:parent/deidentifyTemplates",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/v2/:parent/deidentifyTemplates');
echo $response->getBody();
setUrl('{{baseUrl}}/v2/:parent/deidentifyTemplates');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v2/:parent/deidentifyTemplates');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v2/:parent/deidentifyTemplates' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/:parent/deidentifyTemplates' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v2/:parent/deidentifyTemplates")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/:parent/deidentifyTemplates"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/:parent/deidentifyTemplates"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/:parent/deidentifyTemplates")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/v2/:parent/deidentifyTemplates') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v2/:parent/deidentifyTemplates";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/v2/:parent/deidentifyTemplates
http GET {{baseUrl}}/v2/:parent/deidentifyTemplates
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v2/:parent/deidentifyTemplates
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/:parent/deidentifyTemplates")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
dlp.projects.locations.dlpJobs.cancel
{{baseUrl}}/v2/:name:cancel
QUERY PARAMS
name
BODY json
{}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/:name:cancel");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v2/:name:cancel" {:content-type :json})
require "http/client"
url = "{{baseUrl}}/v2/:name:cancel"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/v2/:name:cancel"),
Content = new StringContent("{}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/:name:cancel");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/:name:cancel"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/v2/:name:cancel HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 2
{}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v2/:name:cancel")
.setHeader("content-type", "application/json")
.setBody("{}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/:name:cancel"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v2/:name:cancel")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v2/:name:cancel")
.header("content-type", "application/json")
.body("{}")
.asString();
const data = JSON.stringify({});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v2/:name:cancel');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v2/:name:cancel',
headers: {'content-type': 'application/json'},
data: {}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/:name:cancel';
const options = {method: 'POST', headers: {'content-type': 'application/json'}, body: '{}'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v2/:name:cancel',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{}")
val request = Request.Builder()
.url("{{baseUrl}}/v2/:name:cancel")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/v2/:name:cancel',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v2/:name:cancel',
headers: {'content-type': 'application/json'},
body: {},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/v2/:name:cancel');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/v2/:name:cancel',
headers: {'content-type': 'application/json'},
data: {}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/:name:cancel';
const options = {method: 'POST', headers: {'content-type': 'application/json'}, body: '{}'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v2/:name:cancel"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v2/:name:cancel" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/:name:cancel",
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([
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/v2/:name:cancel', [
'body' => '{}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v2/:name:cancel');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
]));
$request->setRequestUrl('{{baseUrl}}/v2/:name:cancel');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v2/:name:cancel' -Method POST -Headers $headers -ContentType 'application/json' -Body '{}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/:name:cancel' -Method POST -Headers $headers -ContentType 'application/json' -Body '{}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v2/:name:cancel", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/:name:cancel"
payload = {}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/:name:cancel"
payload <- "{}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/:name:cancel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/v2/:name:cancel') do |req|
req.body = "{}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v2/:name:cancel";
let payload = json!({});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/v2/:name:cancel \
--header 'content-type: application/json' \
--data '{}'
echo '{}' | \
http POST {{baseUrl}}/v2/:name:cancel \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{}' \
--output-document \
- {{baseUrl}}/v2/:name:cancel
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/:name:cancel")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
dlp.projects.locations.dlpJobs.create
{{baseUrl}}/v2/:parent/dlpJobs
QUERY PARAMS
parent
BODY json
{
"inspectJob": {
"actions": [
{
"deidentify": {
"cloudStorageOutput": "",
"fileTypesToTransform": [],
"transformationConfig": {
"deidentifyTemplate": "",
"imageRedactTemplate": "",
"structuredDeidentifyTemplate": ""
},
"transformationDetailsStorageConfig": {
"table": {
"datasetId": "",
"projectId": "",
"tableId": ""
}
}
},
"jobNotificationEmails": {},
"pubSub": {
"topic": ""
},
"publishFindingsToCloudDataCatalog": {},
"publishSummaryToCscc": {},
"publishToStackdriver": {},
"saveFindings": {
"outputConfig": {
"outputSchema": "",
"table": {}
}
}
}
],
"inspectConfig": {
"contentOptions": [],
"customInfoTypes": [
{
"detectionRules": [
{
"hotwordRule": {
"hotwordRegex": {
"groupIndexes": [],
"pattern": ""
},
"likelihoodAdjustment": {
"fixedLikelihood": "",
"relativeLikelihood": 0
},
"proximity": {
"windowAfter": 0,
"windowBefore": 0
}
}
}
],
"dictionary": {
"cloudStoragePath": {
"path": ""
},
"wordList": {
"words": []
}
},
"exclusionType": "",
"infoType": {
"name": "",
"version": ""
},
"likelihood": "",
"regex": {},
"storedType": {
"createTime": "",
"name": ""
},
"surrogateType": {}
}
],
"excludeInfoTypes": false,
"includeQuote": false,
"infoTypes": [
{}
],
"limits": {
"maxFindingsPerInfoType": [
{
"infoType": {},
"maxFindings": 0
}
],
"maxFindingsPerItem": 0,
"maxFindingsPerRequest": 0
},
"minLikelihood": "",
"ruleSet": [
{
"infoTypes": [
{}
],
"rules": [
{
"exclusionRule": {
"dictionary": {},
"excludeByHotword": {
"hotwordRegex": {},
"proximity": {}
},
"excludeInfoTypes": {
"infoTypes": [
{}
]
},
"matchingType": "",
"regex": {}
},
"hotwordRule": {}
}
]
}
]
},
"inspectTemplateName": "",
"storageConfig": {
"bigQueryOptions": {
"excludedFields": [
{
"name": ""
}
],
"identifyingFields": [
{}
],
"includedFields": [
{}
],
"rowsLimit": "",
"rowsLimitPercent": 0,
"sampleMethod": "",
"tableReference": {}
},
"cloudStorageOptions": {
"bytesLimitPerFile": "",
"bytesLimitPerFilePercent": 0,
"fileSet": {
"regexFileSet": {
"bucketName": "",
"excludeRegex": [],
"includeRegex": []
},
"url": ""
},
"fileTypes": [],
"filesLimitPercent": 0,
"sampleMethod": ""
},
"datastoreOptions": {
"kind": {
"name": ""
},
"partitionId": {
"namespaceId": "",
"projectId": ""
}
},
"hybridOptions": {
"description": "",
"labels": {},
"requiredFindingLabelKeys": [],
"tableOptions": {
"identifyingFields": [
{}
]
}
},
"timespanConfig": {
"enableAutoPopulationOfTimespanConfig": false,
"endTime": "",
"startTime": "",
"timestampField": {}
}
}
},
"jobId": "",
"locationId": "",
"riskJob": {
"actions": [
{}
],
"privacyMetric": {
"categoricalStatsConfig": {
"field": {}
},
"deltaPresenceEstimationConfig": {
"auxiliaryTables": [
{
"quasiIds": [
{
"customTag": "",
"field": {}
}
],
"relativeFrequency": {},
"table": {}
}
],
"quasiIds": [
{
"customTag": "",
"field": {},
"inferred": {},
"infoType": {}
}
],
"regionCode": ""
},
"kAnonymityConfig": {
"entityId": {
"field": {}
},
"quasiIds": [
{}
]
},
"kMapEstimationConfig": {
"auxiliaryTables": [
{
"quasiIds": [
{
"customTag": "",
"field": {}
}
],
"relativeFrequency": {},
"table": {}
}
],
"quasiIds": [
{
"customTag": "",
"field": {},
"inferred": {},
"infoType": {}
}
],
"regionCode": ""
},
"lDiversityConfig": {
"quasiIds": [
{}
],
"sensitiveAttribute": {}
},
"numericalStatsConfig": {
"field": {}
}
},
"sourceTable": {}
}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/:parent/dlpJobs");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"inspectJob\": {\n \"actions\": [\n {\n \"deidentify\": {\n \"cloudStorageOutput\": \"\",\n \"fileTypesToTransform\": [],\n \"transformationConfig\": {\n \"deidentifyTemplate\": \"\",\n \"imageRedactTemplate\": \"\",\n \"structuredDeidentifyTemplate\": \"\"\n },\n \"transformationDetailsStorageConfig\": {\n \"table\": {\n \"datasetId\": \"\",\n \"projectId\": \"\",\n \"tableId\": \"\"\n }\n }\n },\n \"jobNotificationEmails\": {},\n \"pubSub\": {\n \"topic\": \"\"\n },\n \"publishFindingsToCloudDataCatalog\": {},\n \"publishSummaryToCscc\": {},\n \"publishToStackdriver\": {},\n \"saveFindings\": {\n \"outputConfig\": {\n \"outputSchema\": \"\",\n \"table\": {}\n }\n }\n }\n ],\n \"inspectConfig\": {\n \"contentOptions\": [],\n \"customInfoTypes\": [\n {\n \"detectionRules\": [\n {\n \"hotwordRule\": {\n \"hotwordRegex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n },\n \"likelihoodAdjustment\": {\n \"fixedLikelihood\": \"\",\n \"relativeLikelihood\": 0\n },\n \"proximity\": {\n \"windowAfter\": 0,\n \"windowBefore\": 0\n }\n }\n }\n ],\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {\n \"words\": []\n }\n },\n \"exclusionType\": \"\",\n \"infoType\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"likelihood\": \"\",\n \"regex\": {},\n \"storedType\": {\n \"createTime\": \"\",\n \"name\": \"\"\n },\n \"surrogateType\": {}\n }\n ],\n \"excludeInfoTypes\": false,\n \"includeQuote\": false,\n \"infoTypes\": [\n {}\n ],\n \"limits\": {\n \"maxFindingsPerInfoType\": [\n {\n \"infoType\": {},\n \"maxFindings\": 0\n }\n ],\n \"maxFindingsPerItem\": 0,\n \"maxFindingsPerRequest\": 0\n },\n \"minLikelihood\": \"\",\n \"ruleSet\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"rules\": [\n {\n \"exclusionRule\": {\n \"dictionary\": {},\n \"excludeByHotword\": {\n \"hotwordRegex\": {},\n \"proximity\": {}\n },\n \"excludeInfoTypes\": {\n \"infoTypes\": [\n {}\n ]\n },\n \"matchingType\": \"\",\n \"regex\": {}\n },\n \"hotwordRule\": {}\n }\n ]\n }\n ]\n },\n \"inspectTemplateName\": \"\",\n \"storageConfig\": {\n \"bigQueryOptions\": {\n \"excludedFields\": [\n {\n \"name\": \"\"\n }\n ],\n \"identifyingFields\": [\n {}\n ],\n \"includedFields\": [\n {}\n ],\n \"rowsLimit\": \"\",\n \"rowsLimitPercent\": 0,\n \"sampleMethod\": \"\",\n \"tableReference\": {}\n },\n \"cloudStorageOptions\": {\n \"bytesLimitPerFile\": \"\",\n \"bytesLimitPerFilePercent\": 0,\n \"fileSet\": {\n \"regexFileSet\": {\n \"bucketName\": \"\",\n \"excludeRegex\": [],\n \"includeRegex\": []\n },\n \"url\": \"\"\n },\n \"fileTypes\": [],\n \"filesLimitPercent\": 0,\n \"sampleMethod\": \"\"\n },\n \"datastoreOptions\": {\n \"kind\": {\n \"name\": \"\"\n },\n \"partitionId\": {\n \"namespaceId\": \"\",\n \"projectId\": \"\"\n }\n },\n \"hybridOptions\": {\n \"description\": \"\",\n \"labels\": {},\n \"requiredFindingLabelKeys\": [],\n \"tableOptions\": {\n \"identifyingFields\": [\n {}\n ]\n }\n },\n \"timespanConfig\": {\n \"enableAutoPopulationOfTimespanConfig\": false,\n \"endTime\": \"\",\n \"startTime\": \"\",\n \"timestampField\": {}\n }\n }\n },\n \"jobId\": \"\",\n \"locationId\": \"\",\n \"riskJob\": {\n \"actions\": [\n {}\n ],\n \"privacyMetric\": {\n \"categoricalStatsConfig\": {\n \"field\": {}\n },\n \"deltaPresenceEstimationConfig\": {\n \"auxiliaryTables\": [\n {\n \"quasiIds\": [\n {\n \"customTag\": \"\",\n \"field\": {}\n }\n ],\n \"relativeFrequency\": {},\n \"table\": {}\n }\n ],\n \"quasiIds\": [\n {\n \"customTag\": \"\",\n \"field\": {},\n \"inferred\": {},\n \"infoType\": {}\n }\n ],\n \"regionCode\": \"\"\n },\n \"kAnonymityConfig\": {\n \"entityId\": {\n \"field\": {}\n },\n \"quasiIds\": [\n {}\n ]\n },\n \"kMapEstimationConfig\": {\n \"auxiliaryTables\": [\n {\n \"quasiIds\": [\n {\n \"customTag\": \"\",\n \"field\": {}\n }\n ],\n \"relativeFrequency\": {},\n \"table\": {}\n }\n ],\n \"quasiIds\": [\n {\n \"customTag\": \"\",\n \"field\": {},\n \"inferred\": {},\n \"infoType\": {}\n }\n ],\n \"regionCode\": \"\"\n },\n \"lDiversityConfig\": {\n \"quasiIds\": [\n {}\n ],\n \"sensitiveAttribute\": {}\n },\n \"numericalStatsConfig\": {\n \"field\": {}\n }\n },\n \"sourceTable\": {}\n }\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v2/:parent/dlpJobs" {:content-type :json
:form-params {:inspectJob {:actions [{:deidentify {:cloudStorageOutput ""
:fileTypesToTransform []
:transformationConfig {:deidentifyTemplate ""
:imageRedactTemplate ""
:structuredDeidentifyTemplate ""}
:transformationDetailsStorageConfig {:table {:datasetId ""
:projectId ""
:tableId ""}}}
:jobNotificationEmails {}
:pubSub {:topic ""}
:publishFindingsToCloudDataCatalog {}
:publishSummaryToCscc {}
:publishToStackdriver {}
:saveFindings {:outputConfig {:outputSchema ""
:table {}}}}]
:inspectConfig {:contentOptions []
:customInfoTypes [{:detectionRules [{:hotwordRule {:hotwordRegex {:groupIndexes []
:pattern ""}
:likelihoodAdjustment {:fixedLikelihood ""
:relativeLikelihood 0}
:proximity {:windowAfter 0
:windowBefore 0}}}]
:dictionary {:cloudStoragePath {:path ""}
:wordList {:words []}}
:exclusionType ""
:infoType {:name ""
:version ""}
:likelihood ""
:regex {}
:storedType {:createTime ""
:name ""}
:surrogateType {}}]
:excludeInfoTypes false
:includeQuote false
:infoTypes [{}]
:limits {:maxFindingsPerInfoType [{:infoType {}
:maxFindings 0}]
:maxFindingsPerItem 0
:maxFindingsPerRequest 0}
:minLikelihood ""
:ruleSet [{:infoTypes [{}]
:rules [{:exclusionRule {:dictionary {}
:excludeByHotword {:hotwordRegex {}
:proximity {}}
:excludeInfoTypes {:infoTypes [{}]}
:matchingType ""
:regex {}}
:hotwordRule {}}]}]}
:inspectTemplateName ""
:storageConfig {:bigQueryOptions {:excludedFields [{:name ""}]
:identifyingFields [{}]
:includedFields [{}]
:rowsLimit ""
:rowsLimitPercent 0
:sampleMethod ""
:tableReference {}}
:cloudStorageOptions {:bytesLimitPerFile ""
:bytesLimitPerFilePercent 0
:fileSet {:regexFileSet {:bucketName ""
:excludeRegex []
:includeRegex []}
:url ""}
:fileTypes []
:filesLimitPercent 0
:sampleMethod ""}
:datastoreOptions {:kind {:name ""}
:partitionId {:namespaceId ""
:projectId ""}}
:hybridOptions {:description ""
:labels {}
:requiredFindingLabelKeys []
:tableOptions {:identifyingFields [{}]}}
:timespanConfig {:enableAutoPopulationOfTimespanConfig false
:endTime ""
:startTime ""
:timestampField {}}}}
:jobId ""
:locationId ""
:riskJob {:actions [{}]
:privacyMetric {:categoricalStatsConfig {:field {}}
:deltaPresenceEstimationConfig {:auxiliaryTables [{:quasiIds [{:customTag ""
:field {}}]
:relativeFrequency {}
:table {}}]
:quasiIds [{:customTag ""
:field {}
:inferred {}
:infoType {}}]
:regionCode ""}
:kAnonymityConfig {:entityId {:field {}}
:quasiIds [{}]}
:kMapEstimationConfig {:auxiliaryTables [{:quasiIds [{:customTag ""
:field {}}]
:relativeFrequency {}
:table {}}]
:quasiIds [{:customTag ""
:field {}
:inferred {}
:infoType {}}]
:regionCode ""}
:lDiversityConfig {:quasiIds [{}]
:sensitiveAttribute {}}
:numericalStatsConfig {:field {}}}
:sourceTable {}}}})
require "http/client"
url = "{{baseUrl}}/v2/:parent/dlpJobs"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"inspectJob\": {\n \"actions\": [\n {\n \"deidentify\": {\n \"cloudStorageOutput\": \"\",\n \"fileTypesToTransform\": [],\n \"transformationConfig\": {\n \"deidentifyTemplate\": \"\",\n \"imageRedactTemplate\": \"\",\n \"structuredDeidentifyTemplate\": \"\"\n },\n \"transformationDetailsStorageConfig\": {\n \"table\": {\n \"datasetId\": \"\",\n \"projectId\": \"\",\n \"tableId\": \"\"\n }\n }\n },\n \"jobNotificationEmails\": {},\n \"pubSub\": {\n \"topic\": \"\"\n },\n \"publishFindingsToCloudDataCatalog\": {},\n \"publishSummaryToCscc\": {},\n \"publishToStackdriver\": {},\n \"saveFindings\": {\n \"outputConfig\": {\n \"outputSchema\": \"\",\n \"table\": {}\n }\n }\n }\n ],\n \"inspectConfig\": {\n \"contentOptions\": [],\n \"customInfoTypes\": [\n {\n \"detectionRules\": [\n {\n \"hotwordRule\": {\n \"hotwordRegex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n },\n \"likelihoodAdjustment\": {\n \"fixedLikelihood\": \"\",\n \"relativeLikelihood\": 0\n },\n \"proximity\": {\n \"windowAfter\": 0,\n \"windowBefore\": 0\n }\n }\n }\n ],\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {\n \"words\": []\n }\n },\n \"exclusionType\": \"\",\n \"infoType\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"likelihood\": \"\",\n \"regex\": {},\n \"storedType\": {\n \"createTime\": \"\",\n \"name\": \"\"\n },\n \"surrogateType\": {}\n }\n ],\n \"excludeInfoTypes\": false,\n \"includeQuote\": false,\n \"infoTypes\": [\n {}\n ],\n \"limits\": {\n \"maxFindingsPerInfoType\": [\n {\n \"infoType\": {},\n \"maxFindings\": 0\n }\n ],\n \"maxFindingsPerItem\": 0,\n \"maxFindingsPerRequest\": 0\n },\n \"minLikelihood\": \"\",\n \"ruleSet\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"rules\": [\n {\n \"exclusionRule\": {\n \"dictionary\": {},\n \"excludeByHotword\": {\n \"hotwordRegex\": {},\n \"proximity\": {}\n },\n \"excludeInfoTypes\": {\n \"infoTypes\": [\n {}\n ]\n },\n \"matchingType\": \"\",\n \"regex\": {}\n },\n \"hotwordRule\": {}\n }\n ]\n }\n ]\n },\n \"inspectTemplateName\": \"\",\n \"storageConfig\": {\n \"bigQueryOptions\": {\n \"excludedFields\": [\n {\n \"name\": \"\"\n }\n ],\n \"identifyingFields\": [\n {}\n ],\n \"includedFields\": [\n {}\n ],\n \"rowsLimit\": \"\",\n \"rowsLimitPercent\": 0,\n \"sampleMethod\": \"\",\n \"tableReference\": {}\n },\n \"cloudStorageOptions\": {\n \"bytesLimitPerFile\": \"\",\n \"bytesLimitPerFilePercent\": 0,\n \"fileSet\": {\n \"regexFileSet\": {\n \"bucketName\": \"\",\n \"excludeRegex\": [],\n \"includeRegex\": []\n },\n \"url\": \"\"\n },\n \"fileTypes\": [],\n \"filesLimitPercent\": 0,\n \"sampleMethod\": \"\"\n },\n \"datastoreOptions\": {\n \"kind\": {\n \"name\": \"\"\n },\n \"partitionId\": {\n \"namespaceId\": \"\",\n \"projectId\": \"\"\n }\n },\n \"hybridOptions\": {\n \"description\": \"\",\n \"labels\": {},\n \"requiredFindingLabelKeys\": [],\n \"tableOptions\": {\n \"identifyingFields\": [\n {}\n ]\n }\n },\n \"timespanConfig\": {\n \"enableAutoPopulationOfTimespanConfig\": false,\n \"endTime\": \"\",\n \"startTime\": \"\",\n \"timestampField\": {}\n }\n }\n },\n \"jobId\": \"\",\n \"locationId\": \"\",\n \"riskJob\": {\n \"actions\": [\n {}\n ],\n \"privacyMetric\": {\n \"categoricalStatsConfig\": {\n \"field\": {}\n },\n \"deltaPresenceEstimationConfig\": {\n \"auxiliaryTables\": [\n {\n \"quasiIds\": [\n {\n \"customTag\": \"\",\n \"field\": {}\n }\n ],\n \"relativeFrequency\": {},\n \"table\": {}\n }\n ],\n \"quasiIds\": [\n {\n \"customTag\": \"\",\n \"field\": {},\n \"inferred\": {},\n \"infoType\": {}\n }\n ],\n \"regionCode\": \"\"\n },\n \"kAnonymityConfig\": {\n \"entityId\": {\n \"field\": {}\n },\n \"quasiIds\": [\n {}\n ]\n },\n \"kMapEstimationConfig\": {\n \"auxiliaryTables\": [\n {\n \"quasiIds\": [\n {\n \"customTag\": \"\",\n \"field\": {}\n }\n ],\n \"relativeFrequency\": {},\n \"table\": {}\n }\n ],\n \"quasiIds\": [\n {\n \"customTag\": \"\",\n \"field\": {},\n \"inferred\": {},\n \"infoType\": {}\n }\n ],\n \"regionCode\": \"\"\n },\n \"lDiversityConfig\": {\n \"quasiIds\": [\n {}\n ],\n \"sensitiveAttribute\": {}\n },\n \"numericalStatsConfig\": {\n \"field\": {}\n }\n },\n \"sourceTable\": {}\n }\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/v2/:parent/dlpJobs"),
Content = new StringContent("{\n \"inspectJob\": {\n \"actions\": [\n {\n \"deidentify\": {\n \"cloudStorageOutput\": \"\",\n \"fileTypesToTransform\": [],\n \"transformationConfig\": {\n \"deidentifyTemplate\": \"\",\n \"imageRedactTemplate\": \"\",\n \"structuredDeidentifyTemplate\": \"\"\n },\n \"transformationDetailsStorageConfig\": {\n \"table\": {\n \"datasetId\": \"\",\n \"projectId\": \"\",\n \"tableId\": \"\"\n }\n }\n },\n \"jobNotificationEmails\": {},\n \"pubSub\": {\n \"topic\": \"\"\n },\n \"publishFindingsToCloudDataCatalog\": {},\n \"publishSummaryToCscc\": {},\n \"publishToStackdriver\": {},\n \"saveFindings\": {\n \"outputConfig\": {\n \"outputSchema\": \"\",\n \"table\": {}\n }\n }\n }\n ],\n \"inspectConfig\": {\n \"contentOptions\": [],\n \"customInfoTypes\": [\n {\n \"detectionRules\": [\n {\n \"hotwordRule\": {\n \"hotwordRegex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n },\n \"likelihoodAdjustment\": {\n \"fixedLikelihood\": \"\",\n \"relativeLikelihood\": 0\n },\n \"proximity\": {\n \"windowAfter\": 0,\n \"windowBefore\": 0\n }\n }\n }\n ],\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {\n \"words\": []\n }\n },\n \"exclusionType\": \"\",\n \"infoType\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"likelihood\": \"\",\n \"regex\": {},\n \"storedType\": {\n \"createTime\": \"\",\n \"name\": \"\"\n },\n \"surrogateType\": {}\n }\n ],\n \"excludeInfoTypes\": false,\n \"includeQuote\": false,\n \"infoTypes\": [\n {}\n ],\n \"limits\": {\n \"maxFindingsPerInfoType\": [\n {\n \"infoType\": {},\n \"maxFindings\": 0\n }\n ],\n \"maxFindingsPerItem\": 0,\n \"maxFindingsPerRequest\": 0\n },\n \"minLikelihood\": \"\",\n \"ruleSet\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"rules\": [\n {\n \"exclusionRule\": {\n \"dictionary\": {},\n \"excludeByHotword\": {\n \"hotwordRegex\": {},\n \"proximity\": {}\n },\n \"excludeInfoTypes\": {\n \"infoTypes\": [\n {}\n ]\n },\n \"matchingType\": \"\",\n \"regex\": {}\n },\n \"hotwordRule\": {}\n }\n ]\n }\n ]\n },\n \"inspectTemplateName\": \"\",\n \"storageConfig\": {\n \"bigQueryOptions\": {\n \"excludedFields\": [\n {\n \"name\": \"\"\n }\n ],\n \"identifyingFields\": [\n {}\n ],\n \"includedFields\": [\n {}\n ],\n \"rowsLimit\": \"\",\n \"rowsLimitPercent\": 0,\n \"sampleMethod\": \"\",\n \"tableReference\": {}\n },\n \"cloudStorageOptions\": {\n \"bytesLimitPerFile\": \"\",\n \"bytesLimitPerFilePercent\": 0,\n \"fileSet\": {\n \"regexFileSet\": {\n \"bucketName\": \"\",\n \"excludeRegex\": [],\n \"includeRegex\": []\n },\n \"url\": \"\"\n },\n \"fileTypes\": [],\n \"filesLimitPercent\": 0,\n \"sampleMethod\": \"\"\n },\n \"datastoreOptions\": {\n \"kind\": {\n \"name\": \"\"\n },\n \"partitionId\": {\n \"namespaceId\": \"\",\n \"projectId\": \"\"\n }\n },\n \"hybridOptions\": {\n \"description\": \"\",\n \"labels\": {},\n \"requiredFindingLabelKeys\": [],\n \"tableOptions\": {\n \"identifyingFields\": [\n {}\n ]\n }\n },\n \"timespanConfig\": {\n \"enableAutoPopulationOfTimespanConfig\": false,\n \"endTime\": \"\",\n \"startTime\": \"\",\n \"timestampField\": {}\n }\n }\n },\n \"jobId\": \"\",\n \"locationId\": \"\",\n \"riskJob\": {\n \"actions\": [\n {}\n ],\n \"privacyMetric\": {\n \"categoricalStatsConfig\": {\n \"field\": {}\n },\n \"deltaPresenceEstimationConfig\": {\n \"auxiliaryTables\": [\n {\n \"quasiIds\": [\n {\n \"customTag\": \"\",\n \"field\": {}\n }\n ],\n \"relativeFrequency\": {},\n \"table\": {}\n }\n ],\n \"quasiIds\": [\n {\n \"customTag\": \"\",\n \"field\": {},\n \"inferred\": {},\n \"infoType\": {}\n }\n ],\n \"regionCode\": \"\"\n },\n \"kAnonymityConfig\": {\n \"entityId\": {\n \"field\": {}\n },\n \"quasiIds\": [\n {}\n ]\n },\n \"kMapEstimationConfig\": {\n \"auxiliaryTables\": [\n {\n \"quasiIds\": [\n {\n \"customTag\": \"\",\n \"field\": {}\n }\n ],\n \"relativeFrequency\": {},\n \"table\": {}\n }\n ],\n \"quasiIds\": [\n {\n \"customTag\": \"\",\n \"field\": {},\n \"inferred\": {},\n \"infoType\": {}\n }\n ],\n \"regionCode\": \"\"\n },\n \"lDiversityConfig\": {\n \"quasiIds\": [\n {}\n ],\n \"sensitiveAttribute\": {}\n },\n \"numericalStatsConfig\": {\n \"field\": {}\n }\n },\n \"sourceTable\": {}\n }\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/:parent/dlpJobs");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"inspectJob\": {\n \"actions\": [\n {\n \"deidentify\": {\n \"cloudStorageOutput\": \"\",\n \"fileTypesToTransform\": [],\n \"transformationConfig\": {\n \"deidentifyTemplate\": \"\",\n \"imageRedactTemplate\": \"\",\n \"structuredDeidentifyTemplate\": \"\"\n },\n \"transformationDetailsStorageConfig\": {\n \"table\": {\n \"datasetId\": \"\",\n \"projectId\": \"\",\n \"tableId\": \"\"\n }\n }\n },\n \"jobNotificationEmails\": {},\n \"pubSub\": {\n \"topic\": \"\"\n },\n \"publishFindingsToCloudDataCatalog\": {},\n \"publishSummaryToCscc\": {},\n \"publishToStackdriver\": {},\n \"saveFindings\": {\n \"outputConfig\": {\n \"outputSchema\": \"\",\n \"table\": {}\n }\n }\n }\n ],\n \"inspectConfig\": {\n \"contentOptions\": [],\n \"customInfoTypes\": [\n {\n \"detectionRules\": [\n {\n \"hotwordRule\": {\n \"hotwordRegex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n },\n \"likelihoodAdjustment\": {\n \"fixedLikelihood\": \"\",\n \"relativeLikelihood\": 0\n },\n \"proximity\": {\n \"windowAfter\": 0,\n \"windowBefore\": 0\n }\n }\n }\n ],\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {\n \"words\": []\n }\n },\n \"exclusionType\": \"\",\n \"infoType\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"likelihood\": \"\",\n \"regex\": {},\n \"storedType\": {\n \"createTime\": \"\",\n \"name\": \"\"\n },\n \"surrogateType\": {}\n }\n ],\n \"excludeInfoTypes\": false,\n \"includeQuote\": false,\n \"infoTypes\": [\n {}\n ],\n \"limits\": {\n \"maxFindingsPerInfoType\": [\n {\n \"infoType\": {},\n \"maxFindings\": 0\n }\n ],\n \"maxFindingsPerItem\": 0,\n \"maxFindingsPerRequest\": 0\n },\n \"minLikelihood\": \"\",\n \"ruleSet\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"rules\": [\n {\n \"exclusionRule\": {\n \"dictionary\": {},\n \"excludeByHotword\": {\n \"hotwordRegex\": {},\n \"proximity\": {}\n },\n \"excludeInfoTypes\": {\n \"infoTypes\": [\n {}\n ]\n },\n \"matchingType\": \"\",\n \"regex\": {}\n },\n \"hotwordRule\": {}\n }\n ]\n }\n ]\n },\n \"inspectTemplateName\": \"\",\n \"storageConfig\": {\n \"bigQueryOptions\": {\n \"excludedFields\": [\n {\n \"name\": \"\"\n }\n ],\n \"identifyingFields\": [\n {}\n ],\n \"includedFields\": [\n {}\n ],\n \"rowsLimit\": \"\",\n \"rowsLimitPercent\": 0,\n \"sampleMethod\": \"\",\n \"tableReference\": {}\n },\n \"cloudStorageOptions\": {\n \"bytesLimitPerFile\": \"\",\n \"bytesLimitPerFilePercent\": 0,\n \"fileSet\": {\n \"regexFileSet\": {\n \"bucketName\": \"\",\n \"excludeRegex\": [],\n \"includeRegex\": []\n },\n \"url\": \"\"\n },\n \"fileTypes\": [],\n \"filesLimitPercent\": 0,\n \"sampleMethod\": \"\"\n },\n \"datastoreOptions\": {\n \"kind\": {\n \"name\": \"\"\n },\n \"partitionId\": {\n \"namespaceId\": \"\",\n \"projectId\": \"\"\n }\n },\n \"hybridOptions\": {\n \"description\": \"\",\n \"labels\": {},\n \"requiredFindingLabelKeys\": [],\n \"tableOptions\": {\n \"identifyingFields\": [\n {}\n ]\n }\n },\n \"timespanConfig\": {\n \"enableAutoPopulationOfTimespanConfig\": false,\n \"endTime\": \"\",\n \"startTime\": \"\",\n \"timestampField\": {}\n }\n }\n },\n \"jobId\": \"\",\n \"locationId\": \"\",\n \"riskJob\": {\n \"actions\": [\n {}\n ],\n \"privacyMetric\": {\n \"categoricalStatsConfig\": {\n \"field\": {}\n },\n \"deltaPresenceEstimationConfig\": {\n \"auxiliaryTables\": [\n {\n \"quasiIds\": [\n {\n \"customTag\": \"\",\n \"field\": {}\n }\n ],\n \"relativeFrequency\": {},\n \"table\": {}\n }\n ],\n \"quasiIds\": [\n {\n \"customTag\": \"\",\n \"field\": {},\n \"inferred\": {},\n \"infoType\": {}\n }\n ],\n \"regionCode\": \"\"\n },\n \"kAnonymityConfig\": {\n \"entityId\": {\n \"field\": {}\n },\n \"quasiIds\": [\n {}\n ]\n },\n \"kMapEstimationConfig\": {\n \"auxiliaryTables\": [\n {\n \"quasiIds\": [\n {\n \"customTag\": \"\",\n \"field\": {}\n }\n ],\n \"relativeFrequency\": {},\n \"table\": {}\n }\n ],\n \"quasiIds\": [\n {\n \"customTag\": \"\",\n \"field\": {},\n \"inferred\": {},\n \"infoType\": {}\n }\n ],\n \"regionCode\": \"\"\n },\n \"lDiversityConfig\": {\n \"quasiIds\": [\n {}\n ],\n \"sensitiveAttribute\": {}\n },\n \"numericalStatsConfig\": {\n \"field\": {}\n }\n },\n \"sourceTable\": {}\n }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/:parent/dlpJobs"
payload := strings.NewReader("{\n \"inspectJob\": {\n \"actions\": [\n {\n \"deidentify\": {\n \"cloudStorageOutput\": \"\",\n \"fileTypesToTransform\": [],\n \"transformationConfig\": {\n \"deidentifyTemplate\": \"\",\n \"imageRedactTemplate\": \"\",\n \"structuredDeidentifyTemplate\": \"\"\n },\n \"transformationDetailsStorageConfig\": {\n \"table\": {\n \"datasetId\": \"\",\n \"projectId\": \"\",\n \"tableId\": \"\"\n }\n }\n },\n \"jobNotificationEmails\": {},\n \"pubSub\": {\n \"topic\": \"\"\n },\n \"publishFindingsToCloudDataCatalog\": {},\n \"publishSummaryToCscc\": {},\n \"publishToStackdriver\": {},\n \"saveFindings\": {\n \"outputConfig\": {\n \"outputSchema\": \"\",\n \"table\": {}\n }\n }\n }\n ],\n \"inspectConfig\": {\n \"contentOptions\": [],\n \"customInfoTypes\": [\n {\n \"detectionRules\": [\n {\n \"hotwordRule\": {\n \"hotwordRegex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n },\n \"likelihoodAdjustment\": {\n \"fixedLikelihood\": \"\",\n \"relativeLikelihood\": 0\n },\n \"proximity\": {\n \"windowAfter\": 0,\n \"windowBefore\": 0\n }\n }\n }\n ],\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {\n \"words\": []\n }\n },\n \"exclusionType\": \"\",\n \"infoType\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"likelihood\": \"\",\n \"regex\": {},\n \"storedType\": {\n \"createTime\": \"\",\n \"name\": \"\"\n },\n \"surrogateType\": {}\n }\n ],\n \"excludeInfoTypes\": false,\n \"includeQuote\": false,\n \"infoTypes\": [\n {}\n ],\n \"limits\": {\n \"maxFindingsPerInfoType\": [\n {\n \"infoType\": {},\n \"maxFindings\": 0\n }\n ],\n \"maxFindingsPerItem\": 0,\n \"maxFindingsPerRequest\": 0\n },\n \"minLikelihood\": \"\",\n \"ruleSet\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"rules\": [\n {\n \"exclusionRule\": {\n \"dictionary\": {},\n \"excludeByHotword\": {\n \"hotwordRegex\": {},\n \"proximity\": {}\n },\n \"excludeInfoTypes\": {\n \"infoTypes\": [\n {}\n ]\n },\n \"matchingType\": \"\",\n \"regex\": {}\n },\n \"hotwordRule\": {}\n }\n ]\n }\n ]\n },\n \"inspectTemplateName\": \"\",\n \"storageConfig\": {\n \"bigQueryOptions\": {\n \"excludedFields\": [\n {\n \"name\": \"\"\n }\n ],\n \"identifyingFields\": [\n {}\n ],\n \"includedFields\": [\n {}\n ],\n \"rowsLimit\": \"\",\n \"rowsLimitPercent\": 0,\n \"sampleMethod\": \"\",\n \"tableReference\": {}\n },\n \"cloudStorageOptions\": {\n \"bytesLimitPerFile\": \"\",\n \"bytesLimitPerFilePercent\": 0,\n \"fileSet\": {\n \"regexFileSet\": {\n \"bucketName\": \"\",\n \"excludeRegex\": [],\n \"includeRegex\": []\n },\n \"url\": \"\"\n },\n \"fileTypes\": [],\n \"filesLimitPercent\": 0,\n \"sampleMethod\": \"\"\n },\n \"datastoreOptions\": {\n \"kind\": {\n \"name\": \"\"\n },\n \"partitionId\": {\n \"namespaceId\": \"\",\n \"projectId\": \"\"\n }\n },\n \"hybridOptions\": {\n \"description\": \"\",\n \"labels\": {},\n \"requiredFindingLabelKeys\": [],\n \"tableOptions\": {\n \"identifyingFields\": [\n {}\n ]\n }\n },\n \"timespanConfig\": {\n \"enableAutoPopulationOfTimespanConfig\": false,\n \"endTime\": \"\",\n \"startTime\": \"\",\n \"timestampField\": {}\n }\n }\n },\n \"jobId\": \"\",\n \"locationId\": \"\",\n \"riskJob\": {\n \"actions\": [\n {}\n ],\n \"privacyMetric\": {\n \"categoricalStatsConfig\": {\n \"field\": {}\n },\n \"deltaPresenceEstimationConfig\": {\n \"auxiliaryTables\": [\n {\n \"quasiIds\": [\n {\n \"customTag\": \"\",\n \"field\": {}\n }\n ],\n \"relativeFrequency\": {},\n \"table\": {}\n }\n ],\n \"quasiIds\": [\n {\n \"customTag\": \"\",\n \"field\": {},\n \"inferred\": {},\n \"infoType\": {}\n }\n ],\n \"regionCode\": \"\"\n },\n \"kAnonymityConfig\": {\n \"entityId\": {\n \"field\": {}\n },\n \"quasiIds\": [\n {}\n ]\n },\n \"kMapEstimationConfig\": {\n \"auxiliaryTables\": [\n {\n \"quasiIds\": [\n {\n \"customTag\": \"\",\n \"field\": {}\n }\n ],\n \"relativeFrequency\": {},\n \"table\": {}\n }\n ],\n \"quasiIds\": [\n {\n \"customTag\": \"\",\n \"field\": {},\n \"inferred\": {},\n \"infoType\": {}\n }\n ],\n \"regionCode\": \"\"\n },\n \"lDiversityConfig\": {\n \"quasiIds\": [\n {}\n ],\n \"sensitiveAttribute\": {}\n },\n \"numericalStatsConfig\": {\n \"field\": {}\n }\n },\n \"sourceTable\": {}\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/v2/:parent/dlpJobs HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 5778
{
"inspectJob": {
"actions": [
{
"deidentify": {
"cloudStorageOutput": "",
"fileTypesToTransform": [],
"transformationConfig": {
"deidentifyTemplate": "",
"imageRedactTemplate": "",
"structuredDeidentifyTemplate": ""
},
"transformationDetailsStorageConfig": {
"table": {
"datasetId": "",
"projectId": "",
"tableId": ""
}
}
},
"jobNotificationEmails": {},
"pubSub": {
"topic": ""
},
"publishFindingsToCloudDataCatalog": {},
"publishSummaryToCscc": {},
"publishToStackdriver": {},
"saveFindings": {
"outputConfig": {
"outputSchema": "",
"table": {}
}
}
}
],
"inspectConfig": {
"contentOptions": [],
"customInfoTypes": [
{
"detectionRules": [
{
"hotwordRule": {
"hotwordRegex": {
"groupIndexes": [],
"pattern": ""
},
"likelihoodAdjustment": {
"fixedLikelihood": "",
"relativeLikelihood": 0
},
"proximity": {
"windowAfter": 0,
"windowBefore": 0
}
}
}
],
"dictionary": {
"cloudStoragePath": {
"path": ""
},
"wordList": {
"words": []
}
},
"exclusionType": "",
"infoType": {
"name": "",
"version": ""
},
"likelihood": "",
"regex": {},
"storedType": {
"createTime": "",
"name": ""
},
"surrogateType": {}
}
],
"excludeInfoTypes": false,
"includeQuote": false,
"infoTypes": [
{}
],
"limits": {
"maxFindingsPerInfoType": [
{
"infoType": {},
"maxFindings": 0
}
],
"maxFindingsPerItem": 0,
"maxFindingsPerRequest": 0
},
"minLikelihood": "",
"ruleSet": [
{
"infoTypes": [
{}
],
"rules": [
{
"exclusionRule": {
"dictionary": {},
"excludeByHotword": {
"hotwordRegex": {},
"proximity": {}
},
"excludeInfoTypes": {
"infoTypes": [
{}
]
},
"matchingType": "",
"regex": {}
},
"hotwordRule": {}
}
]
}
]
},
"inspectTemplateName": "",
"storageConfig": {
"bigQueryOptions": {
"excludedFields": [
{
"name": ""
}
],
"identifyingFields": [
{}
],
"includedFields": [
{}
],
"rowsLimit": "",
"rowsLimitPercent": 0,
"sampleMethod": "",
"tableReference": {}
},
"cloudStorageOptions": {
"bytesLimitPerFile": "",
"bytesLimitPerFilePercent": 0,
"fileSet": {
"regexFileSet": {
"bucketName": "",
"excludeRegex": [],
"includeRegex": []
},
"url": ""
},
"fileTypes": [],
"filesLimitPercent": 0,
"sampleMethod": ""
},
"datastoreOptions": {
"kind": {
"name": ""
},
"partitionId": {
"namespaceId": "",
"projectId": ""
}
},
"hybridOptions": {
"description": "",
"labels": {},
"requiredFindingLabelKeys": [],
"tableOptions": {
"identifyingFields": [
{}
]
}
},
"timespanConfig": {
"enableAutoPopulationOfTimespanConfig": false,
"endTime": "",
"startTime": "",
"timestampField": {}
}
}
},
"jobId": "",
"locationId": "",
"riskJob": {
"actions": [
{}
],
"privacyMetric": {
"categoricalStatsConfig": {
"field": {}
},
"deltaPresenceEstimationConfig": {
"auxiliaryTables": [
{
"quasiIds": [
{
"customTag": "",
"field": {}
}
],
"relativeFrequency": {},
"table": {}
}
],
"quasiIds": [
{
"customTag": "",
"field": {},
"inferred": {},
"infoType": {}
}
],
"regionCode": ""
},
"kAnonymityConfig": {
"entityId": {
"field": {}
},
"quasiIds": [
{}
]
},
"kMapEstimationConfig": {
"auxiliaryTables": [
{
"quasiIds": [
{
"customTag": "",
"field": {}
}
],
"relativeFrequency": {},
"table": {}
}
],
"quasiIds": [
{
"customTag": "",
"field": {},
"inferred": {},
"infoType": {}
}
],
"regionCode": ""
},
"lDiversityConfig": {
"quasiIds": [
{}
],
"sensitiveAttribute": {}
},
"numericalStatsConfig": {
"field": {}
}
},
"sourceTable": {}
}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v2/:parent/dlpJobs")
.setHeader("content-type", "application/json")
.setBody("{\n \"inspectJob\": {\n \"actions\": [\n {\n \"deidentify\": {\n \"cloudStorageOutput\": \"\",\n \"fileTypesToTransform\": [],\n \"transformationConfig\": {\n \"deidentifyTemplate\": \"\",\n \"imageRedactTemplate\": \"\",\n \"structuredDeidentifyTemplate\": \"\"\n },\n \"transformationDetailsStorageConfig\": {\n \"table\": {\n \"datasetId\": \"\",\n \"projectId\": \"\",\n \"tableId\": \"\"\n }\n }\n },\n \"jobNotificationEmails\": {},\n \"pubSub\": {\n \"topic\": \"\"\n },\n \"publishFindingsToCloudDataCatalog\": {},\n \"publishSummaryToCscc\": {},\n \"publishToStackdriver\": {},\n \"saveFindings\": {\n \"outputConfig\": {\n \"outputSchema\": \"\",\n \"table\": {}\n }\n }\n }\n ],\n \"inspectConfig\": {\n \"contentOptions\": [],\n \"customInfoTypes\": [\n {\n \"detectionRules\": [\n {\n \"hotwordRule\": {\n \"hotwordRegex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n },\n \"likelihoodAdjustment\": {\n \"fixedLikelihood\": \"\",\n \"relativeLikelihood\": 0\n },\n \"proximity\": {\n \"windowAfter\": 0,\n \"windowBefore\": 0\n }\n }\n }\n ],\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {\n \"words\": []\n }\n },\n \"exclusionType\": \"\",\n \"infoType\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"likelihood\": \"\",\n \"regex\": {},\n \"storedType\": {\n \"createTime\": \"\",\n \"name\": \"\"\n },\n \"surrogateType\": {}\n }\n ],\n \"excludeInfoTypes\": false,\n \"includeQuote\": false,\n \"infoTypes\": [\n {}\n ],\n \"limits\": {\n \"maxFindingsPerInfoType\": [\n {\n \"infoType\": {},\n \"maxFindings\": 0\n }\n ],\n \"maxFindingsPerItem\": 0,\n \"maxFindingsPerRequest\": 0\n },\n \"minLikelihood\": \"\",\n \"ruleSet\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"rules\": [\n {\n \"exclusionRule\": {\n \"dictionary\": {},\n \"excludeByHotword\": {\n \"hotwordRegex\": {},\n \"proximity\": {}\n },\n \"excludeInfoTypes\": {\n \"infoTypes\": [\n {}\n ]\n },\n \"matchingType\": \"\",\n \"regex\": {}\n },\n \"hotwordRule\": {}\n }\n ]\n }\n ]\n },\n \"inspectTemplateName\": \"\",\n \"storageConfig\": {\n \"bigQueryOptions\": {\n \"excludedFields\": [\n {\n \"name\": \"\"\n }\n ],\n \"identifyingFields\": [\n {}\n ],\n \"includedFields\": [\n {}\n ],\n \"rowsLimit\": \"\",\n \"rowsLimitPercent\": 0,\n \"sampleMethod\": \"\",\n \"tableReference\": {}\n },\n \"cloudStorageOptions\": {\n \"bytesLimitPerFile\": \"\",\n \"bytesLimitPerFilePercent\": 0,\n \"fileSet\": {\n \"regexFileSet\": {\n \"bucketName\": \"\",\n \"excludeRegex\": [],\n \"includeRegex\": []\n },\n \"url\": \"\"\n },\n \"fileTypes\": [],\n \"filesLimitPercent\": 0,\n \"sampleMethod\": \"\"\n },\n \"datastoreOptions\": {\n \"kind\": {\n \"name\": \"\"\n },\n \"partitionId\": {\n \"namespaceId\": \"\",\n \"projectId\": \"\"\n }\n },\n \"hybridOptions\": {\n \"description\": \"\",\n \"labels\": {},\n \"requiredFindingLabelKeys\": [],\n \"tableOptions\": {\n \"identifyingFields\": [\n {}\n ]\n }\n },\n \"timespanConfig\": {\n \"enableAutoPopulationOfTimespanConfig\": false,\n \"endTime\": \"\",\n \"startTime\": \"\",\n \"timestampField\": {}\n }\n }\n },\n \"jobId\": \"\",\n \"locationId\": \"\",\n \"riskJob\": {\n \"actions\": [\n {}\n ],\n \"privacyMetric\": {\n \"categoricalStatsConfig\": {\n \"field\": {}\n },\n \"deltaPresenceEstimationConfig\": {\n \"auxiliaryTables\": [\n {\n \"quasiIds\": [\n {\n \"customTag\": \"\",\n \"field\": {}\n }\n ],\n \"relativeFrequency\": {},\n \"table\": {}\n }\n ],\n \"quasiIds\": [\n {\n \"customTag\": \"\",\n \"field\": {},\n \"inferred\": {},\n \"infoType\": {}\n }\n ],\n \"regionCode\": \"\"\n },\n \"kAnonymityConfig\": {\n \"entityId\": {\n \"field\": {}\n },\n \"quasiIds\": [\n {}\n ]\n },\n \"kMapEstimationConfig\": {\n \"auxiliaryTables\": [\n {\n \"quasiIds\": [\n {\n \"customTag\": \"\",\n \"field\": {}\n }\n ],\n \"relativeFrequency\": {},\n \"table\": {}\n }\n ],\n \"quasiIds\": [\n {\n \"customTag\": \"\",\n \"field\": {},\n \"inferred\": {},\n \"infoType\": {}\n }\n ],\n \"regionCode\": \"\"\n },\n \"lDiversityConfig\": {\n \"quasiIds\": [\n {}\n ],\n \"sensitiveAttribute\": {}\n },\n \"numericalStatsConfig\": {\n \"field\": {}\n }\n },\n \"sourceTable\": {}\n }\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/:parent/dlpJobs"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"inspectJob\": {\n \"actions\": [\n {\n \"deidentify\": {\n \"cloudStorageOutput\": \"\",\n \"fileTypesToTransform\": [],\n \"transformationConfig\": {\n \"deidentifyTemplate\": \"\",\n \"imageRedactTemplate\": \"\",\n \"structuredDeidentifyTemplate\": \"\"\n },\n \"transformationDetailsStorageConfig\": {\n \"table\": {\n \"datasetId\": \"\",\n \"projectId\": \"\",\n \"tableId\": \"\"\n }\n }\n },\n \"jobNotificationEmails\": {},\n \"pubSub\": {\n \"topic\": \"\"\n },\n \"publishFindingsToCloudDataCatalog\": {},\n \"publishSummaryToCscc\": {},\n \"publishToStackdriver\": {},\n \"saveFindings\": {\n \"outputConfig\": {\n \"outputSchema\": \"\",\n \"table\": {}\n }\n }\n }\n ],\n \"inspectConfig\": {\n \"contentOptions\": [],\n \"customInfoTypes\": [\n {\n \"detectionRules\": [\n {\n \"hotwordRule\": {\n \"hotwordRegex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n },\n \"likelihoodAdjustment\": {\n \"fixedLikelihood\": \"\",\n \"relativeLikelihood\": 0\n },\n \"proximity\": {\n \"windowAfter\": 0,\n \"windowBefore\": 0\n }\n }\n }\n ],\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {\n \"words\": []\n }\n },\n \"exclusionType\": \"\",\n \"infoType\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"likelihood\": \"\",\n \"regex\": {},\n \"storedType\": {\n \"createTime\": \"\",\n \"name\": \"\"\n },\n \"surrogateType\": {}\n }\n ],\n \"excludeInfoTypes\": false,\n \"includeQuote\": false,\n \"infoTypes\": [\n {}\n ],\n \"limits\": {\n \"maxFindingsPerInfoType\": [\n {\n \"infoType\": {},\n \"maxFindings\": 0\n }\n ],\n \"maxFindingsPerItem\": 0,\n \"maxFindingsPerRequest\": 0\n },\n \"minLikelihood\": \"\",\n \"ruleSet\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"rules\": [\n {\n \"exclusionRule\": {\n \"dictionary\": {},\n \"excludeByHotword\": {\n \"hotwordRegex\": {},\n \"proximity\": {}\n },\n \"excludeInfoTypes\": {\n \"infoTypes\": [\n {}\n ]\n },\n \"matchingType\": \"\",\n \"regex\": {}\n },\n \"hotwordRule\": {}\n }\n ]\n }\n ]\n },\n \"inspectTemplateName\": \"\",\n \"storageConfig\": {\n \"bigQueryOptions\": {\n \"excludedFields\": [\n {\n \"name\": \"\"\n }\n ],\n \"identifyingFields\": [\n {}\n ],\n \"includedFields\": [\n {}\n ],\n \"rowsLimit\": \"\",\n \"rowsLimitPercent\": 0,\n \"sampleMethod\": \"\",\n \"tableReference\": {}\n },\n \"cloudStorageOptions\": {\n \"bytesLimitPerFile\": \"\",\n \"bytesLimitPerFilePercent\": 0,\n \"fileSet\": {\n \"regexFileSet\": {\n \"bucketName\": \"\",\n \"excludeRegex\": [],\n \"includeRegex\": []\n },\n \"url\": \"\"\n },\n \"fileTypes\": [],\n \"filesLimitPercent\": 0,\n \"sampleMethod\": \"\"\n },\n \"datastoreOptions\": {\n \"kind\": {\n \"name\": \"\"\n },\n \"partitionId\": {\n \"namespaceId\": \"\",\n \"projectId\": \"\"\n }\n },\n \"hybridOptions\": {\n \"description\": \"\",\n \"labels\": {},\n \"requiredFindingLabelKeys\": [],\n \"tableOptions\": {\n \"identifyingFields\": [\n {}\n ]\n }\n },\n \"timespanConfig\": {\n \"enableAutoPopulationOfTimespanConfig\": false,\n \"endTime\": \"\",\n \"startTime\": \"\",\n \"timestampField\": {}\n }\n }\n },\n \"jobId\": \"\",\n \"locationId\": \"\",\n \"riskJob\": {\n \"actions\": [\n {}\n ],\n \"privacyMetric\": {\n \"categoricalStatsConfig\": {\n \"field\": {}\n },\n \"deltaPresenceEstimationConfig\": {\n \"auxiliaryTables\": [\n {\n \"quasiIds\": [\n {\n \"customTag\": \"\",\n \"field\": {}\n }\n ],\n \"relativeFrequency\": {},\n \"table\": {}\n }\n ],\n \"quasiIds\": [\n {\n \"customTag\": \"\",\n \"field\": {},\n \"inferred\": {},\n \"infoType\": {}\n }\n ],\n \"regionCode\": \"\"\n },\n \"kAnonymityConfig\": {\n \"entityId\": {\n \"field\": {}\n },\n \"quasiIds\": [\n {}\n ]\n },\n \"kMapEstimationConfig\": {\n \"auxiliaryTables\": [\n {\n \"quasiIds\": [\n {\n \"customTag\": \"\",\n \"field\": {}\n }\n ],\n \"relativeFrequency\": {},\n \"table\": {}\n }\n ],\n \"quasiIds\": [\n {\n \"customTag\": \"\",\n \"field\": {},\n \"inferred\": {},\n \"infoType\": {}\n }\n ],\n \"regionCode\": \"\"\n },\n \"lDiversityConfig\": {\n \"quasiIds\": [\n {}\n ],\n \"sensitiveAttribute\": {}\n },\n \"numericalStatsConfig\": {\n \"field\": {}\n }\n },\n \"sourceTable\": {}\n }\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"inspectJob\": {\n \"actions\": [\n {\n \"deidentify\": {\n \"cloudStorageOutput\": \"\",\n \"fileTypesToTransform\": [],\n \"transformationConfig\": {\n \"deidentifyTemplate\": \"\",\n \"imageRedactTemplate\": \"\",\n \"structuredDeidentifyTemplate\": \"\"\n },\n \"transformationDetailsStorageConfig\": {\n \"table\": {\n \"datasetId\": \"\",\n \"projectId\": \"\",\n \"tableId\": \"\"\n }\n }\n },\n \"jobNotificationEmails\": {},\n \"pubSub\": {\n \"topic\": \"\"\n },\n \"publishFindingsToCloudDataCatalog\": {},\n \"publishSummaryToCscc\": {},\n \"publishToStackdriver\": {},\n \"saveFindings\": {\n \"outputConfig\": {\n \"outputSchema\": \"\",\n \"table\": {}\n }\n }\n }\n ],\n \"inspectConfig\": {\n \"contentOptions\": [],\n \"customInfoTypes\": [\n {\n \"detectionRules\": [\n {\n \"hotwordRule\": {\n \"hotwordRegex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n },\n \"likelihoodAdjustment\": {\n \"fixedLikelihood\": \"\",\n \"relativeLikelihood\": 0\n },\n \"proximity\": {\n \"windowAfter\": 0,\n \"windowBefore\": 0\n }\n }\n }\n ],\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {\n \"words\": []\n }\n },\n \"exclusionType\": \"\",\n \"infoType\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"likelihood\": \"\",\n \"regex\": {},\n \"storedType\": {\n \"createTime\": \"\",\n \"name\": \"\"\n },\n \"surrogateType\": {}\n }\n ],\n \"excludeInfoTypes\": false,\n \"includeQuote\": false,\n \"infoTypes\": [\n {}\n ],\n \"limits\": {\n \"maxFindingsPerInfoType\": [\n {\n \"infoType\": {},\n \"maxFindings\": 0\n }\n ],\n \"maxFindingsPerItem\": 0,\n \"maxFindingsPerRequest\": 0\n },\n \"minLikelihood\": \"\",\n \"ruleSet\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"rules\": [\n {\n \"exclusionRule\": {\n \"dictionary\": {},\n \"excludeByHotword\": {\n \"hotwordRegex\": {},\n \"proximity\": {}\n },\n \"excludeInfoTypes\": {\n \"infoTypes\": [\n {}\n ]\n },\n \"matchingType\": \"\",\n \"regex\": {}\n },\n \"hotwordRule\": {}\n }\n ]\n }\n ]\n },\n \"inspectTemplateName\": \"\",\n \"storageConfig\": {\n \"bigQueryOptions\": {\n \"excludedFields\": [\n {\n \"name\": \"\"\n }\n ],\n \"identifyingFields\": [\n {}\n ],\n \"includedFields\": [\n {}\n ],\n \"rowsLimit\": \"\",\n \"rowsLimitPercent\": 0,\n \"sampleMethod\": \"\",\n \"tableReference\": {}\n },\n \"cloudStorageOptions\": {\n \"bytesLimitPerFile\": \"\",\n \"bytesLimitPerFilePercent\": 0,\n \"fileSet\": {\n \"regexFileSet\": {\n \"bucketName\": \"\",\n \"excludeRegex\": [],\n \"includeRegex\": []\n },\n \"url\": \"\"\n },\n \"fileTypes\": [],\n \"filesLimitPercent\": 0,\n \"sampleMethod\": \"\"\n },\n \"datastoreOptions\": {\n \"kind\": {\n \"name\": \"\"\n },\n \"partitionId\": {\n \"namespaceId\": \"\",\n \"projectId\": \"\"\n }\n },\n \"hybridOptions\": {\n \"description\": \"\",\n \"labels\": {},\n \"requiredFindingLabelKeys\": [],\n \"tableOptions\": {\n \"identifyingFields\": [\n {}\n ]\n }\n },\n \"timespanConfig\": {\n \"enableAutoPopulationOfTimespanConfig\": false,\n \"endTime\": \"\",\n \"startTime\": \"\",\n \"timestampField\": {}\n }\n }\n },\n \"jobId\": \"\",\n \"locationId\": \"\",\n \"riskJob\": {\n \"actions\": [\n {}\n ],\n \"privacyMetric\": {\n \"categoricalStatsConfig\": {\n \"field\": {}\n },\n \"deltaPresenceEstimationConfig\": {\n \"auxiliaryTables\": [\n {\n \"quasiIds\": [\n {\n \"customTag\": \"\",\n \"field\": {}\n }\n ],\n \"relativeFrequency\": {},\n \"table\": {}\n }\n ],\n \"quasiIds\": [\n {\n \"customTag\": \"\",\n \"field\": {},\n \"inferred\": {},\n \"infoType\": {}\n }\n ],\n \"regionCode\": \"\"\n },\n \"kAnonymityConfig\": {\n \"entityId\": {\n \"field\": {}\n },\n \"quasiIds\": [\n {}\n ]\n },\n \"kMapEstimationConfig\": {\n \"auxiliaryTables\": [\n {\n \"quasiIds\": [\n {\n \"customTag\": \"\",\n \"field\": {}\n }\n ],\n \"relativeFrequency\": {},\n \"table\": {}\n }\n ],\n \"quasiIds\": [\n {\n \"customTag\": \"\",\n \"field\": {},\n \"inferred\": {},\n \"infoType\": {}\n }\n ],\n \"regionCode\": \"\"\n },\n \"lDiversityConfig\": {\n \"quasiIds\": [\n {}\n ],\n \"sensitiveAttribute\": {}\n },\n \"numericalStatsConfig\": {\n \"field\": {}\n }\n },\n \"sourceTable\": {}\n }\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v2/:parent/dlpJobs")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v2/:parent/dlpJobs")
.header("content-type", "application/json")
.body("{\n \"inspectJob\": {\n \"actions\": [\n {\n \"deidentify\": {\n \"cloudStorageOutput\": \"\",\n \"fileTypesToTransform\": [],\n \"transformationConfig\": {\n \"deidentifyTemplate\": \"\",\n \"imageRedactTemplate\": \"\",\n \"structuredDeidentifyTemplate\": \"\"\n },\n \"transformationDetailsStorageConfig\": {\n \"table\": {\n \"datasetId\": \"\",\n \"projectId\": \"\",\n \"tableId\": \"\"\n }\n }\n },\n \"jobNotificationEmails\": {},\n \"pubSub\": {\n \"topic\": \"\"\n },\n \"publishFindingsToCloudDataCatalog\": {},\n \"publishSummaryToCscc\": {},\n \"publishToStackdriver\": {},\n \"saveFindings\": {\n \"outputConfig\": {\n \"outputSchema\": \"\",\n \"table\": {}\n }\n }\n }\n ],\n \"inspectConfig\": {\n \"contentOptions\": [],\n \"customInfoTypes\": [\n {\n \"detectionRules\": [\n {\n \"hotwordRule\": {\n \"hotwordRegex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n },\n \"likelihoodAdjustment\": {\n \"fixedLikelihood\": \"\",\n \"relativeLikelihood\": 0\n },\n \"proximity\": {\n \"windowAfter\": 0,\n \"windowBefore\": 0\n }\n }\n }\n ],\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {\n \"words\": []\n }\n },\n \"exclusionType\": \"\",\n \"infoType\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"likelihood\": \"\",\n \"regex\": {},\n \"storedType\": {\n \"createTime\": \"\",\n \"name\": \"\"\n },\n \"surrogateType\": {}\n }\n ],\n \"excludeInfoTypes\": false,\n \"includeQuote\": false,\n \"infoTypes\": [\n {}\n ],\n \"limits\": {\n \"maxFindingsPerInfoType\": [\n {\n \"infoType\": {},\n \"maxFindings\": 0\n }\n ],\n \"maxFindingsPerItem\": 0,\n \"maxFindingsPerRequest\": 0\n },\n \"minLikelihood\": \"\",\n \"ruleSet\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"rules\": [\n {\n \"exclusionRule\": {\n \"dictionary\": {},\n \"excludeByHotword\": {\n \"hotwordRegex\": {},\n \"proximity\": {}\n },\n \"excludeInfoTypes\": {\n \"infoTypes\": [\n {}\n ]\n },\n \"matchingType\": \"\",\n \"regex\": {}\n },\n \"hotwordRule\": {}\n }\n ]\n }\n ]\n },\n \"inspectTemplateName\": \"\",\n \"storageConfig\": {\n \"bigQueryOptions\": {\n \"excludedFields\": [\n {\n \"name\": \"\"\n }\n ],\n \"identifyingFields\": [\n {}\n ],\n \"includedFields\": [\n {}\n ],\n \"rowsLimit\": \"\",\n \"rowsLimitPercent\": 0,\n \"sampleMethod\": \"\",\n \"tableReference\": {}\n },\n \"cloudStorageOptions\": {\n \"bytesLimitPerFile\": \"\",\n \"bytesLimitPerFilePercent\": 0,\n \"fileSet\": {\n \"regexFileSet\": {\n \"bucketName\": \"\",\n \"excludeRegex\": [],\n \"includeRegex\": []\n },\n \"url\": \"\"\n },\n \"fileTypes\": [],\n \"filesLimitPercent\": 0,\n \"sampleMethod\": \"\"\n },\n \"datastoreOptions\": {\n \"kind\": {\n \"name\": \"\"\n },\n \"partitionId\": {\n \"namespaceId\": \"\",\n \"projectId\": \"\"\n }\n },\n \"hybridOptions\": {\n \"description\": \"\",\n \"labels\": {},\n \"requiredFindingLabelKeys\": [],\n \"tableOptions\": {\n \"identifyingFields\": [\n {}\n ]\n }\n },\n \"timespanConfig\": {\n \"enableAutoPopulationOfTimespanConfig\": false,\n \"endTime\": \"\",\n \"startTime\": \"\",\n \"timestampField\": {}\n }\n }\n },\n \"jobId\": \"\",\n \"locationId\": \"\",\n \"riskJob\": {\n \"actions\": [\n {}\n ],\n \"privacyMetric\": {\n \"categoricalStatsConfig\": {\n \"field\": {}\n },\n \"deltaPresenceEstimationConfig\": {\n \"auxiliaryTables\": [\n {\n \"quasiIds\": [\n {\n \"customTag\": \"\",\n \"field\": {}\n }\n ],\n \"relativeFrequency\": {},\n \"table\": {}\n }\n ],\n \"quasiIds\": [\n {\n \"customTag\": \"\",\n \"field\": {},\n \"inferred\": {},\n \"infoType\": {}\n }\n ],\n \"regionCode\": \"\"\n },\n \"kAnonymityConfig\": {\n \"entityId\": {\n \"field\": {}\n },\n \"quasiIds\": [\n {}\n ]\n },\n \"kMapEstimationConfig\": {\n \"auxiliaryTables\": [\n {\n \"quasiIds\": [\n {\n \"customTag\": \"\",\n \"field\": {}\n }\n ],\n \"relativeFrequency\": {},\n \"table\": {}\n }\n ],\n \"quasiIds\": [\n {\n \"customTag\": \"\",\n \"field\": {},\n \"inferred\": {},\n \"infoType\": {}\n }\n ],\n \"regionCode\": \"\"\n },\n \"lDiversityConfig\": {\n \"quasiIds\": [\n {}\n ],\n \"sensitiveAttribute\": {}\n },\n \"numericalStatsConfig\": {\n \"field\": {}\n }\n },\n \"sourceTable\": {}\n }\n}")
.asString();
const data = JSON.stringify({
inspectJob: {
actions: [
{
deidentify: {
cloudStorageOutput: '',
fileTypesToTransform: [],
transformationConfig: {
deidentifyTemplate: '',
imageRedactTemplate: '',
structuredDeidentifyTemplate: ''
},
transformationDetailsStorageConfig: {
table: {
datasetId: '',
projectId: '',
tableId: ''
}
}
},
jobNotificationEmails: {},
pubSub: {
topic: ''
},
publishFindingsToCloudDataCatalog: {},
publishSummaryToCscc: {},
publishToStackdriver: {},
saveFindings: {
outputConfig: {
outputSchema: '',
table: {}
}
}
}
],
inspectConfig: {
contentOptions: [],
customInfoTypes: [
{
detectionRules: [
{
hotwordRule: {
hotwordRegex: {
groupIndexes: [],
pattern: ''
},
likelihoodAdjustment: {
fixedLikelihood: '',
relativeLikelihood: 0
},
proximity: {
windowAfter: 0,
windowBefore: 0
}
}
}
],
dictionary: {
cloudStoragePath: {
path: ''
},
wordList: {
words: []
}
},
exclusionType: '',
infoType: {
name: '',
version: ''
},
likelihood: '',
regex: {},
storedType: {
createTime: '',
name: ''
},
surrogateType: {}
}
],
excludeInfoTypes: false,
includeQuote: false,
infoTypes: [
{}
],
limits: {
maxFindingsPerInfoType: [
{
infoType: {},
maxFindings: 0
}
],
maxFindingsPerItem: 0,
maxFindingsPerRequest: 0
},
minLikelihood: '',
ruleSet: [
{
infoTypes: [
{}
],
rules: [
{
exclusionRule: {
dictionary: {},
excludeByHotword: {
hotwordRegex: {},
proximity: {}
},
excludeInfoTypes: {
infoTypes: [
{}
]
},
matchingType: '',
regex: {}
},
hotwordRule: {}
}
]
}
]
},
inspectTemplateName: '',
storageConfig: {
bigQueryOptions: {
excludedFields: [
{
name: ''
}
],
identifyingFields: [
{}
],
includedFields: [
{}
],
rowsLimit: '',
rowsLimitPercent: 0,
sampleMethod: '',
tableReference: {}
},
cloudStorageOptions: {
bytesLimitPerFile: '',
bytesLimitPerFilePercent: 0,
fileSet: {
regexFileSet: {
bucketName: '',
excludeRegex: [],
includeRegex: []
},
url: ''
},
fileTypes: [],
filesLimitPercent: 0,
sampleMethod: ''
},
datastoreOptions: {
kind: {
name: ''
},
partitionId: {
namespaceId: '',
projectId: ''
}
},
hybridOptions: {
description: '',
labels: {},
requiredFindingLabelKeys: [],
tableOptions: {
identifyingFields: [
{}
]
}
},
timespanConfig: {
enableAutoPopulationOfTimespanConfig: false,
endTime: '',
startTime: '',
timestampField: {}
}
}
},
jobId: '',
locationId: '',
riskJob: {
actions: [
{}
],
privacyMetric: {
categoricalStatsConfig: {
field: {}
},
deltaPresenceEstimationConfig: {
auxiliaryTables: [
{
quasiIds: [
{
customTag: '',
field: {}
}
],
relativeFrequency: {},
table: {}
}
],
quasiIds: [
{
customTag: '',
field: {},
inferred: {},
infoType: {}
}
],
regionCode: ''
},
kAnonymityConfig: {
entityId: {
field: {}
},
quasiIds: [
{}
]
},
kMapEstimationConfig: {
auxiliaryTables: [
{
quasiIds: [
{
customTag: '',
field: {}
}
],
relativeFrequency: {},
table: {}
}
],
quasiIds: [
{
customTag: '',
field: {},
inferred: {},
infoType: {}
}
],
regionCode: ''
},
lDiversityConfig: {
quasiIds: [
{}
],
sensitiveAttribute: {}
},
numericalStatsConfig: {
field: {}
}
},
sourceTable: {}
}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v2/:parent/dlpJobs');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v2/:parent/dlpJobs',
headers: {'content-type': 'application/json'},
data: {
inspectJob: {
actions: [
{
deidentify: {
cloudStorageOutput: '',
fileTypesToTransform: [],
transformationConfig: {
deidentifyTemplate: '',
imageRedactTemplate: '',
structuredDeidentifyTemplate: ''
},
transformationDetailsStorageConfig: {table: {datasetId: '', projectId: '', tableId: ''}}
},
jobNotificationEmails: {},
pubSub: {topic: ''},
publishFindingsToCloudDataCatalog: {},
publishSummaryToCscc: {},
publishToStackdriver: {},
saveFindings: {outputConfig: {outputSchema: '', table: {}}}
}
],
inspectConfig: {
contentOptions: [],
customInfoTypes: [
{
detectionRules: [
{
hotwordRule: {
hotwordRegex: {groupIndexes: [], pattern: ''},
likelihoodAdjustment: {fixedLikelihood: '', relativeLikelihood: 0},
proximity: {windowAfter: 0, windowBefore: 0}
}
}
],
dictionary: {cloudStoragePath: {path: ''}, wordList: {words: []}},
exclusionType: '',
infoType: {name: '', version: ''},
likelihood: '',
regex: {},
storedType: {createTime: '', name: ''},
surrogateType: {}
}
],
excludeInfoTypes: false,
includeQuote: false,
infoTypes: [{}],
limits: {
maxFindingsPerInfoType: [{infoType: {}, maxFindings: 0}],
maxFindingsPerItem: 0,
maxFindingsPerRequest: 0
},
minLikelihood: '',
ruleSet: [
{
infoTypes: [{}],
rules: [
{
exclusionRule: {
dictionary: {},
excludeByHotword: {hotwordRegex: {}, proximity: {}},
excludeInfoTypes: {infoTypes: [{}]},
matchingType: '',
regex: {}
},
hotwordRule: {}
}
]
}
]
},
inspectTemplateName: '',
storageConfig: {
bigQueryOptions: {
excludedFields: [{name: ''}],
identifyingFields: [{}],
includedFields: [{}],
rowsLimit: '',
rowsLimitPercent: 0,
sampleMethod: '',
tableReference: {}
},
cloudStorageOptions: {
bytesLimitPerFile: '',
bytesLimitPerFilePercent: 0,
fileSet: {regexFileSet: {bucketName: '', excludeRegex: [], includeRegex: []}, url: ''},
fileTypes: [],
filesLimitPercent: 0,
sampleMethod: ''
},
datastoreOptions: {kind: {name: ''}, partitionId: {namespaceId: '', projectId: ''}},
hybridOptions: {
description: '',
labels: {},
requiredFindingLabelKeys: [],
tableOptions: {identifyingFields: [{}]}
},
timespanConfig: {
enableAutoPopulationOfTimespanConfig: false,
endTime: '',
startTime: '',
timestampField: {}
}
}
},
jobId: '',
locationId: '',
riskJob: {
actions: [{}],
privacyMetric: {
categoricalStatsConfig: {field: {}},
deltaPresenceEstimationConfig: {
auxiliaryTables: [{quasiIds: [{customTag: '', field: {}}], relativeFrequency: {}, table: {}}],
quasiIds: [{customTag: '', field: {}, inferred: {}, infoType: {}}],
regionCode: ''
},
kAnonymityConfig: {entityId: {field: {}}, quasiIds: [{}]},
kMapEstimationConfig: {
auxiliaryTables: [{quasiIds: [{customTag: '', field: {}}], relativeFrequency: {}, table: {}}],
quasiIds: [{customTag: '', field: {}, inferred: {}, infoType: {}}],
regionCode: ''
},
lDiversityConfig: {quasiIds: [{}], sensitiveAttribute: {}},
numericalStatsConfig: {field: {}}
},
sourceTable: {}
}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/:parent/dlpJobs';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"inspectJob":{"actions":[{"deidentify":{"cloudStorageOutput":"","fileTypesToTransform":[],"transformationConfig":{"deidentifyTemplate":"","imageRedactTemplate":"","structuredDeidentifyTemplate":""},"transformationDetailsStorageConfig":{"table":{"datasetId":"","projectId":"","tableId":""}}},"jobNotificationEmails":{},"pubSub":{"topic":""},"publishFindingsToCloudDataCatalog":{},"publishSummaryToCscc":{},"publishToStackdriver":{},"saveFindings":{"outputConfig":{"outputSchema":"","table":{}}}}],"inspectConfig":{"contentOptions":[],"customInfoTypes":[{"detectionRules":[{"hotwordRule":{"hotwordRegex":{"groupIndexes":[],"pattern":""},"likelihoodAdjustment":{"fixedLikelihood":"","relativeLikelihood":0},"proximity":{"windowAfter":0,"windowBefore":0}}}],"dictionary":{"cloudStoragePath":{"path":""},"wordList":{"words":[]}},"exclusionType":"","infoType":{"name":"","version":""},"likelihood":"","regex":{},"storedType":{"createTime":"","name":""},"surrogateType":{}}],"excludeInfoTypes":false,"includeQuote":false,"infoTypes":[{}],"limits":{"maxFindingsPerInfoType":[{"infoType":{},"maxFindings":0}],"maxFindingsPerItem":0,"maxFindingsPerRequest":0},"minLikelihood":"","ruleSet":[{"infoTypes":[{}],"rules":[{"exclusionRule":{"dictionary":{},"excludeByHotword":{"hotwordRegex":{},"proximity":{}},"excludeInfoTypes":{"infoTypes":[{}]},"matchingType":"","regex":{}},"hotwordRule":{}}]}]},"inspectTemplateName":"","storageConfig":{"bigQueryOptions":{"excludedFields":[{"name":""}],"identifyingFields":[{}],"includedFields":[{}],"rowsLimit":"","rowsLimitPercent":0,"sampleMethod":"","tableReference":{}},"cloudStorageOptions":{"bytesLimitPerFile":"","bytesLimitPerFilePercent":0,"fileSet":{"regexFileSet":{"bucketName":"","excludeRegex":[],"includeRegex":[]},"url":""},"fileTypes":[],"filesLimitPercent":0,"sampleMethod":""},"datastoreOptions":{"kind":{"name":""},"partitionId":{"namespaceId":"","projectId":""}},"hybridOptions":{"description":"","labels":{},"requiredFindingLabelKeys":[],"tableOptions":{"identifyingFields":[{}]}},"timespanConfig":{"enableAutoPopulationOfTimespanConfig":false,"endTime":"","startTime":"","timestampField":{}}}},"jobId":"","locationId":"","riskJob":{"actions":[{}],"privacyMetric":{"categoricalStatsConfig":{"field":{}},"deltaPresenceEstimationConfig":{"auxiliaryTables":[{"quasiIds":[{"customTag":"","field":{}}],"relativeFrequency":{},"table":{}}],"quasiIds":[{"customTag":"","field":{},"inferred":{},"infoType":{}}],"regionCode":""},"kAnonymityConfig":{"entityId":{"field":{}},"quasiIds":[{}]},"kMapEstimationConfig":{"auxiliaryTables":[{"quasiIds":[{"customTag":"","field":{}}],"relativeFrequency":{},"table":{}}],"quasiIds":[{"customTag":"","field":{},"inferred":{},"infoType":{}}],"regionCode":""},"lDiversityConfig":{"quasiIds":[{}],"sensitiveAttribute":{}},"numericalStatsConfig":{"field":{}}},"sourceTable":{}}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v2/:parent/dlpJobs',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "inspectJob": {\n "actions": [\n {\n "deidentify": {\n "cloudStorageOutput": "",\n "fileTypesToTransform": [],\n "transformationConfig": {\n "deidentifyTemplate": "",\n "imageRedactTemplate": "",\n "structuredDeidentifyTemplate": ""\n },\n "transformationDetailsStorageConfig": {\n "table": {\n "datasetId": "",\n "projectId": "",\n "tableId": ""\n }\n }\n },\n "jobNotificationEmails": {},\n "pubSub": {\n "topic": ""\n },\n "publishFindingsToCloudDataCatalog": {},\n "publishSummaryToCscc": {},\n "publishToStackdriver": {},\n "saveFindings": {\n "outputConfig": {\n "outputSchema": "",\n "table": {}\n }\n }\n }\n ],\n "inspectConfig": {\n "contentOptions": [],\n "customInfoTypes": [\n {\n "detectionRules": [\n {\n "hotwordRule": {\n "hotwordRegex": {\n "groupIndexes": [],\n "pattern": ""\n },\n "likelihoodAdjustment": {\n "fixedLikelihood": "",\n "relativeLikelihood": 0\n },\n "proximity": {\n "windowAfter": 0,\n "windowBefore": 0\n }\n }\n }\n ],\n "dictionary": {\n "cloudStoragePath": {\n "path": ""\n },\n "wordList": {\n "words": []\n }\n },\n "exclusionType": "",\n "infoType": {\n "name": "",\n "version": ""\n },\n "likelihood": "",\n "regex": {},\n "storedType": {\n "createTime": "",\n "name": ""\n },\n "surrogateType": {}\n }\n ],\n "excludeInfoTypes": false,\n "includeQuote": false,\n "infoTypes": [\n {}\n ],\n "limits": {\n "maxFindingsPerInfoType": [\n {\n "infoType": {},\n "maxFindings": 0\n }\n ],\n "maxFindingsPerItem": 0,\n "maxFindingsPerRequest": 0\n },\n "minLikelihood": "",\n "ruleSet": [\n {\n "infoTypes": [\n {}\n ],\n "rules": [\n {\n "exclusionRule": {\n "dictionary": {},\n "excludeByHotword": {\n "hotwordRegex": {},\n "proximity": {}\n },\n "excludeInfoTypes": {\n "infoTypes": [\n {}\n ]\n },\n "matchingType": "",\n "regex": {}\n },\n "hotwordRule": {}\n }\n ]\n }\n ]\n },\n "inspectTemplateName": "",\n "storageConfig": {\n "bigQueryOptions": {\n "excludedFields": [\n {\n "name": ""\n }\n ],\n "identifyingFields": [\n {}\n ],\n "includedFields": [\n {}\n ],\n "rowsLimit": "",\n "rowsLimitPercent": 0,\n "sampleMethod": "",\n "tableReference": {}\n },\n "cloudStorageOptions": {\n "bytesLimitPerFile": "",\n "bytesLimitPerFilePercent": 0,\n "fileSet": {\n "regexFileSet": {\n "bucketName": "",\n "excludeRegex": [],\n "includeRegex": []\n },\n "url": ""\n },\n "fileTypes": [],\n "filesLimitPercent": 0,\n "sampleMethod": ""\n },\n "datastoreOptions": {\n "kind": {\n "name": ""\n },\n "partitionId": {\n "namespaceId": "",\n "projectId": ""\n }\n },\n "hybridOptions": {\n "description": "",\n "labels": {},\n "requiredFindingLabelKeys": [],\n "tableOptions": {\n "identifyingFields": [\n {}\n ]\n }\n },\n "timespanConfig": {\n "enableAutoPopulationOfTimespanConfig": false,\n "endTime": "",\n "startTime": "",\n "timestampField": {}\n }\n }\n },\n "jobId": "",\n "locationId": "",\n "riskJob": {\n "actions": [\n {}\n ],\n "privacyMetric": {\n "categoricalStatsConfig": {\n "field": {}\n },\n "deltaPresenceEstimationConfig": {\n "auxiliaryTables": [\n {\n "quasiIds": [\n {\n "customTag": "",\n "field": {}\n }\n ],\n "relativeFrequency": {},\n "table": {}\n }\n ],\n "quasiIds": [\n {\n "customTag": "",\n "field": {},\n "inferred": {},\n "infoType": {}\n }\n ],\n "regionCode": ""\n },\n "kAnonymityConfig": {\n "entityId": {\n "field": {}\n },\n "quasiIds": [\n {}\n ]\n },\n "kMapEstimationConfig": {\n "auxiliaryTables": [\n {\n "quasiIds": [\n {\n "customTag": "",\n "field": {}\n }\n ],\n "relativeFrequency": {},\n "table": {}\n }\n ],\n "quasiIds": [\n {\n "customTag": "",\n "field": {},\n "inferred": {},\n "infoType": {}\n }\n ],\n "regionCode": ""\n },\n "lDiversityConfig": {\n "quasiIds": [\n {}\n ],\n "sensitiveAttribute": {}\n },\n "numericalStatsConfig": {\n "field": {}\n }\n },\n "sourceTable": {}\n }\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"inspectJob\": {\n \"actions\": [\n {\n \"deidentify\": {\n \"cloudStorageOutput\": \"\",\n \"fileTypesToTransform\": [],\n \"transformationConfig\": {\n \"deidentifyTemplate\": \"\",\n \"imageRedactTemplate\": \"\",\n \"structuredDeidentifyTemplate\": \"\"\n },\n \"transformationDetailsStorageConfig\": {\n \"table\": {\n \"datasetId\": \"\",\n \"projectId\": \"\",\n \"tableId\": \"\"\n }\n }\n },\n \"jobNotificationEmails\": {},\n \"pubSub\": {\n \"topic\": \"\"\n },\n \"publishFindingsToCloudDataCatalog\": {},\n \"publishSummaryToCscc\": {},\n \"publishToStackdriver\": {},\n \"saveFindings\": {\n \"outputConfig\": {\n \"outputSchema\": \"\",\n \"table\": {}\n }\n }\n }\n ],\n \"inspectConfig\": {\n \"contentOptions\": [],\n \"customInfoTypes\": [\n {\n \"detectionRules\": [\n {\n \"hotwordRule\": {\n \"hotwordRegex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n },\n \"likelihoodAdjustment\": {\n \"fixedLikelihood\": \"\",\n \"relativeLikelihood\": 0\n },\n \"proximity\": {\n \"windowAfter\": 0,\n \"windowBefore\": 0\n }\n }\n }\n ],\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {\n \"words\": []\n }\n },\n \"exclusionType\": \"\",\n \"infoType\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"likelihood\": \"\",\n \"regex\": {},\n \"storedType\": {\n \"createTime\": \"\",\n \"name\": \"\"\n },\n \"surrogateType\": {}\n }\n ],\n \"excludeInfoTypes\": false,\n \"includeQuote\": false,\n \"infoTypes\": [\n {}\n ],\n \"limits\": {\n \"maxFindingsPerInfoType\": [\n {\n \"infoType\": {},\n \"maxFindings\": 0\n }\n ],\n \"maxFindingsPerItem\": 0,\n \"maxFindingsPerRequest\": 0\n },\n \"minLikelihood\": \"\",\n \"ruleSet\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"rules\": [\n {\n \"exclusionRule\": {\n \"dictionary\": {},\n \"excludeByHotword\": {\n \"hotwordRegex\": {},\n \"proximity\": {}\n },\n \"excludeInfoTypes\": {\n \"infoTypes\": [\n {}\n ]\n },\n \"matchingType\": \"\",\n \"regex\": {}\n },\n \"hotwordRule\": {}\n }\n ]\n }\n ]\n },\n \"inspectTemplateName\": \"\",\n \"storageConfig\": {\n \"bigQueryOptions\": {\n \"excludedFields\": [\n {\n \"name\": \"\"\n }\n ],\n \"identifyingFields\": [\n {}\n ],\n \"includedFields\": [\n {}\n ],\n \"rowsLimit\": \"\",\n \"rowsLimitPercent\": 0,\n \"sampleMethod\": \"\",\n \"tableReference\": {}\n },\n \"cloudStorageOptions\": {\n \"bytesLimitPerFile\": \"\",\n \"bytesLimitPerFilePercent\": 0,\n \"fileSet\": {\n \"regexFileSet\": {\n \"bucketName\": \"\",\n \"excludeRegex\": [],\n \"includeRegex\": []\n },\n \"url\": \"\"\n },\n \"fileTypes\": [],\n \"filesLimitPercent\": 0,\n \"sampleMethod\": \"\"\n },\n \"datastoreOptions\": {\n \"kind\": {\n \"name\": \"\"\n },\n \"partitionId\": {\n \"namespaceId\": \"\",\n \"projectId\": \"\"\n }\n },\n \"hybridOptions\": {\n \"description\": \"\",\n \"labels\": {},\n \"requiredFindingLabelKeys\": [],\n \"tableOptions\": {\n \"identifyingFields\": [\n {}\n ]\n }\n },\n \"timespanConfig\": {\n \"enableAutoPopulationOfTimespanConfig\": false,\n \"endTime\": \"\",\n \"startTime\": \"\",\n \"timestampField\": {}\n }\n }\n },\n \"jobId\": \"\",\n \"locationId\": \"\",\n \"riskJob\": {\n \"actions\": [\n {}\n ],\n \"privacyMetric\": {\n \"categoricalStatsConfig\": {\n \"field\": {}\n },\n \"deltaPresenceEstimationConfig\": {\n \"auxiliaryTables\": [\n {\n \"quasiIds\": [\n {\n \"customTag\": \"\",\n \"field\": {}\n }\n ],\n \"relativeFrequency\": {},\n \"table\": {}\n }\n ],\n \"quasiIds\": [\n {\n \"customTag\": \"\",\n \"field\": {},\n \"inferred\": {},\n \"infoType\": {}\n }\n ],\n \"regionCode\": \"\"\n },\n \"kAnonymityConfig\": {\n \"entityId\": {\n \"field\": {}\n },\n \"quasiIds\": [\n {}\n ]\n },\n \"kMapEstimationConfig\": {\n \"auxiliaryTables\": [\n {\n \"quasiIds\": [\n {\n \"customTag\": \"\",\n \"field\": {}\n }\n ],\n \"relativeFrequency\": {},\n \"table\": {}\n }\n ],\n \"quasiIds\": [\n {\n \"customTag\": \"\",\n \"field\": {},\n \"inferred\": {},\n \"infoType\": {}\n }\n ],\n \"regionCode\": \"\"\n },\n \"lDiversityConfig\": {\n \"quasiIds\": [\n {}\n ],\n \"sensitiveAttribute\": {}\n },\n \"numericalStatsConfig\": {\n \"field\": {}\n }\n },\n \"sourceTable\": {}\n }\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v2/:parent/dlpJobs")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/v2/:parent/dlpJobs',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
inspectJob: {
actions: [
{
deidentify: {
cloudStorageOutput: '',
fileTypesToTransform: [],
transformationConfig: {
deidentifyTemplate: '',
imageRedactTemplate: '',
structuredDeidentifyTemplate: ''
},
transformationDetailsStorageConfig: {table: {datasetId: '', projectId: '', tableId: ''}}
},
jobNotificationEmails: {},
pubSub: {topic: ''},
publishFindingsToCloudDataCatalog: {},
publishSummaryToCscc: {},
publishToStackdriver: {},
saveFindings: {outputConfig: {outputSchema: '', table: {}}}
}
],
inspectConfig: {
contentOptions: [],
customInfoTypes: [
{
detectionRules: [
{
hotwordRule: {
hotwordRegex: {groupIndexes: [], pattern: ''},
likelihoodAdjustment: {fixedLikelihood: '', relativeLikelihood: 0},
proximity: {windowAfter: 0, windowBefore: 0}
}
}
],
dictionary: {cloudStoragePath: {path: ''}, wordList: {words: []}},
exclusionType: '',
infoType: {name: '', version: ''},
likelihood: '',
regex: {},
storedType: {createTime: '', name: ''},
surrogateType: {}
}
],
excludeInfoTypes: false,
includeQuote: false,
infoTypes: [{}],
limits: {
maxFindingsPerInfoType: [{infoType: {}, maxFindings: 0}],
maxFindingsPerItem: 0,
maxFindingsPerRequest: 0
},
minLikelihood: '',
ruleSet: [
{
infoTypes: [{}],
rules: [
{
exclusionRule: {
dictionary: {},
excludeByHotword: {hotwordRegex: {}, proximity: {}},
excludeInfoTypes: {infoTypes: [{}]},
matchingType: '',
regex: {}
},
hotwordRule: {}
}
]
}
]
},
inspectTemplateName: '',
storageConfig: {
bigQueryOptions: {
excludedFields: [{name: ''}],
identifyingFields: [{}],
includedFields: [{}],
rowsLimit: '',
rowsLimitPercent: 0,
sampleMethod: '',
tableReference: {}
},
cloudStorageOptions: {
bytesLimitPerFile: '',
bytesLimitPerFilePercent: 0,
fileSet: {regexFileSet: {bucketName: '', excludeRegex: [], includeRegex: []}, url: ''},
fileTypes: [],
filesLimitPercent: 0,
sampleMethod: ''
},
datastoreOptions: {kind: {name: ''}, partitionId: {namespaceId: '', projectId: ''}},
hybridOptions: {
description: '',
labels: {},
requiredFindingLabelKeys: [],
tableOptions: {identifyingFields: [{}]}
},
timespanConfig: {
enableAutoPopulationOfTimespanConfig: false,
endTime: '',
startTime: '',
timestampField: {}
}
}
},
jobId: '',
locationId: '',
riskJob: {
actions: [{}],
privacyMetric: {
categoricalStatsConfig: {field: {}},
deltaPresenceEstimationConfig: {
auxiliaryTables: [{quasiIds: [{customTag: '', field: {}}], relativeFrequency: {}, table: {}}],
quasiIds: [{customTag: '', field: {}, inferred: {}, infoType: {}}],
regionCode: ''
},
kAnonymityConfig: {entityId: {field: {}}, quasiIds: [{}]},
kMapEstimationConfig: {
auxiliaryTables: [{quasiIds: [{customTag: '', field: {}}], relativeFrequency: {}, table: {}}],
quasiIds: [{customTag: '', field: {}, inferred: {}, infoType: {}}],
regionCode: ''
},
lDiversityConfig: {quasiIds: [{}], sensitiveAttribute: {}},
numericalStatsConfig: {field: {}}
},
sourceTable: {}
}
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v2/:parent/dlpJobs',
headers: {'content-type': 'application/json'},
body: {
inspectJob: {
actions: [
{
deidentify: {
cloudStorageOutput: '',
fileTypesToTransform: [],
transformationConfig: {
deidentifyTemplate: '',
imageRedactTemplate: '',
structuredDeidentifyTemplate: ''
},
transformationDetailsStorageConfig: {table: {datasetId: '', projectId: '', tableId: ''}}
},
jobNotificationEmails: {},
pubSub: {topic: ''},
publishFindingsToCloudDataCatalog: {},
publishSummaryToCscc: {},
publishToStackdriver: {},
saveFindings: {outputConfig: {outputSchema: '', table: {}}}
}
],
inspectConfig: {
contentOptions: [],
customInfoTypes: [
{
detectionRules: [
{
hotwordRule: {
hotwordRegex: {groupIndexes: [], pattern: ''},
likelihoodAdjustment: {fixedLikelihood: '', relativeLikelihood: 0},
proximity: {windowAfter: 0, windowBefore: 0}
}
}
],
dictionary: {cloudStoragePath: {path: ''}, wordList: {words: []}},
exclusionType: '',
infoType: {name: '', version: ''},
likelihood: '',
regex: {},
storedType: {createTime: '', name: ''},
surrogateType: {}
}
],
excludeInfoTypes: false,
includeQuote: false,
infoTypes: [{}],
limits: {
maxFindingsPerInfoType: [{infoType: {}, maxFindings: 0}],
maxFindingsPerItem: 0,
maxFindingsPerRequest: 0
},
minLikelihood: '',
ruleSet: [
{
infoTypes: [{}],
rules: [
{
exclusionRule: {
dictionary: {},
excludeByHotword: {hotwordRegex: {}, proximity: {}},
excludeInfoTypes: {infoTypes: [{}]},
matchingType: '',
regex: {}
},
hotwordRule: {}
}
]
}
]
},
inspectTemplateName: '',
storageConfig: {
bigQueryOptions: {
excludedFields: [{name: ''}],
identifyingFields: [{}],
includedFields: [{}],
rowsLimit: '',
rowsLimitPercent: 0,
sampleMethod: '',
tableReference: {}
},
cloudStorageOptions: {
bytesLimitPerFile: '',
bytesLimitPerFilePercent: 0,
fileSet: {regexFileSet: {bucketName: '', excludeRegex: [], includeRegex: []}, url: ''},
fileTypes: [],
filesLimitPercent: 0,
sampleMethod: ''
},
datastoreOptions: {kind: {name: ''}, partitionId: {namespaceId: '', projectId: ''}},
hybridOptions: {
description: '',
labels: {},
requiredFindingLabelKeys: [],
tableOptions: {identifyingFields: [{}]}
},
timespanConfig: {
enableAutoPopulationOfTimespanConfig: false,
endTime: '',
startTime: '',
timestampField: {}
}
}
},
jobId: '',
locationId: '',
riskJob: {
actions: [{}],
privacyMetric: {
categoricalStatsConfig: {field: {}},
deltaPresenceEstimationConfig: {
auxiliaryTables: [{quasiIds: [{customTag: '', field: {}}], relativeFrequency: {}, table: {}}],
quasiIds: [{customTag: '', field: {}, inferred: {}, infoType: {}}],
regionCode: ''
},
kAnonymityConfig: {entityId: {field: {}}, quasiIds: [{}]},
kMapEstimationConfig: {
auxiliaryTables: [{quasiIds: [{customTag: '', field: {}}], relativeFrequency: {}, table: {}}],
quasiIds: [{customTag: '', field: {}, inferred: {}, infoType: {}}],
regionCode: ''
},
lDiversityConfig: {quasiIds: [{}], sensitiveAttribute: {}},
numericalStatsConfig: {field: {}}
},
sourceTable: {}
}
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/v2/:parent/dlpJobs');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
inspectJob: {
actions: [
{
deidentify: {
cloudStorageOutput: '',
fileTypesToTransform: [],
transformationConfig: {
deidentifyTemplate: '',
imageRedactTemplate: '',
structuredDeidentifyTemplate: ''
},
transformationDetailsStorageConfig: {
table: {
datasetId: '',
projectId: '',
tableId: ''
}
}
},
jobNotificationEmails: {},
pubSub: {
topic: ''
},
publishFindingsToCloudDataCatalog: {},
publishSummaryToCscc: {},
publishToStackdriver: {},
saveFindings: {
outputConfig: {
outputSchema: '',
table: {}
}
}
}
],
inspectConfig: {
contentOptions: [],
customInfoTypes: [
{
detectionRules: [
{
hotwordRule: {
hotwordRegex: {
groupIndexes: [],
pattern: ''
},
likelihoodAdjustment: {
fixedLikelihood: '',
relativeLikelihood: 0
},
proximity: {
windowAfter: 0,
windowBefore: 0
}
}
}
],
dictionary: {
cloudStoragePath: {
path: ''
},
wordList: {
words: []
}
},
exclusionType: '',
infoType: {
name: '',
version: ''
},
likelihood: '',
regex: {},
storedType: {
createTime: '',
name: ''
},
surrogateType: {}
}
],
excludeInfoTypes: false,
includeQuote: false,
infoTypes: [
{}
],
limits: {
maxFindingsPerInfoType: [
{
infoType: {},
maxFindings: 0
}
],
maxFindingsPerItem: 0,
maxFindingsPerRequest: 0
},
minLikelihood: '',
ruleSet: [
{
infoTypes: [
{}
],
rules: [
{
exclusionRule: {
dictionary: {},
excludeByHotword: {
hotwordRegex: {},
proximity: {}
},
excludeInfoTypes: {
infoTypes: [
{}
]
},
matchingType: '',
regex: {}
},
hotwordRule: {}
}
]
}
]
},
inspectTemplateName: '',
storageConfig: {
bigQueryOptions: {
excludedFields: [
{
name: ''
}
],
identifyingFields: [
{}
],
includedFields: [
{}
],
rowsLimit: '',
rowsLimitPercent: 0,
sampleMethod: '',
tableReference: {}
},
cloudStorageOptions: {
bytesLimitPerFile: '',
bytesLimitPerFilePercent: 0,
fileSet: {
regexFileSet: {
bucketName: '',
excludeRegex: [],
includeRegex: []
},
url: ''
},
fileTypes: [],
filesLimitPercent: 0,
sampleMethod: ''
},
datastoreOptions: {
kind: {
name: ''
},
partitionId: {
namespaceId: '',
projectId: ''
}
},
hybridOptions: {
description: '',
labels: {},
requiredFindingLabelKeys: [],
tableOptions: {
identifyingFields: [
{}
]
}
},
timespanConfig: {
enableAutoPopulationOfTimespanConfig: false,
endTime: '',
startTime: '',
timestampField: {}
}
}
},
jobId: '',
locationId: '',
riskJob: {
actions: [
{}
],
privacyMetric: {
categoricalStatsConfig: {
field: {}
},
deltaPresenceEstimationConfig: {
auxiliaryTables: [
{
quasiIds: [
{
customTag: '',
field: {}
}
],
relativeFrequency: {},
table: {}
}
],
quasiIds: [
{
customTag: '',
field: {},
inferred: {},
infoType: {}
}
],
regionCode: ''
},
kAnonymityConfig: {
entityId: {
field: {}
},
quasiIds: [
{}
]
},
kMapEstimationConfig: {
auxiliaryTables: [
{
quasiIds: [
{
customTag: '',
field: {}
}
],
relativeFrequency: {},
table: {}
}
],
quasiIds: [
{
customTag: '',
field: {},
inferred: {},
infoType: {}
}
],
regionCode: ''
},
lDiversityConfig: {
quasiIds: [
{}
],
sensitiveAttribute: {}
},
numericalStatsConfig: {
field: {}
}
},
sourceTable: {}
}
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/v2/:parent/dlpJobs',
headers: {'content-type': 'application/json'},
data: {
inspectJob: {
actions: [
{
deidentify: {
cloudStorageOutput: '',
fileTypesToTransform: [],
transformationConfig: {
deidentifyTemplate: '',
imageRedactTemplate: '',
structuredDeidentifyTemplate: ''
},
transformationDetailsStorageConfig: {table: {datasetId: '', projectId: '', tableId: ''}}
},
jobNotificationEmails: {},
pubSub: {topic: ''},
publishFindingsToCloudDataCatalog: {},
publishSummaryToCscc: {},
publishToStackdriver: {},
saveFindings: {outputConfig: {outputSchema: '', table: {}}}
}
],
inspectConfig: {
contentOptions: [],
customInfoTypes: [
{
detectionRules: [
{
hotwordRule: {
hotwordRegex: {groupIndexes: [], pattern: ''},
likelihoodAdjustment: {fixedLikelihood: '', relativeLikelihood: 0},
proximity: {windowAfter: 0, windowBefore: 0}
}
}
],
dictionary: {cloudStoragePath: {path: ''}, wordList: {words: []}},
exclusionType: '',
infoType: {name: '', version: ''},
likelihood: '',
regex: {},
storedType: {createTime: '', name: ''},
surrogateType: {}
}
],
excludeInfoTypes: false,
includeQuote: false,
infoTypes: [{}],
limits: {
maxFindingsPerInfoType: [{infoType: {}, maxFindings: 0}],
maxFindingsPerItem: 0,
maxFindingsPerRequest: 0
},
minLikelihood: '',
ruleSet: [
{
infoTypes: [{}],
rules: [
{
exclusionRule: {
dictionary: {},
excludeByHotword: {hotwordRegex: {}, proximity: {}},
excludeInfoTypes: {infoTypes: [{}]},
matchingType: '',
regex: {}
},
hotwordRule: {}
}
]
}
]
},
inspectTemplateName: '',
storageConfig: {
bigQueryOptions: {
excludedFields: [{name: ''}],
identifyingFields: [{}],
includedFields: [{}],
rowsLimit: '',
rowsLimitPercent: 0,
sampleMethod: '',
tableReference: {}
},
cloudStorageOptions: {
bytesLimitPerFile: '',
bytesLimitPerFilePercent: 0,
fileSet: {regexFileSet: {bucketName: '', excludeRegex: [], includeRegex: []}, url: ''},
fileTypes: [],
filesLimitPercent: 0,
sampleMethod: ''
},
datastoreOptions: {kind: {name: ''}, partitionId: {namespaceId: '', projectId: ''}},
hybridOptions: {
description: '',
labels: {},
requiredFindingLabelKeys: [],
tableOptions: {identifyingFields: [{}]}
},
timespanConfig: {
enableAutoPopulationOfTimespanConfig: false,
endTime: '',
startTime: '',
timestampField: {}
}
}
},
jobId: '',
locationId: '',
riskJob: {
actions: [{}],
privacyMetric: {
categoricalStatsConfig: {field: {}},
deltaPresenceEstimationConfig: {
auxiliaryTables: [{quasiIds: [{customTag: '', field: {}}], relativeFrequency: {}, table: {}}],
quasiIds: [{customTag: '', field: {}, inferred: {}, infoType: {}}],
regionCode: ''
},
kAnonymityConfig: {entityId: {field: {}}, quasiIds: [{}]},
kMapEstimationConfig: {
auxiliaryTables: [{quasiIds: [{customTag: '', field: {}}], relativeFrequency: {}, table: {}}],
quasiIds: [{customTag: '', field: {}, inferred: {}, infoType: {}}],
regionCode: ''
},
lDiversityConfig: {quasiIds: [{}], sensitiveAttribute: {}},
numericalStatsConfig: {field: {}}
},
sourceTable: {}
}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/:parent/dlpJobs';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"inspectJob":{"actions":[{"deidentify":{"cloudStorageOutput":"","fileTypesToTransform":[],"transformationConfig":{"deidentifyTemplate":"","imageRedactTemplate":"","structuredDeidentifyTemplate":""},"transformationDetailsStorageConfig":{"table":{"datasetId":"","projectId":"","tableId":""}}},"jobNotificationEmails":{},"pubSub":{"topic":""},"publishFindingsToCloudDataCatalog":{},"publishSummaryToCscc":{},"publishToStackdriver":{},"saveFindings":{"outputConfig":{"outputSchema":"","table":{}}}}],"inspectConfig":{"contentOptions":[],"customInfoTypes":[{"detectionRules":[{"hotwordRule":{"hotwordRegex":{"groupIndexes":[],"pattern":""},"likelihoodAdjustment":{"fixedLikelihood":"","relativeLikelihood":0},"proximity":{"windowAfter":0,"windowBefore":0}}}],"dictionary":{"cloudStoragePath":{"path":""},"wordList":{"words":[]}},"exclusionType":"","infoType":{"name":"","version":""},"likelihood":"","regex":{},"storedType":{"createTime":"","name":""},"surrogateType":{}}],"excludeInfoTypes":false,"includeQuote":false,"infoTypes":[{}],"limits":{"maxFindingsPerInfoType":[{"infoType":{},"maxFindings":0}],"maxFindingsPerItem":0,"maxFindingsPerRequest":0},"minLikelihood":"","ruleSet":[{"infoTypes":[{}],"rules":[{"exclusionRule":{"dictionary":{},"excludeByHotword":{"hotwordRegex":{},"proximity":{}},"excludeInfoTypes":{"infoTypes":[{}]},"matchingType":"","regex":{}},"hotwordRule":{}}]}]},"inspectTemplateName":"","storageConfig":{"bigQueryOptions":{"excludedFields":[{"name":""}],"identifyingFields":[{}],"includedFields":[{}],"rowsLimit":"","rowsLimitPercent":0,"sampleMethod":"","tableReference":{}},"cloudStorageOptions":{"bytesLimitPerFile":"","bytesLimitPerFilePercent":0,"fileSet":{"regexFileSet":{"bucketName":"","excludeRegex":[],"includeRegex":[]},"url":""},"fileTypes":[],"filesLimitPercent":0,"sampleMethod":""},"datastoreOptions":{"kind":{"name":""},"partitionId":{"namespaceId":"","projectId":""}},"hybridOptions":{"description":"","labels":{},"requiredFindingLabelKeys":[],"tableOptions":{"identifyingFields":[{}]}},"timespanConfig":{"enableAutoPopulationOfTimespanConfig":false,"endTime":"","startTime":"","timestampField":{}}}},"jobId":"","locationId":"","riskJob":{"actions":[{}],"privacyMetric":{"categoricalStatsConfig":{"field":{}},"deltaPresenceEstimationConfig":{"auxiliaryTables":[{"quasiIds":[{"customTag":"","field":{}}],"relativeFrequency":{},"table":{}}],"quasiIds":[{"customTag":"","field":{},"inferred":{},"infoType":{}}],"regionCode":""},"kAnonymityConfig":{"entityId":{"field":{}},"quasiIds":[{}]},"kMapEstimationConfig":{"auxiliaryTables":[{"quasiIds":[{"customTag":"","field":{}}],"relativeFrequency":{},"table":{}}],"quasiIds":[{"customTag":"","field":{},"inferred":{},"infoType":{}}],"regionCode":""},"lDiversityConfig":{"quasiIds":[{}],"sensitiveAttribute":{}},"numericalStatsConfig":{"field":{}}},"sourceTable":{}}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"inspectJob": @{ @"actions": @[ @{ @"deidentify": @{ @"cloudStorageOutput": @"", @"fileTypesToTransform": @[ ], @"transformationConfig": @{ @"deidentifyTemplate": @"", @"imageRedactTemplate": @"", @"structuredDeidentifyTemplate": @"" }, @"transformationDetailsStorageConfig": @{ @"table": @{ @"datasetId": @"", @"projectId": @"", @"tableId": @"" } } }, @"jobNotificationEmails": @{ }, @"pubSub": @{ @"topic": @"" }, @"publishFindingsToCloudDataCatalog": @{ }, @"publishSummaryToCscc": @{ }, @"publishToStackdriver": @{ }, @"saveFindings": @{ @"outputConfig": @{ @"outputSchema": @"", @"table": @{ } } } } ], @"inspectConfig": @{ @"contentOptions": @[ ], @"customInfoTypes": @[ @{ @"detectionRules": @[ @{ @"hotwordRule": @{ @"hotwordRegex": @{ @"groupIndexes": @[ ], @"pattern": @"" }, @"likelihoodAdjustment": @{ @"fixedLikelihood": @"", @"relativeLikelihood": @0 }, @"proximity": @{ @"windowAfter": @0, @"windowBefore": @0 } } } ], @"dictionary": @{ @"cloudStoragePath": @{ @"path": @"" }, @"wordList": @{ @"words": @[ ] } }, @"exclusionType": @"", @"infoType": @{ @"name": @"", @"version": @"" }, @"likelihood": @"", @"regex": @{ }, @"storedType": @{ @"createTime": @"", @"name": @"" }, @"surrogateType": @{ } } ], @"excludeInfoTypes": @NO, @"includeQuote": @NO, @"infoTypes": @[ @{ } ], @"limits": @{ @"maxFindingsPerInfoType": @[ @{ @"infoType": @{ }, @"maxFindings": @0 } ], @"maxFindingsPerItem": @0, @"maxFindingsPerRequest": @0 }, @"minLikelihood": @"", @"ruleSet": @[ @{ @"infoTypes": @[ @{ } ], @"rules": @[ @{ @"exclusionRule": @{ @"dictionary": @{ }, @"excludeByHotword": @{ @"hotwordRegex": @{ }, @"proximity": @{ } }, @"excludeInfoTypes": @{ @"infoTypes": @[ @{ } ] }, @"matchingType": @"", @"regex": @{ } }, @"hotwordRule": @{ } } ] } ] }, @"inspectTemplateName": @"", @"storageConfig": @{ @"bigQueryOptions": @{ @"excludedFields": @[ @{ @"name": @"" } ], @"identifyingFields": @[ @{ } ], @"includedFields": @[ @{ } ], @"rowsLimit": @"", @"rowsLimitPercent": @0, @"sampleMethod": @"", @"tableReference": @{ } }, @"cloudStorageOptions": @{ @"bytesLimitPerFile": @"", @"bytesLimitPerFilePercent": @0, @"fileSet": @{ @"regexFileSet": @{ @"bucketName": @"", @"excludeRegex": @[ ], @"includeRegex": @[ ] }, @"url": @"" }, @"fileTypes": @[ ], @"filesLimitPercent": @0, @"sampleMethod": @"" }, @"datastoreOptions": @{ @"kind": @{ @"name": @"" }, @"partitionId": @{ @"namespaceId": @"", @"projectId": @"" } }, @"hybridOptions": @{ @"description": @"", @"labels": @{ }, @"requiredFindingLabelKeys": @[ ], @"tableOptions": @{ @"identifyingFields": @[ @{ } ] } }, @"timespanConfig": @{ @"enableAutoPopulationOfTimespanConfig": @NO, @"endTime": @"", @"startTime": @"", @"timestampField": @{ } } } },
@"jobId": @"",
@"locationId": @"",
@"riskJob": @{ @"actions": @[ @{ } ], @"privacyMetric": @{ @"categoricalStatsConfig": @{ @"field": @{ } }, @"deltaPresenceEstimationConfig": @{ @"auxiliaryTables": @[ @{ @"quasiIds": @[ @{ @"customTag": @"", @"field": @{ } } ], @"relativeFrequency": @{ }, @"table": @{ } } ], @"quasiIds": @[ @{ @"customTag": @"", @"field": @{ }, @"inferred": @{ }, @"infoType": @{ } } ], @"regionCode": @"" }, @"kAnonymityConfig": @{ @"entityId": @{ @"field": @{ } }, @"quasiIds": @[ @{ } ] }, @"kMapEstimationConfig": @{ @"auxiliaryTables": @[ @{ @"quasiIds": @[ @{ @"customTag": @"", @"field": @{ } } ], @"relativeFrequency": @{ }, @"table": @{ } } ], @"quasiIds": @[ @{ @"customTag": @"", @"field": @{ }, @"inferred": @{ }, @"infoType": @{ } } ], @"regionCode": @"" }, @"lDiversityConfig": @{ @"quasiIds": @[ @{ } ], @"sensitiveAttribute": @{ } }, @"numericalStatsConfig": @{ @"field": @{ } } }, @"sourceTable": @{ } } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v2/:parent/dlpJobs"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v2/:parent/dlpJobs" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"inspectJob\": {\n \"actions\": [\n {\n \"deidentify\": {\n \"cloudStorageOutput\": \"\",\n \"fileTypesToTransform\": [],\n \"transformationConfig\": {\n \"deidentifyTemplate\": \"\",\n \"imageRedactTemplate\": \"\",\n \"structuredDeidentifyTemplate\": \"\"\n },\n \"transformationDetailsStorageConfig\": {\n \"table\": {\n \"datasetId\": \"\",\n \"projectId\": \"\",\n \"tableId\": \"\"\n }\n }\n },\n \"jobNotificationEmails\": {},\n \"pubSub\": {\n \"topic\": \"\"\n },\n \"publishFindingsToCloudDataCatalog\": {},\n \"publishSummaryToCscc\": {},\n \"publishToStackdriver\": {},\n \"saveFindings\": {\n \"outputConfig\": {\n \"outputSchema\": \"\",\n \"table\": {}\n }\n }\n }\n ],\n \"inspectConfig\": {\n \"contentOptions\": [],\n \"customInfoTypes\": [\n {\n \"detectionRules\": [\n {\n \"hotwordRule\": {\n \"hotwordRegex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n },\n \"likelihoodAdjustment\": {\n \"fixedLikelihood\": \"\",\n \"relativeLikelihood\": 0\n },\n \"proximity\": {\n \"windowAfter\": 0,\n \"windowBefore\": 0\n }\n }\n }\n ],\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {\n \"words\": []\n }\n },\n \"exclusionType\": \"\",\n \"infoType\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"likelihood\": \"\",\n \"regex\": {},\n \"storedType\": {\n \"createTime\": \"\",\n \"name\": \"\"\n },\n \"surrogateType\": {}\n }\n ],\n \"excludeInfoTypes\": false,\n \"includeQuote\": false,\n \"infoTypes\": [\n {}\n ],\n \"limits\": {\n \"maxFindingsPerInfoType\": [\n {\n \"infoType\": {},\n \"maxFindings\": 0\n }\n ],\n \"maxFindingsPerItem\": 0,\n \"maxFindingsPerRequest\": 0\n },\n \"minLikelihood\": \"\",\n \"ruleSet\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"rules\": [\n {\n \"exclusionRule\": {\n \"dictionary\": {},\n \"excludeByHotword\": {\n \"hotwordRegex\": {},\n \"proximity\": {}\n },\n \"excludeInfoTypes\": {\n \"infoTypes\": [\n {}\n ]\n },\n \"matchingType\": \"\",\n \"regex\": {}\n },\n \"hotwordRule\": {}\n }\n ]\n }\n ]\n },\n \"inspectTemplateName\": \"\",\n \"storageConfig\": {\n \"bigQueryOptions\": {\n \"excludedFields\": [\n {\n \"name\": \"\"\n }\n ],\n \"identifyingFields\": [\n {}\n ],\n \"includedFields\": [\n {}\n ],\n \"rowsLimit\": \"\",\n \"rowsLimitPercent\": 0,\n \"sampleMethod\": \"\",\n \"tableReference\": {}\n },\n \"cloudStorageOptions\": {\n \"bytesLimitPerFile\": \"\",\n \"bytesLimitPerFilePercent\": 0,\n \"fileSet\": {\n \"regexFileSet\": {\n \"bucketName\": \"\",\n \"excludeRegex\": [],\n \"includeRegex\": []\n },\n \"url\": \"\"\n },\n \"fileTypes\": [],\n \"filesLimitPercent\": 0,\n \"sampleMethod\": \"\"\n },\n \"datastoreOptions\": {\n \"kind\": {\n \"name\": \"\"\n },\n \"partitionId\": {\n \"namespaceId\": \"\",\n \"projectId\": \"\"\n }\n },\n \"hybridOptions\": {\n \"description\": \"\",\n \"labels\": {},\n \"requiredFindingLabelKeys\": [],\n \"tableOptions\": {\n \"identifyingFields\": [\n {}\n ]\n }\n },\n \"timespanConfig\": {\n \"enableAutoPopulationOfTimespanConfig\": false,\n \"endTime\": \"\",\n \"startTime\": \"\",\n \"timestampField\": {}\n }\n }\n },\n \"jobId\": \"\",\n \"locationId\": \"\",\n \"riskJob\": {\n \"actions\": [\n {}\n ],\n \"privacyMetric\": {\n \"categoricalStatsConfig\": {\n \"field\": {}\n },\n \"deltaPresenceEstimationConfig\": {\n \"auxiliaryTables\": [\n {\n \"quasiIds\": [\n {\n \"customTag\": \"\",\n \"field\": {}\n }\n ],\n \"relativeFrequency\": {},\n \"table\": {}\n }\n ],\n \"quasiIds\": [\n {\n \"customTag\": \"\",\n \"field\": {},\n \"inferred\": {},\n \"infoType\": {}\n }\n ],\n \"regionCode\": \"\"\n },\n \"kAnonymityConfig\": {\n \"entityId\": {\n \"field\": {}\n },\n \"quasiIds\": [\n {}\n ]\n },\n \"kMapEstimationConfig\": {\n \"auxiliaryTables\": [\n {\n \"quasiIds\": [\n {\n \"customTag\": \"\",\n \"field\": {}\n }\n ],\n \"relativeFrequency\": {},\n \"table\": {}\n }\n ],\n \"quasiIds\": [\n {\n \"customTag\": \"\",\n \"field\": {},\n \"inferred\": {},\n \"infoType\": {}\n }\n ],\n \"regionCode\": \"\"\n },\n \"lDiversityConfig\": {\n \"quasiIds\": [\n {}\n ],\n \"sensitiveAttribute\": {}\n },\n \"numericalStatsConfig\": {\n \"field\": {}\n }\n },\n \"sourceTable\": {}\n }\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/:parent/dlpJobs",
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([
'inspectJob' => [
'actions' => [
[
'deidentify' => [
'cloudStorageOutput' => '',
'fileTypesToTransform' => [
],
'transformationConfig' => [
'deidentifyTemplate' => '',
'imageRedactTemplate' => '',
'structuredDeidentifyTemplate' => ''
],
'transformationDetailsStorageConfig' => [
'table' => [
'datasetId' => '',
'projectId' => '',
'tableId' => ''
]
]
],
'jobNotificationEmails' => [
],
'pubSub' => [
'topic' => ''
],
'publishFindingsToCloudDataCatalog' => [
],
'publishSummaryToCscc' => [
],
'publishToStackdriver' => [
],
'saveFindings' => [
'outputConfig' => [
'outputSchema' => '',
'table' => [
]
]
]
]
],
'inspectConfig' => [
'contentOptions' => [
],
'customInfoTypes' => [
[
'detectionRules' => [
[
'hotwordRule' => [
'hotwordRegex' => [
'groupIndexes' => [
],
'pattern' => ''
],
'likelihoodAdjustment' => [
'fixedLikelihood' => '',
'relativeLikelihood' => 0
],
'proximity' => [
'windowAfter' => 0,
'windowBefore' => 0
]
]
]
],
'dictionary' => [
'cloudStoragePath' => [
'path' => ''
],
'wordList' => [
'words' => [
]
]
],
'exclusionType' => '',
'infoType' => [
'name' => '',
'version' => ''
],
'likelihood' => '',
'regex' => [
],
'storedType' => [
'createTime' => '',
'name' => ''
],
'surrogateType' => [
]
]
],
'excludeInfoTypes' => null,
'includeQuote' => null,
'infoTypes' => [
[
]
],
'limits' => [
'maxFindingsPerInfoType' => [
[
'infoType' => [
],
'maxFindings' => 0
]
],
'maxFindingsPerItem' => 0,
'maxFindingsPerRequest' => 0
],
'minLikelihood' => '',
'ruleSet' => [
[
'infoTypes' => [
[
]
],
'rules' => [
[
'exclusionRule' => [
'dictionary' => [
],
'excludeByHotword' => [
'hotwordRegex' => [
],
'proximity' => [
]
],
'excludeInfoTypes' => [
'infoTypes' => [
[
]
]
],
'matchingType' => '',
'regex' => [
]
],
'hotwordRule' => [
]
]
]
]
]
],
'inspectTemplateName' => '',
'storageConfig' => [
'bigQueryOptions' => [
'excludedFields' => [
[
'name' => ''
]
],
'identifyingFields' => [
[
]
],
'includedFields' => [
[
]
],
'rowsLimit' => '',
'rowsLimitPercent' => 0,
'sampleMethod' => '',
'tableReference' => [
]
],
'cloudStorageOptions' => [
'bytesLimitPerFile' => '',
'bytesLimitPerFilePercent' => 0,
'fileSet' => [
'regexFileSet' => [
'bucketName' => '',
'excludeRegex' => [
],
'includeRegex' => [
]
],
'url' => ''
],
'fileTypes' => [
],
'filesLimitPercent' => 0,
'sampleMethod' => ''
],
'datastoreOptions' => [
'kind' => [
'name' => ''
],
'partitionId' => [
'namespaceId' => '',
'projectId' => ''
]
],
'hybridOptions' => [
'description' => '',
'labels' => [
],
'requiredFindingLabelKeys' => [
],
'tableOptions' => [
'identifyingFields' => [
[
]
]
]
],
'timespanConfig' => [
'enableAutoPopulationOfTimespanConfig' => null,
'endTime' => '',
'startTime' => '',
'timestampField' => [
]
]
]
],
'jobId' => '',
'locationId' => '',
'riskJob' => [
'actions' => [
[
]
],
'privacyMetric' => [
'categoricalStatsConfig' => [
'field' => [
]
],
'deltaPresenceEstimationConfig' => [
'auxiliaryTables' => [
[
'quasiIds' => [
[
'customTag' => '',
'field' => [
]
]
],
'relativeFrequency' => [
],
'table' => [
]
]
],
'quasiIds' => [
[
'customTag' => '',
'field' => [
],
'inferred' => [
],
'infoType' => [
]
]
],
'regionCode' => ''
],
'kAnonymityConfig' => [
'entityId' => [
'field' => [
]
],
'quasiIds' => [
[
]
]
],
'kMapEstimationConfig' => [
'auxiliaryTables' => [
[
'quasiIds' => [
[
'customTag' => '',
'field' => [
]
]
],
'relativeFrequency' => [
],
'table' => [
]
]
],
'quasiIds' => [
[
'customTag' => '',
'field' => [
],
'inferred' => [
],
'infoType' => [
]
]
],
'regionCode' => ''
],
'lDiversityConfig' => [
'quasiIds' => [
[
]
],
'sensitiveAttribute' => [
]
],
'numericalStatsConfig' => [
'field' => [
]
]
],
'sourceTable' => [
]
]
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/v2/:parent/dlpJobs', [
'body' => '{
"inspectJob": {
"actions": [
{
"deidentify": {
"cloudStorageOutput": "",
"fileTypesToTransform": [],
"transformationConfig": {
"deidentifyTemplate": "",
"imageRedactTemplate": "",
"structuredDeidentifyTemplate": ""
},
"transformationDetailsStorageConfig": {
"table": {
"datasetId": "",
"projectId": "",
"tableId": ""
}
}
},
"jobNotificationEmails": {},
"pubSub": {
"topic": ""
},
"publishFindingsToCloudDataCatalog": {},
"publishSummaryToCscc": {},
"publishToStackdriver": {},
"saveFindings": {
"outputConfig": {
"outputSchema": "",
"table": {}
}
}
}
],
"inspectConfig": {
"contentOptions": [],
"customInfoTypes": [
{
"detectionRules": [
{
"hotwordRule": {
"hotwordRegex": {
"groupIndexes": [],
"pattern": ""
},
"likelihoodAdjustment": {
"fixedLikelihood": "",
"relativeLikelihood": 0
},
"proximity": {
"windowAfter": 0,
"windowBefore": 0
}
}
}
],
"dictionary": {
"cloudStoragePath": {
"path": ""
},
"wordList": {
"words": []
}
},
"exclusionType": "",
"infoType": {
"name": "",
"version": ""
},
"likelihood": "",
"regex": {},
"storedType": {
"createTime": "",
"name": ""
},
"surrogateType": {}
}
],
"excludeInfoTypes": false,
"includeQuote": false,
"infoTypes": [
{}
],
"limits": {
"maxFindingsPerInfoType": [
{
"infoType": {},
"maxFindings": 0
}
],
"maxFindingsPerItem": 0,
"maxFindingsPerRequest": 0
},
"minLikelihood": "",
"ruleSet": [
{
"infoTypes": [
{}
],
"rules": [
{
"exclusionRule": {
"dictionary": {},
"excludeByHotword": {
"hotwordRegex": {},
"proximity": {}
},
"excludeInfoTypes": {
"infoTypes": [
{}
]
},
"matchingType": "",
"regex": {}
},
"hotwordRule": {}
}
]
}
]
},
"inspectTemplateName": "",
"storageConfig": {
"bigQueryOptions": {
"excludedFields": [
{
"name": ""
}
],
"identifyingFields": [
{}
],
"includedFields": [
{}
],
"rowsLimit": "",
"rowsLimitPercent": 0,
"sampleMethod": "",
"tableReference": {}
},
"cloudStorageOptions": {
"bytesLimitPerFile": "",
"bytesLimitPerFilePercent": 0,
"fileSet": {
"regexFileSet": {
"bucketName": "",
"excludeRegex": [],
"includeRegex": []
},
"url": ""
},
"fileTypes": [],
"filesLimitPercent": 0,
"sampleMethod": ""
},
"datastoreOptions": {
"kind": {
"name": ""
},
"partitionId": {
"namespaceId": "",
"projectId": ""
}
},
"hybridOptions": {
"description": "",
"labels": {},
"requiredFindingLabelKeys": [],
"tableOptions": {
"identifyingFields": [
{}
]
}
},
"timespanConfig": {
"enableAutoPopulationOfTimespanConfig": false,
"endTime": "",
"startTime": "",
"timestampField": {}
}
}
},
"jobId": "",
"locationId": "",
"riskJob": {
"actions": [
{}
],
"privacyMetric": {
"categoricalStatsConfig": {
"field": {}
},
"deltaPresenceEstimationConfig": {
"auxiliaryTables": [
{
"quasiIds": [
{
"customTag": "",
"field": {}
}
],
"relativeFrequency": {},
"table": {}
}
],
"quasiIds": [
{
"customTag": "",
"field": {},
"inferred": {},
"infoType": {}
}
],
"regionCode": ""
},
"kAnonymityConfig": {
"entityId": {
"field": {}
},
"quasiIds": [
{}
]
},
"kMapEstimationConfig": {
"auxiliaryTables": [
{
"quasiIds": [
{
"customTag": "",
"field": {}
}
],
"relativeFrequency": {},
"table": {}
}
],
"quasiIds": [
{
"customTag": "",
"field": {},
"inferred": {},
"infoType": {}
}
],
"regionCode": ""
},
"lDiversityConfig": {
"quasiIds": [
{}
],
"sensitiveAttribute": {}
},
"numericalStatsConfig": {
"field": {}
}
},
"sourceTable": {}
}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v2/:parent/dlpJobs');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'inspectJob' => [
'actions' => [
[
'deidentify' => [
'cloudStorageOutput' => '',
'fileTypesToTransform' => [
],
'transformationConfig' => [
'deidentifyTemplate' => '',
'imageRedactTemplate' => '',
'structuredDeidentifyTemplate' => ''
],
'transformationDetailsStorageConfig' => [
'table' => [
'datasetId' => '',
'projectId' => '',
'tableId' => ''
]
]
],
'jobNotificationEmails' => [
],
'pubSub' => [
'topic' => ''
],
'publishFindingsToCloudDataCatalog' => [
],
'publishSummaryToCscc' => [
],
'publishToStackdriver' => [
],
'saveFindings' => [
'outputConfig' => [
'outputSchema' => '',
'table' => [
]
]
]
]
],
'inspectConfig' => [
'contentOptions' => [
],
'customInfoTypes' => [
[
'detectionRules' => [
[
'hotwordRule' => [
'hotwordRegex' => [
'groupIndexes' => [
],
'pattern' => ''
],
'likelihoodAdjustment' => [
'fixedLikelihood' => '',
'relativeLikelihood' => 0
],
'proximity' => [
'windowAfter' => 0,
'windowBefore' => 0
]
]
]
],
'dictionary' => [
'cloudStoragePath' => [
'path' => ''
],
'wordList' => [
'words' => [
]
]
],
'exclusionType' => '',
'infoType' => [
'name' => '',
'version' => ''
],
'likelihood' => '',
'regex' => [
],
'storedType' => [
'createTime' => '',
'name' => ''
],
'surrogateType' => [
]
]
],
'excludeInfoTypes' => null,
'includeQuote' => null,
'infoTypes' => [
[
]
],
'limits' => [
'maxFindingsPerInfoType' => [
[
'infoType' => [
],
'maxFindings' => 0
]
],
'maxFindingsPerItem' => 0,
'maxFindingsPerRequest' => 0
],
'minLikelihood' => '',
'ruleSet' => [
[
'infoTypes' => [
[
]
],
'rules' => [
[
'exclusionRule' => [
'dictionary' => [
],
'excludeByHotword' => [
'hotwordRegex' => [
],
'proximity' => [
]
],
'excludeInfoTypes' => [
'infoTypes' => [
[
]
]
],
'matchingType' => '',
'regex' => [
]
],
'hotwordRule' => [
]
]
]
]
]
],
'inspectTemplateName' => '',
'storageConfig' => [
'bigQueryOptions' => [
'excludedFields' => [
[
'name' => ''
]
],
'identifyingFields' => [
[
]
],
'includedFields' => [
[
]
],
'rowsLimit' => '',
'rowsLimitPercent' => 0,
'sampleMethod' => '',
'tableReference' => [
]
],
'cloudStorageOptions' => [
'bytesLimitPerFile' => '',
'bytesLimitPerFilePercent' => 0,
'fileSet' => [
'regexFileSet' => [
'bucketName' => '',
'excludeRegex' => [
],
'includeRegex' => [
]
],
'url' => ''
],
'fileTypes' => [
],
'filesLimitPercent' => 0,
'sampleMethod' => ''
],
'datastoreOptions' => [
'kind' => [
'name' => ''
],
'partitionId' => [
'namespaceId' => '',
'projectId' => ''
]
],
'hybridOptions' => [
'description' => '',
'labels' => [
],
'requiredFindingLabelKeys' => [
],
'tableOptions' => [
'identifyingFields' => [
[
]
]
]
],
'timespanConfig' => [
'enableAutoPopulationOfTimespanConfig' => null,
'endTime' => '',
'startTime' => '',
'timestampField' => [
]
]
]
],
'jobId' => '',
'locationId' => '',
'riskJob' => [
'actions' => [
[
]
],
'privacyMetric' => [
'categoricalStatsConfig' => [
'field' => [
]
],
'deltaPresenceEstimationConfig' => [
'auxiliaryTables' => [
[
'quasiIds' => [
[
'customTag' => '',
'field' => [
]
]
],
'relativeFrequency' => [
],
'table' => [
]
]
],
'quasiIds' => [
[
'customTag' => '',
'field' => [
],
'inferred' => [
],
'infoType' => [
]
]
],
'regionCode' => ''
],
'kAnonymityConfig' => [
'entityId' => [
'field' => [
]
],
'quasiIds' => [
[
]
]
],
'kMapEstimationConfig' => [
'auxiliaryTables' => [
[
'quasiIds' => [
[
'customTag' => '',
'field' => [
]
]
],
'relativeFrequency' => [
],
'table' => [
]
]
],
'quasiIds' => [
[
'customTag' => '',
'field' => [
],
'inferred' => [
],
'infoType' => [
]
]
],
'regionCode' => ''
],
'lDiversityConfig' => [
'quasiIds' => [
[
]
],
'sensitiveAttribute' => [
]
],
'numericalStatsConfig' => [
'field' => [
]
]
],
'sourceTable' => [
]
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'inspectJob' => [
'actions' => [
[
'deidentify' => [
'cloudStorageOutput' => '',
'fileTypesToTransform' => [
],
'transformationConfig' => [
'deidentifyTemplate' => '',
'imageRedactTemplate' => '',
'structuredDeidentifyTemplate' => ''
],
'transformationDetailsStorageConfig' => [
'table' => [
'datasetId' => '',
'projectId' => '',
'tableId' => ''
]
]
],
'jobNotificationEmails' => [
],
'pubSub' => [
'topic' => ''
],
'publishFindingsToCloudDataCatalog' => [
],
'publishSummaryToCscc' => [
],
'publishToStackdriver' => [
],
'saveFindings' => [
'outputConfig' => [
'outputSchema' => '',
'table' => [
]
]
]
]
],
'inspectConfig' => [
'contentOptions' => [
],
'customInfoTypes' => [
[
'detectionRules' => [
[
'hotwordRule' => [
'hotwordRegex' => [
'groupIndexes' => [
],
'pattern' => ''
],
'likelihoodAdjustment' => [
'fixedLikelihood' => '',
'relativeLikelihood' => 0
],
'proximity' => [
'windowAfter' => 0,
'windowBefore' => 0
]
]
]
],
'dictionary' => [
'cloudStoragePath' => [
'path' => ''
],
'wordList' => [
'words' => [
]
]
],
'exclusionType' => '',
'infoType' => [
'name' => '',
'version' => ''
],
'likelihood' => '',
'regex' => [
],
'storedType' => [
'createTime' => '',
'name' => ''
],
'surrogateType' => [
]
]
],
'excludeInfoTypes' => null,
'includeQuote' => null,
'infoTypes' => [
[
]
],
'limits' => [
'maxFindingsPerInfoType' => [
[
'infoType' => [
],
'maxFindings' => 0
]
],
'maxFindingsPerItem' => 0,
'maxFindingsPerRequest' => 0
],
'minLikelihood' => '',
'ruleSet' => [
[
'infoTypes' => [
[
]
],
'rules' => [
[
'exclusionRule' => [
'dictionary' => [
],
'excludeByHotword' => [
'hotwordRegex' => [
],
'proximity' => [
]
],
'excludeInfoTypes' => [
'infoTypes' => [
[
]
]
],
'matchingType' => '',
'regex' => [
]
],
'hotwordRule' => [
]
]
]
]
]
],
'inspectTemplateName' => '',
'storageConfig' => [
'bigQueryOptions' => [
'excludedFields' => [
[
'name' => ''
]
],
'identifyingFields' => [
[
]
],
'includedFields' => [
[
]
],
'rowsLimit' => '',
'rowsLimitPercent' => 0,
'sampleMethod' => '',
'tableReference' => [
]
],
'cloudStorageOptions' => [
'bytesLimitPerFile' => '',
'bytesLimitPerFilePercent' => 0,
'fileSet' => [
'regexFileSet' => [
'bucketName' => '',
'excludeRegex' => [
],
'includeRegex' => [
]
],
'url' => ''
],
'fileTypes' => [
],
'filesLimitPercent' => 0,
'sampleMethod' => ''
],
'datastoreOptions' => [
'kind' => [
'name' => ''
],
'partitionId' => [
'namespaceId' => '',
'projectId' => ''
]
],
'hybridOptions' => [
'description' => '',
'labels' => [
],
'requiredFindingLabelKeys' => [
],
'tableOptions' => [
'identifyingFields' => [
[
]
]
]
],
'timespanConfig' => [
'enableAutoPopulationOfTimespanConfig' => null,
'endTime' => '',
'startTime' => '',
'timestampField' => [
]
]
]
],
'jobId' => '',
'locationId' => '',
'riskJob' => [
'actions' => [
[
]
],
'privacyMetric' => [
'categoricalStatsConfig' => [
'field' => [
]
],
'deltaPresenceEstimationConfig' => [
'auxiliaryTables' => [
[
'quasiIds' => [
[
'customTag' => '',
'field' => [
]
]
],
'relativeFrequency' => [
],
'table' => [
]
]
],
'quasiIds' => [
[
'customTag' => '',
'field' => [
],
'inferred' => [
],
'infoType' => [
]
]
],
'regionCode' => ''
],
'kAnonymityConfig' => [
'entityId' => [
'field' => [
]
],
'quasiIds' => [
[
]
]
],
'kMapEstimationConfig' => [
'auxiliaryTables' => [
[
'quasiIds' => [
[
'customTag' => '',
'field' => [
]
]
],
'relativeFrequency' => [
],
'table' => [
]
]
],
'quasiIds' => [
[
'customTag' => '',
'field' => [
],
'inferred' => [
],
'infoType' => [
]
]
],
'regionCode' => ''
],
'lDiversityConfig' => [
'quasiIds' => [
[
]
],
'sensitiveAttribute' => [
]
],
'numericalStatsConfig' => [
'field' => [
]
]
],
'sourceTable' => [
]
]
]));
$request->setRequestUrl('{{baseUrl}}/v2/:parent/dlpJobs');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v2/:parent/dlpJobs' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"inspectJob": {
"actions": [
{
"deidentify": {
"cloudStorageOutput": "",
"fileTypesToTransform": [],
"transformationConfig": {
"deidentifyTemplate": "",
"imageRedactTemplate": "",
"structuredDeidentifyTemplate": ""
},
"transformationDetailsStorageConfig": {
"table": {
"datasetId": "",
"projectId": "",
"tableId": ""
}
}
},
"jobNotificationEmails": {},
"pubSub": {
"topic": ""
},
"publishFindingsToCloudDataCatalog": {},
"publishSummaryToCscc": {},
"publishToStackdriver": {},
"saveFindings": {
"outputConfig": {
"outputSchema": "",
"table": {}
}
}
}
],
"inspectConfig": {
"contentOptions": [],
"customInfoTypes": [
{
"detectionRules": [
{
"hotwordRule": {
"hotwordRegex": {
"groupIndexes": [],
"pattern": ""
},
"likelihoodAdjustment": {
"fixedLikelihood": "",
"relativeLikelihood": 0
},
"proximity": {
"windowAfter": 0,
"windowBefore": 0
}
}
}
],
"dictionary": {
"cloudStoragePath": {
"path": ""
},
"wordList": {
"words": []
}
},
"exclusionType": "",
"infoType": {
"name": "",
"version": ""
},
"likelihood": "",
"regex": {},
"storedType": {
"createTime": "",
"name": ""
},
"surrogateType": {}
}
],
"excludeInfoTypes": false,
"includeQuote": false,
"infoTypes": [
{}
],
"limits": {
"maxFindingsPerInfoType": [
{
"infoType": {},
"maxFindings": 0
}
],
"maxFindingsPerItem": 0,
"maxFindingsPerRequest": 0
},
"minLikelihood": "",
"ruleSet": [
{
"infoTypes": [
{}
],
"rules": [
{
"exclusionRule": {
"dictionary": {},
"excludeByHotword": {
"hotwordRegex": {},
"proximity": {}
},
"excludeInfoTypes": {
"infoTypes": [
{}
]
},
"matchingType": "",
"regex": {}
},
"hotwordRule": {}
}
]
}
]
},
"inspectTemplateName": "",
"storageConfig": {
"bigQueryOptions": {
"excludedFields": [
{
"name": ""
}
],
"identifyingFields": [
{}
],
"includedFields": [
{}
],
"rowsLimit": "",
"rowsLimitPercent": 0,
"sampleMethod": "",
"tableReference": {}
},
"cloudStorageOptions": {
"bytesLimitPerFile": "",
"bytesLimitPerFilePercent": 0,
"fileSet": {
"regexFileSet": {
"bucketName": "",
"excludeRegex": [],
"includeRegex": []
},
"url": ""
},
"fileTypes": [],
"filesLimitPercent": 0,
"sampleMethod": ""
},
"datastoreOptions": {
"kind": {
"name": ""
},
"partitionId": {
"namespaceId": "",
"projectId": ""
}
},
"hybridOptions": {
"description": "",
"labels": {},
"requiredFindingLabelKeys": [],
"tableOptions": {
"identifyingFields": [
{}
]
}
},
"timespanConfig": {
"enableAutoPopulationOfTimespanConfig": false,
"endTime": "",
"startTime": "",
"timestampField": {}
}
}
},
"jobId": "",
"locationId": "",
"riskJob": {
"actions": [
{}
],
"privacyMetric": {
"categoricalStatsConfig": {
"field": {}
},
"deltaPresenceEstimationConfig": {
"auxiliaryTables": [
{
"quasiIds": [
{
"customTag": "",
"field": {}
}
],
"relativeFrequency": {},
"table": {}
}
],
"quasiIds": [
{
"customTag": "",
"field": {},
"inferred": {},
"infoType": {}
}
],
"regionCode": ""
},
"kAnonymityConfig": {
"entityId": {
"field": {}
},
"quasiIds": [
{}
]
},
"kMapEstimationConfig": {
"auxiliaryTables": [
{
"quasiIds": [
{
"customTag": "",
"field": {}
}
],
"relativeFrequency": {},
"table": {}
}
],
"quasiIds": [
{
"customTag": "",
"field": {},
"inferred": {},
"infoType": {}
}
],
"regionCode": ""
},
"lDiversityConfig": {
"quasiIds": [
{}
],
"sensitiveAttribute": {}
},
"numericalStatsConfig": {
"field": {}
}
},
"sourceTable": {}
}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/:parent/dlpJobs' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"inspectJob": {
"actions": [
{
"deidentify": {
"cloudStorageOutput": "",
"fileTypesToTransform": [],
"transformationConfig": {
"deidentifyTemplate": "",
"imageRedactTemplate": "",
"structuredDeidentifyTemplate": ""
},
"transformationDetailsStorageConfig": {
"table": {
"datasetId": "",
"projectId": "",
"tableId": ""
}
}
},
"jobNotificationEmails": {},
"pubSub": {
"topic": ""
},
"publishFindingsToCloudDataCatalog": {},
"publishSummaryToCscc": {},
"publishToStackdriver": {},
"saveFindings": {
"outputConfig": {
"outputSchema": "",
"table": {}
}
}
}
],
"inspectConfig": {
"contentOptions": [],
"customInfoTypes": [
{
"detectionRules": [
{
"hotwordRule": {
"hotwordRegex": {
"groupIndexes": [],
"pattern": ""
},
"likelihoodAdjustment": {
"fixedLikelihood": "",
"relativeLikelihood": 0
},
"proximity": {
"windowAfter": 0,
"windowBefore": 0
}
}
}
],
"dictionary": {
"cloudStoragePath": {
"path": ""
},
"wordList": {
"words": []
}
},
"exclusionType": "",
"infoType": {
"name": "",
"version": ""
},
"likelihood": "",
"regex": {},
"storedType": {
"createTime": "",
"name": ""
},
"surrogateType": {}
}
],
"excludeInfoTypes": false,
"includeQuote": false,
"infoTypes": [
{}
],
"limits": {
"maxFindingsPerInfoType": [
{
"infoType": {},
"maxFindings": 0
}
],
"maxFindingsPerItem": 0,
"maxFindingsPerRequest": 0
},
"minLikelihood": "",
"ruleSet": [
{
"infoTypes": [
{}
],
"rules": [
{
"exclusionRule": {
"dictionary": {},
"excludeByHotword": {
"hotwordRegex": {},
"proximity": {}
},
"excludeInfoTypes": {
"infoTypes": [
{}
]
},
"matchingType": "",
"regex": {}
},
"hotwordRule": {}
}
]
}
]
},
"inspectTemplateName": "",
"storageConfig": {
"bigQueryOptions": {
"excludedFields": [
{
"name": ""
}
],
"identifyingFields": [
{}
],
"includedFields": [
{}
],
"rowsLimit": "",
"rowsLimitPercent": 0,
"sampleMethod": "",
"tableReference": {}
},
"cloudStorageOptions": {
"bytesLimitPerFile": "",
"bytesLimitPerFilePercent": 0,
"fileSet": {
"regexFileSet": {
"bucketName": "",
"excludeRegex": [],
"includeRegex": []
},
"url": ""
},
"fileTypes": [],
"filesLimitPercent": 0,
"sampleMethod": ""
},
"datastoreOptions": {
"kind": {
"name": ""
},
"partitionId": {
"namespaceId": "",
"projectId": ""
}
},
"hybridOptions": {
"description": "",
"labels": {},
"requiredFindingLabelKeys": [],
"tableOptions": {
"identifyingFields": [
{}
]
}
},
"timespanConfig": {
"enableAutoPopulationOfTimespanConfig": false,
"endTime": "",
"startTime": "",
"timestampField": {}
}
}
},
"jobId": "",
"locationId": "",
"riskJob": {
"actions": [
{}
],
"privacyMetric": {
"categoricalStatsConfig": {
"field": {}
},
"deltaPresenceEstimationConfig": {
"auxiliaryTables": [
{
"quasiIds": [
{
"customTag": "",
"field": {}
}
],
"relativeFrequency": {},
"table": {}
}
],
"quasiIds": [
{
"customTag": "",
"field": {},
"inferred": {},
"infoType": {}
}
],
"regionCode": ""
},
"kAnonymityConfig": {
"entityId": {
"field": {}
},
"quasiIds": [
{}
]
},
"kMapEstimationConfig": {
"auxiliaryTables": [
{
"quasiIds": [
{
"customTag": "",
"field": {}
}
],
"relativeFrequency": {},
"table": {}
}
],
"quasiIds": [
{
"customTag": "",
"field": {},
"inferred": {},
"infoType": {}
}
],
"regionCode": ""
},
"lDiversityConfig": {
"quasiIds": [
{}
],
"sensitiveAttribute": {}
},
"numericalStatsConfig": {
"field": {}
}
},
"sourceTable": {}
}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"inspectJob\": {\n \"actions\": [\n {\n \"deidentify\": {\n \"cloudStorageOutput\": \"\",\n \"fileTypesToTransform\": [],\n \"transformationConfig\": {\n \"deidentifyTemplate\": \"\",\n \"imageRedactTemplate\": \"\",\n \"structuredDeidentifyTemplate\": \"\"\n },\n \"transformationDetailsStorageConfig\": {\n \"table\": {\n \"datasetId\": \"\",\n \"projectId\": \"\",\n \"tableId\": \"\"\n }\n }\n },\n \"jobNotificationEmails\": {},\n \"pubSub\": {\n \"topic\": \"\"\n },\n \"publishFindingsToCloudDataCatalog\": {},\n \"publishSummaryToCscc\": {},\n \"publishToStackdriver\": {},\n \"saveFindings\": {\n \"outputConfig\": {\n \"outputSchema\": \"\",\n \"table\": {}\n }\n }\n }\n ],\n \"inspectConfig\": {\n \"contentOptions\": [],\n \"customInfoTypes\": [\n {\n \"detectionRules\": [\n {\n \"hotwordRule\": {\n \"hotwordRegex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n },\n \"likelihoodAdjustment\": {\n \"fixedLikelihood\": \"\",\n \"relativeLikelihood\": 0\n },\n \"proximity\": {\n \"windowAfter\": 0,\n \"windowBefore\": 0\n }\n }\n }\n ],\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {\n \"words\": []\n }\n },\n \"exclusionType\": \"\",\n \"infoType\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"likelihood\": \"\",\n \"regex\": {},\n \"storedType\": {\n \"createTime\": \"\",\n \"name\": \"\"\n },\n \"surrogateType\": {}\n }\n ],\n \"excludeInfoTypes\": false,\n \"includeQuote\": false,\n \"infoTypes\": [\n {}\n ],\n \"limits\": {\n \"maxFindingsPerInfoType\": [\n {\n \"infoType\": {},\n \"maxFindings\": 0\n }\n ],\n \"maxFindingsPerItem\": 0,\n \"maxFindingsPerRequest\": 0\n },\n \"minLikelihood\": \"\",\n \"ruleSet\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"rules\": [\n {\n \"exclusionRule\": {\n \"dictionary\": {},\n \"excludeByHotword\": {\n \"hotwordRegex\": {},\n \"proximity\": {}\n },\n \"excludeInfoTypes\": {\n \"infoTypes\": [\n {}\n ]\n },\n \"matchingType\": \"\",\n \"regex\": {}\n },\n \"hotwordRule\": {}\n }\n ]\n }\n ]\n },\n \"inspectTemplateName\": \"\",\n \"storageConfig\": {\n \"bigQueryOptions\": {\n \"excludedFields\": [\n {\n \"name\": \"\"\n }\n ],\n \"identifyingFields\": [\n {}\n ],\n \"includedFields\": [\n {}\n ],\n \"rowsLimit\": \"\",\n \"rowsLimitPercent\": 0,\n \"sampleMethod\": \"\",\n \"tableReference\": {}\n },\n \"cloudStorageOptions\": {\n \"bytesLimitPerFile\": \"\",\n \"bytesLimitPerFilePercent\": 0,\n \"fileSet\": {\n \"regexFileSet\": {\n \"bucketName\": \"\",\n \"excludeRegex\": [],\n \"includeRegex\": []\n },\n \"url\": \"\"\n },\n \"fileTypes\": [],\n \"filesLimitPercent\": 0,\n \"sampleMethod\": \"\"\n },\n \"datastoreOptions\": {\n \"kind\": {\n \"name\": \"\"\n },\n \"partitionId\": {\n \"namespaceId\": \"\",\n \"projectId\": \"\"\n }\n },\n \"hybridOptions\": {\n \"description\": \"\",\n \"labels\": {},\n \"requiredFindingLabelKeys\": [],\n \"tableOptions\": {\n \"identifyingFields\": [\n {}\n ]\n }\n },\n \"timespanConfig\": {\n \"enableAutoPopulationOfTimespanConfig\": false,\n \"endTime\": \"\",\n \"startTime\": \"\",\n \"timestampField\": {}\n }\n }\n },\n \"jobId\": \"\",\n \"locationId\": \"\",\n \"riskJob\": {\n \"actions\": [\n {}\n ],\n \"privacyMetric\": {\n \"categoricalStatsConfig\": {\n \"field\": {}\n },\n \"deltaPresenceEstimationConfig\": {\n \"auxiliaryTables\": [\n {\n \"quasiIds\": [\n {\n \"customTag\": \"\",\n \"field\": {}\n }\n ],\n \"relativeFrequency\": {},\n \"table\": {}\n }\n ],\n \"quasiIds\": [\n {\n \"customTag\": \"\",\n \"field\": {},\n \"inferred\": {},\n \"infoType\": {}\n }\n ],\n \"regionCode\": \"\"\n },\n \"kAnonymityConfig\": {\n \"entityId\": {\n \"field\": {}\n },\n \"quasiIds\": [\n {}\n ]\n },\n \"kMapEstimationConfig\": {\n \"auxiliaryTables\": [\n {\n \"quasiIds\": [\n {\n \"customTag\": \"\",\n \"field\": {}\n }\n ],\n \"relativeFrequency\": {},\n \"table\": {}\n }\n ],\n \"quasiIds\": [\n {\n \"customTag\": \"\",\n \"field\": {},\n \"inferred\": {},\n \"infoType\": {}\n }\n ],\n \"regionCode\": \"\"\n },\n \"lDiversityConfig\": {\n \"quasiIds\": [\n {}\n ],\n \"sensitiveAttribute\": {}\n },\n \"numericalStatsConfig\": {\n \"field\": {}\n }\n },\n \"sourceTable\": {}\n }\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v2/:parent/dlpJobs", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/:parent/dlpJobs"
payload = {
"inspectJob": {
"actions": [
{
"deidentify": {
"cloudStorageOutput": "",
"fileTypesToTransform": [],
"transformationConfig": {
"deidentifyTemplate": "",
"imageRedactTemplate": "",
"structuredDeidentifyTemplate": ""
},
"transformationDetailsStorageConfig": { "table": {
"datasetId": "",
"projectId": "",
"tableId": ""
} }
},
"jobNotificationEmails": {},
"pubSub": { "topic": "" },
"publishFindingsToCloudDataCatalog": {},
"publishSummaryToCscc": {},
"publishToStackdriver": {},
"saveFindings": { "outputConfig": {
"outputSchema": "",
"table": {}
} }
}
],
"inspectConfig": {
"contentOptions": [],
"customInfoTypes": [
{
"detectionRules": [{ "hotwordRule": {
"hotwordRegex": {
"groupIndexes": [],
"pattern": ""
},
"likelihoodAdjustment": {
"fixedLikelihood": "",
"relativeLikelihood": 0
},
"proximity": {
"windowAfter": 0,
"windowBefore": 0
}
} }],
"dictionary": {
"cloudStoragePath": { "path": "" },
"wordList": { "words": [] }
},
"exclusionType": "",
"infoType": {
"name": "",
"version": ""
},
"likelihood": "",
"regex": {},
"storedType": {
"createTime": "",
"name": ""
},
"surrogateType": {}
}
],
"excludeInfoTypes": False,
"includeQuote": False,
"infoTypes": [{}],
"limits": {
"maxFindingsPerInfoType": [
{
"infoType": {},
"maxFindings": 0
}
],
"maxFindingsPerItem": 0,
"maxFindingsPerRequest": 0
},
"minLikelihood": "",
"ruleSet": [
{
"infoTypes": [{}],
"rules": [
{
"exclusionRule": {
"dictionary": {},
"excludeByHotword": {
"hotwordRegex": {},
"proximity": {}
},
"excludeInfoTypes": { "infoTypes": [{}] },
"matchingType": "",
"regex": {}
},
"hotwordRule": {}
}
]
}
]
},
"inspectTemplateName": "",
"storageConfig": {
"bigQueryOptions": {
"excludedFields": [{ "name": "" }],
"identifyingFields": [{}],
"includedFields": [{}],
"rowsLimit": "",
"rowsLimitPercent": 0,
"sampleMethod": "",
"tableReference": {}
},
"cloudStorageOptions": {
"bytesLimitPerFile": "",
"bytesLimitPerFilePercent": 0,
"fileSet": {
"regexFileSet": {
"bucketName": "",
"excludeRegex": [],
"includeRegex": []
},
"url": ""
},
"fileTypes": [],
"filesLimitPercent": 0,
"sampleMethod": ""
},
"datastoreOptions": {
"kind": { "name": "" },
"partitionId": {
"namespaceId": "",
"projectId": ""
}
},
"hybridOptions": {
"description": "",
"labels": {},
"requiredFindingLabelKeys": [],
"tableOptions": { "identifyingFields": [{}] }
},
"timespanConfig": {
"enableAutoPopulationOfTimespanConfig": False,
"endTime": "",
"startTime": "",
"timestampField": {}
}
}
},
"jobId": "",
"locationId": "",
"riskJob": {
"actions": [{}],
"privacyMetric": {
"categoricalStatsConfig": { "field": {} },
"deltaPresenceEstimationConfig": {
"auxiliaryTables": [
{
"quasiIds": [
{
"customTag": "",
"field": {}
}
],
"relativeFrequency": {},
"table": {}
}
],
"quasiIds": [
{
"customTag": "",
"field": {},
"inferred": {},
"infoType": {}
}
],
"regionCode": ""
},
"kAnonymityConfig": {
"entityId": { "field": {} },
"quasiIds": [{}]
},
"kMapEstimationConfig": {
"auxiliaryTables": [
{
"quasiIds": [
{
"customTag": "",
"field": {}
}
],
"relativeFrequency": {},
"table": {}
}
],
"quasiIds": [
{
"customTag": "",
"field": {},
"inferred": {},
"infoType": {}
}
],
"regionCode": ""
},
"lDiversityConfig": {
"quasiIds": [{}],
"sensitiveAttribute": {}
},
"numericalStatsConfig": { "field": {} }
},
"sourceTable": {}
}
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/:parent/dlpJobs"
payload <- "{\n \"inspectJob\": {\n \"actions\": [\n {\n \"deidentify\": {\n \"cloudStorageOutput\": \"\",\n \"fileTypesToTransform\": [],\n \"transformationConfig\": {\n \"deidentifyTemplate\": \"\",\n \"imageRedactTemplate\": \"\",\n \"structuredDeidentifyTemplate\": \"\"\n },\n \"transformationDetailsStorageConfig\": {\n \"table\": {\n \"datasetId\": \"\",\n \"projectId\": \"\",\n \"tableId\": \"\"\n }\n }\n },\n \"jobNotificationEmails\": {},\n \"pubSub\": {\n \"topic\": \"\"\n },\n \"publishFindingsToCloudDataCatalog\": {},\n \"publishSummaryToCscc\": {},\n \"publishToStackdriver\": {},\n \"saveFindings\": {\n \"outputConfig\": {\n \"outputSchema\": \"\",\n \"table\": {}\n }\n }\n }\n ],\n \"inspectConfig\": {\n \"contentOptions\": [],\n \"customInfoTypes\": [\n {\n \"detectionRules\": [\n {\n \"hotwordRule\": {\n \"hotwordRegex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n },\n \"likelihoodAdjustment\": {\n \"fixedLikelihood\": \"\",\n \"relativeLikelihood\": 0\n },\n \"proximity\": {\n \"windowAfter\": 0,\n \"windowBefore\": 0\n }\n }\n }\n ],\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {\n \"words\": []\n }\n },\n \"exclusionType\": \"\",\n \"infoType\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"likelihood\": \"\",\n \"regex\": {},\n \"storedType\": {\n \"createTime\": \"\",\n \"name\": \"\"\n },\n \"surrogateType\": {}\n }\n ],\n \"excludeInfoTypes\": false,\n \"includeQuote\": false,\n \"infoTypes\": [\n {}\n ],\n \"limits\": {\n \"maxFindingsPerInfoType\": [\n {\n \"infoType\": {},\n \"maxFindings\": 0\n }\n ],\n \"maxFindingsPerItem\": 0,\n \"maxFindingsPerRequest\": 0\n },\n \"minLikelihood\": \"\",\n \"ruleSet\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"rules\": [\n {\n \"exclusionRule\": {\n \"dictionary\": {},\n \"excludeByHotword\": {\n \"hotwordRegex\": {},\n \"proximity\": {}\n },\n \"excludeInfoTypes\": {\n \"infoTypes\": [\n {}\n ]\n },\n \"matchingType\": \"\",\n \"regex\": {}\n },\n \"hotwordRule\": {}\n }\n ]\n }\n ]\n },\n \"inspectTemplateName\": \"\",\n \"storageConfig\": {\n \"bigQueryOptions\": {\n \"excludedFields\": [\n {\n \"name\": \"\"\n }\n ],\n \"identifyingFields\": [\n {}\n ],\n \"includedFields\": [\n {}\n ],\n \"rowsLimit\": \"\",\n \"rowsLimitPercent\": 0,\n \"sampleMethod\": \"\",\n \"tableReference\": {}\n },\n \"cloudStorageOptions\": {\n \"bytesLimitPerFile\": \"\",\n \"bytesLimitPerFilePercent\": 0,\n \"fileSet\": {\n \"regexFileSet\": {\n \"bucketName\": \"\",\n \"excludeRegex\": [],\n \"includeRegex\": []\n },\n \"url\": \"\"\n },\n \"fileTypes\": [],\n \"filesLimitPercent\": 0,\n \"sampleMethod\": \"\"\n },\n \"datastoreOptions\": {\n \"kind\": {\n \"name\": \"\"\n },\n \"partitionId\": {\n \"namespaceId\": \"\",\n \"projectId\": \"\"\n }\n },\n \"hybridOptions\": {\n \"description\": \"\",\n \"labels\": {},\n \"requiredFindingLabelKeys\": [],\n \"tableOptions\": {\n \"identifyingFields\": [\n {}\n ]\n }\n },\n \"timespanConfig\": {\n \"enableAutoPopulationOfTimespanConfig\": false,\n \"endTime\": \"\",\n \"startTime\": \"\",\n \"timestampField\": {}\n }\n }\n },\n \"jobId\": \"\",\n \"locationId\": \"\",\n \"riskJob\": {\n \"actions\": [\n {}\n ],\n \"privacyMetric\": {\n \"categoricalStatsConfig\": {\n \"field\": {}\n },\n \"deltaPresenceEstimationConfig\": {\n \"auxiliaryTables\": [\n {\n \"quasiIds\": [\n {\n \"customTag\": \"\",\n \"field\": {}\n }\n ],\n \"relativeFrequency\": {},\n \"table\": {}\n }\n ],\n \"quasiIds\": [\n {\n \"customTag\": \"\",\n \"field\": {},\n \"inferred\": {},\n \"infoType\": {}\n }\n ],\n \"regionCode\": \"\"\n },\n \"kAnonymityConfig\": {\n \"entityId\": {\n \"field\": {}\n },\n \"quasiIds\": [\n {}\n ]\n },\n \"kMapEstimationConfig\": {\n \"auxiliaryTables\": [\n {\n \"quasiIds\": [\n {\n \"customTag\": \"\",\n \"field\": {}\n }\n ],\n \"relativeFrequency\": {},\n \"table\": {}\n }\n ],\n \"quasiIds\": [\n {\n \"customTag\": \"\",\n \"field\": {},\n \"inferred\": {},\n \"infoType\": {}\n }\n ],\n \"regionCode\": \"\"\n },\n \"lDiversityConfig\": {\n \"quasiIds\": [\n {}\n ],\n \"sensitiveAttribute\": {}\n },\n \"numericalStatsConfig\": {\n \"field\": {}\n }\n },\n \"sourceTable\": {}\n }\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/:parent/dlpJobs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"inspectJob\": {\n \"actions\": [\n {\n \"deidentify\": {\n \"cloudStorageOutput\": \"\",\n \"fileTypesToTransform\": [],\n \"transformationConfig\": {\n \"deidentifyTemplate\": \"\",\n \"imageRedactTemplate\": \"\",\n \"structuredDeidentifyTemplate\": \"\"\n },\n \"transformationDetailsStorageConfig\": {\n \"table\": {\n \"datasetId\": \"\",\n \"projectId\": \"\",\n \"tableId\": \"\"\n }\n }\n },\n \"jobNotificationEmails\": {},\n \"pubSub\": {\n \"topic\": \"\"\n },\n \"publishFindingsToCloudDataCatalog\": {},\n \"publishSummaryToCscc\": {},\n \"publishToStackdriver\": {},\n \"saveFindings\": {\n \"outputConfig\": {\n \"outputSchema\": \"\",\n \"table\": {}\n }\n }\n }\n ],\n \"inspectConfig\": {\n \"contentOptions\": [],\n \"customInfoTypes\": [\n {\n \"detectionRules\": [\n {\n \"hotwordRule\": {\n \"hotwordRegex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n },\n \"likelihoodAdjustment\": {\n \"fixedLikelihood\": \"\",\n \"relativeLikelihood\": 0\n },\n \"proximity\": {\n \"windowAfter\": 0,\n \"windowBefore\": 0\n }\n }\n }\n ],\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {\n \"words\": []\n }\n },\n \"exclusionType\": \"\",\n \"infoType\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"likelihood\": \"\",\n \"regex\": {},\n \"storedType\": {\n \"createTime\": \"\",\n \"name\": \"\"\n },\n \"surrogateType\": {}\n }\n ],\n \"excludeInfoTypes\": false,\n \"includeQuote\": false,\n \"infoTypes\": [\n {}\n ],\n \"limits\": {\n \"maxFindingsPerInfoType\": [\n {\n \"infoType\": {},\n \"maxFindings\": 0\n }\n ],\n \"maxFindingsPerItem\": 0,\n \"maxFindingsPerRequest\": 0\n },\n \"minLikelihood\": \"\",\n \"ruleSet\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"rules\": [\n {\n \"exclusionRule\": {\n \"dictionary\": {},\n \"excludeByHotword\": {\n \"hotwordRegex\": {},\n \"proximity\": {}\n },\n \"excludeInfoTypes\": {\n \"infoTypes\": [\n {}\n ]\n },\n \"matchingType\": \"\",\n \"regex\": {}\n },\n \"hotwordRule\": {}\n }\n ]\n }\n ]\n },\n \"inspectTemplateName\": \"\",\n \"storageConfig\": {\n \"bigQueryOptions\": {\n \"excludedFields\": [\n {\n \"name\": \"\"\n }\n ],\n \"identifyingFields\": [\n {}\n ],\n \"includedFields\": [\n {}\n ],\n \"rowsLimit\": \"\",\n \"rowsLimitPercent\": 0,\n \"sampleMethod\": \"\",\n \"tableReference\": {}\n },\n \"cloudStorageOptions\": {\n \"bytesLimitPerFile\": \"\",\n \"bytesLimitPerFilePercent\": 0,\n \"fileSet\": {\n \"regexFileSet\": {\n \"bucketName\": \"\",\n \"excludeRegex\": [],\n \"includeRegex\": []\n },\n \"url\": \"\"\n },\n \"fileTypes\": [],\n \"filesLimitPercent\": 0,\n \"sampleMethod\": \"\"\n },\n \"datastoreOptions\": {\n \"kind\": {\n \"name\": \"\"\n },\n \"partitionId\": {\n \"namespaceId\": \"\",\n \"projectId\": \"\"\n }\n },\n \"hybridOptions\": {\n \"description\": \"\",\n \"labels\": {},\n \"requiredFindingLabelKeys\": [],\n \"tableOptions\": {\n \"identifyingFields\": [\n {}\n ]\n }\n },\n \"timespanConfig\": {\n \"enableAutoPopulationOfTimespanConfig\": false,\n \"endTime\": \"\",\n \"startTime\": \"\",\n \"timestampField\": {}\n }\n }\n },\n \"jobId\": \"\",\n \"locationId\": \"\",\n \"riskJob\": {\n \"actions\": [\n {}\n ],\n \"privacyMetric\": {\n \"categoricalStatsConfig\": {\n \"field\": {}\n },\n \"deltaPresenceEstimationConfig\": {\n \"auxiliaryTables\": [\n {\n \"quasiIds\": [\n {\n \"customTag\": \"\",\n \"field\": {}\n }\n ],\n \"relativeFrequency\": {},\n \"table\": {}\n }\n ],\n \"quasiIds\": [\n {\n \"customTag\": \"\",\n \"field\": {},\n \"inferred\": {},\n \"infoType\": {}\n }\n ],\n \"regionCode\": \"\"\n },\n \"kAnonymityConfig\": {\n \"entityId\": {\n \"field\": {}\n },\n \"quasiIds\": [\n {}\n ]\n },\n \"kMapEstimationConfig\": {\n \"auxiliaryTables\": [\n {\n \"quasiIds\": [\n {\n \"customTag\": \"\",\n \"field\": {}\n }\n ],\n \"relativeFrequency\": {},\n \"table\": {}\n }\n ],\n \"quasiIds\": [\n {\n \"customTag\": \"\",\n \"field\": {},\n \"inferred\": {},\n \"infoType\": {}\n }\n ],\n \"regionCode\": \"\"\n },\n \"lDiversityConfig\": {\n \"quasiIds\": [\n {}\n ],\n \"sensitiveAttribute\": {}\n },\n \"numericalStatsConfig\": {\n \"field\": {}\n }\n },\n \"sourceTable\": {}\n }\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/v2/:parent/dlpJobs') do |req|
req.body = "{\n \"inspectJob\": {\n \"actions\": [\n {\n \"deidentify\": {\n \"cloudStorageOutput\": \"\",\n \"fileTypesToTransform\": [],\n \"transformationConfig\": {\n \"deidentifyTemplate\": \"\",\n \"imageRedactTemplate\": \"\",\n \"structuredDeidentifyTemplate\": \"\"\n },\n \"transformationDetailsStorageConfig\": {\n \"table\": {\n \"datasetId\": \"\",\n \"projectId\": \"\",\n \"tableId\": \"\"\n }\n }\n },\n \"jobNotificationEmails\": {},\n \"pubSub\": {\n \"topic\": \"\"\n },\n \"publishFindingsToCloudDataCatalog\": {},\n \"publishSummaryToCscc\": {},\n \"publishToStackdriver\": {},\n \"saveFindings\": {\n \"outputConfig\": {\n \"outputSchema\": \"\",\n \"table\": {}\n }\n }\n }\n ],\n \"inspectConfig\": {\n \"contentOptions\": [],\n \"customInfoTypes\": [\n {\n \"detectionRules\": [\n {\n \"hotwordRule\": {\n \"hotwordRegex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n },\n \"likelihoodAdjustment\": {\n \"fixedLikelihood\": \"\",\n \"relativeLikelihood\": 0\n },\n \"proximity\": {\n \"windowAfter\": 0,\n \"windowBefore\": 0\n }\n }\n }\n ],\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {\n \"words\": []\n }\n },\n \"exclusionType\": \"\",\n \"infoType\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"likelihood\": \"\",\n \"regex\": {},\n \"storedType\": {\n \"createTime\": \"\",\n \"name\": \"\"\n },\n \"surrogateType\": {}\n }\n ],\n \"excludeInfoTypes\": false,\n \"includeQuote\": false,\n \"infoTypes\": [\n {}\n ],\n \"limits\": {\n \"maxFindingsPerInfoType\": [\n {\n \"infoType\": {},\n \"maxFindings\": 0\n }\n ],\n \"maxFindingsPerItem\": 0,\n \"maxFindingsPerRequest\": 0\n },\n \"minLikelihood\": \"\",\n \"ruleSet\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"rules\": [\n {\n \"exclusionRule\": {\n \"dictionary\": {},\n \"excludeByHotword\": {\n \"hotwordRegex\": {},\n \"proximity\": {}\n },\n \"excludeInfoTypes\": {\n \"infoTypes\": [\n {}\n ]\n },\n \"matchingType\": \"\",\n \"regex\": {}\n },\n \"hotwordRule\": {}\n }\n ]\n }\n ]\n },\n \"inspectTemplateName\": \"\",\n \"storageConfig\": {\n \"bigQueryOptions\": {\n \"excludedFields\": [\n {\n \"name\": \"\"\n }\n ],\n \"identifyingFields\": [\n {}\n ],\n \"includedFields\": [\n {}\n ],\n \"rowsLimit\": \"\",\n \"rowsLimitPercent\": 0,\n \"sampleMethod\": \"\",\n \"tableReference\": {}\n },\n \"cloudStorageOptions\": {\n \"bytesLimitPerFile\": \"\",\n \"bytesLimitPerFilePercent\": 0,\n \"fileSet\": {\n \"regexFileSet\": {\n \"bucketName\": \"\",\n \"excludeRegex\": [],\n \"includeRegex\": []\n },\n \"url\": \"\"\n },\n \"fileTypes\": [],\n \"filesLimitPercent\": 0,\n \"sampleMethod\": \"\"\n },\n \"datastoreOptions\": {\n \"kind\": {\n \"name\": \"\"\n },\n \"partitionId\": {\n \"namespaceId\": \"\",\n \"projectId\": \"\"\n }\n },\n \"hybridOptions\": {\n \"description\": \"\",\n \"labels\": {},\n \"requiredFindingLabelKeys\": [],\n \"tableOptions\": {\n \"identifyingFields\": [\n {}\n ]\n }\n },\n \"timespanConfig\": {\n \"enableAutoPopulationOfTimespanConfig\": false,\n \"endTime\": \"\",\n \"startTime\": \"\",\n \"timestampField\": {}\n }\n }\n },\n \"jobId\": \"\",\n \"locationId\": \"\",\n \"riskJob\": {\n \"actions\": [\n {}\n ],\n \"privacyMetric\": {\n \"categoricalStatsConfig\": {\n \"field\": {}\n },\n \"deltaPresenceEstimationConfig\": {\n \"auxiliaryTables\": [\n {\n \"quasiIds\": [\n {\n \"customTag\": \"\",\n \"field\": {}\n }\n ],\n \"relativeFrequency\": {},\n \"table\": {}\n }\n ],\n \"quasiIds\": [\n {\n \"customTag\": \"\",\n \"field\": {},\n \"inferred\": {},\n \"infoType\": {}\n }\n ],\n \"regionCode\": \"\"\n },\n \"kAnonymityConfig\": {\n \"entityId\": {\n \"field\": {}\n },\n \"quasiIds\": [\n {}\n ]\n },\n \"kMapEstimationConfig\": {\n \"auxiliaryTables\": [\n {\n \"quasiIds\": [\n {\n \"customTag\": \"\",\n \"field\": {}\n }\n ],\n \"relativeFrequency\": {},\n \"table\": {}\n }\n ],\n \"quasiIds\": [\n {\n \"customTag\": \"\",\n \"field\": {},\n \"inferred\": {},\n \"infoType\": {}\n }\n ],\n \"regionCode\": \"\"\n },\n \"lDiversityConfig\": {\n \"quasiIds\": [\n {}\n ],\n \"sensitiveAttribute\": {}\n },\n \"numericalStatsConfig\": {\n \"field\": {}\n }\n },\n \"sourceTable\": {}\n }\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v2/:parent/dlpJobs";
let payload = json!({
"inspectJob": json!({
"actions": (
json!({
"deidentify": json!({
"cloudStorageOutput": "",
"fileTypesToTransform": (),
"transformationConfig": json!({
"deidentifyTemplate": "",
"imageRedactTemplate": "",
"structuredDeidentifyTemplate": ""
}),
"transformationDetailsStorageConfig": json!({"table": json!({
"datasetId": "",
"projectId": "",
"tableId": ""
})})
}),
"jobNotificationEmails": json!({}),
"pubSub": json!({"topic": ""}),
"publishFindingsToCloudDataCatalog": json!({}),
"publishSummaryToCscc": json!({}),
"publishToStackdriver": json!({}),
"saveFindings": json!({"outputConfig": json!({
"outputSchema": "",
"table": json!({})
})})
})
),
"inspectConfig": json!({
"contentOptions": (),
"customInfoTypes": (
json!({
"detectionRules": (json!({"hotwordRule": json!({
"hotwordRegex": json!({
"groupIndexes": (),
"pattern": ""
}),
"likelihoodAdjustment": json!({
"fixedLikelihood": "",
"relativeLikelihood": 0
}),
"proximity": json!({
"windowAfter": 0,
"windowBefore": 0
})
})})),
"dictionary": json!({
"cloudStoragePath": json!({"path": ""}),
"wordList": json!({"words": ()})
}),
"exclusionType": "",
"infoType": json!({
"name": "",
"version": ""
}),
"likelihood": "",
"regex": json!({}),
"storedType": json!({
"createTime": "",
"name": ""
}),
"surrogateType": json!({})
})
),
"excludeInfoTypes": false,
"includeQuote": false,
"infoTypes": (json!({})),
"limits": json!({
"maxFindingsPerInfoType": (
json!({
"infoType": json!({}),
"maxFindings": 0
})
),
"maxFindingsPerItem": 0,
"maxFindingsPerRequest": 0
}),
"minLikelihood": "",
"ruleSet": (
json!({
"infoTypes": (json!({})),
"rules": (
json!({
"exclusionRule": json!({
"dictionary": json!({}),
"excludeByHotword": json!({
"hotwordRegex": json!({}),
"proximity": json!({})
}),
"excludeInfoTypes": json!({"infoTypes": (json!({}))}),
"matchingType": "",
"regex": json!({})
}),
"hotwordRule": json!({})
})
)
})
)
}),
"inspectTemplateName": "",
"storageConfig": json!({
"bigQueryOptions": json!({
"excludedFields": (json!({"name": ""})),
"identifyingFields": (json!({})),
"includedFields": (json!({})),
"rowsLimit": "",
"rowsLimitPercent": 0,
"sampleMethod": "",
"tableReference": json!({})
}),
"cloudStorageOptions": json!({
"bytesLimitPerFile": "",
"bytesLimitPerFilePercent": 0,
"fileSet": json!({
"regexFileSet": json!({
"bucketName": "",
"excludeRegex": (),
"includeRegex": ()
}),
"url": ""
}),
"fileTypes": (),
"filesLimitPercent": 0,
"sampleMethod": ""
}),
"datastoreOptions": json!({
"kind": json!({"name": ""}),
"partitionId": json!({
"namespaceId": "",
"projectId": ""
})
}),
"hybridOptions": json!({
"description": "",
"labels": json!({}),
"requiredFindingLabelKeys": (),
"tableOptions": json!({"identifyingFields": (json!({}))})
}),
"timespanConfig": json!({
"enableAutoPopulationOfTimespanConfig": false,
"endTime": "",
"startTime": "",
"timestampField": json!({})
})
})
}),
"jobId": "",
"locationId": "",
"riskJob": json!({
"actions": (json!({})),
"privacyMetric": json!({
"categoricalStatsConfig": json!({"field": json!({})}),
"deltaPresenceEstimationConfig": json!({
"auxiliaryTables": (
json!({
"quasiIds": (
json!({
"customTag": "",
"field": json!({})
})
),
"relativeFrequency": json!({}),
"table": json!({})
})
),
"quasiIds": (
json!({
"customTag": "",
"field": json!({}),
"inferred": json!({}),
"infoType": json!({})
})
),
"regionCode": ""
}),
"kAnonymityConfig": json!({
"entityId": json!({"field": json!({})}),
"quasiIds": (json!({}))
}),
"kMapEstimationConfig": json!({
"auxiliaryTables": (
json!({
"quasiIds": (
json!({
"customTag": "",
"field": json!({})
})
),
"relativeFrequency": json!({}),
"table": json!({})
})
),
"quasiIds": (
json!({
"customTag": "",
"field": json!({}),
"inferred": json!({}),
"infoType": json!({})
})
),
"regionCode": ""
}),
"lDiversityConfig": json!({
"quasiIds": (json!({})),
"sensitiveAttribute": json!({})
}),
"numericalStatsConfig": json!({"field": json!({})})
}),
"sourceTable": json!({})
})
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/v2/:parent/dlpJobs \
--header 'content-type: application/json' \
--data '{
"inspectJob": {
"actions": [
{
"deidentify": {
"cloudStorageOutput": "",
"fileTypesToTransform": [],
"transformationConfig": {
"deidentifyTemplate": "",
"imageRedactTemplate": "",
"structuredDeidentifyTemplate": ""
},
"transformationDetailsStorageConfig": {
"table": {
"datasetId": "",
"projectId": "",
"tableId": ""
}
}
},
"jobNotificationEmails": {},
"pubSub": {
"topic": ""
},
"publishFindingsToCloudDataCatalog": {},
"publishSummaryToCscc": {},
"publishToStackdriver": {},
"saveFindings": {
"outputConfig": {
"outputSchema": "",
"table": {}
}
}
}
],
"inspectConfig": {
"contentOptions": [],
"customInfoTypes": [
{
"detectionRules": [
{
"hotwordRule": {
"hotwordRegex": {
"groupIndexes": [],
"pattern": ""
},
"likelihoodAdjustment": {
"fixedLikelihood": "",
"relativeLikelihood": 0
},
"proximity": {
"windowAfter": 0,
"windowBefore": 0
}
}
}
],
"dictionary": {
"cloudStoragePath": {
"path": ""
},
"wordList": {
"words": []
}
},
"exclusionType": "",
"infoType": {
"name": "",
"version": ""
},
"likelihood": "",
"regex": {},
"storedType": {
"createTime": "",
"name": ""
},
"surrogateType": {}
}
],
"excludeInfoTypes": false,
"includeQuote": false,
"infoTypes": [
{}
],
"limits": {
"maxFindingsPerInfoType": [
{
"infoType": {},
"maxFindings": 0
}
],
"maxFindingsPerItem": 0,
"maxFindingsPerRequest": 0
},
"minLikelihood": "",
"ruleSet": [
{
"infoTypes": [
{}
],
"rules": [
{
"exclusionRule": {
"dictionary": {},
"excludeByHotword": {
"hotwordRegex": {},
"proximity": {}
},
"excludeInfoTypes": {
"infoTypes": [
{}
]
},
"matchingType": "",
"regex": {}
},
"hotwordRule": {}
}
]
}
]
},
"inspectTemplateName": "",
"storageConfig": {
"bigQueryOptions": {
"excludedFields": [
{
"name": ""
}
],
"identifyingFields": [
{}
],
"includedFields": [
{}
],
"rowsLimit": "",
"rowsLimitPercent": 0,
"sampleMethod": "",
"tableReference": {}
},
"cloudStorageOptions": {
"bytesLimitPerFile": "",
"bytesLimitPerFilePercent": 0,
"fileSet": {
"regexFileSet": {
"bucketName": "",
"excludeRegex": [],
"includeRegex": []
},
"url": ""
},
"fileTypes": [],
"filesLimitPercent": 0,
"sampleMethod": ""
},
"datastoreOptions": {
"kind": {
"name": ""
},
"partitionId": {
"namespaceId": "",
"projectId": ""
}
},
"hybridOptions": {
"description": "",
"labels": {},
"requiredFindingLabelKeys": [],
"tableOptions": {
"identifyingFields": [
{}
]
}
},
"timespanConfig": {
"enableAutoPopulationOfTimespanConfig": false,
"endTime": "",
"startTime": "",
"timestampField": {}
}
}
},
"jobId": "",
"locationId": "",
"riskJob": {
"actions": [
{}
],
"privacyMetric": {
"categoricalStatsConfig": {
"field": {}
},
"deltaPresenceEstimationConfig": {
"auxiliaryTables": [
{
"quasiIds": [
{
"customTag": "",
"field": {}
}
],
"relativeFrequency": {},
"table": {}
}
],
"quasiIds": [
{
"customTag": "",
"field": {},
"inferred": {},
"infoType": {}
}
],
"regionCode": ""
},
"kAnonymityConfig": {
"entityId": {
"field": {}
},
"quasiIds": [
{}
]
},
"kMapEstimationConfig": {
"auxiliaryTables": [
{
"quasiIds": [
{
"customTag": "",
"field": {}
}
],
"relativeFrequency": {},
"table": {}
}
],
"quasiIds": [
{
"customTag": "",
"field": {},
"inferred": {},
"infoType": {}
}
],
"regionCode": ""
},
"lDiversityConfig": {
"quasiIds": [
{}
],
"sensitiveAttribute": {}
},
"numericalStatsConfig": {
"field": {}
}
},
"sourceTable": {}
}
}'
echo '{
"inspectJob": {
"actions": [
{
"deidentify": {
"cloudStorageOutput": "",
"fileTypesToTransform": [],
"transformationConfig": {
"deidentifyTemplate": "",
"imageRedactTemplate": "",
"structuredDeidentifyTemplate": ""
},
"transformationDetailsStorageConfig": {
"table": {
"datasetId": "",
"projectId": "",
"tableId": ""
}
}
},
"jobNotificationEmails": {},
"pubSub": {
"topic": ""
},
"publishFindingsToCloudDataCatalog": {},
"publishSummaryToCscc": {},
"publishToStackdriver": {},
"saveFindings": {
"outputConfig": {
"outputSchema": "",
"table": {}
}
}
}
],
"inspectConfig": {
"contentOptions": [],
"customInfoTypes": [
{
"detectionRules": [
{
"hotwordRule": {
"hotwordRegex": {
"groupIndexes": [],
"pattern": ""
},
"likelihoodAdjustment": {
"fixedLikelihood": "",
"relativeLikelihood": 0
},
"proximity": {
"windowAfter": 0,
"windowBefore": 0
}
}
}
],
"dictionary": {
"cloudStoragePath": {
"path": ""
},
"wordList": {
"words": []
}
},
"exclusionType": "",
"infoType": {
"name": "",
"version": ""
},
"likelihood": "",
"regex": {},
"storedType": {
"createTime": "",
"name": ""
},
"surrogateType": {}
}
],
"excludeInfoTypes": false,
"includeQuote": false,
"infoTypes": [
{}
],
"limits": {
"maxFindingsPerInfoType": [
{
"infoType": {},
"maxFindings": 0
}
],
"maxFindingsPerItem": 0,
"maxFindingsPerRequest": 0
},
"minLikelihood": "",
"ruleSet": [
{
"infoTypes": [
{}
],
"rules": [
{
"exclusionRule": {
"dictionary": {},
"excludeByHotword": {
"hotwordRegex": {},
"proximity": {}
},
"excludeInfoTypes": {
"infoTypes": [
{}
]
},
"matchingType": "",
"regex": {}
},
"hotwordRule": {}
}
]
}
]
},
"inspectTemplateName": "",
"storageConfig": {
"bigQueryOptions": {
"excludedFields": [
{
"name": ""
}
],
"identifyingFields": [
{}
],
"includedFields": [
{}
],
"rowsLimit": "",
"rowsLimitPercent": 0,
"sampleMethod": "",
"tableReference": {}
},
"cloudStorageOptions": {
"bytesLimitPerFile": "",
"bytesLimitPerFilePercent": 0,
"fileSet": {
"regexFileSet": {
"bucketName": "",
"excludeRegex": [],
"includeRegex": []
},
"url": ""
},
"fileTypes": [],
"filesLimitPercent": 0,
"sampleMethod": ""
},
"datastoreOptions": {
"kind": {
"name": ""
},
"partitionId": {
"namespaceId": "",
"projectId": ""
}
},
"hybridOptions": {
"description": "",
"labels": {},
"requiredFindingLabelKeys": [],
"tableOptions": {
"identifyingFields": [
{}
]
}
},
"timespanConfig": {
"enableAutoPopulationOfTimespanConfig": false,
"endTime": "",
"startTime": "",
"timestampField": {}
}
}
},
"jobId": "",
"locationId": "",
"riskJob": {
"actions": [
{}
],
"privacyMetric": {
"categoricalStatsConfig": {
"field": {}
},
"deltaPresenceEstimationConfig": {
"auxiliaryTables": [
{
"quasiIds": [
{
"customTag": "",
"field": {}
}
],
"relativeFrequency": {},
"table": {}
}
],
"quasiIds": [
{
"customTag": "",
"field": {},
"inferred": {},
"infoType": {}
}
],
"regionCode": ""
},
"kAnonymityConfig": {
"entityId": {
"field": {}
},
"quasiIds": [
{}
]
},
"kMapEstimationConfig": {
"auxiliaryTables": [
{
"quasiIds": [
{
"customTag": "",
"field": {}
}
],
"relativeFrequency": {},
"table": {}
}
],
"quasiIds": [
{
"customTag": "",
"field": {},
"inferred": {},
"infoType": {}
}
],
"regionCode": ""
},
"lDiversityConfig": {
"quasiIds": [
{}
],
"sensitiveAttribute": {}
},
"numericalStatsConfig": {
"field": {}
}
},
"sourceTable": {}
}
}' | \
http POST {{baseUrl}}/v2/:parent/dlpJobs \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "inspectJob": {\n "actions": [\n {\n "deidentify": {\n "cloudStorageOutput": "",\n "fileTypesToTransform": [],\n "transformationConfig": {\n "deidentifyTemplate": "",\n "imageRedactTemplate": "",\n "structuredDeidentifyTemplate": ""\n },\n "transformationDetailsStorageConfig": {\n "table": {\n "datasetId": "",\n "projectId": "",\n "tableId": ""\n }\n }\n },\n "jobNotificationEmails": {},\n "pubSub": {\n "topic": ""\n },\n "publishFindingsToCloudDataCatalog": {},\n "publishSummaryToCscc": {},\n "publishToStackdriver": {},\n "saveFindings": {\n "outputConfig": {\n "outputSchema": "",\n "table": {}\n }\n }\n }\n ],\n "inspectConfig": {\n "contentOptions": [],\n "customInfoTypes": [\n {\n "detectionRules": [\n {\n "hotwordRule": {\n "hotwordRegex": {\n "groupIndexes": [],\n "pattern": ""\n },\n "likelihoodAdjustment": {\n "fixedLikelihood": "",\n "relativeLikelihood": 0\n },\n "proximity": {\n "windowAfter": 0,\n "windowBefore": 0\n }\n }\n }\n ],\n "dictionary": {\n "cloudStoragePath": {\n "path": ""\n },\n "wordList": {\n "words": []\n }\n },\n "exclusionType": "",\n "infoType": {\n "name": "",\n "version": ""\n },\n "likelihood": "",\n "regex": {},\n "storedType": {\n "createTime": "",\n "name": ""\n },\n "surrogateType": {}\n }\n ],\n "excludeInfoTypes": false,\n "includeQuote": false,\n "infoTypes": [\n {}\n ],\n "limits": {\n "maxFindingsPerInfoType": [\n {\n "infoType": {},\n "maxFindings": 0\n }\n ],\n "maxFindingsPerItem": 0,\n "maxFindingsPerRequest": 0\n },\n "minLikelihood": "",\n "ruleSet": [\n {\n "infoTypes": [\n {}\n ],\n "rules": [\n {\n "exclusionRule": {\n "dictionary": {},\n "excludeByHotword": {\n "hotwordRegex": {},\n "proximity": {}\n },\n "excludeInfoTypes": {\n "infoTypes": [\n {}\n ]\n },\n "matchingType": "",\n "regex": {}\n },\n "hotwordRule": {}\n }\n ]\n }\n ]\n },\n "inspectTemplateName": "",\n "storageConfig": {\n "bigQueryOptions": {\n "excludedFields": [\n {\n "name": ""\n }\n ],\n "identifyingFields": [\n {}\n ],\n "includedFields": [\n {}\n ],\n "rowsLimit": "",\n "rowsLimitPercent": 0,\n "sampleMethod": "",\n "tableReference": {}\n },\n "cloudStorageOptions": {\n "bytesLimitPerFile": "",\n "bytesLimitPerFilePercent": 0,\n "fileSet": {\n "regexFileSet": {\n "bucketName": "",\n "excludeRegex": [],\n "includeRegex": []\n },\n "url": ""\n },\n "fileTypes": [],\n "filesLimitPercent": 0,\n "sampleMethod": ""\n },\n "datastoreOptions": {\n "kind": {\n "name": ""\n },\n "partitionId": {\n "namespaceId": "",\n "projectId": ""\n }\n },\n "hybridOptions": {\n "description": "",\n "labels": {},\n "requiredFindingLabelKeys": [],\n "tableOptions": {\n "identifyingFields": [\n {}\n ]\n }\n },\n "timespanConfig": {\n "enableAutoPopulationOfTimespanConfig": false,\n "endTime": "",\n "startTime": "",\n "timestampField": {}\n }\n }\n },\n "jobId": "",\n "locationId": "",\n "riskJob": {\n "actions": [\n {}\n ],\n "privacyMetric": {\n "categoricalStatsConfig": {\n "field": {}\n },\n "deltaPresenceEstimationConfig": {\n "auxiliaryTables": [\n {\n "quasiIds": [\n {\n "customTag": "",\n "field": {}\n }\n ],\n "relativeFrequency": {},\n "table": {}\n }\n ],\n "quasiIds": [\n {\n "customTag": "",\n "field": {},\n "inferred": {},\n "infoType": {}\n }\n ],\n "regionCode": ""\n },\n "kAnonymityConfig": {\n "entityId": {\n "field": {}\n },\n "quasiIds": [\n {}\n ]\n },\n "kMapEstimationConfig": {\n "auxiliaryTables": [\n {\n "quasiIds": [\n {\n "customTag": "",\n "field": {}\n }\n ],\n "relativeFrequency": {},\n "table": {}\n }\n ],\n "quasiIds": [\n {\n "customTag": "",\n "field": {},\n "inferred": {},\n "infoType": {}\n }\n ],\n "regionCode": ""\n },\n "lDiversityConfig": {\n "quasiIds": [\n {}\n ],\n "sensitiveAttribute": {}\n },\n "numericalStatsConfig": {\n "field": {}\n }\n },\n "sourceTable": {}\n }\n}' \
--output-document \
- {{baseUrl}}/v2/:parent/dlpJobs
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"inspectJob": [
"actions": [
[
"deidentify": [
"cloudStorageOutput": "",
"fileTypesToTransform": [],
"transformationConfig": [
"deidentifyTemplate": "",
"imageRedactTemplate": "",
"structuredDeidentifyTemplate": ""
],
"transformationDetailsStorageConfig": ["table": [
"datasetId": "",
"projectId": "",
"tableId": ""
]]
],
"jobNotificationEmails": [],
"pubSub": ["topic": ""],
"publishFindingsToCloudDataCatalog": [],
"publishSummaryToCscc": [],
"publishToStackdriver": [],
"saveFindings": ["outputConfig": [
"outputSchema": "",
"table": []
]]
]
],
"inspectConfig": [
"contentOptions": [],
"customInfoTypes": [
[
"detectionRules": [["hotwordRule": [
"hotwordRegex": [
"groupIndexes": [],
"pattern": ""
],
"likelihoodAdjustment": [
"fixedLikelihood": "",
"relativeLikelihood": 0
],
"proximity": [
"windowAfter": 0,
"windowBefore": 0
]
]]],
"dictionary": [
"cloudStoragePath": ["path": ""],
"wordList": ["words": []]
],
"exclusionType": "",
"infoType": [
"name": "",
"version": ""
],
"likelihood": "",
"regex": [],
"storedType": [
"createTime": "",
"name": ""
],
"surrogateType": []
]
],
"excludeInfoTypes": false,
"includeQuote": false,
"infoTypes": [[]],
"limits": [
"maxFindingsPerInfoType": [
[
"infoType": [],
"maxFindings": 0
]
],
"maxFindingsPerItem": 0,
"maxFindingsPerRequest": 0
],
"minLikelihood": "",
"ruleSet": [
[
"infoTypes": [[]],
"rules": [
[
"exclusionRule": [
"dictionary": [],
"excludeByHotword": [
"hotwordRegex": [],
"proximity": []
],
"excludeInfoTypes": ["infoTypes": [[]]],
"matchingType": "",
"regex": []
],
"hotwordRule": []
]
]
]
]
],
"inspectTemplateName": "",
"storageConfig": [
"bigQueryOptions": [
"excludedFields": [["name": ""]],
"identifyingFields": [[]],
"includedFields": [[]],
"rowsLimit": "",
"rowsLimitPercent": 0,
"sampleMethod": "",
"tableReference": []
],
"cloudStorageOptions": [
"bytesLimitPerFile": "",
"bytesLimitPerFilePercent": 0,
"fileSet": [
"regexFileSet": [
"bucketName": "",
"excludeRegex": [],
"includeRegex": []
],
"url": ""
],
"fileTypes": [],
"filesLimitPercent": 0,
"sampleMethod": ""
],
"datastoreOptions": [
"kind": ["name": ""],
"partitionId": [
"namespaceId": "",
"projectId": ""
]
],
"hybridOptions": [
"description": "",
"labels": [],
"requiredFindingLabelKeys": [],
"tableOptions": ["identifyingFields": [[]]]
],
"timespanConfig": [
"enableAutoPopulationOfTimespanConfig": false,
"endTime": "",
"startTime": "",
"timestampField": []
]
]
],
"jobId": "",
"locationId": "",
"riskJob": [
"actions": [[]],
"privacyMetric": [
"categoricalStatsConfig": ["field": []],
"deltaPresenceEstimationConfig": [
"auxiliaryTables": [
[
"quasiIds": [
[
"customTag": "",
"field": []
]
],
"relativeFrequency": [],
"table": []
]
],
"quasiIds": [
[
"customTag": "",
"field": [],
"inferred": [],
"infoType": []
]
],
"regionCode": ""
],
"kAnonymityConfig": [
"entityId": ["field": []],
"quasiIds": [[]]
],
"kMapEstimationConfig": [
"auxiliaryTables": [
[
"quasiIds": [
[
"customTag": "",
"field": []
]
],
"relativeFrequency": [],
"table": []
]
],
"quasiIds": [
[
"customTag": "",
"field": [],
"inferred": [],
"infoType": []
]
],
"regionCode": ""
],
"lDiversityConfig": [
"quasiIds": [[]],
"sensitiveAttribute": []
],
"numericalStatsConfig": ["field": []]
],
"sourceTable": []
]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/:parent/dlpJobs")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
dlp.projects.locations.dlpJobs.finish
{{baseUrl}}/v2/:name:finish
QUERY PARAMS
name
BODY json
{}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/:name:finish");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v2/:name:finish" {:content-type :json})
require "http/client"
url = "{{baseUrl}}/v2/:name:finish"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/v2/:name:finish"),
Content = new StringContent("{}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/:name:finish");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/:name:finish"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/v2/:name:finish HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 2
{}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v2/:name:finish")
.setHeader("content-type", "application/json")
.setBody("{}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/:name:finish"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v2/:name:finish")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v2/:name:finish")
.header("content-type", "application/json")
.body("{}")
.asString();
const data = JSON.stringify({});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v2/:name:finish');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v2/:name:finish',
headers: {'content-type': 'application/json'},
data: {}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/:name:finish';
const options = {method: 'POST', headers: {'content-type': 'application/json'}, body: '{}'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v2/:name:finish',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{}")
val request = Request.Builder()
.url("{{baseUrl}}/v2/:name:finish")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/v2/:name:finish',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v2/:name:finish',
headers: {'content-type': 'application/json'},
body: {},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/v2/:name:finish');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/v2/:name:finish',
headers: {'content-type': 'application/json'},
data: {}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/:name:finish';
const options = {method: 'POST', headers: {'content-type': 'application/json'}, body: '{}'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v2/:name:finish"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v2/:name:finish" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/:name:finish",
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([
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/v2/:name:finish', [
'body' => '{}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v2/:name:finish');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
]));
$request->setRequestUrl('{{baseUrl}}/v2/:name:finish');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v2/:name:finish' -Method POST -Headers $headers -ContentType 'application/json' -Body '{}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/:name:finish' -Method POST -Headers $headers -ContentType 'application/json' -Body '{}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v2/:name:finish", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/:name:finish"
payload = {}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/:name:finish"
payload <- "{}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/:name:finish")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/v2/:name:finish') do |req|
req.body = "{}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v2/:name:finish";
let payload = json!({});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/v2/:name:finish \
--header 'content-type: application/json' \
--data '{}'
echo '{}' | \
http POST {{baseUrl}}/v2/:name:finish \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{}' \
--output-document \
- {{baseUrl}}/v2/:name:finish
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/:name:finish")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
dlp.projects.locations.dlpJobs.list
{{baseUrl}}/v2/:parent/dlpJobs
QUERY PARAMS
parent
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/:parent/dlpJobs");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v2/:parent/dlpJobs")
require "http/client"
url = "{{baseUrl}}/v2/:parent/dlpJobs"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/v2/:parent/dlpJobs"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/:parent/dlpJobs");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/:parent/dlpJobs"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/v2/:parent/dlpJobs HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v2/:parent/dlpJobs")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/:parent/dlpJobs"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/v2/:parent/dlpJobs")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v2/:parent/dlpJobs")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/v2/:parent/dlpJobs');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/v2/:parent/dlpJobs'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/:parent/dlpJobs';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v2/:parent/dlpJobs',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v2/:parent/dlpJobs")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v2/:parent/dlpJobs',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'GET', url: '{{baseUrl}}/v2/:parent/dlpJobs'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v2/:parent/dlpJobs');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'GET', url: '{{baseUrl}}/v2/:parent/dlpJobs'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/:parent/dlpJobs';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v2/:parent/dlpJobs"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v2/:parent/dlpJobs" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/:parent/dlpJobs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/v2/:parent/dlpJobs');
echo $response->getBody();
setUrl('{{baseUrl}}/v2/:parent/dlpJobs');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v2/:parent/dlpJobs');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v2/:parent/dlpJobs' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/:parent/dlpJobs' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v2/:parent/dlpJobs")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/:parent/dlpJobs"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/:parent/dlpJobs"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/:parent/dlpJobs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/v2/:parent/dlpJobs') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v2/:parent/dlpJobs";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/v2/:parent/dlpJobs
http GET {{baseUrl}}/v2/:parent/dlpJobs
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v2/:parent/dlpJobs
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/:parent/dlpJobs")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
dlp.projects.locations.image.redact
{{baseUrl}}/v2/:parent/image:redact
QUERY PARAMS
parent
BODY json
{
"byteItem": {
"data": "",
"type": ""
},
"imageRedactionConfigs": [
{
"infoType": {
"name": "",
"version": ""
},
"redactAllText": false,
"redactionColor": {
"blue": "",
"green": "",
"red": ""
}
}
],
"includeFindings": false,
"inspectConfig": {
"contentOptions": [],
"customInfoTypes": [
{
"detectionRules": [
{
"hotwordRule": {
"hotwordRegex": {
"groupIndexes": [],
"pattern": ""
},
"likelihoodAdjustment": {
"fixedLikelihood": "",
"relativeLikelihood": 0
},
"proximity": {
"windowAfter": 0,
"windowBefore": 0
}
}
}
],
"dictionary": {
"cloudStoragePath": {
"path": ""
},
"wordList": {
"words": []
}
},
"exclusionType": "",
"infoType": {},
"likelihood": "",
"regex": {},
"storedType": {
"createTime": "",
"name": ""
},
"surrogateType": {}
}
],
"excludeInfoTypes": false,
"includeQuote": false,
"infoTypes": [
{}
],
"limits": {
"maxFindingsPerInfoType": [
{
"infoType": {},
"maxFindings": 0
}
],
"maxFindingsPerItem": 0,
"maxFindingsPerRequest": 0
},
"minLikelihood": "",
"ruleSet": [
{
"infoTypes": [
{}
],
"rules": [
{
"exclusionRule": {
"dictionary": {},
"excludeByHotword": {
"hotwordRegex": {},
"proximity": {}
},
"excludeInfoTypes": {
"infoTypes": [
{}
]
},
"matchingType": "",
"regex": {}
},
"hotwordRule": {}
}
]
}
]
},
"locationId": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/:parent/image:redact");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"byteItem\": {\n \"data\": \"\",\n \"type\": \"\"\n },\n \"imageRedactionConfigs\": [\n {\n \"infoType\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"redactAllText\": false,\n \"redactionColor\": {\n \"blue\": \"\",\n \"green\": \"\",\n \"red\": \"\"\n }\n }\n ],\n \"includeFindings\": false,\n \"inspectConfig\": {\n \"contentOptions\": [],\n \"customInfoTypes\": [\n {\n \"detectionRules\": [\n {\n \"hotwordRule\": {\n \"hotwordRegex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n },\n \"likelihoodAdjustment\": {\n \"fixedLikelihood\": \"\",\n \"relativeLikelihood\": 0\n },\n \"proximity\": {\n \"windowAfter\": 0,\n \"windowBefore\": 0\n }\n }\n }\n ],\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {\n \"words\": []\n }\n },\n \"exclusionType\": \"\",\n \"infoType\": {},\n \"likelihood\": \"\",\n \"regex\": {},\n \"storedType\": {\n \"createTime\": \"\",\n \"name\": \"\"\n },\n \"surrogateType\": {}\n }\n ],\n \"excludeInfoTypes\": false,\n \"includeQuote\": false,\n \"infoTypes\": [\n {}\n ],\n \"limits\": {\n \"maxFindingsPerInfoType\": [\n {\n \"infoType\": {},\n \"maxFindings\": 0\n }\n ],\n \"maxFindingsPerItem\": 0,\n \"maxFindingsPerRequest\": 0\n },\n \"minLikelihood\": \"\",\n \"ruleSet\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"rules\": [\n {\n \"exclusionRule\": {\n \"dictionary\": {},\n \"excludeByHotword\": {\n \"hotwordRegex\": {},\n \"proximity\": {}\n },\n \"excludeInfoTypes\": {\n \"infoTypes\": [\n {}\n ]\n },\n \"matchingType\": \"\",\n \"regex\": {}\n },\n \"hotwordRule\": {}\n }\n ]\n }\n ]\n },\n \"locationId\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v2/:parent/image:redact" {:content-type :json
:form-params {:byteItem {:data ""
:type ""}
:imageRedactionConfigs [{:infoType {:name ""
:version ""}
:redactAllText false
:redactionColor {:blue ""
:green ""
:red ""}}]
:includeFindings false
:inspectConfig {:contentOptions []
:customInfoTypes [{:detectionRules [{:hotwordRule {:hotwordRegex {:groupIndexes []
:pattern ""}
:likelihoodAdjustment {:fixedLikelihood ""
:relativeLikelihood 0}
:proximity {:windowAfter 0
:windowBefore 0}}}]
:dictionary {:cloudStoragePath {:path ""}
:wordList {:words []}}
:exclusionType ""
:infoType {}
:likelihood ""
:regex {}
:storedType {:createTime ""
:name ""}
:surrogateType {}}]
:excludeInfoTypes false
:includeQuote false
:infoTypes [{}]
:limits {:maxFindingsPerInfoType [{:infoType {}
:maxFindings 0}]
:maxFindingsPerItem 0
:maxFindingsPerRequest 0}
:minLikelihood ""
:ruleSet [{:infoTypes [{}]
:rules [{:exclusionRule {:dictionary {}
:excludeByHotword {:hotwordRegex {}
:proximity {}}
:excludeInfoTypes {:infoTypes [{}]}
:matchingType ""
:regex {}}
:hotwordRule {}}]}]}
:locationId ""}})
require "http/client"
url = "{{baseUrl}}/v2/:parent/image:redact"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"byteItem\": {\n \"data\": \"\",\n \"type\": \"\"\n },\n \"imageRedactionConfigs\": [\n {\n \"infoType\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"redactAllText\": false,\n \"redactionColor\": {\n \"blue\": \"\",\n \"green\": \"\",\n \"red\": \"\"\n }\n }\n ],\n \"includeFindings\": false,\n \"inspectConfig\": {\n \"contentOptions\": [],\n \"customInfoTypes\": [\n {\n \"detectionRules\": [\n {\n \"hotwordRule\": {\n \"hotwordRegex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n },\n \"likelihoodAdjustment\": {\n \"fixedLikelihood\": \"\",\n \"relativeLikelihood\": 0\n },\n \"proximity\": {\n \"windowAfter\": 0,\n \"windowBefore\": 0\n }\n }\n }\n ],\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {\n \"words\": []\n }\n },\n \"exclusionType\": \"\",\n \"infoType\": {},\n \"likelihood\": \"\",\n \"regex\": {},\n \"storedType\": {\n \"createTime\": \"\",\n \"name\": \"\"\n },\n \"surrogateType\": {}\n }\n ],\n \"excludeInfoTypes\": false,\n \"includeQuote\": false,\n \"infoTypes\": [\n {}\n ],\n \"limits\": {\n \"maxFindingsPerInfoType\": [\n {\n \"infoType\": {},\n \"maxFindings\": 0\n }\n ],\n \"maxFindingsPerItem\": 0,\n \"maxFindingsPerRequest\": 0\n },\n \"minLikelihood\": \"\",\n \"ruleSet\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"rules\": [\n {\n \"exclusionRule\": {\n \"dictionary\": {},\n \"excludeByHotword\": {\n \"hotwordRegex\": {},\n \"proximity\": {}\n },\n \"excludeInfoTypes\": {\n \"infoTypes\": [\n {}\n ]\n },\n \"matchingType\": \"\",\n \"regex\": {}\n },\n \"hotwordRule\": {}\n }\n ]\n }\n ]\n },\n \"locationId\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/v2/:parent/image:redact"),
Content = new StringContent("{\n \"byteItem\": {\n \"data\": \"\",\n \"type\": \"\"\n },\n \"imageRedactionConfigs\": [\n {\n \"infoType\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"redactAllText\": false,\n \"redactionColor\": {\n \"blue\": \"\",\n \"green\": \"\",\n \"red\": \"\"\n }\n }\n ],\n \"includeFindings\": false,\n \"inspectConfig\": {\n \"contentOptions\": [],\n \"customInfoTypes\": [\n {\n \"detectionRules\": [\n {\n \"hotwordRule\": {\n \"hotwordRegex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n },\n \"likelihoodAdjustment\": {\n \"fixedLikelihood\": \"\",\n \"relativeLikelihood\": 0\n },\n \"proximity\": {\n \"windowAfter\": 0,\n \"windowBefore\": 0\n }\n }\n }\n ],\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {\n \"words\": []\n }\n },\n \"exclusionType\": \"\",\n \"infoType\": {},\n \"likelihood\": \"\",\n \"regex\": {},\n \"storedType\": {\n \"createTime\": \"\",\n \"name\": \"\"\n },\n \"surrogateType\": {}\n }\n ],\n \"excludeInfoTypes\": false,\n \"includeQuote\": false,\n \"infoTypes\": [\n {}\n ],\n \"limits\": {\n \"maxFindingsPerInfoType\": [\n {\n \"infoType\": {},\n \"maxFindings\": 0\n }\n ],\n \"maxFindingsPerItem\": 0,\n \"maxFindingsPerRequest\": 0\n },\n \"minLikelihood\": \"\",\n \"ruleSet\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"rules\": [\n {\n \"exclusionRule\": {\n \"dictionary\": {},\n \"excludeByHotword\": {\n \"hotwordRegex\": {},\n \"proximity\": {}\n },\n \"excludeInfoTypes\": {\n \"infoTypes\": [\n {}\n ]\n },\n \"matchingType\": \"\",\n \"regex\": {}\n },\n \"hotwordRule\": {}\n }\n ]\n }\n ]\n },\n \"locationId\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/:parent/image:redact");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"byteItem\": {\n \"data\": \"\",\n \"type\": \"\"\n },\n \"imageRedactionConfigs\": [\n {\n \"infoType\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"redactAllText\": false,\n \"redactionColor\": {\n \"blue\": \"\",\n \"green\": \"\",\n \"red\": \"\"\n }\n }\n ],\n \"includeFindings\": false,\n \"inspectConfig\": {\n \"contentOptions\": [],\n \"customInfoTypes\": [\n {\n \"detectionRules\": [\n {\n \"hotwordRule\": {\n \"hotwordRegex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n },\n \"likelihoodAdjustment\": {\n \"fixedLikelihood\": \"\",\n \"relativeLikelihood\": 0\n },\n \"proximity\": {\n \"windowAfter\": 0,\n \"windowBefore\": 0\n }\n }\n }\n ],\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {\n \"words\": []\n }\n },\n \"exclusionType\": \"\",\n \"infoType\": {},\n \"likelihood\": \"\",\n \"regex\": {},\n \"storedType\": {\n \"createTime\": \"\",\n \"name\": \"\"\n },\n \"surrogateType\": {}\n }\n ],\n \"excludeInfoTypes\": false,\n \"includeQuote\": false,\n \"infoTypes\": [\n {}\n ],\n \"limits\": {\n \"maxFindingsPerInfoType\": [\n {\n \"infoType\": {},\n \"maxFindings\": 0\n }\n ],\n \"maxFindingsPerItem\": 0,\n \"maxFindingsPerRequest\": 0\n },\n \"minLikelihood\": \"\",\n \"ruleSet\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"rules\": [\n {\n \"exclusionRule\": {\n \"dictionary\": {},\n \"excludeByHotword\": {\n \"hotwordRegex\": {},\n \"proximity\": {}\n },\n \"excludeInfoTypes\": {\n \"infoTypes\": [\n {}\n ]\n },\n \"matchingType\": \"\",\n \"regex\": {}\n },\n \"hotwordRule\": {}\n }\n ]\n }\n ]\n },\n \"locationId\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/:parent/image:redact"
payload := strings.NewReader("{\n \"byteItem\": {\n \"data\": \"\",\n \"type\": \"\"\n },\n \"imageRedactionConfigs\": [\n {\n \"infoType\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"redactAllText\": false,\n \"redactionColor\": {\n \"blue\": \"\",\n \"green\": \"\",\n \"red\": \"\"\n }\n }\n ],\n \"includeFindings\": false,\n \"inspectConfig\": {\n \"contentOptions\": [],\n \"customInfoTypes\": [\n {\n \"detectionRules\": [\n {\n \"hotwordRule\": {\n \"hotwordRegex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n },\n \"likelihoodAdjustment\": {\n \"fixedLikelihood\": \"\",\n \"relativeLikelihood\": 0\n },\n \"proximity\": {\n \"windowAfter\": 0,\n \"windowBefore\": 0\n }\n }\n }\n ],\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {\n \"words\": []\n }\n },\n \"exclusionType\": \"\",\n \"infoType\": {},\n \"likelihood\": \"\",\n \"regex\": {},\n \"storedType\": {\n \"createTime\": \"\",\n \"name\": \"\"\n },\n \"surrogateType\": {}\n }\n ],\n \"excludeInfoTypes\": false,\n \"includeQuote\": false,\n \"infoTypes\": [\n {}\n ],\n \"limits\": {\n \"maxFindingsPerInfoType\": [\n {\n \"infoType\": {},\n \"maxFindings\": 0\n }\n ],\n \"maxFindingsPerItem\": 0,\n \"maxFindingsPerRequest\": 0\n },\n \"minLikelihood\": \"\",\n \"ruleSet\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"rules\": [\n {\n \"exclusionRule\": {\n \"dictionary\": {},\n \"excludeByHotword\": {\n \"hotwordRegex\": {},\n \"proximity\": {}\n },\n \"excludeInfoTypes\": {\n \"infoTypes\": [\n {}\n ]\n },\n \"matchingType\": \"\",\n \"regex\": {}\n },\n \"hotwordRule\": {}\n }\n ]\n }\n ]\n },\n \"locationId\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/v2/:parent/image:redact HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 2159
{
"byteItem": {
"data": "",
"type": ""
},
"imageRedactionConfigs": [
{
"infoType": {
"name": "",
"version": ""
},
"redactAllText": false,
"redactionColor": {
"blue": "",
"green": "",
"red": ""
}
}
],
"includeFindings": false,
"inspectConfig": {
"contentOptions": [],
"customInfoTypes": [
{
"detectionRules": [
{
"hotwordRule": {
"hotwordRegex": {
"groupIndexes": [],
"pattern": ""
},
"likelihoodAdjustment": {
"fixedLikelihood": "",
"relativeLikelihood": 0
},
"proximity": {
"windowAfter": 0,
"windowBefore": 0
}
}
}
],
"dictionary": {
"cloudStoragePath": {
"path": ""
},
"wordList": {
"words": []
}
},
"exclusionType": "",
"infoType": {},
"likelihood": "",
"regex": {},
"storedType": {
"createTime": "",
"name": ""
},
"surrogateType": {}
}
],
"excludeInfoTypes": false,
"includeQuote": false,
"infoTypes": [
{}
],
"limits": {
"maxFindingsPerInfoType": [
{
"infoType": {},
"maxFindings": 0
}
],
"maxFindingsPerItem": 0,
"maxFindingsPerRequest": 0
},
"minLikelihood": "",
"ruleSet": [
{
"infoTypes": [
{}
],
"rules": [
{
"exclusionRule": {
"dictionary": {},
"excludeByHotword": {
"hotwordRegex": {},
"proximity": {}
},
"excludeInfoTypes": {
"infoTypes": [
{}
]
},
"matchingType": "",
"regex": {}
},
"hotwordRule": {}
}
]
}
]
},
"locationId": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v2/:parent/image:redact")
.setHeader("content-type", "application/json")
.setBody("{\n \"byteItem\": {\n \"data\": \"\",\n \"type\": \"\"\n },\n \"imageRedactionConfigs\": [\n {\n \"infoType\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"redactAllText\": false,\n \"redactionColor\": {\n \"blue\": \"\",\n \"green\": \"\",\n \"red\": \"\"\n }\n }\n ],\n \"includeFindings\": false,\n \"inspectConfig\": {\n \"contentOptions\": [],\n \"customInfoTypes\": [\n {\n \"detectionRules\": [\n {\n \"hotwordRule\": {\n \"hotwordRegex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n },\n \"likelihoodAdjustment\": {\n \"fixedLikelihood\": \"\",\n \"relativeLikelihood\": 0\n },\n \"proximity\": {\n \"windowAfter\": 0,\n \"windowBefore\": 0\n }\n }\n }\n ],\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {\n \"words\": []\n }\n },\n \"exclusionType\": \"\",\n \"infoType\": {},\n \"likelihood\": \"\",\n \"regex\": {},\n \"storedType\": {\n \"createTime\": \"\",\n \"name\": \"\"\n },\n \"surrogateType\": {}\n }\n ],\n \"excludeInfoTypes\": false,\n \"includeQuote\": false,\n \"infoTypes\": [\n {}\n ],\n \"limits\": {\n \"maxFindingsPerInfoType\": [\n {\n \"infoType\": {},\n \"maxFindings\": 0\n }\n ],\n \"maxFindingsPerItem\": 0,\n \"maxFindingsPerRequest\": 0\n },\n \"minLikelihood\": \"\",\n \"ruleSet\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"rules\": [\n {\n \"exclusionRule\": {\n \"dictionary\": {},\n \"excludeByHotword\": {\n \"hotwordRegex\": {},\n \"proximity\": {}\n },\n \"excludeInfoTypes\": {\n \"infoTypes\": [\n {}\n ]\n },\n \"matchingType\": \"\",\n \"regex\": {}\n },\n \"hotwordRule\": {}\n }\n ]\n }\n ]\n },\n \"locationId\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/:parent/image:redact"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"byteItem\": {\n \"data\": \"\",\n \"type\": \"\"\n },\n \"imageRedactionConfigs\": [\n {\n \"infoType\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"redactAllText\": false,\n \"redactionColor\": {\n \"blue\": \"\",\n \"green\": \"\",\n \"red\": \"\"\n }\n }\n ],\n \"includeFindings\": false,\n \"inspectConfig\": {\n \"contentOptions\": [],\n \"customInfoTypes\": [\n {\n \"detectionRules\": [\n {\n \"hotwordRule\": {\n \"hotwordRegex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n },\n \"likelihoodAdjustment\": {\n \"fixedLikelihood\": \"\",\n \"relativeLikelihood\": 0\n },\n \"proximity\": {\n \"windowAfter\": 0,\n \"windowBefore\": 0\n }\n }\n }\n ],\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {\n \"words\": []\n }\n },\n \"exclusionType\": \"\",\n \"infoType\": {},\n \"likelihood\": \"\",\n \"regex\": {},\n \"storedType\": {\n \"createTime\": \"\",\n \"name\": \"\"\n },\n \"surrogateType\": {}\n }\n ],\n \"excludeInfoTypes\": false,\n \"includeQuote\": false,\n \"infoTypes\": [\n {}\n ],\n \"limits\": {\n \"maxFindingsPerInfoType\": [\n {\n \"infoType\": {},\n \"maxFindings\": 0\n }\n ],\n \"maxFindingsPerItem\": 0,\n \"maxFindingsPerRequest\": 0\n },\n \"minLikelihood\": \"\",\n \"ruleSet\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"rules\": [\n {\n \"exclusionRule\": {\n \"dictionary\": {},\n \"excludeByHotword\": {\n \"hotwordRegex\": {},\n \"proximity\": {}\n },\n \"excludeInfoTypes\": {\n \"infoTypes\": [\n {}\n ]\n },\n \"matchingType\": \"\",\n \"regex\": {}\n },\n \"hotwordRule\": {}\n }\n ]\n }\n ]\n },\n \"locationId\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"byteItem\": {\n \"data\": \"\",\n \"type\": \"\"\n },\n \"imageRedactionConfigs\": [\n {\n \"infoType\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"redactAllText\": false,\n \"redactionColor\": {\n \"blue\": \"\",\n \"green\": \"\",\n \"red\": \"\"\n }\n }\n ],\n \"includeFindings\": false,\n \"inspectConfig\": {\n \"contentOptions\": [],\n \"customInfoTypes\": [\n {\n \"detectionRules\": [\n {\n \"hotwordRule\": {\n \"hotwordRegex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n },\n \"likelihoodAdjustment\": {\n \"fixedLikelihood\": \"\",\n \"relativeLikelihood\": 0\n },\n \"proximity\": {\n \"windowAfter\": 0,\n \"windowBefore\": 0\n }\n }\n }\n ],\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {\n \"words\": []\n }\n },\n \"exclusionType\": \"\",\n \"infoType\": {},\n \"likelihood\": \"\",\n \"regex\": {},\n \"storedType\": {\n \"createTime\": \"\",\n \"name\": \"\"\n },\n \"surrogateType\": {}\n }\n ],\n \"excludeInfoTypes\": false,\n \"includeQuote\": false,\n \"infoTypes\": [\n {}\n ],\n \"limits\": {\n \"maxFindingsPerInfoType\": [\n {\n \"infoType\": {},\n \"maxFindings\": 0\n }\n ],\n \"maxFindingsPerItem\": 0,\n \"maxFindingsPerRequest\": 0\n },\n \"minLikelihood\": \"\",\n \"ruleSet\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"rules\": [\n {\n \"exclusionRule\": {\n \"dictionary\": {},\n \"excludeByHotword\": {\n \"hotwordRegex\": {},\n \"proximity\": {}\n },\n \"excludeInfoTypes\": {\n \"infoTypes\": [\n {}\n ]\n },\n \"matchingType\": \"\",\n \"regex\": {}\n },\n \"hotwordRule\": {}\n }\n ]\n }\n ]\n },\n \"locationId\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v2/:parent/image:redact")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v2/:parent/image:redact")
.header("content-type", "application/json")
.body("{\n \"byteItem\": {\n \"data\": \"\",\n \"type\": \"\"\n },\n \"imageRedactionConfigs\": [\n {\n \"infoType\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"redactAllText\": false,\n \"redactionColor\": {\n \"blue\": \"\",\n \"green\": \"\",\n \"red\": \"\"\n }\n }\n ],\n \"includeFindings\": false,\n \"inspectConfig\": {\n \"contentOptions\": [],\n \"customInfoTypes\": [\n {\n \"detectionRules\": [\n {\n \"hotwordRule\": {\n \"hotwordRegex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n },\n \"likelihoodAdjustment\": {\n \"fixedLikelihood\": \"\",\n \"relativeLikelihood\": 0\n },\n \"proximity\": {\n \"windowAfter\": 0,\n \"windowBefore\": 0\n }\n }\n }\n ],\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {\n \"words\": []\n }\n },\n \"exclusionType\": \"\",\n \"infoType\": {},\n \"likelihood\": \"\",\n \"regex\": {},\n \"storedType\": {\n \"createTime\": \"\",\n \"name\": \"\"\n },\n \"surrogateType\": {}\n }\n ],\n \"excludeInfoTypes\": false,\n \"includeQuote\": false,\n \"infoTypes\": [\n {}\n ],\n \"limits\": {\n \"maxFindingsPerInfoType\": [\n {\n \"infoType\": {},\n \"maxFindings\": 0\n }\n ],\n \"maxFindingsPerItem\": 0,\n \"maxFindingsPerRequest\": 0\n },\n \"minLikelihood\": \"\",\n \"ruleSet\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"rules\": [\n {\n \"exclusionRule\": {\n \"dictionary\": {},\n \"excludeByHotword\": {\n \"hotwordRegex\": {},\n \"proximity\": {}\n },\n \"excludeInfoTypes\": {\n \"infoTypes\": [\n {}\n ]\n },\n \"matchingType\": \"\",\n \"regex\": {}\n },\n \"hotwordRule\": {}\n }\n ]\n }\n ]\n },\n \"locationId\": \"\"\n}")
.asString();
const data = JSON.stringify({
byteItem: {
data: '',
type: ''
},
imageRedactionConfigs: [
{
infoType: {
name: '',
version: ''
},
redactAllText: false,
redactionColor: {
blue: '',
green: '',
red: ''
}
}
],
includeFindings: false,
inspectConfig: {
contentOptions: [],
customInfoTypes: [
{
detectionRules: [
{
hotwordRule: {
hotwordRegex: {
groupIndexes: [],
pattern: ''
},
likelihoodAdjustment: {
fixedLikelihood: '',
relativeLikelihood: 0
},
proximity: {
windowAfter: 0,
windowBefore: 0
}
}
}
],
dictionary: {
cloudStoragePath: {
path: ''
},
wordList: {
words: []
}
},
exclusionType: '',
infoType: {},
likelihood: '',
regex: {},
storedType: {
createTime: '',
name: ''
},
surrogateType: {}
}
],
excludeInfoTypes: false,
includeQuote: false,
infoTypes: [
{}
],
limits: {
maxFindingsPerInfoType: [
{
infoType: {},
maxFindings: 0
}
],
maxFindingsPerItem: 0,
maxFindingsPerRequest: 0
},
minLikelihood: '',
ruleSet: [
{
infoTypes: [
{}
],
rules: [
{
exclusionRule: {
dictionary: {},
excludeByHotword: {
hotwordRegex: {},
proximity: {}
},
excludeInfoTypes: {
infoTypes: [
{}
]
},
matchingType: '',
regex: {}
},
hotwordRule: {}
}
]
}
]
},
locationId: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v2/:parent/image:redact');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v2/:parent/image:redact',
headers: {'content-type': 'application/json'},
data: {
byteItem: {data: '', type: ''},
imageRedactionConfigs: [
{
infoType: {name: '', version: ''},
redactAllText: false,
redactionColor: {blue: '', green: '', red: ''}
}
],
includeFindings: false,
inspectConfig: {
contentOptions: [],
customInfoTypes: [
{
detectionRules: [
{
hotwordRule: {
hotwordRegex: {groupIndexes: [], pattern: ''},
likelihoodAdjustment: {fixedLikelihood: '', relativeLikelihood: 0},
proximity: {windowAfter: 0, windowBefore: 0}
}
}
],
dictionary: {cloudStoragePath: {path: ''}, wordList: {words: []}},
exclusionType: '',
infoType: {},
likelihood: '',
regex: {},
storedType: {createTime: '', name: ''},
surrogateType: {}
}
],
excludeInfoTypes: false,
includeQuote: false,
infoTypes: [{}],
limits: {
maxFindingsPerInfoType: [{infoType: {}, maxFindings: 0}],
maxFindingsPerItem: 0,
maxFindingsPerRequest: 0
},
minLikelihood: '',
ruleSet: [
{
infoTypes: [{}],
rules: [
{
exclusionRule: {
dictionary: {},
excludeByHotword: {hotwordRegex: {}, proximity: {}},
excludeInfoTypes: {infoTypes: [{}]},
matchingType: '',
regex: {}
},
hotwordRule: {}
}
]
}
]
},
locationId: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/:parent/image:redact';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"byteItem":{"data":"","type":""},"imageRedactionConfigs":[{"infoType":{"name":"","version":""},"redactAllText":false,"redactionColor":{"blue":"","green":"","red":""}}],"includeFindings":false,"inspectConfig":{"contentOptions":[],"customInfoTypes":[{"detectionRules":[{"hotwordRule":{"hotwordRegex":{"groupIndexes":[],"pattern":""},"likelihoodAdjustment":{"fixedLikelihood":"","relativeLikelihood":0},"proximity":{"windowAfter":0,"windowBefore":0}}}],"dictionary":{"cloudStoragePath":{"path":""},"wordList":{"words":[]}},"exclusionType":"","infoType":{},"likelihood":"","regex":{},"storedType":{"createTime":"","name":""},"surrogateType":{}}],"excludeInfoTypes":false,"includeQuote":false,"infoTypes":[{}],"limits":{"maxFindingsPerInfoType":[{"infoType":{},"maxFindings":0}],"maxFindingsPerItem":0,"maxFindingsPerRequest":0},"minLikelihood":"","ruleSet":[{"infoTypes":[{}],"rules":[{"exclusionRule":{"dictionary":{},"excludeByHotword":{"hotwordRegex":{},"proximity":{}},"excludeInfoTypes":{"infoTypes":[{}]},"matchingType":"","regex":{}},"hotwordRule":{}}]}]},"locationId":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v2/:parent/image:redact',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "byteItem": {\n "data": "",\n "type": ""\n },\n "imageRedactionConfigs": [\n {\n "infoType": {\n "name": "",\n "version": ""\n },\n "redactAllText": false,\n "redactionColor": {\n "blue": "",\n "green": "",\n "red": ""\n }\n }\n ],\n "includeFindings": false,\n "inspectConfig": {\n "contentOptions": [],\n "customInfoTypes": [\n {\n "detectionRules": [\n {\n "hotwordRule": {\n "hotwordRegex": {\n "groupIndexes": [],\n "pattern": ""\n },\n "likelihoodAdjustment": {\n "fixedLikelihood": "",\n "relativeLikelihood": 0\n },\n "proximity": {\n "windowAfter": 0,\n "windowBefore": 0\n }\n }\n }\n ],\n "dictionary": {\n "cloudStoragePath": {\n "path": ""\n },\n "wordList": {\n "words": []\n }\n },\n "exclusionType": "",\n "infoType": {},\n "likelihood": "",\n "regex": {},\n "storedType": {\n "createTime": "",\n "name": ""\n },\n "surrogateType": {}\n }\n ],\n "excludeInfoTypes": false,\n "includeQuote": false,\n "infoTypes": [\n {}\n ],\n "limits": {\n "maxFindingsPerInfoType": [\n {\n "infoType": {},\n "maxFindings": 0\n }\n ],\n "maxFindingsPerItem": 0,\n "maxFindingsPerRequest": 0\n },\n "minLikelihood": "",\n "ruleSet": [\n {\n "infoTypes": [\n {}\n ],\n "rules": [\n {\n "exclusionRule": {\n "dictionary": {},\n "excludeByHotword": {\n "hotwordRegex": {},\n "proximity": {}\n },\n "excludeInfoTypes": {\n "infoTypes": [\n {}\n ]\n },\n "matchingType": "",\n "regex": {}\n },\n "hotwordRule": {}\n }\n ]\n }\n ]\n },\n "locationId": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"byteItem\": {\n \"data\": \"\",\n \"type\": \"\"\n },\n \"imageRedactionConfigs\": [\n {\n \"infoType\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"redactAllText\": false,\n \"redactionColor\": {\n \"blue\": \"\",\n \"green\": \"\",\n \"red\": \"\"\n }\n }\n ],\n \"includeFindings\": false,\n \"inspectConfig\": {\n \"contentOptions\": [],\n \"customInfoTypes\": [\n {\n \"detectionRules\": [\n {\n \"hotwordRule\": {\n \"hotwordRegex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n },\n \"likelihoodAdjustment\": {\n \"fixedLikelihood\": \"\",\n \"relativeLikelihood\": 0\n },\n \"proximity\": {\n \"windowAfter\": 0,\n \"windowBefore\": 0\n }\n }\n }\n ],\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {\n \"words\": []\n }\n },\n \"exclusionType\": \"\",\n \"infoType\": {},\n \"likelihood\": \"\",\n \"regex\": {},\n \"storedType\": {\n \"createTime\": \"\",\n \"name\": \"\"\n },\n \"surrogateType\": {}\n }\n ],\n \"excludeInfoTypes\": false,\n \"includeQuote\": false,\n \"infoTypes\": [\n {}\n ],\n \"limits\": {\n \"maxFindingsPerInfoType\": [\n {\n \"infoType\": {},\n \"maxFindings\": 0\n }\n ],\n \"maxFindingsPerItem\": 0,\n \"maxFindingsPerRequest\": 0\n },\n \"minLikelihood\": \"\",\n \"ruleSet\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"rules\": [\n {\n \"exclusionRule\": {\n \"dictionary\": {},\n \"excludeByHotword\": {\n \"hotwordRegex\": {},\n \"proximity\": {}\n },\n \"excludeInfoTypes\": {\n \"infoTypes\": [\n {}\n ]\n },\n \"matchingType\": \"\",\n \"regex\": {}\n },\n \"hotwordRule\": {}\n }\n ]\n }\n ]\n },\n \"locationId\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v2/:parent/image:redact")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/v2/:parent/image:redact',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
byteItem: {data: '', type: ''},
imageRedactionConfigs: [
{
infoType: {name: '', version: ''},
redactAllText: false,
redactionColor: {blue: '', green: '', red: ''}
}
],
includeFindings: false,
inspectConfig: {
contentOptions: [],
customInfoTypes: [
{
detectionRules: [
{
hotwordRule: {
hotwordRegex: {groupIndexes: [], pattern: ''},
likelihoodAdjustment: {fixedLikelihood: '', relativeLikelihood: 0},
proximity: {windowAfter: 0, windowBefore: 0}
}
}
],
dictionary: {cloudStoragePath: {path: ''}, wordList: {words: []}},
exclusionType: '',
infoType: {},
likelihood: '',
regex: {},
storedType: {createTime: '', name: ''},
surrogateType: {}
}
],
excludeInfoTypes: false,
includeQuote: false,
infoTypes: [{}],
limits: {
maxFindingsPerInfoType: [{infoType: {}, maxFindings: 0}],
maxFindingsPerItem: 0,
maxFindingsPerRequest: 0
},
minLikelihood: '',
ruleSet: [
{
infoTypes: [{}],
rules: [
{
exclusionRule: {
dictionary: {},
excludeByHotword: {hotwordRegex: {}, proximity: {}},
excludeInfoTypes: {infoTypes: [{}]},
matchingType: '',
regex: {}
},
hotwordRule: {}
}
]
}
]
},
locationId: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v2/:parent/image:redact',
headers: {'content-type': 'application/json'},
body: {
byteItem: {data: '', type: ''},
imageRedactionConfigs: [
{
infoType: {name: '', version: ''},
redactAllText: false,
redactionColor: {blue: '', green: '', red: ''}
}
],
includeFindings: false,
inspectConfig: {
contentOptions: [],
customInfoTypes: [
{
detectionRules: [
{
hotwordRule: {
hotwordRegex: {groupIndexes: [], pattern: ''},
likelihoodAdjustment: {fixedLikelihood: '', relativeLikelihood: 0},
proximity: {windowAfter: 0, windowBefore: 0}
}
}
],
dictionary: {cloudStoragePath: {path: ''}, wordList: {words: []}},
exclusionType: '',
infoType: {},
likelihood: '',
regex: {},
storedType: {createTime: '', name: ''},
surrogateType: {}
}
],
excludeInfoTypes: false,
includeQuote: false,
infoTypes: [{}],
limits: {
maxFindingsPerInfoType: [{infoType: {}, maxFindings: 0}],
maxFindingsPerItem: 0,
maxFindingsPerRequest: 0
},
minLikelihood: '',
ruleSet: [
{
infoTypes: [{}],
rules: [
{
exclusionRule: {
dictionary: {},
excludeByHotword: {hotwordRegex: {}, proximity: {}},
excludeInfoTypes: {infoTypes: [{}]},
matchingType: '',
regex: {}
},
hotwordRule: {}
}
]
}
]
},
locationId: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/v2/:parent/image:redact');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
byteItem: {
data: '',
type: ''
},
imageRedactionConfigs: [
{
infoType: {
name: '',
version: ''
},
redactAllText: false,
redactionColor: {
blue: '',
green: '',
red: ''
}
}
],
includeFindings: false,
inspectConfig: {
contentOptions: [],
customInfoTypes: [
{
detectionRules: [
{
hotwordRule: {
hotwordRegex: {
groupIndexes: [],
pattern: ''
},
likelihoodAdjustment: {
fixedLikelihood: '',
relativeLikelihood: 0
},
proximity: {
windowAfter: 0,
windowBefore: 0
}
}
}
],
dictionary: {
cloudStoragePath: {
path: ''
},
wordList: {
words: []
}
},
exclusionType: '',
infoType: {},
likelihood: '',
regex: {},
storedType: {
createTime: '',
name: ''
},
surrogateType: {}
}
],
excludeInfoTypes: false,
includeQuote: false,
infoTypes: [
{}
],
limits: {
maxFindingsPerInfoType: [
{
infoType: {},
maxFindings: 0
}
],
maxFindingsPerItem: 0,
maxFindingsPerRequest: 0
},
minLikelihood: '',
ruleSet: [
{
infoTypes: [
{}
],
rules: [
{
exclusionRule: {
dictionary: {},
excludeByHotword: {
hotwordRegex: {},
proximity: {}
},
excludeInfoTypes: {
infoTypes: [
{}
]
},
matchingType: '',
regex: {}
},
hotwordRule: {}
}
]
}
]
},
locationId: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/v2/:parent/image:redact',
headers: {'content-type': 'application/json'},
data: {
byteItem: {data: '', type: ''},
imageRedactionConfigs: [
{
infoType: {name: '', version: ''},
redactAllText: false,
redactionColor: {blue: '', green: '', red: ''}
}
],
includeFindings: false,
inspectConfig: {
contentOptions: [],
customInfoTypes: [
{
detectionRules: [
{
hotwordRule: {
hotwordRegex: {groupIndexes: [], pattern: ''},
likelihoodAdjustment: {fixedLikelihood: '', relativeLikelihood: 0},
proximity: {windowAfter: 0, windowBefore: 0}
}
}
],
dictionary: {cloudStoragePath: {path: ''}, wordList: {words: []}},
exclusionType: '',
infoType: {},
likelihood: '',
regex: {},
storedType: {createTime: '', name: ''},
surrogateType: {}
}
],
excludeInfoTypes: false,
includeQuote: false,
infoTypes: [{}],
limits: {
maxFindingsPerInfoType: [{infoType: {}, maxFindings: 0}],
maxFindingsPerItem: 0,
maxFindingsPerRequest: 0
},
minLikelihood: '',
ruleSet: [
{
infoTypes: [{}],
rules: [
{
exclusionRule: {
dictionary: {},
excludeByHotword: {hotwordRegex: {}, proximity: {}},
excludeInfoTypes: {infoTypes: [{}]},
matchingType: '',
regex: {}
},
hotwordRule: {}
}
]
}
]
},
locationId: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/:parent/image:redact';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"byteItem":{"data":"","type":""},"imageRedactionConfigs":[{"infoType":{"name":"","version":""},"redactAllText":false,"redactionColor":{"blue":"","green":"","red":""}}],"includeFindings":false,"inspectConfig":{"contentOptions":[],"customInfoTypes":[{"detectionRules":[{"hotwordRule":{"hotwordRegex":{"groupIndexes":[],"pattern":""},"likelihoodAdjustment":{"fixedLikelihood":"","relativeLikelihood":0},"proximity":{"windowAfter":0,"windowBefore":0}}}],"dictionary":{"cloudStoragePath":{"path":""},"wordList":{"words":[]}},"exclusionType":"","infoType":{},"likelihood":"","regex":{},"storedType":{"createTime":"","name":""},"surrogateType":{}}],"excludeInfoTypes":false,"includeQuote":false,"infoTypes":[{}],"limits":{"maxFindingsPerInfoType":[{"infoType":{},"maxFindings":0}],"maxFindingsPerItem":0,"maxFindingsPerRequest":0},"minLikelihood":"","ruleSet":[{"infoTypes":[{}],"rules":[{"exclusionRule":{"dictionary":{},"excludeByHotword":{"hotwordRegex":{},"proximity":{}},"excludeInfoTypes":{"infoTypes":[{}]},"matchingType":"","regex":{}},"hotwordRule":{}}]}]},"locationId":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"byteItem": @{ @"data": @"", @"type": @"" },
@"imageRedactionConfigs": @[ @{ @"infoType": @{ @"name": @"", @"version": @"" }, @"redactAllText": @NO, @"redactionColor": @{ @"blue": @"", @"green": @"", @"red": @"" } } ],
@"includeFindings": @NO,
@"inspectConfig": @{ @"contentOptions": @[ ], @"customInfoTypes": @[ @{ @"detectionRules": @[ @{ @"hotwordRule": @{ @"hotwordRegex": @{ @"groupIndexes": @[ ], @"pattern": @"" }, @"likelihoodAdjustment": @{ @"fixedLikelihood": @"", @"relativeLikelihood": @0 }, @"proximity": @{ @"windowAfter": @0, @"windowBefore": @0 } } } ], @"dictionary": @{ @"cloudStoragePath": @{ @"path": @"" }, @"wordList": @{ @"words": @[ ] } }, @"exclusionType": @"", @"infoType": @{ }, @"likelihood": @"", @"regex": @{ }, @"storedType": @{ @"createTime": @"", @"name": @"" }, @"surrogateType": @{ } } ], @"excludeInfoTypes": @NO, @"includeQuote": @NO, @"infoTypes": @[ @{ } ], @"limits": @{ @"maxFindingsPerInfoType": @[ @{ @"infoType": @{ }, @"maxFindings": @0 } ], @"maxFindingsPerItem": @0, @"maxFindingsPerRequest": @0 }, @"minLikelihood": @"", @"ruleSet": @[ @{ @"infoTypes": @[ @{ } ], @"rules": @[ @{ @"exclusionRule": @{ @"dictionary": @{ }, @"excludeByHotword": @{ @"hotwordRegex": @{ }, @"proximity": @{ } }, @"excludeInfoTypes": @{ @"infoTypes": @[ @{ } ] }, @"matchingType": @"", @"regex": @{ } }, @"hotwordRule": @{ } } ] } ] },
@"locationId": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v2/:parent/image:redact"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v2/:parent/image:redact" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"byteItem\": {\n \"data\": \"\",\n \"type\": \"\"\n },\n \"imageRedactionConfigs\": [\n {\n \"infoType\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"redactAllText\": false,\n \"redactionColor\": {\n \"blue\": \"\",\n \"green\": \"\",\n \"red\": \"\"\n }\n }\n ],\n \"includeFindings\": false,\n \"inspectConfig\": {\n \"contentOptions\": [],\n \"customInfoTypes\": [\n {\n \"detectionRules\": [\n {\n \"hotwordRule\": {\n \"hotwordRegex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n },\n \"likelihoodAdjustment\": {\n \"fixedLikelihood\": \"\",\n \"relativeLikelihood\": 0\n },\n \"proximity\": {\n \"windowAfter\": 0,\n \"windowBefore\": 0\n }\n }\n }\n ],\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {\n \"words\": []\n }\n },\n \"exclusionType\": \"\",\n \"infoType\": {},\n \"likelihood\": \"\",\n \"regex\": {},\n \"storedType\": {\n \"createTime\": \"\",\n \"name\": \"\"\n },\n \"surrogateType\": {}\n }\n ],\n \"excludeInfoTypes\": false,\n \"includeQuote\": false,\n \"infoTypes\": [\n {}\n ],\n \"limits\": {\n \"maxFindingsPerInfoType\": [\n {\n \"infoType\": {},\n \"maxFindings\": 0\n }\n ],\n \"maxFindingsPerItem\": 0,\n \"maxFindingsPerRequest\": 0\n },\n \"minLikelihood\": \"\",\n \"ruleSet\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"rules\": [\n {\n \"exclusionRule\": {\n \"dictionary\": {},\n \"excludeByHotword\": {\n \"hotwordRegex\": {},\n \"proximity\": {}\n },\n \"excludeInfoTypes\": {\n \"infoTypes\": [\n {}\n ]\n },\n \"matchingType\": \"\",\n \"regex\": {}\n },\n \"hotwordRule\": {}\n }\n ]\n }\n ]\n },\n \"locationId\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/:parent/image:redact",
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([
'byteItem' => [
'data' => '',
'type' => ''
],
'imageRedactionConfigs' => [
[
'infoType' => [
'name' => '',
'version' => ''
],
'redactAllText' => null,
'redactionColor' => [
'blue' => '',
'green' => '',
'red' => ''
]
]
],
'includeFindings' => null,
'inspectConfig' => [
'contentOptions' => [
],
'customInfoTypes' => [
[
'detectionRules' => [
[
'hotwordRule' => [
'hotwordRegex' => [
'groupIndexes' => [
],
'pattern' => ''
],
'likelihoodAdjustment' => [
'fixedLikelihood' => '',
'relativeLikelihood' => 0
],
'proximity' => [
'windowAfter' => 0,
'windowBefore' => 0
]
]
]
],
'dictionary' => [
'cloudStoragePath' => [
'path' => ''
],
'wordList' => [
'words' => [
]
]
],
'exclusionType' => '',
'infoType' => [
],
'likelihood' => '',
'regex' => [
],
'storedType' => [
'createTime' => '',
'name' => ''
],
'surrogateType' => [
]
]
],
'excludeInfoTypes' => null,
'includeQuote' => null,
'infoTypes' => [
[
]
],
'limits' => [
'maxFindingsPerInfoType' => [
[
'infoType' => [
],
'maxFindings' => 0
]
],
'maxFindingsPerItem' => 0,
'maxFindingsPerRequest' => 0
],
'minLikelihood' => '',
'ruleSet' => [
[
'infoTypes' => [
[
]
],
'rules' => [
[
'exclusionRule' => [
'dictionary' => [
],
'excludeByHotword' => [
'hotwordRegex' => [
],
'proximity' => [
]
],
'excludeInfoTypes' => [
'infoTypes' => [
[
]
]
],
'matchingType' => '',
'regex' => [
]
],
'hotwordRule' => [
]
]
]
]
]
],
'locationId' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/v2/:parent/image:redact', [
'body' => '{
"byteItem": {
"data": "",
"type": ""
},
"imageRedactionConfigs": [
{
"infoType": {
"name": "",
"version": ""
},
"redactAllText": false,
"redactionColor": {
"blue": "",
"green": "",
"red": ""
}
}
],
"includeFindings": false,
"inspectConfig": {
"contentOptions": [],
"customInfoTypes": [
{
"detectionRules": [
{
"hotwordRule": {
"hotwordRegex": {
"groupIndexes": [],
"pattern": ""
},
"likelihoodAdjustment": {
"fixedLikelihood": "",
"relativeLikelihood": 0
},
"proximity": {
"windowAfter": 0,
"windowBefore": 0
}
}
}
],
"dictionary": {
"cloudStoragePath": {
"path": ""
},
"wordList": {
"words": []
}
},
"exclusionType": "",
"infoType": {},
"likelihood": "",
"regex": {},
"storedType": {
"createTime": "",
"name": ""
},
"surrogateType": {}
}
],
"excludeInfoTypes": false,
"includeQuote": false,
"infoTypes": [
{}
],
"limits": {
"maxFindingsPerInfoType": [
{
"infoType": {},
"maxFindings": 0
}
],
"maxFindingsPerItem": 0,
"maxFindingsPerRequest": 0
},
"minLikelihood": "",
"ruleSet": [
{
"infoTypes": [
{}
],
"rules": [
{
"exclusionRule": {
"dictionary": {},
"excludeByHotword": {
"hotwordRegex": {},
"proximity": {}
},
"excludeInfoTypes": {
"infoTypes": [
{}
]
},
"matchingType": "",
"regex": {}
},
"hotwordRule": {}
}
]
}
]
},
"locationId": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v2/:parent/image:redact');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'byteItem' => [
'data' => '',
'type' => ''
],
'imageRedactionConfigs' => [
[
'infoType' => [
'name' => '',
'version' => ''
],
'redactAllText' => null,
'redactionColor' => [
'blue' => '',
'green' => '',
'red' => ''
]
]
],
'includeFindings' => null,
'inspectConfig' => [
'contentOptions' => [
],
'customInfoTypes' => [
[
'detectionRules' => [
[
'hotwordRule' => [
'hotwordRegex' => [
'groupIndexes' => [
],
'pattern' => ''
],
'likelihoodAdjustment' => [
'fixedLikelihood' => '',
'relativeLikelihood' => 0
],
'proximity' => [
'windowAfter' => 0,
'windowBefore' => 0
]
]
]
],
'dictionary' => [
'cloudStoragePath' => [
'path' => ''
],
'wordList' => [
'words' => [
]
]
],
'exclusionType' => '',
'infoType' => [
],
'likelihood' => '',
'regex' => [
],
'storedType' => [
'createTime' => '',
'name' => ''
],
'surrogateType' => [
]
]
],
'excludeInfoTypes' => null,
'includeQuote' => null,
'infoTypes' => [
[
]
],
'limits' => [
'maxFindingsPerInfoType' => [
[
'infoType' => [
],
'maxFindings' => 0
]
],
'maxFindingsPerItem' => 0,
'maxFindingsPerRequest' => 0
],
'minLikelihood' => '',
'ruleSet' => [
[
'infoTypes' => [
[
]
],
'rules' => [
[
'exclusionRule' => [
'dictionary' => [
],
'excludeByHotword' => [
'hotwordRegex' => [
],
'proximity' => [
]
],
'excludeInfoTypes' => [
'infoTypes' => [
[
]
]
],
'matchingType' => '',
'regex' => [
]
],
'hotwordRule' => [
]
]
]
]
]
],
'locationId' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'byteItem' => [
'data' => '',
'type' => ''
],
'imageRedactionConfigs' => [
[
'infoType' => [
'name' => '',
'version' => ''
],
'redactAllText' => null,
'redactionColor' => [
'blue' => '',
'green' => '',
'red' => ''
]
]
],
'includeFindings' => null,
'inspectConfig' => [
'contentOptions' => [
],
'customInfoTypes' => [
[
'detectionRules' => [
[
'hotwordRule' => [
'hotwordRegex' => [
'groupIndexes' => [
],
'pattern' => ''
],
'likelihoodAdjustment' => [
'fixedLikelihood' => '',
'relativeLikelihood' => 0
],
'proximity' => [
'windowAfter' => 0,
'windowBefore' => 0
]
]
]
],
'dictionary' => [
'cloudStoragePath' => [
'path' => ''
],
'wordList' => [
'words' => [
]
]
],
'exclusionType' => '',
'infoType' => [
],
'likelihood' => '',
'regex' => [
],
'storedType' => [
'createTime' => '',
'name' => ''
],
'surrogateType' => [
]
]
],
'excludeInfoTypes' => null,
'includeQuote' => null,
'infoTypes' => [
[
]
],
'limits' => [
'maxFindingsPerInfoType' => [
[
'infoType' => [
],
'maxFindings' => 0
]
],
'maxFindingsPerItem' => 0,
'maxFindingsPerRequest' => 0
],
'minLikelihood' => '',
'ruleSet' => [
[
'infoTypes' => [
[
]
],
'rules' => [
[
'exclusionRule' => [
'dictionary' => [
],
'excludeByHotword' => [
'hotwordRegex' => [
],
'proximity' => [
]
],
'excludeInfoTypes' => [
'infoTypes' => [
[
]
]
],
'matchingType' => '',
'regex' => [
]
],
'hotwordRule' => [
]
]
]
]
]
],
'locationId' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v2/:parent/image:redact');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v2/:parent/image:redact' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"byteItem": {
"data": "",
"type": ""
},
"imageRedactionConfigs": [
{
"infoType": {
"name": "",
"version": ""
},
"redactAllText": false,
"redactionColor": {
"blue": "",
"green": "",
"red": ""
}
}
],
"includeFindings": false,
"inspectConfig": {
"contentOptions": [],
"customInfoTypes": [
{
"detectionRules": [
{
"hotwordRule": {
"hotwordRegex": {
"groupIndexes": [],
"pattern": ""
},
"likelihoodAdjustment": {
"fixedLikelihood": "",
"relativeLikelihood": 0
},
"proximity": {
"windowAfter": 0,
"windowBefore": 0
}
}
}
],
"dictionary": {
"cloudStoragePath": {
"path": ""
},
"wordList": {
"words": []
}
},
"exclusionType": "",
"infoType": {},
"likelihood": "",
"regex": {},
"storedType": {
"createTime": "",
"name": ""
},
"surrogateType": {}
}
],
"excludeInfoTypes": false,
"includeQuote": false,
"infoTypes": [
{}
],
"limits": {
"maxFindingsPerInfoType": [
{
"infoType": {},
"maxFindings": 0
}
],
"maxFindingsPerItem": 0,
"maxFindingsPerRequest": 0
},
"minLikelihood": "",
"ruleSet": [
{
"infoTypes": [
{}
],
"rules": [
{
"exclusionRule": {
"dictionary": {},
"excludeByHotword": {
"hotwordRegex": {},
"proximity": {}
},
"excludeInfoTypes": {
"infoTypes": [
{}
]
},
"matchingType": "",
"regex": {}
},
"hotwordRule": {}
}
]
}
]
},
"locationId": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/:parent/image:redact' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"byteItem": {
"data": "",
"type": ""
},
"imageRedactionConfigs": [
{
"infoType": {
"name": "",
"version": ""
},
"redactAllText": false,
"redactionColor": {
"blue": "",
"green": "",
"red": ""
}
}
],
"includeFindings": false,
"inspectConfig": {
"contentOptions": [],
"customInfoTypes": [
{
"detectionRules": [
{
"hotwordRule": {
"hotwordRegex": {
"groupIndexes": [],
"pattern": ""
},
"likelihoodAdjustment": {
"fixedLikelihood": "",
"relativeLikelihood": 0
},
"proximity": {
"windowAfter": 0,
"windowBefore": 0
}
}
}
],
"dictionary": {
"cloudStoragePath": {
"path": ""
},
"wordList": {
"words": []
}
},
"exclusionType": "",
"infoType": {},
"likelihood": "",
"regex": {},
"storedType": {
"createTime": "",
"name": ""
},
"surrogateType": {}
}
],
"excludeInfoTypes": false,
"includeQuote": false,
"infoTypes": [
{}
],
"limits": {
"maxFindingsPerInfoType": [
{
"infoType": {},
"maxFindings": 0
}
],
"maxFindingsPerItem": 0,
"maxFindingsPerRequest": 0
},
"minLikelihood": "",
"ruleSet": [
{
"infoTypes": [
{}
],
"rules": [
{
"exclusionRule": {
"dictionary": {},
"excludeByHotword": {
"hotwordRegex": {},
"proximity": {}
},
"excludeInfoTypes": {
"infoTypes": [
{}
]
},
"matchingType": "",
"regex": {}
},
"hotwordRule": {}
}
]
}
]
},
"locationId": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"byteItem\": {\n \"data\": \"\",\n \"type\": \"\"\n },\n \"imageRedactionConfigs\": [\n {\n \"infoType\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"redactAllText\": false,\n \"redactionColor\": {\n \"blue\": \"\",\n \"green\": \"\",\n \"red\": \"\"\n }\n }\n ],\n \"includeFindings\": false,\n \"inspectConfig\": {\n \"contentOptions\": [],\n \"customInfoTypes\": [\n {\n \"detectionRules\": [\n {\n \"hotwordRule\": {\n \"hotwordRegex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n },\n \"likelihoodAdjustment\": {\n \"fixedLikelihood\": \"\",\n \"relativeLikelihood\": 0\n },\n \"proximity\": {\n \"windowAfter\": 0,\n \"windowBefore\": 0\n }\n }\n }\n ],\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {\n \"words\": []\n }\n },\n \"exclusionType\": \"\",\n \"infoType\": {},\n \"likelihood\": \"\",\n \"regex\": {},\n \"storedType\": {\n \"createTime\": \"\",\n \"name\": \"\"\n },\n \"surrogateType\": {}\n }\n ],\n \"excludeInfoTypes\": false,\n \"includeQuote\": false,\n \"infoTypes\": [\n {}\n ],\n \"limits\": {\n \"maxFindingsPerInfoType\": [\n {\n \"infoType\": {},\n \"maxFindings\": 0\n }\n ],\n \"maxFindingsPerItem\": 0,\n \"maxFindingsPerRequest\": 0\n },\n \"minLikelihood\": \"\",\n \"ruleSet\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"rules\": [\n {\n \"exclusionRule\": {\n \"dictionary\": {},\n \"excludeByHotword\": {\n \"hotwordRegex\": {},\n \"proximity\": {}\n },\n \"excludeInfoTypes\": {\n \"infoTypes\": [\n {}\n ]\n },\n \"matchingType\": \"\",\n \"regex\": {}\n },\n \"hotwordRule\": {}\n }\n ]\n }\n ]\n },\n \"locationId\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v2/:parent/image:redact", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/:parent/image:redact"
payload = {
"byteItem": {
"data": "",
"type": ""
},
"imageRedactionConfigs": [
{
"infoType": {
"name": "",
"version": ""
},
"redactAllText": False,
"redactionColor": {
"blue": "",
"green": "",
"red": ""
}
}
],
"includeFindings": False,
"inspectConfig": {
"contentOptions": [],
"customInfoTypes": [
{
"detectionRules": [{ "hotwordRule": {
"hotwordRegex": {
"groupIndexes": [],
"pattern": ""
},
"likelihoodAdjustment": {
"fixedLikelihood": "",
"relativeLikelihood": 0
},
"proximity": {
"windowAfter": 0,
"windowBefore": 0
}
} }],
"dictionary": {
"cloudStoragePath": { "path": "" },
"wordList": { "words": [] }
},
"exclusionType": "",
"infoType": {},
"likelihood": "",
"regex": {},
"storedType": {
"createTime": "",
"name": ""
},
"surrogateType": {}
}
],
"excludeInfoTypes": False,
"includeQuote": False,
"infoTypes": [{}],
"limits": {
"maxFindingsPerInfoType": [
{
"infoType": {},
"maxFindings": 0
}
],
"maxFindingsPerItem": 0,
"maxFindingsPerRequest": 0
},
"minLikelihood": "",
"ruleSet": [
{
"infoTypes": [{}],
"rules": [
{
"exclusionRule": {
"dictionary": {},
"excludeByHotword": {
"hotwordRegex": {},
"proximity": {}
},
"excludeInfoTypes": { "infoTypes": [{}] },
"matchingType": "",
"regex": {}
},
"hotwordRule": {}
}
]
}
]
},
"locationId": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/:parent/image:redact"
payload <- "{\n \"byteItem\": {\n \"data\": \"\",\n \"type\": \"\"\n },\n \"imageRedactionConfigs\": [\n {\n \"infoType\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"redactAllText\": false,\n \"redactionColor\": {\n \"blue\": \"\",\n \"green\": \"\",\n \"red\": \"\"\n }\n }\n ],\n \"includeFindings\": false,\n \"inspectConfig\": {\n \"contentOptions\": [],\n \"customInfoTypes\": [\n {\n \"detectionRules\": [\n {\n \"hotwordRule\": {\n \"hotwordRegex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n },\n \"likelihoodAdjustment\": {\n \"fixedLikelihood\": \"\",\n \"relativeLikelihood\": 0\n },\n \"proximity\": {\n \"windowAfter\": 0,\n \"windowBefore\": 0\n }\n }\n }\n ],\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {\n \"words\": []\n }\n },\n \"exclusionType\": \"\",\n \"infoType\": {},\n \"likelihood\": \"\",\n \"regex\": {},\n \"storedType\": {\n \"createTime\": \"\",\n \"name\": \"\"\n },\n \"surrogateType\": {}\n }\n ],\n \"excludeInfoTypes\": false,\n \"includeQuote\": false,\n \"infoTypes\": [\n {}\n ],\n \"limits\": {\n \"maxFindingsPerInfoType\": [\n {\n \"infoType\": {},\n \"maxFindings\": 0\n }\n ],\n \"maxFindingsPerItem\": 0,\n \"maxFindingsPerRequest\": 0\n },\n \"minLikelihood\": \"\",\n \"ruleSet\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"rules\": [\n {\n \"exclusionRule\": {\n \"dictionary\": {},\n \"excludeByHotword\": {\n \"hotwordRegex\": {},\n \"proximity\": {}\n },\n \"excludeInfoTypes\": {\n \"infoTypes\": [\n {}\n ]\n },\n \"matchingType\": \"\",\n \"regex\": {}\n },\n \"hotwordRule\": {}\n }\n ]\n }\n ]\n },\n \"locationId\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/:parent/image:redact")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"byteItem\": {\n \"data\": \"\",\n \"type\": \"\"\n },\n \"imageRedactionConfigs\": [\n {\n \"infoType\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"redactAllText\": false,\n \"redactionColor\": {\n \"blue\": \"\",\n \"green\": \"\",\n \"red\": \"\"\n }\n }\n ],\n \"includeFindings\": false,\n \"inspectConfig\": {\n \"contentOptions\": [],\n \"customInfoTypes\": [\n {\n \"detectionRules\": [\n {\n \"hotwordRule\": {\n \"hotwordRegex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n },\n \"likelihoodAdjustment\": {\n \"fixedLikelihood\": \"\",\n \"relativeLikelihood\": 0\n },\n \"proximity\": {\n \"windowAfter\": 0,\n \"windowBefore\": 0\n }\n }\n }\n ],\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {\n \"words\": []\n }\n },\n \"exclusionType\": \"\",\n \"infoType\": {},\n \"likelihood\": \"\",\n \"regex\": {},\n \"storedType\": {\n \"createTime\": \"\",\n \"name\": \"\"\n },\n \"surrogateType\": {}\n }\n ],\n \"excludeInfoTypes\": false,\n \"includeQuote\": false,\n \"infoTypes\": [\n {}\n ],\n \"limits\": {\n \"maxFindingsPerInfoType\": [\n {\n \"infoType\": {},\n \"maxFindings\": 0\n }\n ],\n \"maxFindingsPerItem\": 0,\n \"maxFindingsPerRequest\": 0\n },\n \"minLikelihood\": \"\",\n \"ruleSet\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"rules\": [\n {\n \"exclusionRule\": {\n \"dictionary\": {},\n \"excludeByHotword\": {\n \"hotwordRegex\": {},\n \"proximity\": {}\n },\n \"excludeInfoTypes\": {\n \"infoTypes\": [\n {}\n ]\n },\n \"matchingType\": \"\",\n \"regex\": {}\n },\n \"hotwordRule\": {}\n }\n ]\n }\n ]\n },\n \"locationId\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/v2/:parent/image:redact') do |req|
req.body = "{\n \"byteItem\": {\n \"data\": \"\",\n \"type\": \"\"\n },\n \"imageRedactionConfigs\": [\n {\n \"infoType\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"redactAllText\": false,\n \"redactionColor\": {\n \"blue\": \"\",\n \"green\": \"\",\n \"red\": \"\"\n }\n }\n ],\n \"includeFindings\": false,\n \"inspectConfig\": {\n \"contentOptions\": [],\n \"customInfoTypes\": [\n {\n \"detectionRules\": [\n {\n \"hotwordRule\": {\n \"hotwordRegex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n },\n \"likelihoodAdjustment\": {\n \"fixedLikelihood\": \"\",\n \"relativeLikelihood\": 0\n },\n \"proximity\": {\n \"windowAfter\": 0,\n \"windowBefore\": 0\n }\n }\n }\n ],\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {\n \"words\": []\n }\n },\n \"exclusionType\": \"\",\n \"infoType\": {},\n \"likelihood\": \"\",\n \"regex\": {},\n \"storedType\": {\n \"createTime\": \"\",\n \"name\": \"\"\n },\n \"surrogateType\": {}\n }\n ],\n \"excludeInfoTypes\": false,\n \"includeQuote\": false,\n \"infoTypes\": [\n {}\n ],\n \"limits\": {\n \"maxFindingsPerInfoType\": [\n {\n \"infoType\": {},\n \"maxFindings\": 0\n }\n ],\n \"maxFindingsPerItem\": 0,\n \"maxFindingsPerRequest\": 0\n },\n \"minLikelihood\": \"\",\n \"ruleSet\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"rules\": [\n {\n \"exclusionRule\": {\n \"dictionary\": {},\n \"excludeByHotword\": {\n \"hotwordRegex\": {},\n \"proximity\": {}\n },\n \"excludeInfoTypes\": {\n \"infoTypes\": [\n {}\n ]\n },\n \"matchingType\": \"\",\n \"regex\": {}\n },\n \"hotwordRule\": {}\n }\n ]\n }\n ]\n },\n \"locationId\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v2/:parent/image:redact";
let payload = json!({
"byteItem": json!({
"data": "",
"type": ""
}),
"imageRedactionConfigs": (
json!({
"infoType": json!({
"name": "",
"version": ""
}),
"redactAllText": false,
"redactionColor": json!({
"blue": "",
"green": "",
"red": ""
})
})
),
"includeFindings": false,
"inspectConfig": json!({
"contentOptions": (),
"customInfoTypes": (
json!({
"detectionRules": (json!({"hotwordRule": json!({
"hotwordRegex": json!({
"groupIndexes": (),
"pattern": ""
}),
"likelihoodAdjustment": json!({
"fixedLikelihood": "",
"relativeLikelihood": 0
}),
"proximity": json!({
"windowAfter": 0,
"windowBefore": 0
})
})})),
"dictionary": json!({
"cloudStoragePath": json!({"path": ""}),
"wordList": json!({"words": ()})
}),
"exclusionType": "",
"infoType": json!({}),
"likelihood": "",
"regex": json!({}),
"storedType": json!({
"createTime": "",
"name": ""
}),
"surrogateType": json!({})
})
),
"excludeInfoTypes": false,
"includeQuote": false,
"infoTypes": (json!({})),
"limits": json!({
"maxFindingsPerInfoType": (
json!({
"infoType": json!({}),
"maxFindings": 0
})
),
"maxFindingsPerItem": 0,
"maxFindingsPerRequest": 0
}),
"minLikelihood": "",
"ruleSet": (
json!({
"infoTypes": (json!({})),
"rules": (
json!({
"exclusionRule": json!({
"dictionary": json!({}),
"excludeByHotword": json!({
"hotwordRegex": json!({}),
"proximity": json!({})
}),
"excludeInfoTypes": json!({"infoTypes": (json!({}))}),
"matchingType": "",
"regex": json!({})
}),
"hotwordRule": json!({})
})
)
})
)
}),
"locationId": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/v2/:parent/image:redact \
--header 'content-type: application/json' \
--data '{
"byteItem": {
"data": "",
"type": ""
},
"imageRedactionConfigs": [
{
"infoType": {
"name": "",
"version": ""
},
"redactAllText": false,
"redactionColor": {
"blue": "",
"green": "",
"red": ""
}
}
],
"includeFindings": false,
"inspectConfig": {
"contentOptions": [],
"customInfoTypes": [
{
"detectionRules": [
{
"hotwordRule": {
"hotwordRegex": {
"groupIndexes": [],
"pattern": ""
},
"likelihoodAdjustment": {
"fixedLikelihood": "",
"relativeLikelihood": 0
},
"proximity": {
"windowAfter": 0,
"windowBefore": 0
}
}
}
],
"dictionary": {
"cloudStoragePath": {
"path": ""
},
"wordList": {
"words": []
}
},
"exclusionType": "",
"infoType": {},
"likelihood": "",
"regex": {},
"storedType": {
"createTime": "",
"name": ""
},
"surrogateType": {}
}
],
"excludeInfoTypes": false,
"includeQuote": false,
"infoTypes": [
{}
],
"limits": {
"maxFindingsPerInfoType": [
{
"infoType": {},
"maxFindings": 0
}
],
"maxFindingsPerItem": 0,
"maxFindingsPerRequest": 0
},
"minLikelihood": "",
"ruleSet": [
{
"infoTypes": [
{}
],
"rules": [
{
"exclusionRule": {
"dictionary": {},
"excludeByHotword": {
"hotwordRegex": {},
"proximity": {}
},
"excludeInfoTypes": {
"infoTypes": [
{}
]
},
"matchingType": "",
"regex": {}
},
"hotwordRule": {}
}
]
}
]
},
"locationId": ""
}'
echo '{
"byteItem": {
"data": "",
"type": ""
},
"imageRedactionConfigs": [
{
"infoType": {
"name": "",
"version": ""
},
"redactAllText": false,
"redactionColor": {
"blue": "",
"green": "",
"red": ""
}
}
],
"includeFindings": false,
"inspectConfig": {
"contentOptions": [],
"customInfoTypes": [
{
"detectionRules": [
{
"hotwordRule": {
"hotwordRegex": {
"groupIndexes": [],
"pattern": ""
},
"likelihoodAdjustment": {
"fixedLikelihood": "",
"relativeLikelihood": 0
},
"proximity": {
"windowAfter": 0,
"windowBefore": 0
}
}
}
],
"dictionary": {
"cloudStoragePath": {
"path": ""
},
"wordList": {
"words": []
}
},
"exclusionType": "",
"infoType": {},
"likelihood": "",
"regex": {},
"storedType": {
"createTime": "",
"name": ""
},
"surrogateType": {}
}
],
"excludeInfoTypes": false,
"includeQuote": false,
"infoTypes": [
{}
],
"limits": {
"maxFindingsPerInfoType": [
{
"infoType": {},
"maxFindings": 0
}
],
"maxFindingsPerItem": 0,
"maxFindingsPerRequest": 0
},
"minLikelihood": "",
"ruleSet": [
{
"infoTypes": [
{}
],
"rules": [
{
"exclusionRule": {
"dictionary": {},
"excludeByHotword": {
"hotwordRegex": {},
"proximity": {}
},
"excludeInfoTypes": {
"infoTypes": [
{}
]
},
"matchingType": "",
"regex": {}
},
"hotwordRule": {}
}
]
}
]
},
"locationId": ""
}' | \
http POST {{baseUrl}}/v2/:parent/image:redact \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "byteItem": {\n "data": "",\n "type": ""\n },\n "imageRedactionConfigs": [\n {\n "infoType": {\n "name": "",\n "version": ""\n },\n "redactAllText": false,\n "redactionColor": {\n "blue": "",\n "green": "",\n "red": ""\n }\n }\n ],\n "includeFindings": false,\n "inspectConfig": {\n "contentOptions": [],\n "customInfoTypes": [\n {\n "detectionRules": [\n {\n "hotwordRule": {\n "hotwordRegex": {\n "groupIndexes": [],\n "pattern": ""\n },\n "likelihoodAdjustment": {\n "fixedLikelihood": "",\n "relativeLikelihood": 0\n },\n "proximity": {\n "windowAfter": 0,\n "windowBefore": 0\n }\n }\n }\n ],\n "dictionary": {\n "cloudStoragePath": {\n "path": ""\n },\n "wordList": {\n "words": []\n }\n },\n "exclusionType": "",\n "infoType": {},\n "likelihood": "",\n "regex": {},\n "storedType": {\n "createTime": "",\n "name": ""\n },\n "surrogateType": {}\n }\n ],\n "excludeInfoTypes": false,\n "includeQuote": false,\n "infoTypes": [\n {}\n ],\n "limits": {\n "maxFindingsPerInfoType": [\n {\n "infoType": {},\n "maxFindings": 0\n }\n ],\n "maxFindingsPerItem": 0,\n "maxFindingsPerRequest": 0\n },\n "minLikelihood": "",\n "ruleSet": [\n {\n "infoTypes": [\n {}\n ],\n "rules": [\n {\n "exclusionRule": {\n "dictionary": {},\n "excludeByHotword": {\n "hotwordRegex": {},\n "proximity": {}\n },\n "excludeInfoTypes": {\n "infoTypes": [\n {}\n ]\n },\n "matchingType": "",\n "regex": {}\n },\n "hotwordRule": {}\n }\n ]\n }\n ]\n },\n "locationId": ""\n}' \
--output-document \
- {{baseUrl}}/v2/:parent/image:redact
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"byteItem": [
"data": "",
"type": ""
],
"imageRedactionConfigs": [
[
"infoType": [
"name": "",
"version": ""
],
"redactAllText": false,
"redactionColor": [
"blue": "",
"green": "",
"red": ""
]
]
],
"includeFindings": false,
"inspectConfig": [
"contentOptions": [],
"customInfoTypes": [
[
"detectionRules": [["hotwordRule": [
"hotwordRegex": [
"groupIndexes": [],
"pattern": ""
],
"likelihoodAdjustment": [
"fixedLikelihood": "",
"relativeLikelihood": 0
],
"proximity": [
"windowAfter": 0,
"windowBefore": 0
]
]]],
"dictionary": [
"cloudStoragePath": ["path": ""],
"wordList": ["words": []]
],
"exclusionType": "",
"infoType": [],
"likelihood": "",
"regex": [],
"storedType": [
"createTime": "",
"name": ""
],
"surrogateType": []
]
],
"excludeInfoTypes": false,
"includeQuote": false,
"infoTypes": [[]],
"limits": [
"maxFindingsPerInfoType": [
[
"infoType": [],
"maxFindings": 0
]
],
"maxFindingsPerItem": 0,
"maxFindingsPerRequest": 0
],
"minLikelihood": "",
"ruleSet": [
[
"infoTypes": [[]],
"rules": [
[
"exclusionRule": [
"dictionary": [],
"excludeByHotword": [
"hotwordRegex": [],
"proximity": []
],
"excludeInfoTypes": ["infoTypes": [[]]],
"matchingType": "",
"regex": []
],
"hotwordRule": []
]
]
]
]
],
"locationId": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/:parent/image:redact")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
dlp.projects.locations.inspectTemplates.create
{{baseUrl}}/v2/:parent/inspectTemplates
QUERY PARAMS
parent
BODY json
{
"inspectTemplate": {
"createTime": "",
"description": "",
"displayName": "",
"inspectConfig": {
"contentOptions": [],
"customInfoTypes": [
{
"detectionRules": [
{
"hotwordRule": {
"hotwordRegex": {
"groupIndexes": [],
"pattern": ""
},
"likelihoodAdjustment": {
"fixedLikelihood": "",
"relativeLikelihood": 0
},
"proximity": {
"windowAfter": 0,
"windowBefore": 0
}
}
}
],
"dictionary": {
"cloudStoragePath": {
"path": ""
},
"wordList": {
"words": []
}
},
"exclusionType": "",
"infoType": {
"name": "",
"version": ""
},
"likelihood": "",
"regex": {},
"storedType": {
"createTime": "",
"name": ""
},
"surrogateType": {}
}
],
"excludeInfoTypes": false,
"includeQuote": false,
"infoTypes": [
{}
],
"limits": {
"maxFindingsPerInfoType": [
{
"infoType": {},
"maxFindings": 0
}
],
"maxFindingsPerItem": 0,
"maxFindingsPerRequest": 0
},
"minLikelihood": "",
"ruleSet": [
{
"infoTypes": [
{}
],
"rules": [
{
"exclusionRule": {
"dictionary": {},
"excludeByHotword": {
"hotwordRegex": {},
"proximity": {}
},
"excludeInfoTypes": {
"infoTypes": [
{}
]
},
"matchingType": "",
"regex": {}
},
"hotwordRule": {}
}
]
}
]
},
"name": "",
"updateTime": ""
},
"locationId": "",
"templateId": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/:parent/inspectTemplates");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"inspectTemplate\": {\n \"createTime\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"inspectConfig\": {\n \"contentOptions\": [],\n \"customInfoTypes\": [\n {\n \"detectionRules\": [\n {\n \"hotwordRule\": {\n \"hotwordRegex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n },\n \"likelihoodAdjustment\": {\n \"fixedLikelihood\": \"\",\n \"relativeLikelihood\": 0\n },\n \"proximity\": {\n \"windowAfter\": 0,\n \"windowBefore\": 0\n }\n }\n }\n ],\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {\n \"words\": []\n }\n },\n \"exclusionType\": \"\",\n \"infoType\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"likelihood\": \"\",\n \"regex\": {},\n \"storedType\": {\n \"createTime\": \"\",\n \"name\": \"\"\n },\n \"surrogateType\": {}\n }\n ],\n \"excludeInfoTypes\": false,\n \"includeQuote\": false,\n \"infoTypes\": [\n {}\n ],\n \"limits\": {\n \"maxFindingsPerInfoType\": [\n {\n \"infoType\": {},\n \"maxFindings\": 0\n }\n ],\n \"maxFindingsPerItem\": 0,\n \"maxFindingsPerRequest\": 0\n },\n \"minLikelihood\": \"\",\n \"ruleSet\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"rules\": [\n {\n \"exclusionRule\": {\n \"dictionary\": {},\n \"excludeByHotword\": {\n \"hotwordRegex\": {},\n \"proximity\": {}\n },\n \"excludeInfoTypes\": {\n \"infoTypes\": [\n {}\n ]\n },\n \"matchingType\": \"\",\n \"regex\": {}\n },\n \"hotwordRule\": {}\n }\n ]\n }\n ]\n },\n \"name\": \"\",\n \"updateTime\": \"\"\n },\n \"locationId\": \"\",\n \"templateId\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v2/:parent/inspectTemplates" {:content-type :json
:form-params {:inspectTemplate {:createTime ""
:description ""
:displayName ""
:inspectConfig {:contentOptions []
:customInfoTypes [{:detectionRules [{:hotwordRule {:hotwordRegex {:groupIndexes []
:pattern ""}
:likelihoodAdjustment {:fixedLikelihood ""
:relativeLikelihood 0}
:proximity {:windowAfter 0
:windowBefore 0}}}]
:dictionary {:cloudStoragePath {:path ""}
:wordList {:words []}}
:exclusionType ""
:infoType {:name ""
:version ""}
:likelihood ""
:regex {}
:storedType {:createTime ""
:name ""}
:surrogateType {}}]
:excludeInfoTypes false
:includeQuote false
:infoTypes [{}]
:limits {:maxFindingsPerInfoType [{:infoType {}
:maxFindings 0}]
:maxFindingsPerItem 0
:maxFindingsPerRequest 0}
:minLikelihood ""
:ruleSet [{:infoTypes [{}]
:rules [{:exclusionRule {:dictionary {}
:excludeByHotword {:hotwordRegex {}
:proximity {}}
:excludeInfoTypes {:infoTypes [{}]}
:matchingType ""
:regex {}}
:hotwordRule {}}]}]}
:name ""
:updateTime ""}
:locationId ""
:templateId ""}})
require "http/client"
url = "{{baseUrl}}/v2/:parent/inspectTemplates"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"inspectTemplate\": {\n \"createTime\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"inspectConfig\": {\n \"contentOptions\": [],\n \"customInfoTypes\": [\n {\n \"detectionRules\": [\n {\n \"hotwordRule\": {\n \"hotwordRegex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n },\n \"likelihoodAdjustment\": {\n \"fixedLikelihood\": \"\",\n \"relativeLikelihood\": 0\n },\n \"proximity\": {\n \"windowAfter\": 0,\n \"windowBefore\": 0\n }\n }\n }\n ],\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {\n \"words\": []\n }\n },\n \"exclusionType\": \"\",\n \"infoType\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"likelihood\": \"\",\n \"regex\": {},\n \"storedType\": {\n \"createTime\": \"\",\n \"name\": \"\"\n },\n \"surrogateType\": {}\n }\n ],\n \"excludeInfoTypes\": false,\n \"includeQuote\": false,\n \"infoTypes\": [\n {}\n ],\n \"limits\": {\n \"maxFindingsPerInfoType\": [\n {\n \"infoType\": {},\n \"maxFindings\": 0\n }\n ],\n \"maxFindingsPerItem\": 0,\n \"maxFindingsPerRequest\": 0\n },\n \"minLikelihood\": \"\",\n \"ruleSet\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"rules\": [\n {\n \"exclusionRule\": {\n \"dictionary\": {},\n \"excludeByHotword\": {\n \"hotwordRegex\": {},\n \"proximity\": {}\n },\n \"excludeInfoTypes\": {\n \"infoTypes\": [\n {}\n ]\n },\n \"matchingType\": \"\",\n \"regex\": {}\n },\n \"hotwordRule\": {}\n }\n ]\n }\n ]\n },\n \"name\": \"\",\n \"updateTime\": \"\"\n },\n \"locationId\": \"\",\n \"templateId\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/v2/:parent/inspectTemplates"),
Content = new StringContent("{\n \"inspectTemplate\": {\n \"createTime\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"inspectConfig\": {\n \"contentOptions\": [],\n \"customInfoTypes\": [\n {\n \"detectionRules\": [\n {\n \"hotwordRule\": {\n \"hotwordRegex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n },\n \"likelihoodAdjustment\": {\n \"fixedLikelihood\": \"\",\n \"relativeLikelihood\": 0\n },\n \"proximity\": {\n \"windowAfter\": 0,\n \"windowBefore\": 0\n }\n }\n }\n ],\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {\n \"words\": []\n }\n },\n \"exclusionType\": \"\",\n \"infoType\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"likelihood\": \"\",\n \"regex\": {},\n \"storedType\": {\n \"createTime\": \"\",\n \"name\": \"\"\n },\n \"surrogateType\": {}\n }\n ],\n \"excludeInfoTypes\": false,\n \"includeQuote\": false,\n \"infoTypes\": [\n {}\n ],\n \"limits\": {\n \"maxFindingsPerInfoType\": [\n {\n \"infoType\": {},\n \"maxFindings\": 0\n }\n ],\n \"maxFindingsPerItem\": 0,\n \"maxFindingsPerRequest\": 0\n },\n \"minLikelihood\": \"\",\n \"ruleSet\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"rules\": [\n {\n \"exclusionRule\": {\n \"dictionary\": {},\n \"excludeByHotword\": {\n \"hotwordRegex\": {},\n \"proximity\": {}\n },\n \"excludeInfoTypes\": {\n \"infoTypes\": [\n {}\n ]\n },\n \"matchingType\": \"\",\n \"regex\": {}\n },\n \"hotwordRule\": {}\n }\n ]\n }\n ]\n },\n \"name\": \"\",\n \"updateTime\": \"\"\n },\n \"locationId\": \"\",\n \"templateId\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/:parent/inspectTemplates");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"inspectTemplate\": {\n \"createTime\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"inspectConfig\": {\n \"contentOptions\": [],\n \"customInfoTypes\": [\n {\n \"detectionRules\": [\n {\n \"hotwordRule\": {\n \"hotwordRegex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n },\n \"likelihoodAdjustment\": {\n \"fixedLikelihood\": \"\",\n \"relativeLikelihood\": 0\n },\n \"proximity\": {\n \"windowAfter\": 0,\n \"windowBefore\": 0\n }\n }\n }\n ],\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {\n \"words\": []\n }\n },\n \"exclusionType\": \"\",\n \"infoType\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"likelihood\": \"\",\n \"regex\": {},\n \"storedType\": {\n \"createTime\": \"\",\n \"name\": \"\"\n },\n \"surrogateType\": {}\n }\n ],\n \"excludeInfoTypes\": false,\n \"includeQuote\": false,\n \"infoTypes\": [\n {}\n ],\n \"limits\": {\n \"maxFindingsPerInfoType\": [\n {\n \"infoType\": {},\n \"maxFindings\": 0\n }\n ],\n \"maxFindingsPerItem\": 0,\n \"maxFindingsPerRequest\": 0\n },\n \"minLikelihood\": \"\",\n \"ruleSet\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"rules\": [\n {\n \"exclusionRule\": {\n \"dictionary\": {},\n \"excludeByHotword\": {\n \"hotwordRegex\": {},\n \"proximity\": {}\n },\n \"excludeInfoTypes\": {\n \"infoTypes\": [\n {}\n ]\n },\n \"matchingType\": \"\",\n \"regex\": {}\n },\n \"hotwordRule\": {}\n }\n ]\n }\n ]\n },\n \"name\": \"\",\n \"updateTime\": \"\"\n },\n \"locationId\": \"\",\n \"templateId\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/:parent/inspectTemplates"
payload := strings.NewReader("{\n \"inspectTemplate\": {\n \"createTime\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"inspectConfig\": {\n \"contentOptions\": [],\n \"customInfoTypes\": [\n {\n \"detectionRules\": [\n {\n \"hotwordRule\": {\n \"hotwordRegex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n },\n \"likelihoodAdjustment\": {\n \"fixedLikelihood\": \"\",\n \"relativeLikelihood\": 0\n },\n \"proximity\": {\n \"windowAfter\": 0,\n \"windowBefore\": 0\n }\n }\n }\n ],\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {\n \"words\": []\n }\n },\n \"exclusionType\": \"\",\n \"infoType\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"likelihood\": \"\",\n \"regex\": {},\n \"storedType\": {\n \"createTime\": \"\",\n \"name\": \"\"\n },\n \"surrogateType\": {}\n }\n ],\n \"excludeInfoTypes\": false,\n \"includeQuote\": false,\n \"infoTypes\": [\n {}\n ],\n \"limits\": {\n \"maxFindingsPerInfoType\": [\n {\n \"infoType\": {},\n \"maxFindings\": 0\n }\n ],\n \"maxFindingsPerItem\": 0,\n \"maxFindingsPerRequest\": 0\n },\n \"minLikelihood\": \"\",\n \"ruleSet\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"rules\": [\n {\n \"exclusionRule\": {\n \"dictionary\": {},\n \"excludeByHotword\": {\n \"hotwordRegex\": {},\n \"proximity\": {}\n },\n \"excludeInfoTypes\": {\n \"infoTypes\": [\n {}\n ]\n },\n \"matchingType\": \"\",\n \"regex\": {}\n },\n \"hotwordRule\": {}\n }\n ]\n }\n ]\n },\n \"name\": \"\",\n \"updateTime\": \"\"\n },\n \"locationId\": \"\",\n \"templateId\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/v2/:parent/inspectTemplates HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 2221
{
"inspectTemplate": {
"createTime": "",
"description": "",
"displayName": "",
"inspectConfig": {
"contentOptions": [],
"customInfoTypes": [
{
"detectionRules": [
{
"hotwordRule": {
"hotwordRegex": {
"groupIndexes": [],
"pattern": ""
},
"likelihoodAdjustment": {
"fixedLikelihood": "",
"relativeLikelihood": 0
},
"proximity": {
"windowAfter": 0,
"windowBefore": 0
}
}
}
],
"dictionary": {
"cloudStoragePath": {
"path": ""
},
"wordList": {
"words": []
}
},
"exclusionType": "",
"infoType": {
"name": "",
"version": ""
},
"likelihood": "",
"regex": {},
"storedType": {
"createTime": "",
"name": ""
},
"surrogateType": {}
}
],
"excludeInfoTypes": false,
"includeQuote": false,
"infoTypes": [
{}
],
"limits": {
"maxFindingsPerInfoType": [
{
"infoType": {},
"maxFindings": 0
}
],
"maxFindingsPerItem": 0,
"maxFindingsPerRequest": 0
},
"minLikelihood": "",
"ruleSet": [
{
"infoTypes": [
{}
],
"rules": [
{
"exclusionRule": {
"dictionary": {},
"excludeByHotword": {
"hotwordRegex": {},
"proximity": {}
},
"excludeInfoTypes": {
"infoTypes": [
{}
]
},
"matchingType": "",
"regex": {}
},
"hotwordRule": {}
}
]
}
]
},
"name": "",
"updateTime": ""
},
"locationId": "",
"templateId": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v2/:parent/inspectTemplates")
.setHeader("content-type", "application/json")
.setBody("{\n \"inspectTemplate\": {\n \"createTime\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"inspectConfig\": {\n \"contentOptions\": [],\n \"customInfoTypes\": [\n {\n \"detectionRules\": [\n {\n \"hotwordRule\": {\n \"hotwordRegex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n },\n \"likelihoodAdjustment\": {\n \"fixedLikelihood\": \"\",\n \"relativeLikelihood\": 0\n },\n \"proximity\": {\n \"windowAfter\": 0,\n \"windowBefore\": 0\n }\n }\n }\n ],\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {\n \"words\": []\n }\n },\n \"exclusionType\": \"\",\n \"infoType\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"likelihood\": \"\",\n \"regex\": {},\n \"storedType\": {\n \"createTime\": \"\",\n \"name\": \"\"\n },\n \"surrogateType\": {}\n }\n ],\n \"excludeInfoTypes\": false,\n \"includeQuote\": false,\n \"infoTypes\": [\n {}\n ],\n \"limits\": {\n \"maxFindingsPerInfoType\": [\n {\n \"infoType\": {},\n \"maxFindings\": 0\n }\n ],\n \"maxFindingsPerItem\": 0,\n \"maxFindingsPerRequest\": 0\n },\n \"minLikelihood\": \"\",\n \"ruleSet\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"rules\": [\n {\n \"exclusionRule\": {\n \"dictionary\": {},\n \"excludeByHotword\": {\n \"hotwordRegex\": {},\n \"proximity\": {}\n },\n \"excludeInfoTypes\": {\n \"infoTypes\": [\n {}\n ]\n },\n \"matchingType\": \"\",\n \"regex\": {}\n },\n \"hotwordRule\": {}\n }\n ]\n }\n ]\n },\n \"name\": \"\",\n \"updateTime\": \"\"\n },\n \"locationId\": \"\",\n \"templateId\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/:parent/inspectTemplates"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"inspectTemplate\": {\n \"createTime\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"inspectConfig\": {\n \"contentOptions\": [],\n \"customInfoTypes\": [\n {\n \"detectionRules\": [\n {\n \"hotwordRule\": {\n \"hotwordRegex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n },\n \"likelihoodAdjustment\": {\n \"fixedLikelihood\": \"\",\n \"relativeLikelihood\": 0\n },\n \"proximity\": {\n \"windowAfter\": 0,\n \"windowBefore\": 0\n }\n }\n }\n ],\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {\n \"words\": []\n }\n },\n \"exclusionType\": \"\",\n \"infoType\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"likelihood\": \"\",\n \"regex\": {},\n \"storedType\": {\n \"createTime\": \"\",\n \"name\": \"\"\n },\n \"surrogateType\": {}\n }\n ],\n \"excludeInfoTypes\": false,\n \"includeQuote\": false,\n \"infoTypes\": [\n {}\n ],\n \"limits\": {\n \"maxFindingsPerInfoType\": [\n {\n \"infoType\": {},\n \"maxFindings\": 0\n }\n ],\n \"maxFindingsPerItem\": 0,\n \"maxFindingsPerRequest\": 0\n },\n \"minLikelihood\": \"\",\n \"ruleSet\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"rules\": [\n {\n \"exclusionRule\": {\n \"dictionary\": {},\n \"excludeByHotword\": {\n \"hotwordRegex\": {},\n \"proximity\": {}\n },\n \"excludeInfoTypes\": {\n \"infoTypes\": [\n {}\n ]\n },\n \"matchingType\": \"\",\n \"regex\": {}\n },\n \"hotwordRule\": {}\n }\n ]\n }\n ]\n },\n \"name\": \"\",\n \"updateTime\": \"\"\n },\n \"locationId\": \"\",\n \"templateId\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"inspectTemplate\": {\n \"createTime\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"inspectConfig\": {\n \"contentOptions\": [],\n \"customInfoTypes\": [\n {\n \"detectionRules\": [\n {\n \"hotwordRule\": {\n \"hotwordRegex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n },\n \"likelihoodAdjustment\": {\n \"fixedLikelihood\": \"\",\n \"relativeLikelihood\": 0\n },\n \"proximity\": {\n \"windowAfter\": 0,\n \"windowBefore\": 0\n }\n }\n }\n ],\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {\n \"words\": []\n }\n },\n \"exclusionType\": \"\",\n \"infoType\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"likelihood\": \"\",\n \"regex\": {},\n \"storedType\": {\n \"createTime\": \"\",\n \"name\": \"\"\n },\n \"surrogateType\": {}\n }\n ],\n \"excludeInfoTypes\": false,\n \"includeQuote\": false,\n \"infoTypes\": [\n {}\n ],\n \"limits\": {\n \"maxFindingsPerInfoType\": [\n {\n \"infoType\": {},\n \"maxFindings\": 0\n }\n ],\n \"maxFindingsPerItem\": 0,\n \"maxFindingsPerRequest\": 0\n },\n \"minLikelihood\": \"\",\n \"ruleSet\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"rules\": [\n {\n \"exclusionRule\": {\n \"dictionary\": {},\n \"excludeByHotword\": {\n \"hotwordRegex\": {},\n \"proximity\": {}\n },\n \"excludeInfoTypes\": {\n \"infoTypes\": [\n {}\n ]\n },\n \"matchingType\": \"\",\n \"regex\": {}\n },\n \"hotwordRule\": {}\n }\n ]\n }\n ]\n },\n \"name\": \"\",\n \"updateTime\": \"\"\n },\n \"locationId\": \"\",\n \"templateId\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v2/:parent/inspectTemplates")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v2/:parent/inspectTemplates")
.header("content-type", "application/json")
.body("{\n \"inspectTemplate\": {\n \"createTime\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"inspectConfig\": {\n \"contentOptions\": [],\n \"customInfoTypes\": [\n {\n \"detectionRules\": [\n {\n \"hotwordRule\": {\n \"hotwordRegex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n },\n \"likelihoodAdjustment\": {\n \"fixedLikelihood\": \"\",\n \"relativeLikelihood\": 0\n },\n \"proximity\": {\n \"windowAfter\": 0,\n \"windowBefore\": 0\n }\n }\n }\n ],\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {\n \"words\": []\n }\n },\n \"exclusionType\": \"\",\n \"infoType\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"likelihood\": \"\",\n \"regex\": {},\n \"storedType\": {\n \"createTime\": \"\",\n \"name\": \"\"\n },\n \"surrogateType\": {}\n }\n ],\n \"excludeInfoTypes\": false,\n \"includeQuote\": false,\n \"infoTypes\": [\n {}\n ],\n \"limits\": {\n \"maxFindingsPerInfoType\": [\n {\n \"infoType\": {},\n \"maxFindings\": 0\n }\n ],\n \"maxFindingsPerItem\": 0,\n \"maxFindingsPerRequest\": 0\n },\n \"minLikelihood\": \"\",\n \"ruleSet\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"rules\": [\n {\n \"exclusionRule\": {\n \"dictionary\": {},\n \"excludeByHotword\": {\n \"hotwordRegex\": {},\n \"proximity\": {}\n },\n \"excludeInfoTypes\": {\n \"infoTypes\": [\n {}\n ]\n },\n \"matchingType\": \"\",\n \"regex\": {}\n },\n \"hotwordRule\": {}\n }\n ]\n }\n ]\n },\n \"name\": \"\",\n \"updateTime\": \"\"\n },\n \"locationId\": \"\",\n \"templateId\": \"\"\n}")
.asString();
const data = JSON.stringify({
inspectTemplate: {
createTime: '',
description: '',
displayName: '',
inspectConfig: {
contentOptions: [],
customInfoTypes: [
{
detectionRules: [
{
hotwordRule: {
hotwordRegex: {
groupIndexes: [],
pattern: ''
},
likelihoodAdjustment: {
fixedLikelihood: '',
relativeLikelihood: 0
},
proximity: {
windowAfter: 0,
windowBefore: 0
}
}
}
],
dictionary: {
cloudStoragePath: {
path: ''
},
wordList: {
words: []
}
},
exclusionType: '',
infoType: {
name: '',
version: ''
},
likelihood: '',
regex: {},
storedType: {
createTime: '',
name: ''
},
surrogateType: {}
}
],
excludeInfoTypes: false,
includeQuote: false,
infoTypes: [
{}
],
limits: {
maxFindingsPerInfoType: [
{
infoType: {},
maxFindings: 0
}
],
maxFindingsPerItem: 0,
maxFindingsPerRequest: 0
},
minLikelihood: '',
ruleSet: [
{
infoTypes: [
{}
],
rules: [
{
exclusionRule: {
dictionary: {},
excludeByHotword: {
hotwordRegex: {},
proximity: {}
},
excludeInfoTypes: {
infoTypes: [
{}
]
},
matchingType: '',
regex: {}
},
hotwordRule: {}
}
]
}
]
},
name: '',
updateTime: ''
},
locationId: '',
templateId: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v2/:parent/inspectTemplates');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v2/:parent/inspectTemplates',
headers: {'content-type': 'application/json'},
data: {
inspectTemplate: {
createTime: '',
description: '',
displayName: '',
inspectConfig: {
contentOptions: [],
customInfoTypes: [
{
detectionRules: [
{
hotwordRule: {
hotwordRegex: {groupIndexes: [], pattern: ''},
likelihoodAdjustment: {fixedLikelihood: '', relativeLikelihood: 0},
proximity: {windowAfter: 0, windowBefore: 0}
}
}
],
dictionary: {cloudStoragePath: {path: ''}, wordList: {words: []}},
exclusionType: '',
infoType: {name: '', version: ''},
likelihood: '',
regex: {},
storedType: {createTime: '', name: ''},
surrogateType: {}
}
],
excludeInfoTypes: false,
includeQuote: false,
infoTypes: [{}],
limits: {
maxFindingsPerInfoType: [{infoType: {}, maxFindings: 0}],
maxFindingsPerItem: 0,
maxFindingsPerRequest: 0
},
minLikelihood: '',
ruleSet: [
{
infoTypes: [{}],
rules: [
{
exclusionRule: {
dictionary: {},
excludeByHotword: {hotwordRegex: {}, proximity: {}},
excludeInfoTypes: {infoTypes: [{}]},
matchingType: '',
regex: {}
},
hotwordRule: {}
}
]
}
]
},
name: '',
updateTime: ''
},
locationId: '',
templateId: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/:parent/inspectTemplates';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"inspectTemplate":{"createTime":"","description":"","displayName":"","inspectConfig":{"contentOptions":[],"customInfoTypes":[{"detectionRules":[{"hotwordRule":{"hotwordRegex":{"groupIndexes":[],"pattern":""},"likelihoodAdjustment":{"fixedLikelihood":"","relativeLikelihood":0},"proximity":{"windowAfter":0,"windowBefore":0}}}],"dictionary":{"cloudStoragePath":{"path":""},"wordList":{"words":[]}},"exclusionType":"","infoType":{"name":"","version":""},"likelihood":"","regex":{},"storedType":{"createTime":"","name":""},"surrogateType":{}}],"excludeInfoTypes":false,"includeQuote":false,"infoTypes":[{}],"limits":{"maxFindingsPerInfoType":[{"infoType":{},"maxFindings":0}],"maxFindingsPerItem":0,"maxFindingsPerRequest":0},"minLikelihood":"","ruleSet":[{"infoTypes":[{}],"rules":[{"exclusionRule":{"dictionary":{},"excludeByHotword":{"hotwordRegex":{},"proximity":{}},"excludeInfoTypes":{"infoTypes":[{}]},"matchingType":"","regex":{}},"hotwordRule":{}}]}]},"name":"","updateTime":""},"locationId":"","templateId":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v2/:parent/inspectTemplates',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "inspectTemplate": {\n "createTime": "",\n "description": "",\n "displayName": "",\n "inspectConfig": {\n "contentOptions": [],\n "customInfoTypes": [\n {\n "detectionRules": [\n {\n "hotwordRule": {\n "hotwordRegex": {\n "groupIndexes": [],\n "pattern": ""\n },\n "likelihoodAdjustment": {\n "fixedLikelihood": "",\n "relativeLikelihood": 0\n },\n "proximity": {\n "windowAfter": 0,\n "windowBefore": 0\n }\n }\n }\n ],\n "dictionary": {\n "cloudStoragePath": {\n "path": ""\n },\n "wordList": {\n "words": []\n }\n },\n "exclusionType": "",\n "infoType": {\n "name": "",\n "version": ""\n },\n "likelihood": "",\n "regex": {},\n "storedType": {\n "createTime": "",\n "name": ""\n },\n "surrogateType": {}\n }\n ],\n "excludeInfoTypes": false,\n "includeQuote": false,\n "infoTypes": [\n {}\n ],\n "limits": {\n "maxFindingsPerInfoType": [\n {\n "infoType": {},\n "maxFindings": 0\n }\n ],\n "maxFindingsPerItem": 0,\n "maxFindingsPerRequest": 0\n },\n "minLikelihood": "",\n "ruleSet": [\n {\n "infoTypes": [\n {}\n ],\n "rules": [\n {\n "exclusionRule": {\n "dictionary": {},\n "excludeByHotword": {\n "hotwordRegex": {},\n "proximity": {}\n },\n "excludeInfoTypes": {\n "infoTypes": [\n {}\n ]\n },\n "matchingType": "",\n "regex": {}\n },\n "hotwordRule": {}\n }\n ]\n }\n ]\n },\n "name": "",\n "updateTime": ""\n },\n "locationId": "",\n "templateId": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"inspectTemplate\": {\n \"createTime\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"inspectConfig\": {\n \"contentOptions\": [],\n \"customInfoTypes\": [\n {\n \"detectionRules\": [\n {\n \"hotwordRule\": {\n \"hotwordRegex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n },\n \"likelihoodAdjustment\": {\n \"fixedLikelihood\": \"\",\n \"relativeLikelihood\": 0\n },\n \"proximity\": {\n \"windowAfter\": 0,\n \"windowBefore\": 0\n }\n }\n }\n ],\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {\n \"words\": []\n }\n },\n \"exclusionType\": \"\",\n \"infoType\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"likelihood\": \"\",\n \"regex\": {},\n \"storedType\": {\n \"createTime\": \"\",\n \"name\": \"\"\n },\n \"surrogateType\": {}\n }\n ],\n \"excludeInfoTypes\": false,\n \"includeQuote\": false,\n \"infoTypes\": [\n {}\n ],\n \"limits\": {\n \"maxFindingsPerInfoType\": [\n {\n \"infoType\": {},\n \"maxFindings\": 0\n }\n ],\n \"maxFindingsPerItem\": 0,\n \"maxFindingsPerRequest\": 0\n },\n \"minLikelihood\": \"\",\n \"ruleSet\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"rules\": [\n {\n \"exclusionRule\": {\n \"dictionary\": {},\n \"excludeByHotword\": {\n \"hotwordRegex\": {},\n \"proximity\": {}\n },\n \"excludeInfoTypes\": {\n \"infoTypes\": [\n {}\n ]\n },\n \"matchingType\": \"\",\n \"regex\": {}\n },\n \"hotwordRule\": {}\n }\n ]\n }\n ]\n },\n \"name\": \"\",\n \"updateTime\": \"\"\n },\n \"locationId\": \"\",\n \"templateId\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v2/:parent/inspectTemplates")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/v2/:parent/inspectTemplates',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
inspectTemplate: {
createTime: '',
description: '',
displayName: '',
inspectConfig: {
contentOptions: [],
customInfoTypes: [
{
detectionRules: [
{
hotwordRule: {
hotwordRegex: {groupIndexes: [], pattern: ''},
likelihoodAdjustment: {fixedLikelihood: '', relativeLikelihood: 0},
proximity: {windowAfter: 0, windowBefore: 0}
}
}
],
dictionary: {cloudStoragePath: {path: ''}, wordList: {words: []}},
exclusionType: '',
infoType: {name: '', version: ''},
likelihood: '',
regex: {},
storedType: {createTime: '', name: ''},
surrogateType: {}
}
],
excludeInfoTypes: false,
includeQuote: false,
infoTypes: [{}],
limits: {
maxFindingsPerInfoType: [{infoType: {}, maxFindings: 0}],
maxFindingsPerItem: 0,
maxFindingsPerRequest: 0
},
minLikelihood: '',
ruleSet: [
{
infoTypes: [{}],
rules: [
{
exclusionRule: {
dictionary: {},
excludeByHotword: {hotwordRegex: {}, proximity: {}},
excludeInfoTypes: {infoTypes: [{}]},
matchingType: '',
regex: {}
},
hotwordRule: {}
}
]
}
]
},
name: '',
updateTime: ''
},
locationId: '',
templateId: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v2/:parent/inspectTemplates',
headers: {'content-type': 'application/json'},
body: {
inspectTemplate: {
createTime: '',
description: '',
displayName: '',
inspectConfig: {
contentOptions: [],
customInfoTypes: [
{
detectionRules: [
{
hotwordRule: {
hotwordRegex: {groupIndexes: [], pattern: ''},
likelihoodAdjustment: {fixedLikelihood: '', relativeLikelihood: 0},
proximity: {windowAfter: 0, windowBefore: 0}
}
}
],
dictionary: {cloudStoragePath: {path: ''}, wordList: {words: []}},
exclusionType: '',
infoType: {name: '', version: ''},
likelihood: '',
regex: {},
storedType: {createTime: '', name: ''},
surrogateType: {}
}
],
excludeInfoTypes: false,
includeQuote: false,
infoTypes: [{}],
limits: {
maxFindingsPerInfoType: [{infoType: {}, maxFindings: 0}],
maxFindingsPerItem: 0,
maxFindingsPerRequest: 0
},
minLikelihood: '',
ruleSet: [
{
infoTypes: [{}],
rules: [
{
exclusionRule: {
dictionary: {},
excludeByHotword: {hotwordRegex: {}, proximity: {}},
excludeInfoTypes: {infoTypes: [{}]},
matchingType: '',
regex: {}
},
hotwordRule: {}
}
]
}
]
},
name: '',
updateTime: ''
},
locationId: '',
templateId: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/v2/:parent/inspectTemplates');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
inspectTemplate: {
createTime: '',
description: '',
displayName: '',
inspectConfig: {
contentOptions: [],
customInfoTypes: [
{
detectionRules: [
{
hotwordRule: {
hotwordRegex: {
groupIndexes: [],
pattern: ''
},
likelihoodAdjustment: {
fixedLikelihood: '',
relativeLikelihood: 0
},
proximity: {
windowAfter: 0,
windowBefore: 0
}
}
}
],
dictionary: {
cloudStoragePath: {
path: ''
},
wordList: {
words: []
}
},
exclusionType: '',
infoType: {
name: '',
version: ''
},
likelihood: '',
regex: {},
storedType: {
createTime: '',
name: ''
},
surrogateType: {}
}
],
excludeInfoTypes: false,
includeQuote: false,
infoTypes: [
{}
],
limits: {
maxFindingsPerInfoType: [
{
infoType: {},
maxFindings: 0
}
],
maxFindingsPerItem: 0,
maxFindingsPerRequest: 0
},
minLikelihood: '',
ruleSet: [
{
infoTypes: [
{}
],
rules: [
{
exclusionRule: {
dictionary: {},
excludeByHotword: {
hotwordRegex: {},
proximity: {}
},
excludeInfoTypes: {
infoTypes: [
{}
]
},
matchingType: '',
regex: {}
},
hotwordRule: {}
}
]
}
]
},
name: '',
updateTime: ''
},
locationId: '',
templateId: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/v2/:parent/inspectTemplates',
headers: {'content-type': 'application/json'},
data: {
inspectTemplate: {
createTime: '',
description: '',
displayName: '',
inspectConfig: {
contentOptions: [],
customInfoTypes: [
{
detectionRules: [
{
hotwordRule: {
hotwordRegex: {groupIndexes: [], pattern: ''},
likelihoodAdjustment: {fixedLikelihood: '', relativeLikelihood: 0},
proximity: {windowAfter: 0, windowBefore: 0}
}
}
],
dictionary: {cloudStoragePath: {path: ''}, wordList: {words: []}},
exclusionType: '',
infoType: {name: '', version: ''},
likelihood: '',
regex: {},
storedType: {createTime: '', name: ''},
surrogateType: {}
}
],
excludeInfoTypes: false,
includeQuote: false,
infoTypes: [{}],
limits: {
maxFindingsPerInfoType: [{infoType: {}, maxFindings: 0}],
maxFindingsPerItem: 0,
maxFindingsPerRequest: 0
},
minLikelihood: '',
ruleSet: [
{
infoTypes: [{}],
rules: [
{
exclusionRule: {
dictionary: {},
excludeByHotword: {hotwordRegex: {}, proximity: {}},
excludeInfoTypes: {infoTypes: [{}]},
matchingType: '',
regex: {}
},
hotwordRule: {}
}
]
}
]
},
name: '',
updateTime: ''
},
locationId: '',
templateId: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/:parent/inspectTemplates';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"inspectTemplate":{"createTime":"","description":"","displayName":"","inspectConfig":{"contentOptions":[],"customInfoTypes":[{"detectionRules":[{"hotwordRule":{"hotwordRegex":{"groupIndexes":[],"pattern":""},"likelihoodAdjustment":{"fixedLikelihood":"","relativeLikelihood":0},"proximity":{"windowAfter":0,"windowBefore":0}}}],"dictionary":{"cloudStoragePath":{"path":""},"wordList":{"words":[]}},"exclusionType":"","infoType":{"name":"","version":""},"likelihood":"","regex":{},"storedType":{"createTime":"","name":""},"surrogateType":{}}],"excludeInfoTypes":false,"includeQuote":false,"infoTypes":[{}],"limits":{"maxFindingsPerInfoType":[{"infoType":{},"maxFindings":0}],"maxFindingsPerItem":0,"maxFindingsPerRequest":0},"minLikelihood":"","ruleSet":[{"infoTypes":[{}],"rules":[{"exclusionRule":{"dictionary":{},"excludeByHotword":{"hotwordRegex":{},"proximity":{}},"excludeInfoTypes":{"infoTypes":[{}]},"matchingType":"","regex":{}},"hotwordRule":{}}]}]},"name":"","updateTime":""},"locationId":"","templateId":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"inspectTemplate": @{ @"createTime": @"", @"description": @"", @"displayName": @"", @"inspectConfig": @{ @"contentOptions": @[ ], @"customInfoTypes": @[ @{ @"detectionRules": @[ @{ @"hotwordRule": @{ @"hotwordRegex": @{ @"groupIndexes": @[ ], @"pattern": @"" }, @"likelihoodAdjustment": @{ @"fixedLikelihood": @"", @"relativeLikelihood": @0 }, @"proximity": @{ @"windowAfter": @0, @"windowBefore": @0 } } } ], @"dictionary": @{ @"cloudStoragePath": @{ @"path": @"" }, @"wordList": @{ @"words": @[ ] } }, @"exclusionType": @"", @"infoType": @{ @"name": @"", @"version": @"" }, @"likelihood": @"", @"regex": @{ }, @"storedType": @{ @"createTime": @"", @"name": @"" }, @"surrogateType": @{ } } ], @"excludeInfoTypes": @NO, @"includeQuote": @NO, @"infoTypes": @[ @{ } ], @"limits": @{ @"maxFindingsPerInfoType": @[ @{ @"infoType": @{ }, @"maxFindings": @0 } ], @"maxFindingsPerItem": @0, @"maxFindingsPerRequest": @0 }, @"minLikelihood": @"", @"ruleSet": @[ @{ @"infoTypes": @[ @{ } ], @"rules": @[ @{ @"exclusionRule": @{ @"dictionary": @{ }, @"excludeByHotword": @{ @"hotwordRegex": @{ }, @"proximity": @{ } }, @"excludeInfoTypes": @{ @"infoTypes": @[ @{ } ] }, @"matchingType": @"", @"regex": @{ } }, @"hotwordRule": @{ } } ] } ] }, @"name": @"", @"updateTime": @"" },
@"locationId": @"",
@"templateId": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v2/:parent/inspectTemplates"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v2/:parent/inspectTemplates" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"inspectTemplate\": {\n \"createTime\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"inspectConfig\": {\n \"contentOptions\": [],\n \"customInfoTypes\": [\n {\n \"detectionRules\": [\n {\n \"hotwordRule\": {\n \"hotwordRegex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n },\n \"likelihoodAdjustment\": {\n \"fixedLikelihood\": \"\",\n \"relativeLikelihood\": 0\n },\n \"proximity\": {\n \"windowAfter\": 0,\n \"windowBefore\": 0\n }\n }\n }\n ],\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {\n \"words\": []\n }\n },\n \"exclusionType\": \"\",\n \"infoType\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"likelihood\": \"\",\n \"regex\": {},\n \"storedType\": {\n \"createTime\": \"\",\n \"name\": \"\"\n },\n \"surrogateType\": {}\n }\n ],\n \"excludeInfoTypes\": false,\n \"includeQuote\": false,\n \"infoTypes\": [\n {}\n ],\n \"limits\": {\n \"maxFindingsPerInfoType\": [\n {\n \"infoType\": {},\n \"maxFindings\": 0\n }\n ],\n \"maxFindingsPerItem\": 0,\n \"maxFindingsPerRequest\": 0\n },\n \"minLikelihood\": \"\",\n \"ruleSet\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"rules\": [\n {\n \"exclusionRule\": {\n \"dictionary\": {},\n \"excludeByHotword\": {\n \"hotwordRegex\": {},\n \"proximity\": {}\n },\n \"excludeInfoTypes\": {\n \"infoTypes\": [\n {}\n ]\n },\n \"matchingType\": \"\",\n \"regex\": {}\n },\n \"hotwordRule\": {}\n }\n ]\n }\n ]\n },\n \"name\": \"\",\n \"updateTime\": \"\"\n },\n \"locationId\": \"\",\n \"templateId\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/:parent/inspectTemplates",
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([
'inspectTemplate' => [
'createTime' => '',
'description' => '',
'displayName' => '',
'inspectConfig' => [
'contentOptions' => [
],
'customInfoTypes' => [
[
'detectionRules' => [
[
'hotwordRule' => [
'hotwordRegex' => [
'groupIndexes' => [
],
'pattern' => ''
],
'likelihoodAdjustment' => [
'fixedLikelihood' => '',
'relativeLikelihood' => 0
],
'proximity' => [
'windowAfter' => 0,
'windowBefore' => 0
]
]
]
],
'dictionary' => [
'cloudStoragePath' => [
'path' => ''
],
'wordList' => [
'words' => [
]
]
],
'exclusionType' => '',
'infoType' => [
'name' => '',
'version' => ''
],
'likelihood' => '',
'regex' => [
],
'storedType' => [
'createTime' => '',
'name' => ''
],
'surrogateType' => [
]
]
],
'excludeInfoTypes' => null,
'includeQuote' => null,
'infoTypes' => [
[
]
],
'limits' => [
'maxFindingsPerInfoType' => [
[
'infoType' => [
],
'maxFindings' => 0
]
],
'maxFindingsPerItem' => 0,
'maxFindingsPerRequest' => 0
],
'minLikelihood' => '',
'ruleSet' => [
[
'infoTypes' => [
[
]
],
'rules' => [
[
'exclusionRule' => [
'dictionary' => [
],
'excludeByHotword' => [
'hotwordRegex' => [
],
'proximity' => [
]
],
'excludeInfoTypes' => [
'infoTypes' => [
[
]
]
],
'matchingType' => '',
'regex' => [
]
],
'hotwordRule' => [
]
]
]
]
]
],
'name' => '',
'updateTime' => ''
],
'locationId' => '',
'templateId' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/v2/:parent/inspectTemplates', [
'body' => '{
"inspectTemplate": {
"createTime": "",
"description": "",
"displayName": "",
"inspectConfig": {
"contentOptions": [],
"customInfoTypes": [
{
"detectionRules": [
{
"hotwordRule": {
"hotwordRegex": {
"groupIndexes": [],
"pattern": ""
},
"likelihoodAdjustment": {
"fixedLikelihood": "",
"relativeLikelihood": 0
},
"proximity": {
"windowAfter": 0,
"windowBefore": 0
}
}
}
],
"dictionary": {
"cloudStoragePath": {
"path": ""
},
"wordList": {
"words": []
}
},
"exclusionType": "",
"infoType": {
"name": "",
"version": ""
},
"likelihood": "",
"regex": {},
"storedType": {
"createTime": "",
"name": ""
},
"surrogateType": {}
}
],
"excludeInfoTypes": false,
"includeQuote": false,
"infoTypes": [
{}
],
"limits": {
"maxFindingsPerInfoType": [
{
"infoType": {},
"maxFindings": 0
}
],
"maxFindingsPerItem": 0,
"maxFindingsPerRequest": 0
},
"minLikelihood": "",
"ruleSet": [
{
"infoTypes": [
{}
],
"rules": [
{
"exclusionRule": {
"dictionary": {},
"excludeByHotword": {
"hotwordRegex": {},
"proximity": {}
},
"excludeInfoTypes": {
"infoTypes": [
{}
]
},
"matchingType": "",
"regex": {}
},
"hotwordRule": {}
}
]
}
]
},
"name": "",
"updateTime": ""
},
"locationId": "",
"templateId": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v2/:parent/inspectTemplates');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'inspectTemplate' => [
'createTime' => '',
'description' => '',
'displayName' => '',
'inspectConfig' => [
'contentOptions' => [
],
'customInfoTypes' => [
[
'detectionRules' => [
[
'hotwordRule' => [
'hotwordRegex' => [
'groupIndexes' => [
],
'pattern' => ''
],
'likelihoodAdjustment' => [
'fixedLikelihood' => '',
'relativeLikelihood' => 0
],
'proximity' => [
'windowAfter' => 0,
'windowBefore' => 0
]
]
]
],
'dictionary' => [
'cloudStoragePath' => [
'path' => ''
],
'wordList' => [
'words' => [
]
]
],
'exclusionType' => '',
'infoType' => [
'name' => '',
'version' => ''
],
'likelihood' => '',
'regex' => [
],
'storedType' => [
'createTime' => '',
'name' => ''
],
'surrogateType' => [
]
]
],
'excludeInfoTypes' => null,
'includeQuote' => null,
'infoTypes' => [
[
]
],
'limits' => [
'maxFindingsPerInfoType' => [
[
'infoType' => [
],
'maxFindings' => 0
]
],
'maxFindingsPerItem' => 0,
'maxFindingsPerRequest' => 0
],
'minLikelihood' => '',
'ruleSet' => [
[
'infoTypes' => [
[
]
],
'rules' => [
[
'exclusionRule' => [
'dictionary' => [
],
'excludeByHotword' => [
'hotwordRegex' => [
],
'proximity' => [
]
],
'excludeInfoTypes' => [
'infoTypes' => [
[
]
]
],
'matchingType' => '',
'regex' => [
]
],
'hotwordRule' => [
]
]
]
]
]
],
'name' => '',
'updateTime' => ''
],
'locationId' => '',
'templateId' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'inspectTemplate' => [
'createTime' => '',
'description' => '',
'displayName' => '',
'inspectConfig' => [
'contentOptions' => [
],
'customInfoTypes' => [
[
'detectionRules' => [
[
'hotwordRule' => [
'hotwordRegex' => [
'groupIndexes' => [
],
'pattern' => ''
],
'likelihoodAdjustment' => [
'fixedLikelihood' => '',
'relativeLikelihood' => 0
],
'proximity' => [
'windowAfter' => 0,
'windowBefore' => 0
]
]
]
],
'dictionary' => [
'cloudStoragePath' => [
'path' => ''
],
'wordList' => [
'words' => [
]
]
],
'exclusionType' => '',
'infoType' => [
'name' => '',
'version' => ''
],
'likelihood' => '',
'regex' => [
],
'storedType' => [
'createTime' => '',
'name' => ''
],
'surrogateType' => [
]
]
],
'excludeInfoTypes' => null,
'includeQuote' => null,
'infoTypes' => [
[
]
],
'limits' => [
'maxFindingsPerInfoType' => [
[
'infoType' => [
],
'maxFindings' => 0
]
],
'maxFindingsPerItem' => 0,
'maxFindingsPerRequest' => 0
],
'minLikelihood' => '',
'ruleSet' => [
[
'infoTypes' => [
[
]
],
'rules' => [
[
'exclusionRule' => [
'dictionary' => [
],
'excludeByHotword' => [
'hotwordRegex' => [
],
'proximity' => [
]
],
'excludeInfoTypes' => [
'infoTypes' => [
[
]
]
],
'matchingType' => '',
'regex' => [
]
],
'hotwordRule' => [
]
]
]
]
]
],
'name' => '',
'updateTime' => ''
],
'locationId' => '',
'templateId' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v2/:parent/inspectTemplates');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v2/:parent/inspectTemplates' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"inspectTemplate": {
"createTime": "",
"description": "",
"displayName": "",
"inspectConfig": {
"contentOptions": [],
"customInfoTypes": [
{
"detectionRules": [
{
"hotwordRule": {
"hotwordRegex": {
"groupIndexes": [],
"pattern": ""
},
"likelihoodAdjustment": {
"fixedLikelihood": "",
"relativeLikelihood": 0
},
"proximity": {
"windowAfter": 0,
"windowBefore": 0
}
}
}
],
"dictionary": {
"cloudStoragePath": {
"path": ""
},
"wordList": {
"words": []
}
},
"exclusionType": "",
"infoType": {
"name": "",
"version": ""
},
"likelihood": "",
"regex": {},
"storedType": {
"createTime": "",
"name": ""
},
"surrogateType": {}
}
],
"excludeInfoTypes": false,
"includeQuote": false,
"infoTypes": [
{}
],
"limits": {
"maxFindingsPerInfoType": [
{
"infoType": {},
"maxFindings": 0
}
],
"maxFindingsPerItem": 0,
"maxFindingsPerRequest": 0
},
"minLikelihood": "",
"ruleSet": [
{
"infoTypes": [
{}
],
"rules": [
{
"exclusionRule": {
"dictionary": {},
"excludeByHotword": {
"hotwordRegex": {},
"proximity": {}
},
"excludeInfoTypes": {
"infoTypes": [
{}
]
},
"matchingType": "",
"regex": {}
},
"hotwordRule": {}
}
]
}
]
},
"name": "",
"updateTime": ""
},
"locationId": "",
"templateId": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/:parent/inspectTemplates' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"inspectTemplate": {
"createTime": "",
"description": "",
"displayName": "",
"inspectConfig": {
"contentOptions": [],
"customInfoTypes": [
{
"detectionRules": [
{
"hotwordRule": {
"hotwordRegex": {
"groupIndexes": [],
"pattern": ""
},
"likelihoodAdjustment": {
"fixedLikelihood": "",
"relativeLikelihood": 0
},
"proximity": {
"windowAfter": 0,
"windowBefore": 0
}
}
}
],
"dictionary": {
"cloudStoragePath": {
"path": ""
},
"wordList": {
"words": []
}
},
"exclusionType": "",
"infoType": {
"name": "",
"version": ""
},
"likelihood": "",
"regex": {},
"storedType": {
"createTime": "",
"name": ""
},
"surrogateType": {}
}
],
"excludeInfoTypes": false,
"includeQuote": false,
"infoTypes": [
{}
],
"limits": {
"maxFindingsPerInfoType": [
{
"infoType": {},
"maxFindings": 0
}
],
"maxFindingsPerItem": 0,
"maxFindingsPerRequest": 0
},
"minLikelihood": "",
"ruleSet": [
{
"infoTypes": [
{}
],
"rules": [
{
"exclusionRule": {
"dictionary": {},
"excludeByHotword": {
"hotwordRegex": {},
"proximity": {}
},
"excludeInfoTypes": {
"infoTypes": [
{}
]
},
"matchingType": "",
"regex": {}
},
"hotwordRule": {}
}
]
}
]
},
"name": "",
"updateTime": ""
},
"locationId": "",
"templateId": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"inspectTemplate\": {\n \"createTime\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"inspectConfig\": {\n \"contentOptions\": [],\n \"customInfoTypes\": [\n {\n \"detectionRules\": [\n {\n \"hotwordRule\": {\n \"hotwordRegex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n },\n \"likelihoodAdjustment\": {\n \"fixedLikelihood\": \"\",\n \"relativeLikelihood\": 0\n },\n \"proximity\": {\n \"windowAfter\": 0,\n \"windowBefore\": 0\n }\n }\n }\n ],\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {\n \"words\": []\n }\n },\n \"exclusionType\": \"\",\n \"infoType\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"likelihood\": \"\",\n \"regex\": {},\n \"storedType\": {\n \"createTime\": \"\",\n \"name\": \"\"\n },\n \"surrogateType\": {}\n }\n ],\n \"excludeInfoTypes\": false,\n \"includeQuote\": false,\n \"infoTypes\": [\n {}\n ],\n \"limits\": {\n \"maxFindingsPerInfoType\": [\n {\n \"infoType\": {},\n \"maxFindings\": 0\n }\n ],\n \"maxFindingsPerItem\": 0,\n \"maxFindingsPerRequest\": 0\n },\n \"minLikelihood\": \"\",\n \"ruleSet\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"rules\": [\n {\n \"exclusionRule\": {\n \"dictionary\": {},\n \"excludeByHotword\": {\n \"hotwordRegex\": {},\n \"proximity\": {}\n },\n \"excludeInfoTypes\": {\n \"infoTypes\": [\n {}\n ]\n },\n \"matchingType\": \"\",\n \"regex\": {}\n },\n \"hotwordRule\": {}\n }\n ]\n }\n ]\n },\n \"name\": \"\",\n \"updateTime\": \"\"\n },\n \"locationId\": \"\",\n \"templateId\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v2/:parent/inspectTemplates", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/:parent/inspectTemplates"
payload = {
"inspectTemplate": {
"createTime": "",
"description": "",
"displayName": "",
"inspectConfig": {
"contentOptions": [],
"customInfoTypes": [
{
"detectionRules": [{ "hotwordRule": {
"hotwordRegex": {
"groupIndexes": [],
"pattern": ""
},
"likelihoodAdjustment": {
"fixedLikelihood": "",
"relativeLikelihood": 0
},
"proximity": {
"windowAfter": 0,
"windowBefore": 0
}
} }],
"dictionary": {
"cloudStoragePath": { "path": "" },
"wordList": { "words": [] }
},
"exclusionType": "",
"infoType": {
"name": "",
"version": ""
},
"likelihood": "",
"regex": {},
"storedType": {
"createTime": "",
"name": ""
},
"surrogateType": {}
}
],
"excludeInfoTypes": False,
"includeQuote": False,
"infoTypes": [{}],
"limits": {
"maxFindingsPerInfoType": [
{
"infoType": {},
"maxFindings": 0
}
],
"maxFindingsPerItem": 0,
"maxFindingsPerRequest": 0
},
"minLikelihood": "",
"ruleSet": [
{
"infoTypes": [{}],
"rules": [
{
"exclusionRule": {
"dictionary": {},
"excludeByHotword": {
"hotwordRegex": {},
"proximity": {}
},
"excludeInfoTypes": { "infoTypes": [{}] },
"matchingType": "",
"regex": {}
},
"hotwordRule": {}
}
]
}
]
},
"name": "",
"updateTime": ""
},
"locationId": "",
"templateId": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/:parent/inspectTemplates"
payload <- "{\n \"inspectTemplate\": {\n \"createTime\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"inspectConfig\": {\n \"contentOptions\": [],\n \"customInfoTypes\": [\n {\n \"detectionRules\": [\n {\n \"hotwordRule\": {\n \"hotwordRegex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n },\n \"likelihoodAdjustment\": {\n \"fixedLikelihood\": \"\",\n \"relativeLikelihood\": 0\n },\n \"proximity\": {\n \"windowAfter\": 0,\n \"windowBefore\": 0\n }\n }\n }\n ],\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {\n \"words\": []\n }\n },\n \"exclusionType\": \"\",\n \"infoType\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"likelihood\": \"\",\n \"regex\": {},\n \"storedType\": {\n \"createTime\": \"\",\n \"name\": \"\"\n },\n \"surrogateType\": {}\n }\n ],\n \"excludeInfoTypes\": false,\n \"includeQuote\": false,\n \"infoTypes\": [\n {}\n ],\n \"limits\": {\n \"maxFindingsPerInfoType\": [\n {\n \"infoType\": {},\n \"maxFindings\": 0\n }\n ],\n \"maxFindingsPerItem\": 0,\n \"maxFindingsPerRequest\": 0\n },\n \"minLikelihood\": \"\",\n \"ruleSet\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"rules\": [\n {\n \"exclusionRule\": {\n \"dictionary\": {},\n \"excludeByHotword\": {\n \"hotwordRegex\": {},\n \"proximity\": {}\n },\n \"excludeInfoTypes\": {\n \"infoTypes\": [\n {}\n ]\n },\n \"matchingType\": \"\",\n \"regex\": {}\n },\n \"hotwordRule\": {}\n }\n ]\n }\n ]\n },\n \"name\": \"\",\n \"updateTime\": \"\"\n },\n \"locationId\": \"\",\n \"templateId\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/:parent/inspectTemplates")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"inspectTemplate\": {\n \"createTime\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"inspectConfig\": {\n \"contentOptions\": [],\n \"customInfoTypes\": [\n {\n \"detectionRules\": [\n {\n \"hotwordRule\": {\n \"hotwordRegex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n },\n \"likelihoodAdjustment\": {\n \"fixedLikelihood\": \"\",\n \"relativeLikelihood\": 0\n },\n \"proximity\": {\n \"windowAfter\": 0,\n \"windowBefore\": 0\n }\n }\n }\n ],\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {\n \"words\": []\n }\n },\n \"exclusionType\": \"\",\n \"infoType\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"likelihood\": \"\",\n \"regex\": {},\n \"storedType\": {\n \"createTime\": \"\",\n \"name\": \"\"\n },\n \"surrogateType\": {}\n }\n ],\n \"excludeInfoTypes\": false,\n \"includeQuote\": false,\n \"infoTypes\": [\n {}\n ],\n \"limits\": {\n \"maxFindingsPerInfoType\": [\n {\n \"infoType\": {},\n \"maxFindings\": 0\n }\n ],\n \"maxFindingsPerItem\": 0,\n \"maxFindingsPerRequest\": 0\n },\n \"minLikelihood\": \"\",\n \"ruleSet\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"rules\": [\n {\n \"exclusionRule\": {\n \"dictionary\": {},\n \"excludeByHotword\": {\n \"hotwordRegex\": {},\n \"proximity\": {}\n },\n \"excludeInfoTypes\": {\n \"infoTypes\": [\n {}\n ]\n },\n \"matchingType\": \"\",\n \"regex\": {}\n },\n \"hotwordRule\": {}\n }\n ]\n }\n ]\n },\n \"name\": \"\",\n \"updateTime\": \"\"\n },\n \"locationId\": \"\",\n \"templateId\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/v2/:parent/inspectTemplates') do |req|
req.body = "{\n \"inspectTemplate\": {\n \"createTime\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"inspectConfig\": {\n \"contentOptions\": [],\n \"customInfoTypes\": [\n {\n \"detectionRules\": [\n {\n \"hotwordRule\": {\n \"hotwordRegex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n },\n \"likelihoodAdjustment\": {\n \"fixedLikelihood\": \"\",\n \"relativeLikelihood\": 0\n },\n \"proximity\": {\n \"windowAfter\": 0,\n \"windowBefore\": 0\n }\n }\n }\n ],\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {\n \"words\": []\n }\n },\n \"exclusionType\": \"\",\n \"infoType\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"likelihood\": \"\",\n \"regex\": {},\n \"storedType\": {\n \"createTime\": \"\",\n \"name\": \"\"\n },\n \"surrogateType\": {}\n }\n ],\n \"excludeInfoTypes\": false,\n \"includeQuote\": false,\n \"infoTypes\": [\n {}\n ],\n \"limits\": {\n \"maxFindingsPerInfoType\": [\n {\n \"infoType\": {},\n \"maxFindings\": 0\n }\n ],\n \"maxFindingsPerItem\": 0,\n \"maxFindingsPerRequest\": 0\n },\n \"minLikelihood\": \"\",\n \"ruleSet\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"rules\": [\n {\n \"exclusionRule\": {\n \"dictionary\": {},\n \"excludeByHotword\": {\n \"hotwordRegex\": {},\n \"proximity\": {}\n },\n \"excludeInfoTypes\": {\n \"infoTypes\": [\n {}\n ]\n },\n \"matchingType\": \"\",\n \"regex\": {}\n },\n \"hotwordRule\": {}\n }\n ]\n }\n ]\n },\n \"name\": \"\",\n \"updateTime\": \"\"\n },\n \"locationId\": \"\",\n \"templateId\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v2/:parent/inspectTemplates";
let payload = json!({
"inspectTemplate": json!({
"createTime": "",
"description": "",
"displayName": "",
"inspectConfig": json!({
"contentOptions": (),
"customInfoTypes": (
json!({
"detectionRules": (json!({"hotwordRule": json!({
"hotwordRegex": json!({
"groupIndexes": (),
"pattern": ""
}),
"likelihoodAdjustment": json!({
"fixedLikelihood": "",
"relativeLikelihood": 0
}),
"proximity": json!({
"windowAfter": 0,
"windowBefore": 0
})
})})),
"dictionary": json!({
"cloudStoragePath": json!({"path": ""}),
"wordList": json!({"words": ()})
}),
"exclusionType": "",
"infoType": json!({
"name": "",
"version": ""
}),
"likelihood": "",
"regex": json!({}),
"storedType": json!({
"createTime": "",
"name": ""
}),
"surrogateType": json!({})
})
),
"excludeInfoTypes": false,
"includeQuote": false,
"infoTypes": (json!({})),
"limits": json!({
"maxFindingsPerInfoType": (
json!({
"infoType": json!({}),
"maxFindings": 0
})
),
"maxFindingsPerItem": 0,
"maxFindingsPerRequest": 0
}),
"minLikelihood": "",
"ruleSet": (
json!({
"infoTypes": (json!({})),
"rules": (
json!({
"exclusionRule": json!({
"dictionary": json!({}),
"excludeByHotword": json!({
"hotwordRegex": json!({}),
"proximity": json!({})
}),
"excludeInfoTypes": json!({"infoTypes": (json!({}))}),
"matchingType": "",
"regex": json!({})
}),
"hotwordRule": json!({})
})
)
})
)
}),
"name": "",
"updateTime": ""
}),
"locationId": "",
"templateId": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/v2/:parent/inspectTemplates \
--header 'content-type: application/json' \
--data '{
"inspectTemplate": {
"createTime": "",
"description": "",
"displayName": "",
"inspectConfig": {
"contentOptions": [],
"customInfoTypes": [
{
"detectionRules": [
{
"hotwordRule": {
"hotwordRegex": {
"groupIndexes": [],
"pattern": ""
},
"likelihoodAdjustment": {
"fixedLikelihood": "",
"relativeLikelihood": 0
},
"proximity": {
"windowAfter": 0,
"windowBefore": 0
}
}
}
],
"dictionary": {
"cloudStoragePath": {
"path": ""
},
"wordList": {
"words": []
}
},
"exclusionType": "",
"infoType": {
"name": "",
"version": ""
},
"likelihood": "",
"regex": {},
"storedType": {
"createTime": "",
"name": ""
},
"surrogateType": {}
}
],
"excludeInfoTypes": false,
"includeQuote": false,
"infoTypes": [
{}
],
"limits": {
"maxFindingsPerInfoType": [
{
"infoType": {},
"maxFindings": 0
}
],
"maxFindingsPerItem": 0,
"maxFindingsPerRequest": 0
},
"minLikelihood": "",
"ruleSet": [
{
"infoTypes": [
{}
],
"rules": [
{
"exclusionRule": {
"dictionary": {},
"excludeByHotword": {
"hotwordRegex": {},
"proximity": {}
},
"excludeInfoTypes": {
"infoTypes": [
{}
]
},
"matchingType": "",
"regex": {}
},
"hotwordRule": {}
}
]
}
]
},
"name": "",
"updateTime": ""
},
"locationId": "",
"templateId": ""
}'
echo '{
"inspectTemplate": {
"createTime": "",
"description": "",
"displayName": "",
"inspectConfig": {
"contentOptions": [],
"customInfoTypes": [
{
"detectionRules": [
{
"hotwordRule": {
"hotwordRegex": {
"groupIndexes": [],
"pattern": ""
},
"likelihoodAdjustment": {
"fixedLikelihood": "",
"relativeLikelihood": 0
},
"proximity": {
"windowAfter": 0,
"windowBefore": 0
}
}
}
],
"dictionary": {
"cloudStoragePath": {
"path": ""
},
"wordList": {
"words": []
}
},
"exclusionType": "",
"infoType": {
"name": "",
"version": ""
},
"likelihood": "",
"regex": {},
"storedType": {
"createTime": "",
"name": ""
},
"surrogateType": {}
}
],
"excludeInfoTypes": false,
"includeQuote": false,
"infoTypes": [
{}
],
"limits": {
"maxFindingsPerInfoType": [
{
"infoType": {},
"maxFindings": 0
}
],
"maxFindingsPerItem": 0,
"maxFindingsPerRequest": 0
},
"minLikelihood": "",
"ruleSet": [
{
"infoTypes": [
{}
],
"rules": [
{
"exclusionRule": {
"dictionary": {},
"excludeByHotword": {
"hotwordRegex": {},
"proximity": {}
},
"excludeInfoTypes": {
"infoTypes": [
{}
]
},
"matchingType": "",
"regex": {}
},
"hotwordRule": {}
}
]
}
]
},
"name": "",
"updateTime": ""
},
"locationId": "",
"templateId": ""
}' | \
http POST {{baseUrl}}/v2/:parent/inspectTemplates \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "inspectTemplate": {\n "createTime": "",\n "description": "",\n "displayName": "",\n "inspectConfig": {\n "contentOptions": [],\n "customInfoTypes": [\n {\n "detectionRules": [\n {\n "hotwordRule": {\n "hotwordRegex": {\n "groupIndexes": [],\n "pattern": ""\n },\n "likelihoodAdjustment": {\n "fixedLikelihood": "",\n "relativeLikelihood": 0\n },\n "proximity": {\n "windowAfter": 0,\n "windowBefore": 0\n }\n }\n }\n ],\n "dictionary": {\n "cloudStoragePath": {\n "path": ""\n },\n "wordList": {\n "words": []\n }\n },\n "exclusionType": "",\n "infoType": {\n "name": "",\n "version": ""\n },\n "likelihood": "",\n "regex": {},\n "storedType": {\n "createTime": "",\n "name": ""\n },\n "surrogateType": {}\n }\n ],\n "excludeInfoTypes": false,\n "includeQuote": false,\n "infoTypes": [\n {}\n ],\n "limits": {\n "maxFindingsPerInfoType": [\n {\n "infoType": {},\n "maxFindings": 0\n }\n ],\n "maxFindingsPerItem": 0,\n "maxFindingsPerRequest": 0\n },\n "minLikelihood": "",\n "ruleSet": [\n {\n "infoTypes": [\n {}\n ],\n "rules": [\n {\n "exclusionRule": {\n "dictionary": {},\n "excludeByHotword": {\n "hotwordRegex": {},\n "proximity": {}\n },\n "excludeInfoTypes": {\n "infoTypes": [\n {}\n ]\n },\n "matchingType": "",\n "regex": {}\n },\n "hotwordRule": {}\n }\n ]\n }\n ]\n },\n "name": "",\n "updateTime": ""\n },\n "locationId": "",\n "templateId": ""\n}' \
--output-document \
- {{baseUrl}}/v2/:parent/inspectTemplates
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"inspectTemplate": [
"createTime": "",
"description": "",
"displayName": "",
"inspectConfig": [
"contentOptions": [],
"customInfoTypes": [
[
"detectionRules": [["hotwordRule": [
"hotwordRegex": [
"groupIndexes": [],
"pattern": ""
],
"likelihoodAdjustment": [
"fixedLikelihood": "",
"relativeLikelihood": 0
],
"proximity": [
"windowAfter": 0,
"windowBefore": 0
]
]]],
"dictionary": [
"cloudStoragePath": ["path": ""],
"wordList": ["words": []]
],
"exclusionType": "",
"infoType": [
"name": "",
"version": ""
],
"likelihood": "",
"regex": [],
"storedType": [
"createTime": "",
"name": ""
],
"surrogateType": []
]
],
"excludeInfoTypes": false,
"includeQuote": false,
"infoTypes": [[]],
"limits": [
"maxFindingsPerInfoType": [
[
"infoType": [],
"maxFindings": 0
]
],
"maxFindingsPerItem": 0,
"maxFindingsPerRequest": 0
],
"minLikelihood": "",
"ruleSet": [
[
"infoTypes": [[]],
"rules": [
[
"exclusionRule": [
"dictionary": [],
"excludeByHotword": [
"hotwordRegex": [],
"proximity": []
],
"excludeInfoTypes": ["infoTypes": [[]]],
"matchingType": "",
"regex": []
],
"hotwordRule": []
]
]
]
]
],
"name": "",
"updateTime": ""
],
"locationId": "",
"templateId": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/:parent/inspectTemplates")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
dlp.projects.locations.inspectTemplates.list
{{baseUrl}}/v2/:parent/inspectTemplates
QUERY PARAMS
parent
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/:parent/inspectTemplates");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v2/:parent/inspectTemplates")
require "http/client"
url = "{{baseUrl}}/v2/:parent/inspectTemplates"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/v2/:parent/inspectTemplates"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/:parent/inspectTemplates");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/:parent/inspectTemplates"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/v2/:parent/inspectTemplates HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v2/:parent/inspectTemplates")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/:parent/inspectTemplates"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/v2/:parent/inspectTemplates")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v2/:parent/inspectTemplates")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/v2/:parent/inspectTemplates');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/v2/:parent/inspectTemplates'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/:parent/inspectTemplates';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v2/:parent/inspectTemplates',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v2/:parent/inspectTemplates")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v2/:parent/inspectTemplates',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'GET', url: '{{baseUrl}}/v2/:parent/inspectTemplates'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v2/:parent/inspectTemplates');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'GET', url: '{{baseUrl}}/v2/:parent/inspectTemplates'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/:parent/inspectTemplates';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v2/:parent/inspectTemplates"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v2/:parent/inspectTemplates" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/:parent/inspectTemplates",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/v2/:parent/inspectTemplates');
echo $response->getBody();
setUrl('{{baseUrl}}/v2/:parent/inspectTemplates');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v2/:parent/inspectTemplates');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v2/:parent/inspectTemplates' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/:parent/inspectTemplates' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v2/:parent/inspectTemplates")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/:parent/inspectTemplates"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/:parent/inspectTemplates"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/:parent/inspectTemplates")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/v2/:parent/inspectTemplates') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v2/:parent/inspectTemplates";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/v2/:parent/inspectTemplates
http GET {{baseUrl}}/v2/:parent/inspectTemplates
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v2/:parent/inspectTemplates
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/:parent/inspectTemplates")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
dlp.projects.locations.jobTriggers.activate
{{baseUrl}}/v2/:name:activate
QUERY PARAMS
name
BODY json
{}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/:name:activate");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v2/:name:activate" {:content-type :json})
require "http/client"
url = "{{baseUrl}}/v2/:name:activate"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/v2/:name:activate"),
Content = new StringContent("{}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/:name:activate");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/:name:activate"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/v2/:name:activate HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 2
{}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v2/:name:activate")
.setHeader("content-type", "application/json")
.setBody("{}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/:name:activate"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v2/:name:activate")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v2/:name:activate")
.header("content-type", "application/json")
.body("{}")
.asString();
const data = JSON.stringify({});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v2/:name:activate');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v2/:name:activate',
headers: {'content-type': 'application/json'},
data: {}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/:name:activate';
const options = {method: 'POST', headers: {'content-type': 'application/json'}, body: '{}'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v2/:name:activate',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{}")
val request = Request.Builder()
.url("{{baseUrl}}/v2/:name:activate")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/v2/:name:activate',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v2/:name:activate',
headers: {'content-type': 'application/json'},
body: {},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/v2/:name:activate');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/v2/:name:activate',
headers: {'content-type': 'application/json'},
data: {}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/:name:activate';
const options = {method: 'POST', headers: {'content-type': 'application/json'}, body: '{}'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v2/:name:activate"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v2/:name:activate" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/:name:activate",
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([
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/v2/:name:activate', [
'body' => '{}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v2/:name:activate');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
]));
$request->setRequestUrl('{{baseUrl}}/v2/:name:activate');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v2/:name:activate' -Method POST -Headers $headers -ContentType 'application/json' -Body '{}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/:name:activate' -Method POST -Headers $headers -ContentType 'application/json' -Body '{}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v2/:name:activate", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/:name:activate"
payload = {}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/:name:activate"
payload <- "{}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/:name:activate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/v2/:name:activate') do |req|
req.body = "{}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v2/:name:activate";
let payload = json!({});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/v2/:name:activate \
--header 'content-type: application/json' \
--data '{}'
echo '{}' | \
http POST {{baseUrl}}/v2/:name:activate \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{}' \
--output-document \
- {{baseUrl}}/v2/:name:activate
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/:name:activate")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
dlp.projects.locations.jobTriggers.create
{{baseUrl}}/v2/:parent/jobTriggers
QUERY PARAMS
parent
BODY json
{
"jobTrigger": {
"createTime": "",
"description": "",
"displayName": "",
"errors": [
{
"details": {
"code": 0,
"details": [
{}
],
"message": ""
},
"timestamps": []
}
],
"inspectJob": {
"actions": [
{
"deidentify": {
"cloudStorageOutput": "",
"fileTypesToTransform": [],
"transformationConfig": {
"deidentifyTemplate": "",
"imageRedactTemplate": "",
"structuredDeidentifyTemplate": ""
},
"transformationDetailsStorageConfig": {
"table": {
"datasetId": "",
"projectId": "",
"tableId": ""
}
}
},
"jobNotificationEmails": {},
"pubSub": {
"topic": ""
},
"publishFindingsToCloudDataCatalog": {},
"publishSummaryToCscc": {},
"publishToStackdriver": {},
"saveFindings": {
"outputConfig": {
"outputSchema": "",
"table": {}
}
}
}
],
"inspectConfig": {
"contentOptions": [],
"customInfoTypes": [
{
"detectionRules": [
{
"hotwordRule": {
"hotwordRegex": {
"groupIndexes": [],
"pattern": ""
},
"likelihoodAdjustment": {
"fixedLikelihood": "",
"relativeLikelihood": 0
},
"proximity": {
"windowAfter": 0,
"windowBefore": 0
}
}
}
],
"dictionary": {
"cloudStoragePath": {
"path": ""
},
"wordList": {
"words": []
}
},
"exclusionType": "",
"infoType": {
"name": "",
"version": ""
},
"likelihood": "",
"regex": {},
"storedType": {
"createTime": "",
"name": ""
},
"surrogateType": {}
}
],
"excludeInfoTypes": false,
"includeQuote": false,
"infoTypes": [
{}
],
"limits": {
"maxFindingsPerInfoType": [
{
"infoType": {},
"maxFindings": 0
}
],
"maxFindingsPerItem": 0,
"maxFindingsPerRequest": 0
},
"minLikelihood": "",
"ruleSet": [
{
"infoTypes": [
{}
],
"rules": [
{
"exclusionRule": {
"dictionary": {},
"excludeByHotword": {
"hotwordRegex": {},
"proximity": {}
},
"excludeInfoTypes": {
"infoTypes": [
{}
]
},
"matchingType": "",
"regex": {}
},
"hotwordRule": {}
}
]
}
]
},
"inspectTemplateName": "",
"storageConfig": {
"bigQueryOptions": {
"excludedFields": [
{
"name": ""
}
],
"identifyingFields": [
{}
],
"includedFields": [
{}
],
"rowsLimit": "",
"rowsLimitPercent": 0,
"sampleMethod": "",
"tableReference": {}
},
"cloudStorageOptions": {
"bytesLimitPerFile": "",
"bytesLimitPerFilePercent": 0,
"fileSet": {
"regexFileSet": {
"bucketName": "",
"excludeRegex": [],
"includeRegex": []
},
"url": ""
},
"fileTypes": [],
"filesLimitPercent": 0,
"sampleMethod": ""
},
"datastoreOptions": {
"kind": {
"name": ""
},
"partitionId": {
"namespaceId": "",
"projectId": ""
}
},
"hybridOptions": {
"description": "",
"labels": {},
"requiredFindingLabelKeys": [],
"tableOptions": {
"identifyingFields": [
{}
]
}
},
"timespanConfig": {
"enableAutoPopulationOfTimespanConfig": false,
"endTime": "",
"startTime": "",
"timestampField": {}
}
}
},
"lastRunTime": "",
"name": "",
"status": "",
"triggers": [
{
"manual": {},
"schedule": {
"recurrencePeriodDuration": ""
}
}
],
"updateTime": ""
},
"locationId": "",
"triggerId": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/:parent/jobTriggers");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"jobTrigger\": {\n \"createTime\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"errors\": [\n {\n \"details\": {\n \"code\": 0,\n \"details\": [\n {}\n ],\n \"message\": \"\"\n },\n \"timestamps\": []\n }\n ],\n \"inspectJob\": {\n \"actions\": [\n {\n \"deidentify\": {\n \"cloudStorageOutput\": \"\",\n \"fileTypesToTransform\": [],\n \"transformationConfig\": {\n \"deidentifyTemplate\": \"\",\n \"imageRedactTemplate\": \"\",\n \"structuredDeidentifyTemplate\": \"\"\n },\n \"transformationDetailsStorageConfig\": {\n \"table\": {\n \"datasetId\": \"\",\n \"projectId\": \"\",\n \"tableId\": \"\"\n }\n }\n },\n \"jobNotificationEmails\": {},\n \"pubSub\": {\n \"topic\": \"\"\n },\n \"publishFindingsToCloudDataCatalog\": {},\n \"publishSummaryToCscc\": {},\n \"publishToStackdriver\": {},\n \"saveFindings\": {\n \"outputConfig\": {\n \"outputSchema\": \"\",\n \"table\": {}\n }\n }\n }\n ],\n \"inspectConfig\": {\n \"contentOptions\": [],\n \"customInfoTypes\": [\n {\n \"detectionRules\": [\n {\n \"hotwordRule\": {\n \"hotwordRegex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n },\n \"likelihoodAdjustment\": {\n \"fixedLikelihood\": \"\",\n \"relativeLikelihood\": 0\n },\n \"proximity\": {\n \"windowAfter\": 0,\n \"windowBefore\": 0\n }\n }\n }\n ],\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {\n \"words\": []\n }\n },\n \"exclusionType\": \"\",\n \"infoType\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"likelihood\": \"\",\n \"regex\": {},\n \"storedType\": {\n \"createTime\": \"\",\n \"name\": \"\"\n },\n \"surrogateType\": {}\n }\n ],\n \"excludeInfoTypes\": false,\n \"includeQuote\": false,\n \"infoTypes\": [\n {}\n ],\n \"limits\": {\n \"maxFindingsPerInfoType\": [\n {\n \"infoType\": {},\n \"maxFindings\": 0\n }\n ],\n \"maxFindingsPerItem\": 0,\n \"maxFindingsPerRequest\": 0\n },\n \"minLikelihood\": \"\",\n \"ruleSet\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"rules\": [\n {\n \"exclusionRule\": {\n \"dictionary\": {},\n \"excludeByHotword\": {\n \"hotwordRegex\": {},\n \"proximity\": {}\n },\n \"excludeInfoTypes\": {\n \"infoTypes\": [\n {}\n ]\n },\n \"matchingType\": \"\",\n \"regex\": {}\n },\n \"hotwordRule\": {}\n }\n ]\n }\n ]\n },\n \"inspectTemplateName\": \"\",\n \"storageConfig\": {\n \"bigQueryOptions\": {\n \"excludedFields\": [\n {\n \"name\": \"\"\n }\n ],\n \"identifyingFields\": [\n {}\n ],\n \"includedFields\": [\n {}\n ],\n \"rowsLimit\": \"\",\n \"rowsLimitPercent\": 0,\n \"sampleMethod\": \"\",\n \"tableReference\": {}\n },\n \"cloudStorageOptions\": {\n \"bytesLimitPerFile\": \"\",\n \"bytesLimitPerFilePercent\": 0,\n \"fileSet\": {\n \"regexFileSet\": {\n \"bucketName\": \"\",\n \"excludeRegex\": [],\n \"includeRegex\": []\n },\n \"url\": \"\"\n },\n \"fileTypes\": [],\n \"filesLimitPercent\": 0,\n \"sampleMethod\": \"\"\n },\n \"datastoreOptions\": {\n \"kind\": {\n \"name\": \"\"\n },\n \"partitionId\": {\n \"namespaceId\": \"\",\n \"projectId\": \"\"\n }\n },\n \"hybridOptions\": {\n \"description\": \"\",\n \"labels\": {},\n \"requiredFindingLabelKeys\": [],\n \"tableOptions\": {\n \"identifyingFields\": [\n {}\n ]\n }\n },\n \"timespanConfig\": {\n \"enableAutoPopulationOfTimespanConfig\": false,\n \"endTime\": \"\",\n \"startTime\": \"\",\n \"timestampField\": {}\n }\n }\n },\n \"lastRunTime\": \"\",\n \"name\": \"\",\n \"status\": \"\",\n \"triggers\": [\n {\n \"manual\": {},\n \"schedule\": {\n \"recurrencePeriodDuration\": \"\"\n }\n }\n ],\n \"updateTime\": \"\"\n },\n \"locationId\": \"\",\n \"triggerId\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v2/:parent/jobTriggers" {:content-type :json
:form-params {:jobTrigger {:createTime ""
:description ""
:displayName ""
:errors [{:details {:code 0
:details [{}]
:message ""}
:timestamps []}]
:inspectJob {:actions [{:deidentify {:cloudStorageOutput ""
:fileTypesToTransform []
:transformationConfig {:deidentifyTemplate ""
:imageRedactTemplate ""
:structuredDeidentifyTemplate ""}
:transformationDetailsStorageConfig {:table {:datasetId ""
:projectId ""
:tableId ""}}}
:jobNotificationEmails {}
:pubSub {:topic ""}
:publishFindingsToCloudDataCatalog {}
:publishSummaryToCscc {}
:publishToStackdriver {}
:saveFindings {:outputConfig {:outputSchema ""
:table {}}}}]
:inspectConfig {:contentOptions []
:customInfoTypes [{:detectionRules [{:hotwordRule {:hotwordRegex {:groupIndexes []
:pattern ""}
:likelihoodAdjustment {:fixedLikelihood ""
:relativeLikelihood 0}
:proximity {:windowAfter 0
:windowBefore 0}}}]
:dictionary {:cloudStoragePath {:path ""}
:wordList {:words []}}
:exclusionType ""
:infoType {:name ""
:version ""}
:likelihood ""
:regex {}
:storedType {:createTime ""
:name ""}
:surrogateType {}}]
:excludeInfoTypes false
:includeQuote false
:infoTypes [{}]
:limits {:maxFindingsPerInfoType [{:infoType {}
:maxFindings 0}]
:maxFindingsPerItem 0
:maxFindingsPerRequest 0}
:minLikelihood ""
:ruleSet [{:infoTypes [{}]
:rules [{:exclusionRule {:dictionary {}
:excludeByHotword {:hotwordRegex {}
:proximity {}}
:excludeInfoTypes {:infoTypes [{}]}
:matchingType ""
:regex {}}
:hotwordRule {}}]}]}
:inspectTemplateName ""
:storageConfig {:bigQueryOptions {:excludedFields [{:name ""}]
:identifyingFields [{}]
:includedFields [{}]
:rowsLimit ""
:rowsLimitPercent 0
:sampleMethod ""
:tableReference {}}
:cloudStorageOptions {:bytesLimitPerFile ""
:bytesLimitPerFilePercent 0
:fileSet {:regexFileSet {:bucketName ""
:excludeRegex []
:includeRegex []}
:url ""}
:fileTypes []
:filesLimitPercent 0
:sampleMethod ""}
:datastoreOptions {:kind {:name ""}
:partitionId {:namespaceId ""
:projectId ""}}
:hybridOptions {:description ""
:labels {}
:requiredFindingLabelKeys []
:tableOptions {:identifyingFields [{}]}}
:timespanConfig {:enableAutoPopulationOfTimespanConfig false
:endTime ""
:startTime ""
:timestampField {}}}}
:lastRunTime ""
:name ""
:status ""
:triggers [{:manual {}
:schedule {:recurrencePeriodDuration ""}}]
:updateTime ""}
:locationId ""
:triggerId ""}})
require "http/client"
url = "{{baseUrl}}/v2/:parent/jobTriggers"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"jobTrigger\": {\n \"createTime\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"errors\": [\n {\n \"details\": {\n \"code\": 0,\n \"details\": [\n {}\n ],\n \"message\": \"\"\n },\n \"timestamps\": []\n }\n ],\n \"inspectJob\": {\n \"actions\": [\n {\n \"deidentify\": {\n \"cloudStorageOutput\": \"\",\n \"fileTypesToTransform\": [],\n \"transformationConfig\": {\n \"deidentifyTemplate\": \"\",\n \"imageRedactTemplate\": \"\",\n \"structuredDeidentifyTemplate\": \"\"\n },\n \"transformationDetailsStorageConfig\": {\n \"table\": {\n \"datasetId\": \"\",\n \"projectId\": \"\",\n \"tableId\": \"\"\n }\n }\n },\n \"jobNotificationEmails\": {},\n \"pubSub\": {\n \"topic\": \"\"\n },\n \"publishFindingsToCloudDataCatalog\": {},\n \"publishSummaryToCscc\": {},\n \"publishToStackdriver\": {},\n \"saveFindings\": {\n \"outputConfig\": {\n \"outputSchema\": \"\",\n \"table\": {}\n }\n }\n }\n ],\n \"inspectConfig\": {\n \"contentOptions\": [],\n \"customInfoTypes\": [\n {\n \"detectionRules\": [\n {\n \"hotwordRule\": {\n \"hotwordRegex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n },\n \"likelihoodAdjustment\": {\n \"fixedLikelihood\": \"\",\n \"relativeLikelihood\": 0\n },\n \"proximity\": {\n \"windowAfter\": 0,\n \"windowBefore\": 0\n }\n }\n }\n ],\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {\n \"words\": []\n }\n },\n \"exclusionType\": \"\",\n \"infoType\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"likelihood\": \"\",\n \"regex\": {},\n \"storedType\": {\n \"createTime\": \"\",\n \"name\": \"\"\n },\n \"surrogateType\": {}\n }\n ],\n \"excludeInfoTypes\": false,\n \"includeQuote\": false,\n \"infoTypes\": [\n {}\n ],\n \"limits\": {\n \"maxFindingsPerInfoType\": [\n {\n \"infoType\": {},\n \"maxFindings\": 0\n }\n ],\n \"maxFindingsPerItem\": 0,\n \"maxFindingsPerRequest\": 0\n },\n \"minLikelihood\": \"\",\n \"ruleSet\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"rules\": [\n {\n \"exclusionRule\": {\n \"dictionary\": {},\n \"excludeByHotword\": {\n \"hotwordRegex\": {},\n \"proximity\": {}\n },\n \"excludeInfoTypes\": {\n \"infoTypes\": [\n {}\n ]\n },\n \"matchingType\": \"\",\n \"regex\": {}\n },\n \"hotwordRule\": {}\n }\n ]\n }\n ]\n },\n \"inspectTemplateName\": \"\",\n \"storageConfig\": {\n \"bigQueryOptions\": {\n \"excludedFields\": [\n {\n \"name\": \"\"\n }\n ],\n \"identifyingFields\": [\n {}\n ],\n \"includedFields\": [\n {}\n ],\n \"rowsLimit\": \"\",\n \"rowsLimitPercent\": 0,\n \"sampleMethod\": \"\",\n \"tableReference\": {}\n },\n \"cloudStorageOptions\": {\n \"bytesLimitPerFile\": \"\",\n \"bytesLimitPerFilePercent\": 0,\n \"fileSet\": {\n \"regexFileSet\": {\n \"bucketName\": \"\",\n \"excludeRegex\": [],\n \"includeRegex\": []\n },\n \"url\": \"\"\n },\n \"fileTypes\": [],\n \"filesLimitPercent\": 0,\n \"sampleMethod\": \"\"\n },\n \"datastoreOptions\": {\n \"kind\": {\n \"name\": \"\"\n },\n \"partitionId\": {\n \"namespaceId\": \"\",\n \"projectId\": \"\"\n }\n },\n \"hybridOptions\": {\n \"description\": \"\",\n \"labels\": {},\n \"requiredFindingLabelKeys\": [],\n \"tableOptions\": {\n \"identifyingFields\": [\n {}\n ]\n }\n },\n \"timespanConfig\": {\n \"enableAutoPopulationOfTimespanConfig\": false,\n \"endTime\": \"\",\n \"startTime\": \"\",\n \"timestampField\": {}\n }\n }\n },\n \"lastRunTime\": \"\",\n \"name\": \"\",\n \"status\": \"\",\n \"triggers\": [\n {\n \"manual\": {},\n \"schedule\": {\n \"recurrencePeriodDuration\": \"\"\n }\n }\n ],\n \"updateTime\": \"\"\n },\n \"locationId\": \"\",\n \"triggerId\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/v2/:parent/jobTriggers"),
Content = new StringContent("{\n \"jobTrigger\": {\n \"createTime\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"errors\": [\n {\n \"details\": {\n \"code\": 0,\n \"details\": [\n {}\n ],\n \"message\": \"\"\n },\n \"timestamps\": []\n }\n ],\n \"inspectJob\": {\n \"actions\": [\n {\n \"deidentify\": {\n \"cloudStorageOutput\": \"\",\n \"fileTypesToTransform\": [],\n \"transformationConfig\": {\n \"deidentifyTemplate\": \"\",\n \"imageRedactTemplate\": \"\",\n \"structuredDeidentifyTemplate\": \"\"\n },\n \"transformationDetailsStorageConfig\": {\n \"table\": {\n \"datasetId\": \"\",\n \"projectId\": \"\",\n \"tableId\": \"\"\n }\n }\n },\n \"jobNotificationEmails\": {},\n \"pubSub\": {\n \"topic\": \"\"\n },\n \"publishFindingsToCloudDataCatalog\": {},\n \"publishSummaryToCscc\": {},\n \"publishToStackdriver\": {},\n \"saveFindings\": {\n \"outputConfig\": {\n \"outputSchema\": \"\",\n \"table\": {}\n }\n }\n }\n ],\n \"inspectConfig\": {\n \"contentOptions\": [],\n \"customInfoTypes\": [\n {\n \"detectionRules\": [\n {\n \"hotwordRule\": {\n \"hotwordRegex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n },\n \"likelihoodAdjustment\": {\n \"fixedLikelihood\": \"\",\n \"relativeLikelihood\": 0\n },\n \"proximity\": {\n \"windowAfter\": 0,\n \"windowBefore\": 0\n }\n }\n }\n ],\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {\n \"words\": []\n }\n },\n \"exclusionType\": \"\",\n \"infoType\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"likelihood\": \"\",\n \"regex\": {},\n \"storedType\": {\n \"createTime\": \"\",\n \"name\": \"\"\n },\n \"surrogateType\": {}\n }\n ],\n \"excludeInfoTypes\": false,\n \"includeQuote\": false,\n \"infoTypes\": [\n {}\n ],\n \"limits\": {\n \"maxFindingsPerInfoType\": [\n {\n \"infoType\": {},\n \"maxFindings\": 0\n }\n ],\n \"maxFindingsPerItem\": 0,\n \"maxFindingsPerRequest\": 0\n },\n \"minLikelihood\": \"\",\n \"ruleSet\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"rules\": [\n {\n \"exclusionRule\": {\n \"dictionary\": {},\n \"excludeByHotword\": {\n \"hotwordRegex\": {},\n \"proximity\": {}\n },\n \"excludeInfoTypes\": {\n \"infoTypes\": [\n {}\n ]\n },\n \"matchingType\": \"\",\n \"regex\": {}\n },\n \"hotwordRule\": {}\n }\n ]\n }\n ]\n },\n \"inspectTemplateName\": \"\",\n \"storageConfig\": {\n \"bigQueryOptions\": {\n \"excludedFields\": [\n {\n \"name\": \"\"\n }\n ],\n \"identifyingFields\": [\n {}\n ],\n \"includedFields\": [\n {}\n ],\n \"rowsLimit\": \"\",\n \"rowsLimitPercent\": 0,\n \"sampleMethod\": \"\",\n \"tableReference\": {}\n },\n \"cloudStorageOptions\": {\n \"bytesLimitPerFile\": \"\",\n \"bytesLimitPerFilePercent\": 0,\n \"fileSet\": {\n \"regexFileSet\": {\n \"bucketName\": \"\",\n \"excludeRegex\": [],\n \"includeRegex\": []\n },\n \"url\": \"\"\n },\n \"fileTypes\": [],\n \"filesLimitPercent\": 0,\n \"sampleMethod\": \"\"\n },\n \"datastoreOptions\": {\n \"kind\": {\n \"name\": \"\"\n },\n \"partitionId\": {\n \"namespaceId\": \"\",\n \"projectId\": \"\"\n }\n },\n \"hybridOptions\": {\n \"description\": \"\",\n \"labels\": {},\n \"requiredFindingLabelKeys\": [],\n \"tableOptions\": {\n \"identifyingFields\": [\n {}\n ]\n }\n },\n \"timespanConfig\": {\n \"enableAutoPopulationOfTimespanConfig\": false,\n \"endTime\": \"\",\n \"startTime\": \"\",\n \"timestampField\": {}\n }\n }\n },\n \"lastRunTime\": \"\",\n \"name\": \"\",\n \"status\": \"\",\n \"triggers\": [\n {\n \"manual\": {},\n \"schedule\": {\n \"recurrencePeriodDuration\": \"\"\n }\n }\n ],\n \"updateTime\": \"\"\n },\n \"locationId\": \"\",\n \"triggerId\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/:parent/jobTriggers");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"jobTrigger\": {\n \"createTime\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"errors\": [\n {\n \"details\": {\n \"code\": 0,\n \"details\": [\n {}\n ],\n \"message\": \"\"\n },\n \"timestamps\": []\n }\n ],\n \"inspectJob\": {\n \"actions\": [\n {\n \"deidentify\": {\n \"cloudStorageOutput\": \"\",\n \"fileTypesToTransform\": [],\n \"transformationConfig\": {\n \"deidentifyTemplate\": \"\",\n \"imageRedactTemplate\": \"\",\n \"structuredDeidentifyTemplate\": \"\"\n },\n \"transformationDetailsStorageConfig\": {\n \"table\": {\n \"datasetId\": \"\",\n \"projectId\": \"\",\n \"tableId\": \"\"\n }\n }\n },\n \"jobNotificationEmails\": {},\n \"pubSub\": {\n \"topic\": \"\"\n },\n \"publishFindingsToCloudDataCatalog\": {},\n \"publishSummaryToCscc\": {},\n \"publishToStackdriver\": {},\n \"saveFindings\": {\n \"outputConfig\": {\n \"outputSchema\": \"\",\n \"table\": {}\n }\n }\n }\n ],\n \"inspectConfig\": {\n \"contentOptions\": [],\n \"customInfoTypes\": [\n {\n \"detectionRules\": [\n {\n \"hotwordRule\": {\n \"hotwordRegex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n },\n \"likelihoodAdjustment\": {\n \"fixedLikelihood\": \"\",\n \"relativeLikelihood\": 0\n },\n \"proximity\": {\n \"windowAfter\": 0,\n \"windowBefore\": 0\n }\n }\n }\n ],\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {\n \"words\": []\n }\n },\n \"exclusionType\": \"\",\n \"infoType\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"likelihood\": \"\",\n \"regex\": {},\n \"storedType\": {\n \"createTime\": \"\",\n \"name\": \"\"\n },\n \"surrogateType\": {}\n }\n ],\n \"excludeInfoTypes\": false,\n \"includeQuote\": false,\n \"infoTypes\": [\n {}\n ],\n \"limits\": {\n \"maxFindingsPerInfoType\": [\n {\n \"infoType\": {},\n \"maxFindings\": 0\n }\n ],\n \"maxFindingsPerItem\": 0,\n \"maxFindingsPerRequest\": 0\n },\n \"minLikelihood\": \"\",\n \"ruleSet\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"rules\": [\n {\n \"exclusionRule\": {\n \"dictionary\": {},\n \"excludeByHotword\": {\n \"hotwordRegex\": {},\n \"proximity\": {}\n },\n \"excludeInfoTypes\": {\n \"infoTypes\": [\n {}\n ]\n },\n \"matchingType\": \"\",\n \"regex\": {}\n },\n \"hotwordRule\": {}\n }\n ]\n }\n ]\n },\n \"inspectTemplateName\": \"\",\n \"storageConfig\": {\n \"bigQueryOptions\": {\n \"excludedFields\": [\n {\n \"name\": \"\"\n }\n ],\n \"identifyingFields\": [\n {}\n ],\n \"includedFields\": [\n {}\n ],\n \"rowsLimit\": \"\",\n \"rowsLimitPercent\": 0,\n \"sampleMethod\": \"\",\n \"tableReference\": {}\n },\n \"cloudStorageOptions\": {\n \"bytesLimitPerFile\": \"\",\n \"bytesLimitPerFilePercent\": 0,\n \"fileSet\": {\n \"regexFileSet\": {\n \"bucketName\": \"\",\n \"excludeRegex\": [],\n \"includeRegex\": []\n },\n \"url\": \"\"\n },\n \"fileTypes\": [],\n \"filesLimitPercent\": 0,\n \"sampleMethod\": \"\"\n },\n \"datastoreOptions\": {\n \"kind\": {\n \"name\": \"\"\n },\n \"partitionId\": {\n \"namespaceId\": \"\",\n \"projectId\": \"\"\n }\n },\n \"hybridOptions\": {\n \"description\": \"\",\n \"labels\": {},\n \"requiredFindingLabelKeys\": [],\n \"tableOptions\": {\n \"identifyingFields\": [\n {}\n ]\n }\n },\n \"timespanConfig\": {\n \"enableAutoPopulationOfTimespanConfig\": false,\n \"endTime\": \"\",\n \"startTime\": \"\",\n \"timestampField\": {}\n }\n }\n },\n \"lastRunTime\": \"\",\n \"name\": \"\",\n \"status\": \"\",\n \"triggers\": [\n {\n \"manual\": {},\n \"schedule\": {\n \"recurrencePeriodDuration\": \"\"\n }\n }\n ],\n \"updateTime\": \"\"\n },\n \"locationId\": \"\",\n \"triggerId\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/:parent/jobTriggers"
payload := strings.NewReader("{\n \"jobTrigger\": {\n \"createTime\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"errors\": [\n {\n \"details\": {\n \"code\": 0,\n \"details\": [\n {}\n ],\n \"message\": \"\"\n },\n \"timestamps\": []\n }\n ],\n \"inspectJob\": {\n \"actions\": [\n {\n \"deidentify\": {\n \"cloudStorageOutput\": \"\",\n \"fileTypesToTransform\": [],\n \"transformationConfig\": {\n \"deidentifyTemplate\": \"\",\n \"imageRedactTemplate\": \"\",\n \"structuredDeidentifyTemplate\": \"\"\n },\n \"transformationDetailsStorageConfig\": {\n \"table\": {\n \"datasetId\": \"\",\n \"projectId\": \"\",\n \"tableId\": \"\"\n }\n }\n },\n \"jobNotificationEmails\": {},\n \"pubSub\": {\n \"topic\": \"\"\n },\n \"publishFindingsToCloudDataCatalog\": {},\n \"publishSummaryToCscc\": {},\n \"publishToStackdriver\": {},\n \"saveFindings\": {\n \"outputConfig\": {\n \"outputSchema\": \"\",\n \"table\": {}\n }\n }\n }\n ],\n \"inspectConfig\": {\n \"contentOptions\": [],\n \"customInfoTypes\": [\n {\n \"detectionRules\": [\n {\n \"hotwordRule\": {\n \"hotwordRegex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n },\n \"likelihoodAdjustment\": {\n \"fixedLikelihood\": \"\",\n \"relativeLikelihood\": 0\n },\n \"proximity\": {\n \"windowAfter\": 0,\n \"windowBefore\": 0\n }\n }\n }\n ],\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {\n \"words\": []\n }\n },\n \"exclusionType\": \"\",\n \"infoType\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"likelihood\": \"\",\n \"regex\": {},\n \"storedType\": {\n \"createTime\": \"\",\n \"name\": \"\"\n },\n \"surrogateType\": {}\n }\n ],\n \"excludeInfoTypes\": false,\n \"includeQuote\": false,\n \"infoTypes\": [\n {}\n ],\n \"limits\": {\n \"maxFindingsPerInfoType\": [\n {\n \"infoType\": {},\n \"maxFindings\": 0\n }\n ],\n \"maxFindingsPerItem\": 0,\n \"maxFindingsPerRequest\": 0\n },\n \"minLikelihood\": \"\",\n \"ruleSet\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"rules\": [\n {\n \"exclusionRule\": {\n \"dictionary\": {},\n \"excludeByHotword\": {\n \"hotwordRegex\": {},\n \"proximity\": {}\n },\n \"excludeInfoTypes\": {\n \"infoTypes\": [\n {}\n ]\n },\n \"matchingType\": \"\",\n \"regex\": {}\n },\n \"hotwordRule\": {}\n }\n ]\n }\n ]\n },\n \"inspectTemplateName\": \"\",\n \"storageConfig\": {\n \"bigQueryOptions\": {\n \"excludedFields\": [\n {\n \"name\": \"\"\n }\n ],\n \"identifyingFields\": [\n {}\n ],\n \"includedFields\": [\n {}\n ],\n \"rowsLimit\": \"\",\n \"rowsLimitPercent\": 0,\n \"sampleMethod\": \"\",\n \"tableReference\": {}\n },\n \"cloudStorageOptions\": {\n \"bytesLimitPerFile\": \"\",\n \"bytesLimitPerFilePercent\": 0,\n \"fileSet\": {\n \"regexFileSet\": {\n \"bucketName\": \"\",\n \"excludeRegex\": [],\n \"includeRegex\": []\n },\n \"url\": \"\"\n },\n \"fileTypes\": [],\n \"filesLimitPercent\": 0,\n \"sampleMethod\": \"\"\n },\n \"datastoreOptions\": {\n \"kind\": {\n \"name\": \"\"\n },\n \"partitionId\": {\n \"namespaceId\": \"\",\n \"projectId\": \"\"\n }\n },\n \"hybridOptions\": {\n \"description\": \"\",\n \"labels\": {},\n \"requiredFindingLabelKeys\": [],\n \"tableOptions\": {\n \"identifyingFields\": [\n {}\n ]\n }\n },\n \"timespanConfig\": {\n \"enableAutoPopulationOfTimespanConfig\": false,\n \"endTime\": \"\",\n \"startTime\": \"\",\n \"timestampField\": {}\n }\n }\n },\n \"lastRunTime\": \"\",\n \"name\": \"\",\n \"status\": \"\",\n \"triggers\": [\n {\n \"manual\": {},\n \"schedule\": {\n \"recurrencePeriodDuration\": \"\"\n }\n }\n ],\n \"updateTime\": \"\"\n },\n \"locationId\": \"\",\n \"triggerId\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/v2/:parent/jobTriggers HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 5171
{
"jobTrigger": {
"createTime": "",
"description": "",
"displayName": "",
"errors": [
{
"details": {
"code": 0,
"details": [
{}
],
"message": ""
},
"timestamps": []
}
],
"inspectJob": {
"actions": [
{
"deidentify": {
"cloudStorageOutput": "",
"fileTypesToTransform": [],
"transformationConfig": {
"deidentifyTemplate": "",
"imageRedactTemplate": "",
"structuredDeidentifyTemplate": ""
},
"transformationDetailsStorageConfig": {
"table": {
"datasetId": "",
"projectId": "",
"tableId": ""
}
}
},
"jobNotificationEmails": {},
"pubSub": {
"topic": ""
},
"publishFindingsToCloudDataCatalog": {},
"publishSummaryToCscc": {},
"publishToStackdriver": {},
"saveFindings": {
"outputConfig": {
"outputSchema": "",
"table": {}
}
}
}
],
"inspectConfig": {
"contentOptions": [],
"customInfoTypes": [
{
"detectionRules": [
{
"hotwordRule": {
"hotwordRegex": {
"groupIndexes": [],
"pattern": ""
},
"likelihoodAdjustment": {
"fixedLikelihood": "",
"relativeLikelihood": 0
},
"proximity": {
"windowAfter": 0,
"windowBefore": 0
}
}
}
],
"dictionary": {
"cloudStoragePath": {
"path": ""
},
"wordList": {
"words": []
}
},
"exclusionType": "",
"infoType": {
"name": "",
"version": ""
},
"likelihood": "",
"regex": {},
"storedType": {
"createTime": "",
"name": ""
},
"surrogateType": {}
}
],
"excludeInfoTypes": false,
"includeQuote": false,
"infoTypes": [
{}
],
"limits": {
"maxFindingsPerInfoType": [
{
"infoType": {},
"maxFindings": 0
}
],
"maxFindingsPerItem": 0,
"maxFindingsPerRequest": 0
},
"minLikelihood": "",
"ruleSet": [
{
"infoTypes": [
{}
],
"rules": [
{
"exclusionRule": {
"dictionary": {},
"excludeByHotword": {
"hotwordRegex": {},
"proximity": {}
},
"excludeInfoTypes": {
"infoTypes": [
{}
]
},
"matchingType": "",
"regex": {}
},
"hotwordRule": {}
}
]
}
]
},
"inspectTemplateName": "",
"storageConfig": {
"bigQueryOptions": {
"excludedFields": [
{
"name": ""
}
],
"identifyingFields": [
{}
],
"includedFields": [
{}
],
"rowsLimit": "",
"rowsLimitPercent": 0,
"sampleMethod": "",
"tableReference": {}
},
"cloudStorageOptions": {
"bytesLimitPerFile": "",
"bytesLimitPerFilePercent": 0,
"fileSet": {
"regexFileSet": {
"bucketName": "",
"excludeRegex": [],
"includeRegex": []
},
"url": ""
},
"fileTypes": [],
"filesLimitPercent": 0,
"sampleMethod": ""
},
"datastoreOptions": {
"kind": {
"name": ""
},
"partitionId": {
"namespaceId": "",
"projectId": ""
}
},
"hybridOptions": {
"description": "",
"labels": {},
"requiredFindingLabelKeys": [],
"tableOptions": {
"identifyingFields": [
{}
]
}
},
"timespanConfig": {
"enableAutoPopulationOfTimespanConfig": false,
"endTime": "",
"startTime": "",
"timestampField": {}
}
}
},
"lastRunTime": "",
"name": "",
"status": "",
"triggers": [
{
"manual": {},
"schedule": {
"recurrencePeriodDuration": ""
}
}
],
"updateTime": ""
},
"locationId": "",
"triggerId": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v2/:parent/jobTriggers")
.setHeader("content-type", "application/json")
.setBody("{\n \"jobTrigger\": {\n \"createTime\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"errors\": [\n {\n \"details\": {\n \"code\": 0,\n \"details\": [\n {}\n ],\n \"message\": \"\"\n },\n \"timestamps\": []\n }\n ],\n \"inspectJob\": {\n \"actions\": [\n {\n \"deidentify\": {\n \"cloudStorageOutput\": \"\",\n \"fileTypesToTransform\": [],\n \"transformationConfig\": {\n \"deidentifyTemplate\": \"\",\n \"imageRedactTemplate\": \"\",\n \"structuredDeidentifyTemplate\": \"\"\n },\n \"transformationDetailsStorageConfig\": {\n \"table\": {\n \"datasetId\": \"\",\n \"projectId\": \"\",\n \"tableId\": \"\"\n }\n }\n },\n \"jobNotificationEmails\": {},\n \"pubSub\": {\n \"topic\": \"\"\n },\n \"publishFindingsToCloudDataCatalog\": {},\n \"publishSummaryToCscc\": {},\n \"publishToStackdriver\": {},\n \"saveFindings\": {\n \"outputConfig\": {\n \"outputSchema\": \"\",\n \"table\": {}\n }\n }\n }\n ],\n \"inspectConfig\": {\n \"contentOptions\": [],\n \"customInfoTypes\": [\n {\n \"detectionRules\": [\n {\n \"hotwordRule\": {\n \"hotwordRegex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n },\n \"likelihoodAdjustment\": {\n \"fixedLikelihood\": \"\",\n \"relativeLikelihood\": 0\n },\n \"proximity\": {\n \"windowAfter\": 0,\n \"windowBefore\": 0\n }\n }\n }\n ],\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {\n \"words\": []\n }\n },\n \"exclusionType\": \"\",\n \"infoType\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"likelihood\": \"\",\n \"regex\": {},\n \"storedType\": {\n \"createTime\": \"\",\n \"name\": \"\"\n },\n \"surrogateType\": {}\n }\n ],\n \"excludeInfoTypes\": false,\n \"includeQuote\": false,\n \"infoTypes\": [\n {}\n ],\n \"limits\": {\n \"maxFindingsPerInfoType\": [\n {\n \"infoType\": {},\n \"maxFindings\": 0\n }\n ],\n \"maxFindingsPerItem\": 0,\n \"maxFindingsPerRequest\": 0\n },\n \"minLikelihood\": \"\",\n \"ruleSet\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"rules\": [\n {\n \"exclusionRule\": {\n \"dictionary\": {},\n \"excludeByHotword\": {\n \"hotwordRegex\": {},\n \"proximity\": {}\n },\n \"excludeInfoTypes\": {\n \"infoTypes\": [\n {}\n ]\n },\n \"matchingType\": \"\",\n \"regex\": {}\n },\n \"hotwordRule\": {}\n }\n ]\n }\n ]\n },\n \"inspectTemplateName\": \"\",\n \"storageConfig\": {\n \"bigQueryOptions\": {\n \"excludedFields\": [\n {\n \"name\": \"\"\n }\n ],\n \"identifyingFields\": [\n {}\n ],\n \"includedFields\": [\n {}\n ],\n \"rowsLimit\": \"\",\n \"rowsLimitPercent\": 0,\n \"sampleMethod\": \"\",\n \"tableReference\": {}\n },\n \"cloudStorageOptions\": {\n \"bytesLimitPerFile\": \"\",\n \"bytesLimitPerFilePercent\": 0,\n \"fileSet\": {\n \"regexFileSet\": {\n \"bucketName\": \"\",\n \"excludeRegex\": [],\n \"includeRegex\": []\n },\n \"url\": \"\"\n },\n \"fileTypes\": [],\n \"filesLimitPercent\": 0,\n \"sampleMethod\": \"\"\n },\n \"datastoreOptions\": {\n \"kind\": {\n \"name\": \"\"\n },\n \"partitionId\": {\n \"namespaceId\": \"\",\n \"projectId\": \"\"\n }\n },\n \"hybridOptions\": {\n \"description\": \"\",\n \"labels\": {},\n \"requiredFindingLabelKeys\": [],\n \"tableOptions\": {\n \"identifyingFields\": [\n {}\n ]\n }\n },\n \"timespanConfig\": {\n \"enableAutoPopulationOfTimespanConfig\": false,\n \"endTime\": \"\",\n \"startTime\": \"\",\n \"timestampField\": {}\n }\n }\n },\n \"lastRunTime\": \"\",\n \"name\": \"\",\n \"status\": \"\",\n \"triggers\": [\n {\n \"manual\": {},\n \"schedule\": {\n \"recurrencePeriodDuration\": \"\"\n }\n }\n ],\n \"updateTime\": \"\"\n },\n \"locationId\": \"\",\n \"triggerId\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/:parent/jobTriggers"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"jobTrigger\": {\n \"createTime\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"errors\": [\n {\n \"details\": {\n \"code\": 0,\n \"details\": [\n {}\n ],\n \"message\": \"\"\n },\n \"timestamps\": []\n }\n ],\n \"inspectJob\": {\n \"actions\": [\n {\n \"deidentify\": {\n \"cloudStorageOutput\": \"\",\n \"fileTypesToTransform\": [],\n \"transformationConfig\": {\n \"deidentifyTemplate\": \"\",\n \"imageRedactTemplate\": \"\",\n \"structuredDeidentifyTemplate\": \"\"\n },\n \"transformationDetailsStorageConfig\": {\n \"table\": {\n \"datasetId\": \"\",\n \"projectId\": \"\",\n \"tableId\": \"\"\n }\n }\n },\n \"jobNotificationEmails\": {},\n \"pubSub\": {\n \"topic\": \"\"\n },\n \"publishFindingsToCloudDataCatalog\": {},\n \"publishSummaryToCscc\": {},\n \"publishToStackdriver\": {},\n \"saveFindings\": {\n \"outputConfig\": {\n \"outputSchema\": \"\",\n \"table\": {}\n }\n }\n }\n ],\n \"inspectConfig\": {\n \"contentOptions\": [],\n \"customInfoTypes\": [\n {\n \"detectionRules\": [\n {\n \"hotwordRule\": {\n \"hotwordRegex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n },\n \"likelihoodAdjustment\": {\n \"fixedLikelihood\": \"\",\n \"relativeLikelihood\": 0\n },\n \"proximity\": {\n \"windowAfter\": 0,\n \"windowBefore\": 0\n }\n }\n }\n ],\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {\n \"words\": []\n }\n },\n \"exclusionType\": \"\",\n \"infoType\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"likelihood\": \"\",\n \"regex\": {},\n \"storedType\": {\n \"createTime\": \"\",\n \"name\": \"\"\n },\n \"surrogateType\": {}\n }\n ],\n \"excludeInfoTypes\": false,\n \"includeQuote\": false,\n \"infoTypes\": [\n {}\n ],\n \"limits\": {\n \"maxFindingsPerInfoType\": [\n {\n \"infoType\": {},\n \"maxFindings\": 0\n }\n ],\n \"maxFindingsPerItem\": 0,\n \"maxFindingsPerRequest\": 0\n },\n \"minLikelihood\": \"\",\n \"ruleSet\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"rules\": [\n {\n \"exclusionRule\": {\n \"dictionary\": {},\n \"excludeByHotword\": {\n \"hotwordRegex\": {},\n \"proximity\": {}\n },\n \"excludeInfoTypes\": {\n \"infoTypes\": [\n {}\n ]\n },\n \"matchingType\": \"\",\n \"regex\": {}\n },\n \"hotwordRule\": {}\n }\n ]\n }\n ]\n },\n \"inspectTemplateName\": \"\",\n \"storageConfig\": {\n \"bigQueryOptions\": {\n \"excludedFields\": [\n {\n \"name\": \"\"\n }\n ],\n \"identifyingFields\": [\n {}\n ],\n \"includedFields\": [\n {}\n ],\n \"rowsLimit\": \"\",\n \"rowsLimitPercent\": 0,\n \"sampleMethod\": \"\",\n \"tableReference\": {}\n },\n \"cloudStorageOptions\": {\n \"bytesLimitPerFile\": \"\",\n \"bytesLimitPerFilePercent\": 0,\n \"fileSet\": {\n \"regexFileSet\": {\n \"bucketName\": \"\",\n \"excludeRegex\": [],\n \"includeRegex\": []\n },\n \"url\": \"\"\n },\n \"fileTypes\": [],\n \"filesLimitPercent\": 0,\n \"sampleMethod\": \"\"\n },\n \"datastoreOptions\": {\n \"kind\": {\n \"name\": \"\"\n },\n \"partitionId\": {\n \"namespaceId\": \"\",\n \"projectId\": \"\"\n }\n },\n \"hybridOptions\": {\n \"description\": \"\",\n \"labels\": {},\n \"requiredFindingLabelKeys\": [],\n \"tableOptions\": {\n \"identifyingFields\": [\n {}\n ]\n }\n },\n \"timespanConfig\": {\n \"enableAutoPopulationOfTimespanConfig\": false,\n \"endTime\": \"\",\n \"startTime\": \"\",\n \"timestampField\": {}\n }\n }\n },\n \"lastRunTime\": \"\",\n \"name\": \"\",\n \"status\": \"\",\n \"triggers\": [\n {\n \"manual\": {},\n \"schedule\": {\n \"recurrencePeriodDuration\": \"\"\n }\n }\n ],\n \"updateTime\": \"\"\n },\n \"locationId\": \"\",\n \"triggerId\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"jobTrigger\": {\n \"createTime\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"errors\": [\n {\n \"details\": {\n \"code\": 0,\n \"details\": [\n {}\n ],\n \"message\": \"\"\n },\n \"timestamps\": []\n }\n ],\n \"inspectJob\": {\n \"actions\": [\n {\n \"deidentify\": {\n \"cloudStorageOutput\": \"\",\n \"fileTypesToTransform\": [],\n \"transformationConfig\": {\n \"deidentifyTemplate\": \"\",\n \"imageRedactTemplate\": \"\",\n \"structuredDeidentifyTemplate\": \"\"\n },\n \"transformationDetailsStorageConfig\": {\n \"table\": {\n \"datasetId\": \"\",\n \"projectId\": \"\",\n \"tableId\": \"\"\n }\n }\n },\n \"jobNotificationEmails\": {},\n \"pubSub\": {\n \"topic\": \"\"\n },\n \"publishFindingsToCloudDataCatalog\": {},\n \"publishSummaryToCscc\": {},\n \"publishToStackdriver\": {},\n \"saveFindings\": {\n \"outputConfig\": {\n \"outputSchema\": \"\",\n \"table\": {}\n }\n }\n }\n ],\n \"inspectConfig\": {\n \"contentOptions\": [],\n \"customInfoTypes\": [\n {\n \"detectionRules\": [\n {\n \"hotwordRule\": {\n \"hotwordRegex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n },\n \"likelihoodAdjustment\": {\n \"fixedLikelihood\": \"\",\n \"relativeLikelihood\": 0\n },\n \"proximity\": {\n \"windowAfter\": 0,\n \"windowBefore\": 0\n }\n }\n }\n ],\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {\n \"words\": []\n }\n },\n \"exclusionType\": \"\",\n \"infoType\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"likelihood\": \"\",\n \"regex\": {},\n \"storedType\": {\n \"createTime\": \"\",\n \"name\": \"\"\n },\n \"surrogateType\": {}\n }\n ],\n \"excludeInfoTypes\": false,\n \"includeQuote\": false,\n \"infoTypes\": [\n {}\n ],\n \"limits\": {\n \"maxFindingsPerInfoType\": [\n {\n \"infoType\": {},\n \"maxFindings\": 0\n }\n ],\n \"maxFindingsPerItem\": 0,\n \"maxFindingsPerRequest\": 0\n },\n \"minLikelihood\": \"\",\n \"ruleSet\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"rules\": [\n {\n \"exclusionRule\": {\n \"dictionary\": {},\n \"excludeByHotword\": {\n \"hotwordRegex\": {},\n \"proximity\": {}\n },\n \"excludeInfoTypes\": {\n \"infoTypes\": [\n {}\n ]\n },\n \"matchingType\": \"\",\n \"regex\": {}\n },\n \"hotwordRule\": {}\n }\n ]\n }\n ]\n },\n \"inspectTemplateName\": \"\",\n \"storageConfig\": {\n \"bigQueryOptions\": {\n \"excludedFields\": [\n {\n \"name\": \"\"\n }\n ],\n \"identifyingFields\": [\n {}\n ],\n \"includedFields\": [\n {}\n ],\n \"rowsLimit\": \"\",\n \"rowsLimitPercent\": 0,\n \"sampleMethod\": \"\",\n \"tableReference\": {}\n },\n \"cloudStorageOptions\": {\n \"bytesLimitPerFile\": \"\",\n \"bytesLimitPerFilePercent\": 0,\n \"fileSet\": {\n \"regexFileSet\": {\n \"bucketName\": \"\",\n \"excludeRegex\": [],\n \"includeRegex\": []\n },\n \"url\": \"\"\n },\n \"fileTypes\": [],\n \"filesLimitPercent\": 0,\n \"sampleMethod\": \"\"\n },\n \"datastoreOptions\": {\n \"kind\": {\n \"name\": \"\"\n },\n \"partitionId\": {\n \"namespaceId\": \"\",\n \"projectId\": \"\"\n }\n },\n \"hybridOptions\": {\n \"description\": \"\",\n \"labels\": {},\n \"requiredFindingLabelKeys\": [],\n \"tableOptions\": {\n \"identifyingFields\": [\n {}\n ]\n }\n },\n \"timespanConfig\": {\n \"enableAutoPopulationOfTimespanConfig\": false,\n \"endTime\": \"\",\n \"startTime\": \"\",\n \"timestampField\": {}\n }\n }\n },\n \"lastRunTime\": \"\",\n \"name\": \"\",\n \"status\": \"\",\n \"triggers\": [\n {\n \"manual\": {},\n \"schedule\": {\n \"recurrencePeriodDuration\": \"\"\n }\n }\n ],\n \"updateTime\": \"\"\n },\n \"locationId\": \"\",\n \"triggerId\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v2/:parent/jobTriggers")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v2/:parent/jobTriggers")
.header("content-type", "application/json")
.body("{\n \"jobTrigger\": {\n \"createTime\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"errors\": [\n {\n \"details\": {\n \"code\": 0,\n \"details\": [\n {}\n ],\n \"message\": \"\"\n },\n \"timestamps\": []\n }\n ],\n \"inspectJob\": {\n \"actions\": [\n {\n \"deidentify\": {\n \"cloudStorageOutput\": \"\",\n \"fileTypesToTransform\": [],\n \"transformationConfig\": {\n \"deidentifyTemplate\": \"\",\n \"imageRedactTemplate\": \"\",\n \"structuredDeidentifyTemplate\": \"\"\n },\n \"transformationDetailsStorageConfig\": {\n \"table\": {\n \"datasetId\": \"\",\n \"projectId\": \"\",\n \"tableId\": \"\"\n }\n }\n },\n \"jobNotificationEmails\": {},\n \"pubSub\": {\n \"topic\": \"\"\n },\n \"publishFindingsToCloudDataCatalog\": {},\n \"publishSummaryToCscc\": {},\n \"publishToStackdriver\": {},\n \"saveFindings\": {\n \"outputConfig\": {\n \"outputSchema\": \"\",\n \"table\": {}\n }\n }\n }\n ],\n \"inspectConfig\": {\n \"contentOptions\": [],\n \"customInfoTypes\": [\n {\n \"detectionRules\": [\n {\n \"hotwordRule\": {\n \"hotwordRegex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n },\n \"likelihoodAdjustment\": {\n \"fixedLikelihood\": \"\",\n \"relativeLikelihood\": 0\n },\n \"proximity\": {\n \"windowAfter\": 0,\n \"windowBefore\": 0\n }\n }\n }\n ],\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {\n \"words\": []\n }\n },\n \"exclusionType\": \"\",\n \"infoType\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"likelihood\": \"\",\n \"regex\": {},\n \"storedType\": {\n \"createTime\": \"\",\n \"name\": \"\"\n },\n \"surrogateType\": {}\n }\n ],\n \"excludeInfoTypes\": false,\n \"includeQuote\": false,\n \"infoTypes\": [\n {}\n ],\n \"limits\": {\n \"maxFindingsPerInfoType\": [\n {\n \"infoType\": {},\n \"maxFindings\": 0\n }\n ],\n \"maxFindingsPerItem\": 0,\n \"maxFindingsPerRequest\": 0\n },\n \"minLikelihood\": \"\",\n \"ruleSet\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"rules\": [\n {\n \"exclusionRule\": {\n \"dictionary\": {},\n \"excludeByHotword\": {\n \"hotwordRegex\": {},\n \"proximity\": {}\n },\n \"excludeInfoTypes\": {\n \"infoTypes\": [\n {}\n ]\n },\n \"matchingType\": \"\",\n \"regex\": {}\n },\n \"hotwordRule\": {}\n }\n ]\n }\n ]\n },\n \"inspectTemplateName\": \"\",\n \"storageConfig\": {\n \"bigQueryOptions\": {\n \"excludedFields\": [\n {\n \"name\": \"\"\n }\n ],\n \"identifyingFields\": [\n {}\n ],\n \"includedFields\": [\n {}\n ],\n \"rowsLimit\": \"\",\n \"rowsLimitPercent\": 0,\n \"sampleMethod\": \"\",\n \"tableReference\": {}\n },\n \"cloudStorageOptions\": {\n \"bytesLimitPerFile\": \"\",\n \"bytesLimitPerFilePercent\": 0,\n \"fileSet\": {\n \"regexFileSet\": {\n \"bucketName\": \"\",\n \"excludeRegex\": [],\n \"includeRegex\": []\n },\n \"url\": \"\"\n },\n \"fileTypes\": [],\n \"filesLimitPercent\": 0,\n \"sampleMethod\": \"\"\n },\n \"datastoreOptions\": {\n \"kind\": {\n \"name\": \"\"\n },\n \"partitionId\": {\n \"namespaceId\": \"\",\n \"projectId\": \"\"\n }\n },\n \"hybridOptions\": {\n \"description\": \"\",\n \"labels\": {},\n \"requiredFindingLabelKeys\": [],\n \"tableOptions\": {\n \"identifyingFields\": [\n {}\n ]\n }\n },\n \"timespanConfig\": {\n \"enableAutoPopulationOfTimespanConfig\": false,\n \"endTime\": \"\",\n \"startTime\": \"\",\n \"timestampField\": {}\n }\n }\n },\n \"lastRunTime\": \"\",\n \"name\": \"\",\n \"status\": \"\",\n \"triggers\": [\n {\n \"manual\": {},\n \"schedule\": {\n \"recurrencePeriodDuration\": \"\"\n }\n }\n ],\n \"updateTime\": \"\"\n },\n \"locationId\": \"\",\n \"triggerId\": \"\"\n}")
.asString();
const data = JSON.stringify({
jobTrigger: {
createTime: '',
description: '',
displayName: '',
errors: [
{
details: {
code: 0,
details: [
{}
],
message: ''
},
timestamps: []
}
],
inspectJob: {
actions: [
{
deidentify: {
cloudStorageOutput: '',
fileTypesToTransform: [],
transformationConfig: {
deidentifyTemplate: '',
imageRedactTemplate: '',
structuredDeidentifyTemplate: ''
},
transformationDetailsStorageConfig: {
table: {
datasetId: '',
projectId: '',
tableId: ''
}
}
},
jobNotificationEmails: {},
pubSub: {
topic: ''
},
publishFindingsToCloudDataCatalog: {},
publishSummaryToCscc: {},
publishToStackdriver: {},
saveFindings: {
outputConfig: {
outputSchema: '',
table: {}
}
}
}
],
inspectConfig: {
contentOptions: [],
customInfoTypes: [
{
detectionRules: [
{
hotwordRule: {
hotwordRegex: {
groupIndexes: [],
pattern: ''
},
likelihoodAdjustment: {
fixedLikelihood: '',
relativeLikelihood: 0
},
proximity: {
windowAfter: 0,
windowBefore: 0
}
}
}
],
dictionary: {
cloudStoragePath: {
path: ''
},
wordList: {
words: []
}
},
exclusionType: '',
infoType: {
name: '',
version: ''
},
likelihood: '',
regex: {},
storedType: {
createTime: '',
name: ''
},
surrogateType: {}
}
],
excludeInfoTypes: false,
includeQuote: false,
infoTypes: [
{}
],
limits: {
maxFindingsPerInfoType: [
{
infoType: {},
maxFindings: 0
}
],
maxFindingsPerItem: 0,
maxFindingsPerRequest: 0
},
minLikelihood: '',
ruleSet: [
{
infoTypes: [
{}
],
rules: [
{
exclusionRule: {
dictionary: {},
excludeByHotword: {
hotwordRegex: {},
proximity: {}
},
excludeInfoTypes: {
infoTypes: [
{}
]
},
matchingType: '',
regex: {}
},
hotwordRule: {}
}
]
}
]
},
inspectTemplateName: '',
storageConfig: {
bigQueryOptions: {
excludedFields: [
{
name: ''
}
],
identifyingFields: [
{}
],
includedFields: [
{}
],
rowsLimit: '',
rowsLimitPercent: 0,
sampleMethod: '',
tableReference: {}
},
cloudStorageOptions: {
bytesLimitPerFile: '',
bytesLimitPerFilePercent: 0,
fileSet: {
regexFileSet: {
bucketName: '',
excludeRegex: [],
includeRegex: []
},
url: ''
},
fileTypes: [],
filesLimitPercent: 0,
sampleMethod: ''
},
datastoreOptions: {
kind: {
name: ''
},
partitionId: {
namespaceId: '',
projectId: ''
}
},
hybridOptions: {
description: '',
labels: {},
requiredFindingLabelKeys: [],
tableOptions: {
identifyingFields: [
{}
]
}
},
timespanConfig: {
enableAutoPopulationOfTimespanConfig: false,
endTime: '',
startTime: '',
timestampField: {}
}
}
},
lastRunTime: '',
name: '',
status: '',
triggers: [
{
manual: {},
schedule: {
recurrencePeriodDuration: ''
}
}
],
updateTime: ''
},
locationId: '',
triggerId: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v2/:parent/jobTriggers');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v2/:parent/jobTriggers',
headers: {'content-type': 'application/json'},
data: {
jobTrigger: {
createTime: '',
description: '',
displayName: '',
errors: [{details: {code: 0, details: [{}], message: ''}, timestamps: []}],
inspectJob: {
actions: [
{
deidentify: {
cloudStorageOutput: '',
fileTypesToTransform: [],
transformationConfig: {
deidentifyTemplate: '',
imageRedactTemplate: '',
structuredDeidentifyTemplate: ''
},
transformationDetailsStorageConfig: {table: {datasetId: '', projectId: '', tableId: ''}}
},
jobNotificationEmails: {},
pubSub: {topic: ''},
publishFindingsToCloudDataCatalog: {},
publishSummaryToCscc: {},
publishToStackdriver: {},
saveFindings: {outputConfig: {outputSchema: '', table: {}}}
}
],
inspectConfig: {
contentOptions: [],
customInfoTypes: [
{
detectionRules: [
{
hotwordRule: {
hotwordRegex: {groupIndexes: [], pattern: ''},
likelihoodAdjustment: {fixedLikelihood: '', relativeLikelihood: 0},
proximity: {windowAfter: 0, windowBefore: 0}
}
}
],
dictionary: {cloudStoragePath: {path: ''}, wordList: {words: []}},
exclusionType: '',
infoType: {name: '', version: ''},
likelihood: '',
regex: {},
storedType: {createTime: '', name: ''},
surrogateType: {}
}
],
excludeInfoTypes: false,
includeQuote: false,
infoTypes: [{}],
limits: {
maxFindingsPerInfoType: [{infoType: {}, maxFindings: 0}],
maxFindingsPerItem: 0,
maxFindingsPerRequest: 0
},
minLikelihood: '',
ruleSet: [
{
infoTypes: [{}],
rules: [
{
exclusionRule: {
dictionary: {},
excludeByHotword: {hotwordRegex: {}, proximity: {}},
excludeInfoTypes: {infoTypes: [{}]},
matchingType: '',
regex: {}
},
hotwordRule: {}
}
]
}
]
},
inspectTemplateName: '',
storageConfig: {
bigQueryOptions: {
excludedFields: [{name: ''}],
identifyingFields: [{}],
includedFields: [{}],
rowsLimit: '',
rowsLimitPercent: 0,
sampleMethod: '',
tableReference: {}
},
cloudStorageOptions: {
bytesLimitPerFile: '',
bytesLimitPerFilePercent: 0,
fileSet: {regexFileSet: {bucketName: '', excludeRegex: [], includeRegex: []}, url: ''},
fileTypes: [],
filesLimitPercent: 0,
sampleMethod: ''
},
datastoreOptions: {kind: {name: ''}, partitionId: {namespaceId: '', projectId: ''}},
hybridOptions: {
description: '',
labels: {},
requiredFindingLabelKeys: [],
tableOptions: {identifyingFields: [{}]}
},
timespanConfig: {
enableAutoPopulationOfTimespanConfig: false,
endTime: '',
startTime: '',
timestampField: {}
}
}
},
lastRunTime: '',
name: '',
status: '',
triggers: [{manual: {}, schedule: {recurrencePeriodDuration: ''}}],
updateTime: ''
},
locationId: '',
triggerId: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/:parent/jobTriggers';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"jobTrigger":{"createTime":"","description":"","displayName":"","errors":[{"details":{"code":0,"details":[{}],"message":""},"timestamps":[]}],"inspectJob":{"actions":[{"deidentify":{"cloudStorageOutput":"","fileTypesToTransform":[],"transformationConfig":{"deidentifyTemplate":"","imageRedactTemplate":"","structuredDeidentifyTemplate":""},"transformationDetailsStorageConfig":{"table":{"datasetId":"","projectId":"","tableId":""}}},"jobNotificationEmails":{},"pubSub":{"topic":""},"publishFindingsToCloudDataCatalog":{},"publishSummaryToCscc":{},"publishToStackdriver":{},"saveFindings":{"outputConfig":{"outputSchema":"","table":{}}}}],"inspectConfig":{"contentOptions":[],"customInfoTypes":[{"detectionRules":[{"hotwordRule":{"hotwordRegex":{"groupIndexes":[],"pattern":""},"likelihoodAdjustment":{"fixedLikelihood":"","relativeLikelihood":0},"proximity":{"windowAfter":0,"windowBefore":0}}}],"dictionary":{"cloudStoragePath":{"path":""},"wordList":{"words":[]}},"exclusionType":"","infoType":{"name":"","version":""},"likelihood":"","regex":{},"storedType":{"createTime":"","name":""},"surrogateType":{}}],"excludeInfoTypes":false,"includeQuote":false,"infoTypes":[{}],"limits":{"maxFindingsPerInfoType":[{"infoType":{},"maxFindings":0}],"maxFindingsPerItem":0,"maxFindingsPerRequest":0},"minLikelihood":"","ruleSet":[{"infoTypes":[{}],"rules":[{"exclusionRule":{"dictionary":{},"excludeByHotword":{"hotwordRegex":{},"proximity":{}},"excludeInfoTypes":{"infoTypes":[{}]},"matchingType":"","regex":{}},"hotwordRule":{}}]}]},"inspectTemplateName":"","storageConfig":{"bigQueryOptions":{"excludedFields":[{"name":""}],"identifyingFields":[{}],"includedFields":[{}],"rowsLimit":"","rowsLimitPercent":0,"sampleMethod":"","tableReference":{}},"cloudStorageOptions":{"bytesLimitPerFile":"","bytesLimitPerFilePercent":0,"fileSet":{"regexFileSet":{"bucketName":"","excludeRegex":[],"includeRegex":[]},"url":""},"fileTypes":[],"filesLimitPercent":0,"sampleMethod":""},"datastoreOptions":{"kind":{"name":""},"partitionId":{"namespaceId":"","projectId":""}},"hybridOptions":{"description":"","labels":{},"requiredFindingLabelKeys":[],"tableOptions":{"identifyingFields":[{}]}},"timespanConfig":{"enableAutoPopulationOfTimespanConfig":false,"endTime":"","startTime":"","timestampField":{}}}},"lastRunTime":"","name":"","status":"","triggers":[{"manual":{},"schedule":{"recurrencePeriodDuration":""}}],"updateTime":""},"locationId":"","triggerId":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v2/:parent/jobTriggers',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "jobTrigger": {\n "createTime": "",\n "description": "",\n "displayName": "",\n "errors": [\n {\n "details": {\n "code": 0,\n "details": [\n {}\n ],\n "message": ""\n },\n "timestamps": []\n }\n ],\n "inspectJob": {\n "actions": [\n {\n "deidentify": {\n "cloudStorageOutput": "",\n "fileTypesToTransform": [],\n "transformationConfig": {\n "deidentifyTemplate": "",\n "imageRedactTemplate": "",\n "structuredDeidentifyTemplate": ""\n },\n "transformationDetailsStorageConfig": {\n "table": {\n "datasetId": "",\n "projectId": "",\n "tableId": ""\n }\n }\n },\n "jobNotificationEmails": {},\n "pubSub": {\n "topic": ""\n },\n "publishFindingsToCloudDataCatalog": {},\n "publishSummaryToCscc": {},\n "publishToStackdriver": {},\n "saveFindings": {\n "outputConfig": {\n "outputSchema": "",\n "table": {}\n }\n }\n }\n ],\n "inspectConfig": {\n "contentOptions": [],\n "customInfoTypes": [\n {\n "detectionRules": [\n {\n "hotwordRule": {\n "hotwordRegex": {\n "groupIndexes": [],\n "pattern": ""\n },\n "likelihoodAdjustment": {\n "fixedLikelihood": "",\n "relativeLikelihood": 0\n },\n "proximity": {\n "windowAfter": 0,\n "windowBefore": 0\n }\n }\n }\n ],\n "dictionary": {\n "cloudStoragePath": {\n "path": ""\n },\n "wordList": {\n "words": []\n }\n },\n "exclusionType": "",\n "infoType": {\n "name": "",\n "version": ""\n },\n "likelihood": "",\n "regex": {},\n "storedType": {\n "createTime": "",\n "name": ""\n },\n "surrogateType": {}\n }\n ],\n "excludeInfoTypes": false,\n "includeQuote": false,\n "infoTypes": [\n {}\n ],\n "limits": {\n "maxFindingsPerInfoType": [\n {\n "infoType": {},\n "maxFindings": 0\n }\n ],\n "maxFindingsPerItem": 0,\n "maxFindingsPerRequest": 0\n },\n "minLikelihood": "",\n "ruleSet": [\n {\n "infoTypes": [\n {}\n ],\n "rules": [\n {\n "exclusionRule": {\n "dictionary": {},\n "excludeByHotword": {\n "hotwordRegex": {},\n "proximity": {}\n },\n "excludeInfoTypes": {\n "infoTypes": [\n {}\n ]\n },\n "matchingType": "",\n "regex": {}\n },\n "hotwordRule": {}\n }\n ]\n }\n ]\n },\n "inspectTemplateName": "",\n "storageConfig": {\n "bigQueryOptions": {\n "excludedFields": [\n {\n "name": ""\n }\n ],\n "identifyingFields": [\n {}\n ],\n "includedFields": [\n {}\n ],\n "rowsLimit": "",\n "rowsLimitPercent": 0,\n "sampleMethod": "",\n "tableReference": {}\n },\n "cloudStorageOptions": {\n "bytesLimitPerFile": "",\n "bytesLimitPerFilePercent": 0,\n "fileSet": {\n "regexFileSet": {\n "bucketName": "",\n "excludeRegex": [],\n "includeRegex": []\n },\n "url": ""\n },\n "fileTypes": [],\n "filesLimitPercent": 0,\n "sampleMethod": ""\n },\n "datastoreOptions": {\n "kind": {\n "name": ""\n },\n "partitionId": {\n "namespaceId": "",\n "projectId": ""\n }\n },\n "hybridOptions": {\n "description": "",\n "labels": {},\n "requiredFindingLabelKeys": [],\n "tableOptions": {\n "identifyingFields": [\n {}\n ]\n }\n },\n "timespanConfig": {\n "enableAutoPopulationOfTimespanConfig": false,\n "endTime": "",\n "startTime": "",\n "timestampField": {}\n }\n }\n },\n "lastRunTime": "",\n "name": "",\n "status": "",\n "triggers": [\n {\n "manual": {},\n "schedule": {\n "recurrencePeriodDuration": ""\n }\n }\n ],\n "updateTime": ""\n },\n "locationId": "",\n "triggerId": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"jobTrigger\": {\n \"createTime\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"errors\": [\n {\n \"details\": {\n \"code\": 0,\n \"details\": [\n {}\n ],\n \"message\": \"\"\n },\n \"timestamps\": []\n }\n ],\n \"inspectJob\": {\n \"actions\": [\n {\n \"deidentify\": {\n \"cloudStorageOutput\": \"\",\n \"fileTypesToTransform\": [],\n \"transformationConfig\": {\n \"deidentifyTemplate\": \"\",\n \"imageRedactTemplate\": \"\",\n \"structuredDeidentifyTemplate\": \"\"\n },\n \"transformationDetailsStorageConfig\": {\n \"table\": {\n \"datasetId\": \"\",\n \"projectId\": \"\",\n \"tableId\": \"\"\n }\n }\n },\n \"jobNotificationEmails\": {},\n \"pubSub\": {\n \"topic\": \"\"\n },\n \"publishFindingsToCloudDataCatalog\": {},\n \"publishSummaryToCscc\": {},\n \"publishToStackdriver\": {},\n \"saveFindings\": {\n \"outputConfig\": {\n \"outputSchema\": \"\",\n \"table\": {}\n }\n }\n }\n ],\n \"inspectConfig\": {\n \"contentOptions\": [],\n \"customInfoTypes\": [\n {\n \"detectionRules\": [\n {\n \"hotwordRule\": {\n \"hotwordRegex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n },\n \"likelihoodAdjustment\": {\n \"fixedLikelihood\": \"\",\n \"relativeLikelihood\": 0\n },\n \"proximity\": {\n \"windowAfter\": 0,\n \"windowBefore\": 0\n }\n }\n }\n ],\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {\n \"words\": []\n }\n },\n \"exclusionType\": \"\",\n \"infoType\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"likelihood\": \"\",\n \"regex\": {},\n \"storedType\": {\n \"createTime\": \"\",\n \"name\": \"\"\n },\n \"surrogateType\": {}\n }\n ],\n \"excludeInfoTypes\": false,\n \"includeQuote\": false,\n \"infoTypes\": [\n {}\n ],\n \"limits\": {\n \"maxFindingsPerInfoType\": [\n {\n \"infoType\": {},\n \"maxFindings\": 0\n }\n ],\n \"maxFindingsPerItem\": 0,\n \"maxFindingsPerRequest\": 0\n },\n \"minLikelihood\": \"\",\n \"ruleSet\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"rules\": [\n {\n \"exclusionRule\": {\n \"dictionary\": {},\n \"excludeByHotword\": {\n \"hotwordRegex\": {},\n \"proximity\": {}\n },\n \"excludeInfoTypes\": {\n \"infoTypes\": [\n {}\n ]\n },\n \"matchingType\": \"\",\n \"regex\": {}\n },\n \"hotwordRule\": {}\n }\n ]\n }\n ]\n },\n \"inspectTemplateName\": \"\",\n \"storageConfig\": {\n \"bigQueryOptions\": {\n \"excludedFields\": [\n {\n \"name\": \"\"\n }\n ],\n \"identifyingFields\": [\n {}\n ],\n \"includedFields\": [\n {}\n ],\n \"rowsLimit\": \"\",\n \"rowsLimitPercent\": 0,\n \"sampleMethod\": \"\",\n \"tableReference\": {}\n },\n \"cloudStorageOptions\": {\n \"bytesLimitPerFile\": \"\",\n \"bytesLimitPerFilePercent\": 0,\n \"fileSet\": {\n \"regexFileSet\": {\n \"bucketName\": \"\",\n \"excludeRegex\": [],\n \"includeRegex\": []\n },\n \"url\": \"\"\n },\n \"fileTypes\": [],\n \"filesLimitPercent\": 0,\n \"sampleMethod\": \"\"\n },\n \"datastoreOptions\": {\n \"kind\": {\n \"name\": \"\"\n },\n \"partitionId\": {\n \"namespaceId\": \"\",\n \"projectId\": \"\"\n }\n },\n \"hybridOptions\": {\n \"description\": \"\",\n \"labels\": {},\n \"requiredFindingLabelKeys\": [],\n \"tableOptions\": {\n \"identifyingFields\": [\n {}\n ]\n }\n },\n \"timespanConfig\": {\n \"enableAutoPopulationOfTimespanConfig\": false,\n \"endTime\": \"\",\n \"startTime\": \"\",\n \"timestampField\": {}\n }\n }\n },\n \"lastRunTime\": \"\",\n \"name\": \"\",\n \"status\": \"\",\n \"triggers\": [\n {\n \"manual\": {},\n \"schedule\": {\n \"recurrencePeriodDuration\": \"\"\n }\n }\n ],\n \"updateTime\": \"\"\n },\n \"locationId\": \"\",\n \"triggerId\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v2/:parent/jobTriggers")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/v2/:parent/jobTriggers',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
jobTrigger: {
createTime: '',
description: '',
displayName: '',
errors: [{details: {code: 0, details: [{}], message: ''}, timestamps: []}],
inspectJob: {
actions: [
{
deidentify: {
cloudStorageOutput: '',
fileTypesToTransform: [],
transformationConfig: {
deidentifyTemplate: '',
imageRedactTemplate: '',
structuredDeidentifyTemplate: ''
},
transformationDetailsStorageConfig: {table: {datasetId: '', projectId: '', tableId: ''}}
},
jobNotificationEmails: {},
pubSub: {topic: ''},
publishFindingsToCloudDataCatalog: {},
publishSummaryToCscc: {},
publishToStackdriver: {},
saveFindings: {outputConfig: {outputSchema: '', table: {}}}
}
],
inspectConfig: {
contentOptions: [],
customInfoTypes: [
{
detectionRules: [
{
hotwordRule: {
hotwordRegex: {groupIndexes: [], pattern: ''},
likelihoodAdjustment: {fixedLikelihood: '', relativeLikelihood: 0},
proximity: {windowAfter: 0, windowBefore: 0}
}
}
],
dictionary: {cloudStoragePath: {path: ''}, wordList: {words: []}},
exclusionType: '',
infoType: {name: '', version: ''},
likelihood: '',
regex: {},
storedType: {createTime: '', name: ''},
surrogateType: {}
}
],
excludeInfoTypes: false,
includeQuote: false,
infoTypes: [{}],
limits: {
maxFindingsPerInfoType: [{infoType: {}, maxFindings: 0}],
maxFindingsPerItem: 0,
maxFindingsPerRequest: 0
},
minLikelihood: '',
ruleSet: [
{
infoTypes: [{}],
rules: [
{
exclusionRule: {
dictionary: {},
excludeByHotword: {hotwordRegex: {}, proximity: {}},
excludeInfoTypes: {infoTypes: [{}]},
matchingType: '',
regex: {}
},
hotwordRule: {}
}
]
}
]
},
inspectTemplateName: '',
storageConfig: {
bigQueryOptions: {
excludedFields: [{name: ''}],
identifyingFields: [{}],
includedFields: [{}],
rowsLimit: '',
rowsLimitPercent: 0,
sampleMethod: '',
tableReference: {}
},
cloudStorageOptions: {
bytesLimitPerFile: '',
bytesLimitPerFilePercent: 0,
fileSet: {regexFileSet: {bucketName: '', excludeRegex: [], includeRegex: []}, url: ''},
fileTypes: [],
filesLimitPercent: 0,
sampleMethod: ''
},
datastoreOptions: {kind: {name: ''}, partitionId: {namespaceId: '', projectId: ''}},
hybridOptions: {
description: '',
labels: {},
requiredFindingLabelKeys: [],
tableOptions: {identifyingFields: [{}]}
},
timespanConfig: {
enableAutoPopulationOfTimespanConfig: false,
endTime: '',
startTime: '',
timestampField: {}
}
}
},
lastRunTime: '',
name: '',
status: '',
triggers: [{manual: {}, schedule: {recurrencePeriodDuration: ''}}],
updateTime: ''
},
locationId: '',
triggerId: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v2/:parent/jobTriggers',
headers: {'content-type': 'application/json'},
body: {
jobTrigger: {
createTime: '',
description: '',
displayName: '',
errors: [{details: {code: 0, details: [{}], message: ''}, timestamps: []}],
inspectJob: {
actions: [
{
deidentify: {
cloudStorageOutput: '',
fileTypesToTransform: [],
transformationConfig: {
deidentifyTemplate: '',
imageRedactTemplate: '',
structuredDeidentifyTemplate: ''
},
transformationDetailsStorageConfig: {table: {datasetId: '', projectId: '', tableId: ''}}
},
jobNotificationEmails: {},
pubSub: {topic: ''},
publishFindingsToCloudDataCatalog: {},
publishSummaryToCscc: {},
publishToStackdriver: {},
saveFindings: {outputConfig: {outputSchema: '', table: {}}}
}
],
inspectConfig: {
contentOptions: [],
customInfoTypes: [
{
detectionRules: [
{
hotwordRule: {
hotwordRegex: {groupIndexes: [], pattern: ''},
likelihoodAdjustment: {fixedLikelihood: '', relativeLikelihood: 0},
proximity: {windowAfter: 0, windowBefore: 0}
}
}
],
dictionary: {cloudStoragePath: {path: ''}, wordList: {words: []}},
exclusionType: '',
infoType: {name: '', version: ''},
likelihood: '',
regex: {},
storedType: {createTime: '', name: ''},
surrogateType: {}
}
],
excludeInfoTypes: false,
includeQuote: false,
infoTypes: [{}],
limits: {
maxFindingsPerInfoType: [{infoType: {}, maxFindings: 0}],
maxFindingsPerItem: 0,
maxFindingsPerRequest: 0
},
minLikelihood: '',
ruleSet: [
{
infoTypes: [{}],
rules: [
{
exclusionRule: {
dictionary: {},
excludeByHotword: {hotwordRegex: {}, proximity: {}},
excludeInfoTypes: {infoTypes: [{}]},
matchingType: '',
regex: {}
},
hotwordRule: {}
}
]
}
]
},
inspectTemplateName: '',
storageConfig: {
bigQueryOptions: {
excludedFields: [{name: ''}],
identifyingFields: [{}],
includedFields: [{}],
rowsLimit: '',
rowsLimitPercent: 0,
sampleMethod: '',
tableReference: {}
},
cloudStorageOptions: {
bytesLimitPerFile: '',
bytesLimitPerFilePercent: 0,
fileSet: {regexFileSet: {bucketName: '', excludeRegex: [], includeRegex: []}, url: ''},
fileTypes: [],
filesLimitPercent: 0,
sampleMethod: ''
},
datastoreOptions: {kind: {name: ''}, partitionId: {namespaceId: '', projectId: ''}},
hybridOptions: {
description: '',
labels: {},
requiredFindingLabelKeys: [],
tableOptions: {identifyingFields: [{}]}
},
timespanConfig: {
enableAutoPopulationOfTimespanConfig: false,
endTime: '',
startTime: '',
timestampField: {}
}
}
},
lastRunTime: '',
name: '',
status: '',
triggers: [{manual: {}, schedule: {recurrencePeriodDuration: ''}}],
updateTime: ''
},
locationId: '',
triggerId: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/v2/:parent/jobTriggers');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
jobTrigger: {
createTime: '',
description: '',
displayName: '',
errors: [
{
details: {
code: 0,
details: [
{}
],
message: ''
},
timestamps: []
}
],
inspectJob: {
actions: [
{
deidentify: {
cloudStorageOutput: '',
fileTypesToTransform: [],
transformationConfig: {
deidentifyTemplate: '',
imageRedactTemplate: '',
structuredDeidentifyTemplate: ''
},
transformationDetailsStorageConfig: {
table: {
datasetId: '',
projectId: '',
tableId: ''
}
}
},
jobNotificationEmails: {},
pubSub: {
topic: ''
},
publishFindingsToCloudDataCatalog: {},
publishSummaryToCscc: {},
publishToStackdriver: {},
saveFindings: {
outputConfig: {
outputSchema: '',
table: {}
}
}
}
],
inspectConfig: {
contentOptions: [],
customInfoTypes: [
{
detectionRules: [
{
hotwordRule: {
hotwordRegex: {
groupIndexes: [],
pattern: ''
},
likelihoodAdjustment: {
fixedLikelihood: '',
relativeLikelihood: 0
},
proximity: {
windowAfter: 0,
windowBefore: 0
}
}
}
],
dictionary: {
cloudStoragePath: {
path: ''
},
wordList: {
words: []
}
},
exclusionType: '',
infoType: {
name: '',
version: ''
},
likelihood: '',
regex: {},
storedType: {
createTime: '',
name: ''
},
surrogateType: {}
}
],
excludeInfoTypes: false,
includeQuote: false,
infoTypes: [
{}
],
limits: {
maxFindingsPerInfoType: [
{
infoType: {},
maxFindings: 0
}
],
maxFindingsPerItem: 0,
maxFindingsPerRequest: 0
},
minLikelihood: '',
ruleSet: [
{
infoTypes: [
{}
],
rules: [
{
exclusionRule: {
dictionary: {},
excludeByHotword: {
hotwordRegex: {},
proximity: {}
},
excludeInfoTypes: {
infoTypes: [
{}
]
},
matchingType: '',
regex: {}
},
hotwordRule: {}
}
]
}
]
},
inspectTemplateName: '',
storageConfig: {
bigQueryOptions: {
excludedFields: [
{
name: ''
}
],
identifyingFields: [
{}
],
includedFields: [
{}
],
rowsLimit: '',
rowsLimitPercent: 0,
sampleMethod: '',
tableReference: {}
},
cloudStorageOptions: {
bytesLimitPerFile: '',
bytesLimitPerFilePercent: 0,
fileSet: {
regexFileSet: {
bucketName: '',
excludeRegex: [],
includeRegex: []
},
url: ''
},
fileTypes: [],
filesLimitPercent: 0,
sampleMethod: ''
},
datastoreOptions: {
kind: {
name: ''
},
partitionId: {
namespaceId: '',
projectId: ''
}
},
hybridOptions: {
description: '',
labels: {},
requiredFindingLabelKeys: [],
tableOptions: {
identifyingFields: [
{}
]
}
},
timespanConfig: {
enableAutoPopulationOfTimespanConfig: false,
endTime: '',
startTime: '',
timestampField: {}
}
}
},
lastRunTime: '',
name: '',
status: '',
triggers: [
{
manual: {},
schedule: {
recurrencePeriodDuration: ''
}
}
],
updateTime: ''
},
locationId: '',
triggerId: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/v2/:parent/jobTriggers',
headers: {'content-type': 'application/json'},
data: {
jobTrigger: {
createTime: '',
description: '',
displayName: '',
errors: [{details: {code: 0, details: [{}], message: ''}, timestamps: []}],
inspectJob: {
actions: [
{
deidentify: {
cloudStorageOutput: '',
fileTypesToTransform: [],
transformationConfig: {
deidentifyTemplate: '',
imageRedactTemplate: '',
structuredDeidentifyTemplate: ''
},
transformationDetailsStorageConfig: {table: {datasetId: '', projectId: '', tableId: ''}}
},
jobNotificationEmails: {},
pubSub: {topic: ''},
publishFindingsToCloudDataCatalog: {},
publishSummaryToCscc: {},
publishToStackdriver: {},
saveFindings: {outputConfig: {outputSchema: '', table: {}}}
}
],
inspectConfig: {
contentOptions: [],
customInfoTypes: [
{
detectionRules: [
{
hotwordRule: {
hotwordRegex: {groupIndexes: [], pattern: ''},
likelihoodAdjustment: {fixedLikelihood: '', relativeLikelihood: 0},
proximity: {windowAfter: 0, windowBefore: 0}
}
}
],
dictionary: {cloudStoragePath: {path: ''}, wordList: {words: []}},
exclusionType: '',
infoType: {name: '', version: ''},
likelihood: '',
regex: {},
storedType: {createTime: '', name: ''},
surrogateType: {}
}
],
excludeInfoTypes: false,
includeQuote: false,
infoTypes: [{}],
limits: {
maxFindingsPerInfoType: [{infoType: {}, maxFindings: 0}],
maxFindingsPerItem: 0,
maxFindingsPerRequest: 0
},
minLikelihood: '',
ruleSet: [
{
infoTypes: [{}],
rules: [
{
exclusionRule: {
dictionary: {},
excludeByHotword: {hotwordRegex: {}, proximity: {}},
excludeInfoTypes: {infoTypes: [{}]},
matchingType: '',
regex: {}
},
hotwordRule: {}
}
]
}
]
},
inspectTemplateName: '',
storageConfig: {
bigQueryOptions: {
excludedFields: [{name: ''}],
identifyingFields: [{}],
includedFields: [{}],
rowsLimit: '',
rowsLimitPercent: 0,
sampleMethod: '',
tableReference: {}
},
cloudStorageOptions: {
bytesLimitPerFile: '',
bytesLimitPerFilePercent: 0,
fileSet: {regexFileSet: {bucketName: '', excludeRegex: [], includeRegex: []}, url: ''},
fileTypes: [],
filesLimitPercent: 0,
sampleMethod: ''
},
datastoreOptions: {kind: {name: ''}, partitionId: {namespaceId: '', projectId: ''}},
hybridOptions: {
description: '',
labels: {},
requiredFindingLabelKeys: [],
tableOptions: {identifyingFields: [{}]}
},
timespanConfig: {
enableAutoPopulationOfTimespanConfig: false,
endTime: '',
startTime: '',
timestampField: {}
}
}
},
lastRunTime: '',
name: '',
status: '',
triggers: [{manual: {}, schedule: {recurrencePeriodDuration: ''}}],
updateTime: ''
},
locationId: '',
triggerId: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/:parent/jobTriggers';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"jobTrigger":{"createTime":"","description":"","displayName":"","errors":[{"details":{"code":0,"details":[{}],"message":""},"timestamps":[]}],"inspectJob":{"actions":[{"deidentify":{"cloudStorageOutput":"","fileTypesToTransform":[],"transformationConfig":{"deidentifyTemplate":"","imageRedactTemplate":"","structuredDeidentifyTemplate":""},"transformationDetailsStorageConfig":{"table":{"datasetId":"","projectId":"","tableId":""}}},"jobNotificationEmails":{},"pubSub":{"topic":""},"publishFindingsToCloudDataCatalog":{},"publishSummaryToCscc":{},"publishToStackdriver":{},"saveFindings":{"outputConfig":{"outputSchema":"","table":{}}}}],"inspectConfig":{"contentOptions":[],"customInfoTypes":[{"detectionRules":[{"hotwordRule":{"hotwordRegex":{"groupIndexes":[],"pattern":""},"likelihoodAdjustment":{"fixedLikelihood":"","relativeLikelihood":0},"proximity":{"windowAfter":0,"windowBefore":0}}}],"dictionary":{"cloudStoragePath":{"path":""},"wordList":{"words":[]}},"exclusionType":"","infoType":{"name":"","version":""},"likelihood":"","regex":{},"storedType":{"createTime":"","name":""},"surrogateType":{}}],"excludeInfoTypes":false,"includeQuote":false,"infoTypes":[{}],"limits":{"maxFindingsPerInfoType":[{"infoType":{},"maxFindings":0}],"maxFindingsPerItem":0,"maxFindingsPerRequest":0},"minLikelihood":"","ruleSet":[{"infoTypes":[{}],"rules":[{"exclusionRule":{"dictionary":{},"excludeByHotword":{"hotwordRegex":{},"proximity":{}},"excludeInfoTypes":{"infoTypes":[{}]},"matchingType":"","regex":{}},"hotwordRule":{}}]}]},"inspectTemplateName":"","storageConfig":{"bigQueryOptions":{"excludedFields":[{"name":""}],"identifyingFields":[{}],"includedFields":[{}],"rowsLimit":"","rowsLimitPercent":0,"sampleMethod":"","tableReference":{}},"cloudStorageOptions":{"bytesLimitPerFile":"","bytesLimitPerFilePercent":0,"fileSet":{"regexFileSet":{"bucketName":"","excludeRegex":[],"includeRegex":[]},"url":""},"fileTypes":[],"filesLimitPercent":0,"sampleMethod":""},"datastoreOptions":{"kind":{"name":""},"partitionId":{"namespaceId":"","projectId":""}},"hybridOptions":{"description":"","labels":{},"requiredFindingLabelKeys":[],"tableOptions":{"identifyingFields":[{}]}},"timespanConfig":{"enableAutoPopulationOfTimespanConfig":false,"endTime":"","startTime":"","timestampField":{}}}},"lastRunTime":"","name":"","status":"","triggers":[{"manual":{},"schedule":{"recurrencePeriodDuration":""}}],"updateTime":""},"locationId":"","triggerId":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"jobTrigger": @{ @"createTime": @"", @"description": @"", @"displayName": @"", @"errors": @[ @{ @"details": @{ @"code": @0, @"details": @[ @{ } ], @"message": @"" }, @"timestamps": @[ ] } ], @"inspectJob": @{ @"actions": @[ @{ @"deidentify": @{ @"cloudStorageOutput": @"", @"fileTypesToTransform": @[ ], @"transformationConfig": @{ @"deidentifyTemplate": @"", @"imageRedactTemplate": @"", @"structuredDeidentifyTemplate": @"" }, @"transformationDetailsStorageConfig": @{ @"table": @{ @"datasetId": @"", @"projectId": @"", @"tableId": @"" } } }, @"jobNotificationEmails": @{ }, @"pubSub": @{ @"topic": @"" }, @"publishFindingsToCloudDataCatalog": @{ }, @"publishSummaryToCscc": @{ }, @"publishToStackdriver": @{ }, @"saveFindings": @{ @"outputConfig": @{ @"outputSchema": @"", @"table": @{ } } } } ], @"inspectConfig": @{ @"contentOptions": @[ ], @"customInfoTypes": @[ @{ @"detectionRules": @[ @{ @"hotwordRule": @{ @"hotwordRegex": @{ @"groupIndexes": @[ ], @"pattern": @"" }, @"likelihoodAdjustment": @{ @"fixedLikelihood": @"", @"relativeLikelihood": @0 }, @"proximity": @{ @"windowAfter": @0, @"windowBefore": @0 } } } ], @"dictionary": @{ @"cloudStoragePath": @{ @"path": @"" }, @"wordList": @{ @"words": @[ ] } }, @"exclusionType": @"", @"infoType": @{ @"name": @"", @"version": @"" }, @"likelihood": @"", @"regex": @{ }, @"storedType": @{ @"createTime": @"", @"name": @"" }, @"surrogateType": @{ } } ], @"excludeInfoTypes": @NO, @"includeQuote": @NO, @"infoTypes": @[ @{ } ], @"limits": @{ @"maxFindingsPerInfoType": @[ @{ @"infoType": @{ }, @"maxFindings": @0 } ], @"maxFindingsPerItem": @0, @"maxFindingsPerRequest": @0 }, @"minLikelihood": @"", @"ruleSet": @[ @{ @"infoTypes": @[ @{ } ], @"rules": @[ @{ @"exclusionRule": @{ @"dictionary": @{ }, @"excludeByHotword": @{ @"hotwordRegex": @{ }, @"proximity": @{ } }, @"excludeInfoTypes": @{ @"infoTypes": @[ @{ } ] }, @"matchingType": @"", @"regex": @{ } }, @"hotwordRule": @{ } } ] } ] }, @"inspectTemplateName": @"", @"storageConfig": @{ @"bigQueryOptions": @{ @"excludedFields": @[ @{ @"name": @"" } ], @"identifyingFields": @[ @{ } ], @"includedFields": @[ @{ } ], @"rowsLimit": @"", @"rowsLimitPercent": @0, @"sampleMethod": @"", @"tableReference": @{ } }, @"cloudStorageOptions": @{ @"bytesLimitPerFile": @"", @"bytesLimitPerFilePercent": @0, @"fileSet": @{ @"regexFileSet": @{ @"bucketName": @"", @"excludeRegex": @[ ], @"includeRegex": @[ ] }, @"url": @"" }, @"fileTypes": @[ ], @"filesLimitPercent": @0, @"sampleMethod": @"" }, @"datastoreOptions": @{ @"kind": @{ @"name": @"" }, @"partitionId": @{ @"namespaceId": @"", @"projectId": @"" } }, @"hybridOptions": @{ @"description": @"", @"labels": @{ }, @"requiredFindingLabelKeys": @[ ], @"tableOptions": @{ @"identifyingFields": @[ @{ } ] } }, @"timespanConfig": @{ @"enableAutoPopulationOfTimespanConfig": @NO, @"endTime": @"", @"startTime": @"", @"timestampField": @{ } } } }, @"lastRunTime": @"", @"name": @"", @"status": @"", @"triggers": @[ @{ @"manual": @{ }, @"schedule": @{ @"recurrencePeriodDuration": @"" } } ], @"updateTime": @"" },
@"locationId": @"",
@"triggerId": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v2/:parent/jobTriggers"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v2/:parent/jobTriggers" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"jobTrigger\": {\n \"createTime\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"errors\": [\n {\n \"details\": {\n \"code\": 0,\n \"details\": [\n {}\n ],\n \"message\": \"\"\n },\n \"timestamps\": []\n }\n ],\n \"inspectJob\": {\n \"actions\": [\n {\n \"deidentify\": {\n \"cloudStorageOutput\": \"\",\n \"fileTypesToTransform\": [],\n \"transformationConfig\": {\n \"deidentifyTemplate\": \"\",\n \"imageRedactTemplate\": \"\",\n \"structuredDeidentifyTemplate\": \"\"\n },\n \"transformationDetailsStorageConfig\": {\n \"table\": {\n \"datasetId\": \"\",\n \"projectId\": \"\",\n \"tableId\": \"\"\n }\n }\n },\n \"jobNotificationEmails\": {},\n \"pubSub\": {\n \"topic\": \"\"\n },\n \"publishFindingsToCloudDataCatalog\": {},\n \"publishSummaryToCscc\": {},\n \"publishToStackdriver\": {},\n \"saveFindings\": {\n \"outputConfig\": {\n \"outputSchema\": \"\",\n \"table\": {}\n }\n }\n }\n ],\n \"inspectConfig\": {\n \"contentOptions\": [],\n \"customInfoTypes\": [\n {\n \"detectionRules\": [\n {\n \"hotwordRule\": {\n \"hotwordRegex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n },\n \"likelihoodAdjustment\": {\n \"fixedLikelihood\": \"\",\n \"relativeLikelihood\": 0\n },\n \"proximity\": {\n \"windowAfter\": 0,\n \"windowBefore\": 0\n }\n }\n }\n ],\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {\n \"words\": []\n }\n },\n \"exclusionType\": \"\",\n \"infoType\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"likelihood\": \"\",\n \"regex\": {},\n \"storedType\": {\n \"createTime\": \"\",\n \"name\": \"\"\n },\n \"surrogateType\": {}\n }\n ],\n \"excludeInfoTypes\": false,\n \"includeQuote\": false,\n \"infoTypes\": [\n {}\n ],\n \"limits\": {\n \"maxFindingsPerInfoType\": [\n {\n \"infoType\": {},\n \"maxFindings\": 0\n }\n ],\n \"maxFindingsPerItem\": 0,\n \"maxFindingsPerRequest\": 0\n },\n \"minLikelihood\": \"\",\n \"ruleSet\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"rules\": [\n {\n \"exclusionRule\": {\n \"dictionary\": {},\n \"excludeByHotword\": {\n \"hotwordRegex\": {},\n \"proximity\": {}\n },\n \"excludeInfoTypes\": {\n \"infoTypes\": [\n {}\n ]\n },\n \"matchingType\": \"\",\n \"regex\": {}\n },\n \"hotwordRule\": {}\n }\n ]\n }\n ]\n },\n \"inspectTemplateName\": \"\",\n \"storageConfig\": {\n \"bigQueryOptions\": {\n \"excludedFields\": [\n {\n \"name\": \"\"\n }\n ],\n \"identifyingFields\": [\n {}\n ],\n \"includedFields\": [\n {}\n ],\n \"rowsLimit\": \"\",\n \"rowsLimitPercent\": 0,\n \"sampleMethod\": \"\",\n \"tableReference\": {}\n },\n \"cloudStorageOptions\": {\n \"bytesLimitPerFile\": \"\",\n \"bytesLimitPerFilePercent\": 0,\n \"fileSet\": {\n \"regexFileSet\": {\n \"bucketName\": \"\",\n \"excludeRegex\": [],\n \"includeRegex\": []\n },\n \"url\": \"\"\n },\n \"fileTypes\": [],\n \"filesLimitPercent\": 0,\n \"sampleMethod\": \"\"\n },\n \"datastoreOptions\": {\n \"kind\": {\n \"name\": \"\"\n },\n \"partitionId\": {\n \"namespaceId\": \"\",\n \"projectId\": \"\"\n }\n },\n \"hybridOptions\": {\n \"description\": \"\",\n \"labels\": {},\n \"requiredFindingLabelKeys\": [],\n \"tableOptions\": {\n \"identifyingFields\": [\n {}\n ]\n }\n },\n \"timespanConfig\": {\n \"enableAutoPopulationOfTimespanConfig\": false,\n \"endTime\": \"\",\n \"startTime\": \"\",\n \"timestampField\": {}\n }\n }\n },\n \"lastRunTime\": \"\",\n \"name\": \"\",\n \"status\": \"\",\n \"triggers\": [\n {\n \"manual\": {},\n \"schedule\": {\n \"recurrencePeriodDuration\": \"\"\n }\n }\n ],\n \"updateTime\": \"\"\n },\n \"locationId\": \"\",\n \"triggerId\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/:parent/jobTriggers",
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([
'jobTrigger' => [
'createTime' => '',
'description' => '',
'displayName' => '',
'errors' => [
[
'details' => [
'code' => 0,
'details' => [
[
]
],
'message' => ''
],
'timestamps' => [
]
]
],
'inspectJob' => [
'actions' => [
[
'deidentify' => [
'cloudStorageOutput' => '',
'fileTypesToTransform' => [
],
'transformationConfig' => [
'deidentifyTemplate' => '',
'imageRedactTemplate' => '',
'structuredDeidentifyTemplate' => ''
],
'transformationDetailsStorageConfig' => [
'table' => [
'datasetId' => '',
'projectId' => '',
'tableId' => ''
]
]
],
'jobNotificationEmails' => [
],
'pubSub' => [
'topic' => ''
],
'publishFindingsToCloudDataCatalog' => [
],
'publishSummaryToCscc' => [
],
'publishToStackdriver' => [
],
'saveFindings' => [
'outputConfig' => [
'outputSchema' => '',
'table' => [
]
]
]
]
],
'inspectConfig' => [
'contentOptions' => [
],
'customInfoTypes' => [
[
'detectionRules' => [
[
'hotwordRule' => [
'hotwordRegex' => [
'groupIndexes' => [
],
'pattern' => ''
],
'likelihoodAdjustment' => [
'fixedLikelihood' => '',
'relativeLikelihood' => 0
],
'proximity' => [
'windowAfter' => 0,
'windowBefore' => 0
]
]
]
],
'dictionary' => [
'cloudStoragePath' => [
'path' => ''
],
'wordList' => [
'words' => [
]
]
],
'exclusionType' => '',
'infoType' => [
'name' => '',
'version' => ''
],
'likelihood' => '',
'regex' => [
],
'storedType' => [
'createTime' => '',
'name' => ''
],
'surrogateType' => [
]
]
],
'excludeInfoTypes' => null,
'includeQuote' => null,
'infoTypes' => [
[
]
],
'limits' => [
'maxFindingsPerInfoType' => [
[
'infoType' => [
],
'maxFindings' => 0
]
],
'maxFindingsPerItem' => 0,
'maxFindingsPerRequest' => 0
],
'minLikelihood' => '',
'ruleSet' => [
[
'infoTypes' => [
[
]
],
'rules' => [
[
'exclusionRule' => [
'dictionary' => [
],
'excludeByHotword' => [
'hotwordRegex' => [
],
'proximity' => [
]
],
'excludeInfoTypes' => [
'infoTypes' => [
[
]
]
],
'matchingType' => '',
'regex' => [
]
],
'hotwordRule' => [
]
]
]
]
]
],
'inspectTemplateName' => '',
'storageConfig' => [
'bigQueryOptions' => [
'excludedFields' => [
[
'name' => ''
]
],
'identifyingFields' => [
[
]
],
'includedFields' => [
[
]
],
'rowsLimit' => '',
'rowsLimitPercent' => 0,
'sampleMethod' => '',
'tableReference' => [
]
],
'cloudStorageOptions' => [
'bytesLimitPerFile' => '',
'bytesLimitPerFilePercent' => 0,
'fileSet' => [
'regexFileSet' => [
'bucketName' => '',
'excludeRegex' => [
],
'includeRegex' => [
]
],
'url' => ''
],
'fileTypes' => [
],
'filesLimitPercent' => 0,
'sampleMethod' => ''
],
'datastoreOptions' => [
'kind' => [
'name' => ''
],
'partitionId' => [
'namespaceId' => '',
'projectId' => ''
]
],
'hybridOptions' => [
'description' => '',
'labels' => [
],
'requiredFindingLabelKeys' => [
],
'tableOptions' => [
'identifyingFields' => [
[
]
]
]
],
'timespanConfig' => [
'enableAutoPopulationOfTimespanConfig' => null,
'endTime' => '',
'startTime' => '',
'timestampField' => [
]
]
]
],
'lastRunTime' => '',
'name' => '',
'status' => '',
'triggers' => [
[
'manual' => [
],
'schedule' => [
'recurrencePeriodDuration' => ''
]
]
],
'updateTime' => ''
],
'locationId' => '',
'triggerId' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/v2/:parent/jobTriggers', [
'body' => '{
"jobTrigger": {
"createTime": "",
"description": "",
"displayName": "",
"errors": [
{
"details": {
"code": 0,
"details": [
{}
],
"message": ""
},
"timestamps": []
}
],
"inspectJob": {
"actions": [
{
"deidentify": {
"cloudStorageOutput": "",
"fileTypesToTransform": [],
"transformationConfig": {
"deidentifyTemplate": "",
"imageRedactTemplate": "",
"structuredDeidentifyTemplate": ""
},
"transformationDetailsStorageConfig": {
"table": {
"datasetId": "",
"projectId": "",
"tableId": ""
}
}
},
"jobNotificationEmails": {},
"pubSub": {
"topic": ""
},
"publishFindingsToCloudDataCatalog": {},
"publishSummaryToCscc": {},
"publishToStackdriver": {},
"saveFindings": {
"outputConfig": {
"outputSchema": "",
"table": {}
}
}
}
],
"inspectConfig": {
"contentOptions": [],
"customInfoTypes": [
{
"detectionRules": [
{
"hotwordRule": {
"hotwordRegex": {
"groupIndexes": [],
"pattern": ""
},
"likelihoodAdjustment": {
"fixedLikelihood": "",
"relativeLikelihood": 0
},
"proximity": {
"windowAfter": 0,
"windowBefore": 0
}
}
}
],
"dictionary": {
"cloudStoragePath": {
"path": ""
},
"wordList": {
"words": []
}
},
"exclusionType": "",
"infoType": {
"name": "",
"version": ""
},
"likelihood": "",
"regex": {},
"storedType": {
"createTime": "",
"name": ""
},
"surrogateType": {}
}
],
"excludeInfoTypes": false,
"includeQuote": false,
"infoTypes": [
{}
],
"limits": {
"maxFindingsPerInfoType": [
{
"infoType": {},
"maxFindings": 0
}
],
"maxFindingsPerItem": 0,
"maxFindingsPerRequest": 0
},
"minLikelihood": "",
"ruleSet": [
{
"infoTypes": [
{}
],
"rules": [
{
"exclusionRule": {
"dictionary": {},
"excludeByHotword": {
"hotwordRegex": {},
"proximity": {}
},
"excludeInfoTypes": {
"infoTypes": [
{}
]
},
"matchingType": "",
"regex": {}
},
"hotwordRule": {}
}
]
}
]
},
"inspectTemplateName": "",
"storageConfig": {
"bigQueryOptions": {
"excludedFields": [
{
"name": ""
}
],
"identifyingFields": [
{}
],
"includedFields": [
{}
],
"rowsLimit": "",
"rowsLimitPercent": 0,
"sampleMethod": "",
"tableReference": {}
},
"cloudStorageOptions": {
"bytesLimitPerFile": "",
"bytesLimitPerFilePercent": 0,
"fileSet": {
"regexFileSet": {
"bucketName": "",
"excludeRegex": [],
"includeRegex": []
},
"url": ""
},
"fileTypes": [],
"filesLimitPercent": 0,
"sampleMethod": ""
},
"datastoreOptions": {
"kind": {
"name": ""
},
"partitionId": {
"namespaceId": "",
"projectId": ""
}
},
"hybridOptions": {
"description": "",
"labels": {},
"requiredFindingLabelKeys": [],
"tableOptions": {
"identifyingFields": [
{}
]
}
},
"timespanConfig": {
"enableAutoPopulationOfTimespanConfig": false,
"endTime": "",
"startTime": "",
"timestampField": {}
}
}
},
"lastRunTime": "",
"name": "",
"status": "",
"triggers": [
{
"manual": {},
"schedule": {
"recurrencePeriodDuration": ""
}
}
],
"updateTime": ""
},
"locationId": "",
"triggerId": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v2/:parent/jobTriggers');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'jobTrigger' => [
'createTime' => '',
'description' => '',
'displayName' => '',
'errors' => [
[
'details' => [
'code' => 0,
'details' => [
[
]
],
'message' => ''
],
'timestamps' => [
]
]
],
'inspectJob' => [
'actions' => [
[
'deidentify' => [
'cloudStorageOutput' => '',
'fileTypesToTransform' => [
],
'transformationConfig' => [
'deidentifyTemplate' => '',
'imageRedactTemplate' => '',
'structuredDeidentifyTemplate' => ''
],
'transformationDetailsStorageConfig' => [
'table' => [
'datasetId' => '',
'projectId' => '',
'tableId' => ''
]
]
],
'jobNotificationEmails' => [
],
'pubSub' => [
'topic' => ''
],
'publishFindingsToCloudDataCatalog' => [
],
'publishSummaryToCscc' => [
],
'publishToStackdriver' => [
],
'saveFindings' => [
'outputConfig' => [
'outputSchema' => '',
'table' => [
]
]
]
]
],
'inspectConfig' => [
'contentOptions' => [
],
'customInfoTypes' => [
[
'detectionRules' => [
[
'hotwordRule' => [
'hotwordRegex' => [
'groupIndexes' => [
],
'pattern' => ''
],
'likelihoodAdjustment' => [
'fixedLikelihood' => '',
'relativeLikelihood' => 0
],
'proximity' => [
'windowAfter' => 0,
'windowBefore' => 0
]
]
]
],
'dictionary' => [
'cloudStoragePath' => [
'path' => ''
],
'wordList' => [
'words' => [
]
]
],
'exclusionType' => '',
'infoType' => [
'name' => '',
'version' => ''
],
'likelihood' => '',
'regex' => [
],
'storedType' => [
'createTime' => '',
'name' => ''
],
'surrogateType' => [
]
]
],
'excludeInfoTypes' => null,
'includeQuote' => null,
'infoTypes' => [
[
]
],
'limits' => [
'maxFindingsPerInfoType' => [
[
'infoType' => [
],
'maxFindings' => 0
]
],
'maxFindingsPerItem' => 0,
'maxFindingsPerRequest' => 0
],
'minLikelihood' => '',
'ruleSet' => [
[
'infoTypes' => [
[
]
],
'rules' => [
[
'exclusionRule' => [
'dictionary' => [
],
'excludeByHotword' => [
'hotwordRegex' => [
],
'proximity' => [
]
],
'excludeInfoTypes' => [
'infoTypes' => [
[
]
]
],
'matchingType' => '',
'regex' => [
]
],
'hotwordRule' => [
]
]
]
]
]
],
'inspectTemplateName' => '',
'storageConfig' => [
'bigQueryOptions' => [
'excludedFields' => [
[
'name' => ''
]
],
'identifyingFields' => [
[
]
],
'includedFields' => [
[
]
],
'rowsLimit' => '',
'rowsLimitPercent' => 0,
'sampleMethod' => '',
'tableReference' => [
]
],
'cloudStorageOptions' => [
'bytesLimitPerFile' => '',
'bytesLimitPerFilePercent' => 0,
'fileSet' => [
'regexFileSet' => [
'bucketName' => '',
'excludeRegex' => [
],
'includeRegex' => [
]
],
'url' => ''
],
'fileTypes' => [
],
'filesLimitPercent' => 0,
'sampleMethod' => ''
],
'datastoreOptions' => [
'kind' => [
'name' => ''
],
'partitionId' => [
'namespaceId' => '',
'projectId' => ''
]
],
'hybridOptions' => [
'description' => '',
'labels' => [
],
'requiredFindingLabelKeys' => [
],
'tableOptions' => [
'identifyingFields' => [
[
]
]
]
],
'timespanConfig' => [
'enableAutoPopulationOfTimespanConfig' => null,
'endTime' => '',
'startTime' => '',
'timestampField' => [
]
]
]
],
'lastRunTime' => '',
'name' => '',
'status' => '',
'triggers' => [
[
'manual' => [
],
'schedule' => [
'recurrencePeriodDuration' => ''
]
]
],
'updateTime' => ''
],
'locationId' => '',
'triggerId' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'jobTrigger' => [
'createTime' => '',
'description' => '',
'displayName' => '',
'errors' => [
[
'details' => [
'code' => 0,
'details' => [
[
]
],
'message' => ''
],
'timestamps' => [
]
]
],
'inspectJob' => [
'actions' => [
[
'deidentify' => [
'cloudStorageOutput' => '',
'fileTypesToTransform' => [
],
'transformationConfig' => [
'deidentifyTemplate' => '',
'imageRedactTemplate' => '',
'structuredDeidentifyTemplate' => ''
],
'transformationDetailsStorageConfig' => [
'table' => [
'datasetId' => '',
'projectId' => '',
'tableId' => ''
]
]
],
'jobNotificationEmails' => [
],
'pubSub' => [
'topic' => ''
],
'publishFindingsToCloudDataCatalog' => [
],
'publishSummaryToCscc' => [
],
'publishToStackdriver' => [
],
'saveFindings' => [
'outputConfig' => [
'outputSchema' => '',
'table' => [
]
]
]
]
],
'inspectConfig' => [
'contentOptions' => [
],
'customInfoTypes' => [
[
'detectionRules' => [
[
'hotwordRule' => [
'hotwordRegex' => [
'groupIndexes' => [
],
'pattern' => ''
],
'likelihoodAdjustment' => [
'fixedLikelihood' => '',
'relativeLikelihood' => 0
],
'proximity' => [
'windowAfter' => 0,
'windowBefore' => 0
]
]
]
],
'dictionary' => [
'cloudStoragePath' => [
'path' => ''
],
'wordList' => [
'words' => [
]
]
],
'exclusionType' => '',
'infoType' => [
'name' => '',
'version' => ''
],
'likelihood' => '',
'regex' => [
],
'storedType' => [
'createTime' => '',
'name' => ''
],
'surrogateType' => [
]
]
],
'excludeInfoTypes' => null,
'includeQuote' => null,
'infoTypes' => [
[
]
],
'limits' => [
'maxFindingsPerInfoType' => [
[
'infoType' => [
],
'maxFindings' => 0
]
],
'maxFindingsPerItem' => 0,
'maxFindingsPerRequest' => 0
],
'minLikelihood' => '',
'ruleSet' => [
[
'infoTypes' => [
[
]
],
'rules' => [
[
'exclusionRule' => [
'dictionary' => [
],
'excludeByHotword' => [
'hotwordRegex' => [
],
'proximity' => [
]
],
'excludeInfoTypes' => [
'infoTypes' => [
[
]
]
],
'matchingType' => '',
'regex' => [
]
],
'hotwordRule' => [
]
]
]
]
]
],
'inspectTemplateName' => '',
'storageConfig' => [
'bigQueryOptions' => [
'excludedFields' => [
[
'name' => ''
]
],
'identifyingFields' => [
[
]
],
'includedFields' => [
[
]
],
'rowsLimit' => '',
'rowsLimitPercent' => 0,
'sampleMethod' => '',
'tableReference' => [
]
],
'cloudStorageOptions' => [
'bytesLimitPerFile' => '',
'bytesLimitPerFilePercent' => 0,
'fileSet' => [
'regexFileSet' => [
'bucketName' => '',
'excludeRegex' => [
],
'includeRegex' => [
]
],
'url' => ''
],
'fileTypes' => [
],
'filesLimitPercent' => 0,
'sampleMethod' => ''
],
'datastoreOptions' => [
'kind' => [
'name' => ''
],
'partitionId' => [
'namespaceId' => '',
'projectId' => ''
]
],
'hybridOptions' => [
'description' => '',
'labels' => [
],
'requiredFindingLabelKeys' => [
],
'tableOptions' => [
'identifyingFields' => [
[
]
]
]
],
'timespanConfig' => [
'enableAutoPopulationOfTimespanConfig' => null,
'endTime' => '',
'startTime' => '',
'timestampField' => [
]
]
]
],
'lastRunTime' => '',
'name' => '',
'status' => '',
'triggers' => [
[
'manual' => [
],
'schedule' => [
'recurrencePeriodDuration' => ''
]
]
],
'updateTime' => ''
],
'locationId' => '',
'triggerId' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v2/:parent/jobTriggers');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v2/:parent/jobTriggers' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"jobTrigger": {
"createTime": "",
"description": "",
"displayName": "",
"errors": [
{
"details": {
"code": 0,
"details": [
{}
],
"message": ""
},
"timestamps": []
}
],
"inspectJob": {
"actions": [
{
"deidentify": {
"cloudStorageOutput": "",
"fileTypesToTransform": [],
"transformationConfig": {
"deidentifyTemplate": "",
"imageRedactTemplate": "",
"structuredDeidentifyTemplate": ""
},
"transformationDetailsStorageConfig": {
"table": {
"datasetId": "",
"projectId": "",
"tableId": ""
}
}
},
"jobNotificationEmails": {},
"pubSub": {
"topic": ""
},
"publishFindingsToCloudDataCatalog": {},
"publishSummaryToCscc": {},
"publishToStackdriver": {},
"saveFindings": {
"outputConfig": {
"outputSchema": "",
"table": {}
}
}
}
],
"inspectConfig": {
"contentOptions": [],
"customInfoTypes": [
{
"detectionRules": [
{
"hotwordRule": {
"hotwordRegex": {
"groupIndexes": [],
"pattern": ""
},
"likelihoodAdjustment": {
"fixedLikelihood": "",
"relativeLikelihood": 0
},
"proximity": {
"windowAfter": 0,
"windowBefore": 0
}
}
}
],
"dictionary": {
"cloudStoragePath": {
"path": ""
},
"wordList": {
"words": []
}
},
"exclusionType": "",
"infoType": {
"name": "",
"version": ""
},
"likelihood": "",
"regex": {},
"storedType": {
"createTime": "",
"name": ""
},
"surrogateType": {}
}
],
"excludeInfoTypes": false,
"includeQuote": false,
"infoTypes": [
{}
],
"limits": {
"maxFindingsPerInfoType": [
{
"infoType": {},
"maxFindings": 0
}
],
"maxFindingsPerItem": 0,
"maxFindingsPerRequest": 0
},
"minLikelihood": "",
"ruleSet": [
{
"infoTypes": [
{}
],
"rules": [
{
"exclusionRule": {
"dictionary": {},
"excludeByHotword": {
"hotwordRegex": {},
"proximity": {}
},
"excludeInfoTypes": {
"infoTypes": [
{}
]
},
"matchingType": "",
"regex": {}
},
"hotwordRule": {}
}
]
}
]
},
"inspectTemplateName": "",
"storageConfig": {
"bigQueryOptions": {
"excludedFields": [
{
"name": ""
}
],
"identifyingFields": [
{}
],
"includedFields": [
{}
],
"rowsLimit": "",
"rowsLimitPercent": 0,
"sampleMethod": "",
"tableReference": {}
},
"cloudStorageOptions": {
"bytesLimitPerFile": "",
"bytesLimitPerFilePercent": 0,
"fileSet": {
"regexFileSet": {
"bucketName": "",
"excludeRegex": [],
"includeRegex": []
},
"url": ""
},
"fileTypes": [],
"filesLimitPercent": 0,
"sampleMethod": ""
},
"datastoreOptions": {
"kind": {
"name": ""
},
"partitionId": {
"namespaceId": "",
"projectId": ""
}
},
"hybridOptions": {
"description": "",
"labels": {},
"requiredFindingLabelKeys": [],
"tableOptions": {
"identifyingFields": [
{}
]
}
},
"timespanConfig": {
"enableAutoPopulationOfTimespanConfig": false,
"endTime": "",
"startTime": "",
"timestampField": {}
}
}
},
"lastRunTime": "",
"name": "",
"status": "",
"triggers": [
{
"manual": {},
"schedule": {
"recurrencePeriodDuration": ""
}
}
],
"updateTime": ""
},
"locationId": "",
"triggerId": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/:parent/jobTriggers' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"jobTrigger": {
"createTime": "",
"description": "",
"displayName": "",
"errors": [
{
"details": {
"code": 0,
"details": [
{}
],
"message": ""
},
"timestamps": []
}
],
"inspectJob": {
"actions": [
{
"deidentify": {
"cloudStorageOutput": "",
"fileTypesToTransform": [],
"transformationConfig": {
"deidentifyTemplate": "",
"imageRedactTemplate": "",
"structuredDeidentifyTemplate": ""
},
"transformationDetailsStorageConfig": {
"table": {
"datasetId": "",
"projectId": "",
"tableId": ""
}
}
},
"jobNotificationEmails": {},
"pubSub": {
"topic": ""
},
"publishFindingsToCloudDataCatalog": {},
"publishSummaryToCscc": {},
"publishToStackdriver": {},
"saveFindings": {
"outputConfig": {
"outputSchema": "",
"table": {}
}
}
}
],
"inspectConfig": {
"contentOptions": [],
"customInfoTypes": [
{
"detectionRules": [
{
"hotwordRule": {
"hotwordRegex": {
"groupIndexes": [],
"pattern": ""
},
"likelihoodAdjustment": {
"fixedLikelihood": "",
"relativeLikelihood": 0
},
"proximity": {
"windowAfter": 0,
"windowBefore": 0
}
}
}
],
"dictionary": {
"cloudStoragePath": {
"path": ""
},
"wordList": {
"words": []
}
},
"exclusionType": "",
"infoType": {
"name": "",
"version": ""
},
"likelihood": "",
"regex": {},
"storedType": {
"createTime": "",
"name": ""
},
"surrogateType": {}
}
],
"excludeInfoTypes": false,
"includeQuote": false,
"infoTypes": [
{}
],
"limits": {
"maxFindingsPerInfoType": [
{
"infoType": {},
"maxFindings": 0
}
],
"maxFindingsPerItem": 0,
"maxFindingsPerRequest": 0
},
"minLikelihood": "",
"ruleSet": [
{
"infoTypes": [
{}
],
"rules": [
{
"exclusionRule": {
"dictionary": {},
"excludeByHotword": {
"hotwordRegex": {},
"proximity": {}
},
"excludeInfoTypes": {
"infoTypes": [
{}
]
},
"matchingType": "",
"regex": {}
},
"hotwordRule": {}
}
]
}
]
},
"inspectTemplateName": "",
"storageConfig": {
"bigQueryOptions": {
"excludedFields": [
{
"name": ""
}
],
"identifyingFields": [
{}
],
"includedFields": [
{}
],
"rowsLimit": "",
"rowsLimitPercent": 0,
"sampleMethod": "",
"tableReference": {}
},
"cloudStorageOptions": {
"bytesLimitPerFile": "",
"bytesLimitPerFilePercent": 0,
"fileSet": {
"regexFileSet": {
"bucketName": "",
"excludeRegex": [],
"includeRegex": []
},
"url": ""
},
"fileTypes": [],
"filesLimitPercent": 0,
"sampleMethod": ""
},
"datastoreOptions": {
"kind": {
"name": ""
},
"partitionId": {
"namespaceId": "",
"projectId": ""
}
},
"hybridOptions": {
"description": "",
"labels": {},
"requiredFindingLabelKeys": [],
"tableOptions": {
"identifyingFields": [
{}
]
}
},
"timespanConfig": {
"enableAutoPopulationOfTimespanConfig": false,
"endTime": "",
"startTime": "",
"timestampField": {}
}
}
},
"lastRunTime": "",
"name": "",
"status": "",
"triggers": [
{
"manual": {},
"schedule": {
"recurrencePeriodDuration": ""
}
}
],
"updateTime": ""
},
"locationId": "",
"triggerId": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"jobTrigger\": {\n \"createTime\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"errors\": [\n {\n \"details\": {\n \"code\": 0,\n \"details\": [\n {}\n ],\n \"message\": \"\"\n },\n \"timestamps\": []\n }\n ],\n \"inspectJob\": {\n \"actions\": [\n {\n \"deidentify\": {\n \"cloudStorageOutput\": \"\",\n \"fileTypesToTransform\": [],\n \"transformationConfig\": {\n \"deidentifyTemplate\": \"\",\n \"imageRedactTemplate\": \"\",\n \"structuredDeidentifyTemplate\": \"\"\n },\n \"transformationDetailsStorageConfig\": {\n \"table\": {\n \"datasetId\": \"\",\n \"projectId\": \"\",\n \"tableId\": \"\"\n }\n }\n },\n \"jobNotificationEmails\": {},\n \"pubSub\": {\n \"topic\": \"\"\n },\n \"publishFindingsToCloudDataCatalog\": {},\n \"publishSummaryToCscc\": {},\n \"publishToStackdriver\": {},\n \"saveFindings\": {\n \"outputConfig\": {\n \"outputSchema\": \"\",\n \"table\": {}\n }\n }\n }\n ],\n \"inspectConfig\": {\n \"contentOptions\": [],\n \"customInfoTypes\": [\n {\n \"detectionRules\": [\n {\n \"hotwordRule\": {\n \"hotwordRegex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n },\n \"likelihoodAdjustment\": {\n \"fixedLikelihood\": \"\",\n \"relativeLikelihood\": 0\n },\n \"proximity\": {\n \"windowAfter\": 0,\n \"windowBefore\": 0\n }\n }\n }\n ],\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {\n \"words\": []\n }\n },\n \"exclusionType\": \"\",\n \"infoType\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"likelihood\": \"\",\n \"regex\": {},\n \"storedType\": {\n \"createTime\": \"\",\n \"name\": \"\"\n },\n \"surrogateType\": {}\n }\n ],\n \"excludeInfoTypes\": false,\n \"includeQuote\": false,\n \"infoTypes\": [\n {}\n ],\n \"limits\": {\n \"maxFindingsPerInfoType\": [\n {\n \"infoType\": {},\n \"maxFindings\": 0\n }\n ],\n \"maxFindingsPerItem\": 0,\n \"maxFindingsPerRequest\": 0\n },\n \"minLikelihood\": \"\",\n \"ruleSet\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"rules\": [\n {\n \"exclusionRule\": {\n \"dictionary\": {},\n \"excludeByHotword\": {\n \"hotwordRegex\": {},\n \"proximity\": {}\n },\n \"excludeInfoTypes\": {\n \"infoTypes\": [\n {}\n ]\n },\n \"matchingType\": \"\",\n \"regex\": {}\n },\n \"hotwordRule\": {}\n }\n ]\n }\n ]\n },\n \"inspectTemplateName\": \"\",\n \"storageConfig\": {\n \"bigQueryOptions\": {\n \"excludedFields\": [\n {\n \"name\": \"\"\n }\n ],\n \"identifyingFields\": [\n {}\n ],\n \"includedFields\": [\n {}\n ],\n \"rowsLimit\": \"\",\n \"rowsLimitPercent\": 0,\n \"sampleMethod\": \"\",\n \"tableReference\": {}\n },\n \"cloudStorageOptions\": {\n \"bytesLimitPerFile\": \"\",\n \"bytesLimitPerFilePercent\": 0,\n \"fileSet\": {\n \"regexFileSet\": {\n \"bucketName\": \"\",\n \"excludeRegex\": [],\n \"includeRegex\": []\n },\n \"url\": \"\"\n },\n \"fileTypes\": [],\n \"filesLimitPercent\": 0,\n \"sampleMethod\": \"\"\n },\n \"datastoreOptions\": {\n \"kind\": {\n \"name\": \"\"\n },\n \"partitionId\": {\n \"namespaceId\": \"\",\n \"projectId\": \"\"\n }\n },\n \"hybridOptions\": {\n \"description\": \"\",\n \"labels\": {},\n \"requiredFindingLabelKeys\": [],\n \"tableOptions\": {\n \"identifyingFields\": [\n {}\n ]\n }\n },\n \"timespanConfig\": {\n \"enableAutoPopulationOfTimespanConfig\": false,\n \"endTime\": \"\",\n \"startTime\": \"\",\n \"timestampField\": {}\n }\n }\n },\n \"lastRunTime\": \"\",\n \"name\": \"\",\n \"status\": \"\",\n \"triggers\": [\n {\n \"manual\": {},\n \"schedule\": {\n \"recurrencePeriodDuration\": \"\"\n }\n }\n ],\n \"updateTime\": \"\"\n },\n \"locationId\": \"\",\n \"triggerId\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v2/:parent/jobTriggers", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/:parent/jobTriggers"
payload = {
"jobTrigger": {
"createTime": "",
"description": "",
"displayName": "",
"errors": [
{
"details": {
"code": 0,
"details": [{}],
"message": ""
},
"timestamps": []
}
],
"inspectJob": {
"actions": [
{
"deidentify": {
"cloudStorageOutput": "",
"fileTypesToTransform": [],
"transformationConfig": {
"deidentifyTemplate": "",
"imageRedactTemplate": "",
"structuredDeidentifyTemplate": ""
},
"transformationDetailsStorageConfig": { "table": {
"datasetId": "",
"projectId": "",
"tableId": ""
} }
},
"jobNotificationEmails": {},
"pubSub": { "topic": "" },
"publishFindingsToCloudDataCatalog": {},
"publishSummaryToCscc": {},
"publishToStackdriver": {},
"saveFindings": { "outputConfig": {
"outputSchema": "",
"table": {}
} }
}
],
"inspectConfig": {
"contentOptions": [],
"customInfoTypes": [
{
"detectionRules": [{ "hotwordRule": {
"hotwordRegex": {
"groupIndexes": [],
"pattern": ""
},
"likelihoodAdjustment": {
"fixedLikelihood": "",
"relativeLikelihood": 0
},
"proximity": {
"windowAfter": 0,
"windowBefore": 0
}
} }],
"dictionary": {
"cloudStoragePath": { "path": "" },
"wordList": { "words": [] }
},
"exclusionType": "",
"infoType": {
"name": "",
"version": ""
},
"likelihood": "",
"regex": {},
"storedType": {
"createTime": "",
"name": ""
},
"surrogateType": {}
}
],
"excludeInfoTypes": False,
"includeQuote": False,
"infoTypes": [{}],
"limits": {
"maxFindingsPerInfoType": [
{
"infoType": {},
"maxFindings": 0
}
],
"maxFindingsPerItem": 0,
"maxFindingsPerRequest": 0
},
"minLikelihood": "",
"ruleSet": [
{
"infoTypes": [{}],
"rules": [
{
"exclusionRule": {
"dictionary": {},
"excludeByHotword": {
"hotwordRegex": {},
"proximity": {}
},
"excludeInfoTypes": { "infoTypes": [{}] },
"matchingType": "",
"regex": {}
},
"hotwordRule": {}
}
]
}
]
},
"inspectTemplateName": "",
"storageConfig": {
"bigQueryOptions": {
"excludedFields": [{ "name": "" }],
"identifyingFields": [{}],
"includedFields": [{}],
"rowsLimit": "",
"rowsLimitPercent": 0,
"sampleMethod": "",
"tableReference": {}
},
"cloudStorageOptions": {
"bytesLimitPerFile": "",
"bytesLimitPerFilePercent": 0,
"fileSet": {
"regexFileSet": {
"bucketName": "",
"excludeRegex": [],
"includeRegex": []
},
"url": ""
},
"fileTypes": [],
"filesLimitPercent": 0,
"sampleMethod": ""
},
"datastoreOptions": {
"kind": { "name": "" },
"partitionId": {
"namespaceId": "",
"projectId": ""
}
},
"hybridOptions": {
"description": "",
"labels": {},
"requiredFindingLabelKeys": [],
"tableOptions": { "identifyingFields": [{}] }
},
"timespanConfig": {
"enableAutoPopulationOfTimespanConfig": False,
"endTime": "",
"startTime": "",
"timestampField": {}
}
}
},
"lastRunTime": "",
"name": "",
"status": "",
"triggers": [
{
"manual": {},
"schedule": { "recurrencePeriodDuration": "" }
}
],
"updateTime": ""
},
"locationId": "",
"triggerId": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/:parent/jobTriggers"
payload <- "{\n \"jobTrigger\": {\n \"createTime\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"errors\": [\n {\n \"details\": {\n \"code\": 0,\n \"details\": [\n {}\n ],\n \"message\": \"\"\n },\n \"timestamps\": []\n }\n ],\n \"inspectJob\": {\n \"actions\": [\n {\n \"deidentify\": {\n \"cloudStorageOutput\": \"\",\n \"fileTypesToTransform\": [],\n \"transformationConfig\": {\n \"deidentifyTemplate\": \"\",\n \"imageRedactTemplate\": \"\",\n \"structuredDeidentifyTemplate\": \"\"\n },\n \"transformationDetailsStorageConfig\": {\n \"table\": {\n \"datasetId\": \"\",\n \"projectId\": \"\",\n \"tableId\": \"\"\n }\n }\n },\n \"jobNotificationEmails\": {},\n \"pubSub\": {\n \"topic\": \"\"\n },\n \"publishFindingsToCloudDataCatalog\": {},\n \"publishSummaryToCscc\": {},\n \"publishToStackdriver\": {},\n \"saveFindings\": {\n \"outputConfig\": {\n \"outputSchema\": \"\",\n \"table\": {}\n }\n }\n }\n ],\n \"inspectConfig\": {\n \"contentOptions\": [],\n \"customInfoTypes\": [\n {\n \"detectionRules\": [\n {\n \"hotwordRule\": {\n \"hotwordRegex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n },\n \"likelihoodAdjustment\": {\n \"fixedLikelihood\": \"\",\n \"relativeLikelihood\": 0\n },\n \"proximity\": {\n \"windowAfter\": 0,\n \"windowBefore\": 0\n }\n }\n }\n ],\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {\n \"words\": []\n }\n },\n \"exclusionType\": \"\",\n \"infoType\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"likelihood\": \"\",\n \"regex\": {},\n \"storedType\": {\n \"createTime\": \"\",\n \"name\": \"\"\n },\n \"surrogateType\": {}\n }\n ],\n \"excludeInfoTypes\": false,\n \"includeQuote\": false,\n \"infoTypes\": [\n {}\n ],\n \"limits\": {\n \"maxFindingsPerInfoType\": [\n {\n \"infoType\": {},\n \"maxFindings\": 0\n }\n ],\n \"maxFindingsPerItem\": 0,\n \"maxFindingsPerRequest\": 0\n },\n \"minLikelihood\": \"\",\n \"ruleSet\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"rules\": [\n {\n \"exclusionRule\": {\n \"dictionary\": {},\n \"excludeByHotword\": {\n \"hotwordRegex\": {},\n \"proximity\": {}\n },\n \"excludeInfoTypes\": {\n \"infoTypes\": [\n {}\n ]\n },\n \"matchingType\": \"\",\n \"regex\": {}\n },\n \"hotwordRule\": {}\n }\n ]\n }\n ]\n },\n \"inspectTemplateName\": \"\",\n \"storageConfig\": {\n \"bigQueryOptions\": {\n \"excludedFields\": [\n {\n \"name\": \"\"\n }\n ],\n \"identifyingFields\": [\n {}\n ],\n \"includedFields\": [\n {}\n ],\n \"rowsLimit\": \"\",\n \"rowsLimitPercent\": 0,\n \"sampleMethod\": \"\",\n \"tableReference\": {}\n },\n \"cloudStorageOptions\": {\n \"bytesLimitPerFile\": \"\",\n \"bytesLimitPerFilePercent\": 0,\n \"fileSet\": {\n \"regexFileSet\": {\n \"bucketName\": \"\",\n \"excludeRegex\": [],\n \"includeRegex\": []\n },\n \"url\": \"\"\n },\n \"fileTypes\": [],\n \"filesLimitPercent\": 0,\n \"sampleMethod\": \"\"\n },\n \"datastoreOptions\": {\n \"kind\": {\n \"name\": \"\"\n },\n \"partitionId\": {\n \"namespaceId\": \"\",\n \"projectId\": \"\"\n }\n },\n \"hybridOptions\": {\n \"description\": \"\",\n \"labels\": {},\n \"requiredFindingLabelKeys\": [],\n \"tableOptions\": {\n \"identifyingFields\": [\n {}\n ]\n }\n },\n \"timespanConfig\": {\n \"enableAutoPopulationOfTimespanConfig\": false,\n \"endTime\": \"\",\n \"startTime\": \"\",\n \"timestampField\": {}\n }\n }\n },\n \"lastRunTime\": \"\",\n \"name\": \"\",\n \"status\": \"\",\n \"triggers\": [\n {\n \"manual\": {},\n \"schedule\": {\n \"recurrencePeriodDuration\": \"\"\n }\n }\n ],\n \"updateTime\": \"\"\n },\n \"locationId\": \"\",\n \"triggerId\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/:parent/jobTriggers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"jobTrigger\": {\n \"createTime\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"errors\": [\n {\n \"details\": {\n \"code\": 0,\n \"details\": [\n {}\n ],\n \"message\": \"\"\n },\n \"timestamps\": []\n }\n ],\n \"inspectJob\": {\n \"actions\": [\n {\n \"deidentify\": {\n \"cloudStorageOutput\": \"\",\n \"fileTypesToTransform\": [],\n \"transformationConfig\": {\n \"deidentifyTemplate\": \"\",\n \"imageRedactTemplate\": \"\",\n \"structuredDeidentifyTemplate\": \"\"\n },\n \"transformationDetailsStorageConfig\": {\n \"table\": {\n \"datasetId\": \"\",\n \"projectId\": \"\",\n \"tableId\": \"\"\n }\n }\n },\n \"jobNotificationEmails\": {},\n \"pubSub\": {\n \"topic\": \"\"\n },\n \"publishFindingsToCloudDataCatalog\": {},\n \"publishSummaryToCscc\": {},\n \"publishToStackdriver\": {},\n \"saveFindings\": {\n \"outputConfig\": {\n \"outputSchema\": \"\",\n \"table\": {}\n }\n }\n }\n ],\n \"inspectConfig\": {\n \"contentOptions\": [],\n \"customInfoTypes\": [\n {\n \"detectionRules\": [\n {\n \"hotwordRule\": {\n \"hotwordRegex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n },\n \"likelihoodAdjustment\": {\n \"fixedLikelihood\": \"\",\n \"relativeLikelihood\": 0\n },\n \"proximity\": {\n \"windowAfter\": 0,\n \"windowBefore\": 0\n }\n }\n }\n ],\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {\n \"words\": []\n }\n },\n \"exclusionType\": \"\",\n \"infoType\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"likelihood\": \"\",\n \"regex\": {},\n \"storedType\": {\n \"createTime\": \"\",\n \"name\": \"\"\n },\n \"surrogateType\": {}\n }\n ],\n \"excludeInfoTypes\": false,\n \"includeQuote\": false,\n \"infoTypes\": [\n {}\n ],\n \"limits\": {\n \"maxFindingsPerInfoType\": [\n {\n \"infoType\": {},\n \"maxFindings\": 0\n }\n ],\n \"maxFindingsPerItem\": 0,\n \"maxFindingsPerRequest\": 0\n },\n \"minLikelihood\": \"\",\n \"ruleSet\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"rules\": [\n {\n \"exclusionRule\": {\n \"dictionary\": {},\n \"excludeByHotword\": {\n \"hotwordRegex\": {},\n \"proximity\": {}\n },\n \"excludeInfoTypes\": {\n \"infoTypes\": [\n {}\n ]\n },\n \"matchingType\": \"\",\n \"regex\": {}\n },\n \"hotwordRule\": {}\n }\n ]\n }\n ]\n },\n \"inspectTemplateName\": \"\",\n \"storageConfig\": {\n \"bigQueryOptions\": {\n \"excludedFields\": [\n {\n \"name\": \"\"\n }\n ],\n \"identifyingFields\": [\n {}\n ],\n \"includedFields\": [\n {}\n ],\n \"rowsLimit\": \"\",\n \"rowsLimitPercent\": 0,\n \"sampleMethod\": \"\",\n \"tableReference\": {}\n },\n \"cloudStorageOptions\": {\n \"bytesLimitPerFile\": \"\",\n \"bytesLimitPerFilePercent\": 0,\n \"fileSet\": {\n \"regexFileSet\": {\n \"bucketName\": \"\",\n \"excludeRegex\": [],\n \"includeRegex\": []\n },\n \"url\": \"\"\n },\n \"fileTypes\": [],\n \"filesLimitPercent\": 0,\n \"sampleMethod\": \"\"\n },\n \"datastoreOptions\": {\n \"kind\": {\n \"name\": \"\"\n },\n \"partitionId\": {\n \"namespaceId\": \"\",\n \"projectId\": \"\"\n }\n },\n \"hybridOptions\": {\n \"description\": \"\",\n \"labels\": {},\n \"requiredFindingLabelKeys\": [],\n \"tableOptions\": {\n \"identifyingFields\": [\n {}\n ]\n }\n },\n \"timespanConfig\": {\n \"enableAutoPopulationOfTimespanConfig\": false,\n \"endTime\": \"\",\n \"startTime\": \"\",\n \"timestampField\": {}\n }\n }\n },\n \"lastRunTime\": \"\",\n \"name\": \"\",\n \"status\": \"\",\n \"triggers\": [\n {\n \"manual\": {},\n \"schedule\": {\n \"recurrencePeriodDuration\": \"\"\n }\n }\n ],\n \"updateTime\": \"\"\n },\n \"locationId\": \"\",\n \"triggerId\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/v2/:parent/jobTriggers') do |req|
req.body = "{\n \"jobTrigger\": {\n \"createTime\": \"\",\n \"description\": \"\",\n \"displayName\": \"\",\n \"errors\": [\n {\n \"details\": {\n \"code\": 0,\n \"details\": [\n {}\n ],\n \"message\": \"\"\n },\n \"timestamps\": []\n }\n ],\n \"inspectJob\": {\n \"actions\": [\n {\n \"deidentify\": {\n \"cloudStorageOutput\": \"\",\n \"fileTypesToTransform\": [],\n \"transformationConfig\": {\n \"deidentifyTemplate\": \"\",\n \"imageRedactTemplate\": \"\",\n \"structuredDeidentifyTemplate\": \"\"\n },\n \"transformationDetailsStorageConfig\": {\n \"table\": {\n \"datasetId\": \"\",\n \"projectId\": \"\",\n \"tableId\": \"\"\n }\n }\n },\n \"jobNotificationEmails\": {},\n \"pubSub\": {\n \"topic\": \"\"\n },\n \"publishFindingsToCloudDataCatalog\": {},\n \"publishSummaryToCscc\": {},\n \"publishToStackdriver\": {},\n \"saveFindings\": {\n \"outputConfig\": {\n \"outputSchema\": \"\",\n \"table\": {}\n }\n }\n }\n ],\n \"inspectConfig\": {\n \"contentOptions\": [],\n \"customInfoTypes\": [\n {\n \"detectionRules\": [\n {\n \"hotwordRule\": {\n \"hotwordRegex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n },\n \"likelihoodAdjustment\": {\n \"fixedLikelihood\": \"\",\n \"relativeLikelihood\": 0\n },\n \"proximity\": {\n \"windowAfter\": 0,\n \"windowBefore\": 0\n }\n }\n }\n ],\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {\n \"words\": []\n }\n },\n \"exclusionType\": \"\",\n \"infoType\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"likelihood\": \"\",\n \"regex\": {},\n \"storedType\": {\n \"createTime\": \"\",\n \"name\": \"\"\n },\n \"surrogateType\": {}\n }\n ],\n \"excludeInfoTypes\": false,\n \"includeQuote\": false,\n \"infoTypes\": [\n {}\n ],\n \"limits\": {\n \"maxFindingsPerInfoType\": [\n {\n \"infoType\": {},\n \"maxFindings\": 0\n }\n ],\n \"maxFindingsPerItem\": 0,\n \"maxFindingsPerRequest\": 0\n },\n \"minLikelihood\": \"\",\n \"ruleSet\": [\n {\n \"infoTypes\": [\n {}\n ],\n \"rules\": [\n {\n \"exclusionRule\": {\n \"dictionary\": {},\n \"excludeByHotword\": {\n \"hotwordRegex\": {},\n \"proximity\": {}\n },\n \"excludeInfoTypes\": {\n \"infoTypes\": [\n {}\n ]\n },\n \"matchingType\": \"\",\n \"regex\": {}\n },\n \"hotwordRule\": {}\n }\n ]\n }\n ]\n },\n \"inspectTemplateName\": \"\",\n \"storageConfig\": {\n \"bigQueryOptions\": {\n \"excludedFields\": [\n {\n \"name\": \"\"\n }\n ],\n \"identifyingFields\": [\n {}\n ],\n \"includedFields\": [\n {}\n ],\n \"rowsLimit\": \"\",\n \"rowsLimitPercent\": 0,\n \"sampleMethod\": \"\",\n \"tableReference\": {}\n },\n \"cloudStorageOptions\": {\n \"bytesLimitPerFile\": \"\",\n \"bytesLimitPerFilePercent\": 0,\n \"fileSet\": {\n \"regexFileSet\": {\n \"bucketName\": \"\",\n \"excludeRegex\": [],\n \"includeRegex\": []\n },\n \"url\": \"\"\n },\n \"fileTypes\": [],\n \"filesLimitPercent\": 0,\n \"sampleMethod\": \"\"\n },\n \"datastoreOptions\": {\n \"kind\": {\n \"name\": \"\"\n },\n \"partitionId\": {\n \"namespaceId\": \"\",\n \"projectId\": \"\"\n }\n },\n \"hybridOptions\": {\n \"description\": \"\",\n \"labels\": {},\n \"requiredFindingLabelKeys\": [],\n \"tableOptions\": {\n \"identifyingFields\": [\n {}\n ]\n }\n },\n \"timespanConfig\": {\n \"enableAutoPopulationOfTimespanConfig\": false,\n \"endTime\": \"\",\n \"startTime\": \"\",\n \"timestampField\": {}\n }\n }\n },\n \"lastRunTime\": \"\",\n \"name\": \"\",\n \"status\": \"\",\n \"triggers\": [\n {\n \"manual\": {},\n \"schedule\": {\n \"recurrencePeriodDuration\": \"\"\n }\n }\n ],\n \"updateTime\": \"\"\n },\n \"locationId\": \"\",\n \"triggerId\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v2/:parent/jobTriggers";
let payload = json!({
"jobTrigger": json!({
"createTime": "",
"description": "",
"displayName": "",
"errors": (
json!({
"details": json!({
"code": 0,
"details": (json!({})),
"message": ""
}),
"timestamps": ()
})
),
"inspectJob": json!({
"actions": (
json!({
"deidentify": json!({
"cloudStorageOutput": "",
"fileTypesToTransform": (),
"transformationConfig": json!({
"deidentifyTemplate": "",
"imageRedactTemplate": "",
"structuredDeidentifyTemplate": ""
}),
"transformationDetailsStorageConfig": json!({"table": json!({
"datasetId": "",
"projectId": "",
"tableId": ""
})})
}),
"jobNotificationEmails": json!({}),
"pubSub": json!({"topic": ""}),
"publishFindingsToCloudDataCatalog": json!({}),
"publishSummaryToCscc": json!({}),
"publishToStackdriver": json!({}),
"saveFindings": json!({"outputConfig": json!({
"outputSchema": "",
"table": json!({})
})})
})
),
"inspectConfig": json!({
"contentOptions": (),
"customInfoTypes": (
json!({
"detectionRules": (json!({"hotwordRule": json!({
"hotwordRegex": json!({
"groupIndexes": (),
"pattern": ""
}),
"likelihoodAdjustment": json!({
"fixedLikelihood": "",
"relativeLikelihood": 0
}),
"proximity": json!({
"windowAfter": 0,
"windowBefore": 0
})
})})),
"dictionary": json!({
"cloudStoragePath": json!({"path": ""}),
"wordList": json!({"words": ()})
}),
"exclusionType": "",
"infoType": json!({
"name": "",
"version": ""
}),
"likelihood": "",
"regex": json!({}),
"storedType": json!({
"createTime": "",
"name": ""
}),
"surrogateType": json!({})
})
),
"excludeInfoTypes": false,
"includeQuote": false,
"infoTypes": (json!({})),
"limits": json!({
"maxFindingsPerInfoType": (
json!({
"infoType": json!({}),
"maxFindings": 0
})
),
"maxFindingsPerItem": 0,
"maxFindingsPerRequest": 0
}),
"minLikelihood": "",
"ruleSet": (
json!({
"infoTypes": (json!({})),
"rules": (
json!({
"exclusionRule": json!({
"dictionary": json!({}),
"excludeByHotword": json!({
"hotwordRegex": json!({}),
"proximity": json!({})
}),
"excludeInfoTypes": json!({"infoTypes": (json!({}))}),
"matchingType": "",
"regex": json!({})
}),
"hotwordRule": json!({})
})
)
})
)
}),
"inspectTemplateName": "",
"storageConfig": json!({
"bigQueryOptions": json!({
"excludedFields": (json!({"name": ""})),
"identifyingFields": (json!({})),
"includedFields": (json!({})),
"rowsLimit": "",
"rowsLimitPercent": 0,
"sampleMethod": "",
"tableReference": json!({})
}),
"cloudStorageOptions": json!({
"bytesLimitPerFile": "",
"bytesLimitPerFilePercent": 0,
"fileSet": json!({
"regexFileSet": json!({
"bucketName": "",
"excludeRegex": (),
"includeRegex": ()
}),
"url": ""
}),
"fileTypes": (),
"filesLimitPercent": 0,
"sampleMethod": ""
}),
"datastoreOptions": json!({
"kind": json!({"name": ""}),
"partitionId": json!({
"namespaceId": "",
"projectId": ""
})
}),
"hybridOptions": json!({
"description": "",
"labels": json!({}),
"requiredFindingLabelKeys": (),
"tableOptions": json!({"identifyingFields": (json!({}))})
}),
"timespanConfig": json!({
"enableAutoPopulationOfTimespanConfig": false,
"endTime": "",
"startTime": "",
"timestampField": json!({})
})
})
}),
"lastRunTime": "",
"name": "",
"status": "",
"triggers": (
json!({
"manual": json!({}),
"schedule": json!({"recurrencePeriodDuration": ""})
})
),
"updateTime": ""
}),
"locationId": "",
"triggerId": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/v2/:parent/jobTriggers \
--header 'content-type: application/json' \
--data '{
"jobTrigger": {
"createTime": "",
"description": "",
"displayName": "",
"errors": [
{
"details": {
"code": 0,
"details": [
{}
],
"message": ""
},
"timestamps": []
}
],
"inspectJob": {
"actions": [
{
"deidentify": {
"cloudStorageOutput": "",
"fileTypesToTransform": [],
"transformationConfig": {
"deidentifyTemplate": "",
"imageRedactTemplate": "",
"structuredDeidentifyTemplate": ""
},
"transformationDetailsStorageConfig": {
"table": {
"datasetId": "",
"projectId": "",
"tableId": ""
}
}
},
"jobNotificationEmails": {},
"pubSub": {
"topic": ""
},
"publishFindingsToCloudDataCatalog": {},
"publishSummaryToCscc": {},
"publishToStackdriver": {},
"saveFindings": {
"outputConfig": {
"outputSchema": "",
"table": {}
}
}
}
],
"inspectConfig": {
"contentOptions": [],
"customInfoTypes": [
{
"detectionRules": [
{
"hotwordRule": {
"hotwordRegex": {
"groupIndexes": [],
"pattern": ""
},
"likelihoodAdjustment": {
"fixedLikelihood": "",
"relativeLikelihood": 0
},
"proximity": {
"windowAfter": 0,
"windowBefore": 0
}
}
}
],
"dictionary": {
"cloudStoragePath": {
"path": ""
},
"wordList": {
"words": []
}
},
"exclusionType": "",
"infoType": {
"name": "",
"version": ""
},
"likelihood": "",
"regex": {},
"storedType": {
"createTime": "",
"name": ""
},
"surrogateType": {}
}
],
"excludeInfoTypes": false,
"includeQuote": false,
"infoTypes": [
{}
],
"limits": {
"maxFindingsPerInfoType": [
{
"infoType": {},
"maxFindings": 0
}
],
"maxFindingsPerItem": 0,
"maxFindingsPerRequest": 0
},
"minLikelihood": "",
"ruleSet": [
{
"infoTypes": [
{}
],
"rules": [
{
"exclusionRule": {
"dictionary": {},
"excludeByHotword": {
"hotwordRegex": {},
"proximity": {}
},
"excludeInfoTypes": {
"infoTypes": [
{}
]
},
"matchingType": "",
"regex": {}
},
"hotwordRule": {}
}
]
}
]
},
"inspectTemplateName": "",
"storageConfig": {
"bigQueryOptions": {
"excludedFields": [
{
"name": ""
}
],
"identifyingFields": [
{}
],
"includedFields": [
{}
],
"rowsLimit": "",
"rowsLimitPercent": 0,
"sampleMethod": "",
"tableReference": {}
},
"cloudStorageOptions": {
"bytesLimitPerFile": "",
"bytesLimitPerFilePercent": 0,
"fileSet": {
"regexFileSet": {
"bucketName": "",
"excludeRegex": [],
"includeRegex": []
},
"url": ""
},
"fileTypes": [],
"filesLimitPercent": 0,
"sampleMethod": ""
},
"datastoreOptions": {
"kind": {
"name": ""
},
"partitionId": {
"namespaceId": "",
"projectId": ""
}
},
"hybridOptions": {
"description": "",
"labels": {},
"requiredFindingLabelKeys": [],
"tableOptions": {
"identifyingFields": [
{}
]
}
},
"timespanConfig": {
"enableAutoPopulationOfTimespanConfig": false,
"endTime": "",
"startTime": "",
"timestampField": {}
}
}
},
"lastRunTime": "",
"name": "",
"status": "",
"triggers": [
{
"manual": {},
"schedule": {
"recurrencePeriodDuration": ""
}
}
],
"updateTime": ""
},
"locationId": "",
"triggerId": ""
}'
echo '{
"jobTrigger": {
"createTime": "",
"description": "",
"displayName": "",
"errors": [
{
"details": {
"code": 0,
"details": [
{}
],
"message": ""
},
"timestamps": []
}
],
"inspectJob": {
"actions": [
{
"deidentify": {
"cloudStorageOutput": "",
"fileTypesToTransform": [],
"transformationConfig": {
"deidentifyTemplate": "",
"imageRedactTemplate": "",
"structuredDeidentifyTemplate": ""
},
"transformationDetailsStorageConfig": {
"table": {
"datasetId": "",
"projectId": "",
"tableId": ""
}
}
},
"jobNotificationEmails": {},
"pubSub": {
"topic": ""
},
"publishFindingsToCloudDataCatalog": {},
"publishSummaryToCscc": {},
"publishToStackdriver": {},
"saveFindings": {
"outputConfig": {
"outputSchema": "",
"table": {}
}
}
}
],
"inspectConfig": {
"contentOptions": [],
"customInfoTypes": [
{
"detectionRules": [
{
"hotwordRule": {
"hotwordRegex": {
"groupIndexes": [],
"pattern": ""
},
"likelihoodAdjustment": {
"fixedLikelihood": "",
"relativeLikelihood": 0
},
"proximity": {
"windowAfter": 0,
"windowBefore": 0
}
}
}
],
"dictionary": {
"cloudStoragePath": {
"path": ""
},
"wordList": {
"words": []
}
},
"exclusionType": "",
"infoType": {
"name": "",
"version": ""
},
"likelihood": "",
"regex": {},
"storedType": {
"createTime": "",
"name": ""
},
"surrogateType": {}
}
],
"excludeInfoTypes": false,
"includeQuote": false,
"infoTypes": [
{}
],
"limits": {
"maxFindingsPerInfoType": [
{
"infoType": {},
"maxFindings": 0
}
],
"maxFindingsPerItem": 0,
"maxFindingsPerRequest": 0
},
"minLikelihood": "",
"ruleSet": [
{
"infoTypes": [
{}
],
"rules": [
{
"exclusionRule": {
"dictionary": {},
"excludeByHotword": {
"hotwordRegex": {},
"proximity": {}
},
"excludeInfoTypes": {
"infoTypes": [
{}
]
},
"matchingType": "",
"regex": {}
},
"hotwordRule": {}
}
]
}
]
},
"inspectTemplateName": "",
"storageConfig": {
"bigQueryOptions": {
"excludedFields": [
{
"name": ""
}
],
"identifyingFields": [
{}
],
"includedFields": [
{}
],
"rowsLimit": "",
"rowsLimitPercent": 0,
"sampleMethod": "",
"tableReference": {}
},
"cloudStorageOptions": {
"bytesLimitPerFile": "",
"bytesLimitPerFilePercent": 0,
"fileSet": {
"regexFileSet": {
"bucketName": "",
"excludeRegex": [],
"includeRegex": []
},
"url": ""
},
"fileTypes": [],
"filesLimitPercent": 0,
"sampleMethod": ""
},
"datastoreOptions": {
"kind": {
"name": ""
},
"partitionId": {
"namespaceId": "",
"projectId": ""
}
},
"hybridOptions": {
"description": "",
"labels": {},
"requiredFindingLabelKeys": [],
"tableOptions": {
"identifyingFields": [
{}
]
}
},
"timespanConfig": {
"enableAutoPopulationOfTimespanConfig": false,
"endTime": "",
"startTime": "",
"timestampField": {}
}
}
},
"lastRunTime": "",
"name": "",
"status": "",
"triggers": [
{
"manual": {},
"schedule": {
"recurrencePeriodDuration": ""
}
}
],
"updateTime": ""
},
"locationId": "",
"triggerId": ""
}' | \
http POST {{baseUrl}}/v2/:parent/jobTriggers \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "jobTrigger": {\n "createTime": "",\n "description": "",\n "displayName": "",\n "errors": [\n {\n "details": {\n "code": 0,\n "details": [\n {}\n ],\n "message": ""\n },\n "timestamps": []\n }\n ],\n "inspectJob": {\n "actions": [\n {\n "deidentify": {\n "cloudStorageOutput": "",\n "fileTypesToTransform": [],\n "transformationConfig": {\n "deidentifyTemplate": "",\n "imageRedactTemplate": "",\n "structuredDeidentifyTemplate": ""\n },\n "transformationDetailsStorageConfig": {\n "table": {\n "datasetId": "",\n "projectId": "",\n "tableId": ""\n }\n }\n },\n "jobNotificationEmails": {},\n "pubSub": {\n "topic": ""\n },\n "publishFindingsToCloudDataCatalog": {},\n "publishSummaryToCscc": {},\n "publishToStackdriver": {},\n "saveFindings": {\n "outputConfig": {\n "outputSchema": "",\n "table": {}\n }\n }\n }\n ],\n "inspectConfig": {\n "contentOptions": [],\n "customInfoTypes": [\n {\n "detectionRules": [\n {\n "hotwordRule": {\n "hotwordRegex": {\n "groupIndexes": [],\n "pattern": ""\n },\n "likelihoodAdjustment": {\n "fixedLikelihood": "",\n "relativeLikelihood": 0\n },\n "proximity": {\n "windowAfter": 0,\n "windowBefore": 0\n }\n }\n }\n ],\n "dictionary": {\n "cloudStoragePath": {\n "path": ""\n },\n "wordList": {\n "words": []\n }\n },\n "exclusionType": "",\n "infoType": {\n "name": "",\n "version": ""\n },\n "likelihood": "",\n "regex": {},\n "storedType": {\n "createTime": "",\n "name": ""\n },\n "surrogateType": {}\n }\n ],\n "excludeInfoTypes": false,\n "includeQuote": false,\n "infoTypes": [\n {}\n ],\n "limits": {\n "maxFindingsPerInfoType": [\n {\n "infoType": {},\n "maxFindings": 0\n }\n ],\n "maxFindingsPerItem": 0,\n "maxFindingsPerRequest": 0\n },\n "minLikelihood": "",\n "ruleSet": [\n {\n "infoTypes": [\n {}\n ],\n "rules": [\n {\n "exclusionRule": {\n "dictionary": {},\n "excludeByHotword": {\n "hotwordRegex": {},\n "proximity": {}\n },\n "excludeInfoTypes": {\n "infoTypes": [\n {}\n ]\n },\n "matchingType": "",\n "regex": {}\n },\n "hotwordRule": {}\n }\n ]\n }\n ]\n },\n "inspectTemplateName": "",\n "storageConfig": {\n "bigQueryOptions": {\n "excludedFields": [\n {\n "name": ""\n }\n ],\n "identifyingFields": [\n {}\n ],\n "includedFields": [\n {}\n ],\n "rowsLimit": "",\n "rowsLimitPercent": 0,\n "sampleMethod": "",\n "tableReference": {}\n },\n "cloudStorageOptions": {\n "bytesLimitPerFile": "",\n "bytesLimitPerFilePercent": 0,\n "fileSet": {\n "regexFileSet": {\n "bucketName": "",\n "excludeRegex": [],\n "includeRegex": []\n },\n "url": ""\n },\n "fileTypes": [],\n "filesLimitPercent": 0,\n "sampleMethod": ""\n },\n "datastoreOptions": {\n "kind": {\n "name": ""\n },\n "partitionId": {\n "namespaceId": "",\n "projectId": ""\n }\n },\n "hybridOptions": {\n "description": "",\n "labels": {},\n "requiredFindingLabelKeys": [],\n "tableOptions": {\n "identifyingFields": [\n {}\n ]\n }\n },\n "timespanConfig": {\n "enableAutoPopulationOfTimespanConfig": false,\n "endTime": "",\n "startTime": "",\n "timestampField": {}\n }\n }\n },\n "lastRunTime": "",\n "name": "",\n "status": "",\n "triggers": [\n {\n "manual": {},\n "schedule": {\n "recurrencePeriodDuration": ""\n }\n }\n ],\n "updateTime": ""\n },\n "locationId": "",\n "triggerId": ""\n}' \
--output-document \
- {{baseUrl}}/v2/:parent/jobTriggers
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"jobTrigger": [
"createTime": "",
"description": "",
"displayName": "",
"errors": [
[
"details": [
"code": 0,
"details": [[]],
"message": ""
],
"timestamps": []
]
],
"inspectJob": [
"actions": [
[
"deidentify": [
"cloudStorageOutput": "",
"fileTypesToTransform": [],
"transformationConfig": [
"deidentifyTemplate": "",
"imageRedactTemplate": "",
"structuredDeidentifyTemplate": ""
],
"transformationDetailsStorageConfig": ["table": [
"datasetId": "",
"projectId": "",
"tableId": ""
]]
],
"jobNotificationEmails": [],
"pubSub": ["topic": ""],
"publishFindingsToCloudDataCatalog": [],
"publishSummaryToCscc": [],
"publishToStackdriver": [],
"saveFindings": ["outputConfig": [
"outputSchema": "",
"table": []
]]
]
],
"inspectConfig": [
"contentOptions": [],
"customInfoTypes": [
[
"detectionRules": [["hotwordRule": [
"hotwordRegex": [
"groupIndexes": [],
"pattern": ""
],
"likelihoodAdjustment": [
"fixedLikelihood": "",
"relativeLikelihood": 0
],
"proximity": [
"windowAfter": 0,
"windowBefore": 0
]
]]],
"dictionary": [
"cloudStoragePath": ["path": ""],
"wordList": ["words": []]
],
"exclusionType": "",
"infoType": [
"name": "",
"version": ""
],
"likelihood": "",
"regex": [],
"storedType": [
"createTime": "",
"name": ""
],
"surrogateType": []
]
],
"excludeInfoTypes": false,
"includeQuote": false,
"infoTypes": [[]],
"limits": [
"maxFindingsPerInfoType": [
[
"infoType": [],
"maxFindings": 0
]
],
"maxFindingsPerItem": 0,
"maxFindingsPerRequest": 0
],
"minLikelihood": "",
"ruleSet": [
[
"infoTypes": [[]],
"rules": [
[
"exclusionRule": [
"dictionary": [],
"excludeByHotword": [
"hotwordRegex": [],
"proximity": []
],
"excludeInfoTypes": ["infoTypes": [[]]],
"matchingType": "",
"regex": []
],
"hotwordRule": []
]
]
]
]
],
"inspectTemplateName": "",
"storageConfig": [
"bigQueryOptions": [
"excludedFields": [["name": ""]],
"identifyingFields": [[]],
"includedFields": [[]],
"rowsLimit": "",
"rowsLimitPercent": 0,
"sampleMethod": "",
"tableReference": []
],
"cloudStorageOptions": [
"bytesLimitPerFile": "",
"bytesLimitPerFilePercent": 0,
"fileSet": [
"regexFileSet": [
"bucketName": "",
"excludeRegex": [],
"includeRegex": []
],
"url": ""
],
"fileTypes": [],
"filesLimitPercent": 0,
"sampleMethod": ""
],
"datastoreOptions": [
"kind": ["name": ""],
"partitionId": [
"namespaceId": "",
"projectId": ""
]
],
"hybridOptions": [
"description": "",
"labels": [],
"requiredFindingLabelKeys": [],
"tableOptions": ["identifyingFields": [[]]]
],
"timespanConfig": [
"enableAutoPopulationOfTimespanConfig": false,
"endTime": "",
"startTime": "",
"timestampField": []
]
]
],
"lastRunTime": "",
"name": "",
"status": "",
"triggers": [
[
"manual": [],
"schedule": ["recurrencePeriodDuration": ""]
]
],
"updateTime": ""
],
"locationId": "",
"triggerId": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/:parent/jobTriggers")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
dlp.projects.locations.jobTriggers.hybridInspect
{{baseUrl}}/v2/:name:hybridInspect
QUERY PARAMS
name
BODY json
{
"hybridItem": {
"findingDetails": {
"containerDetails": {
"fullPath": "",
"projectId": "",
"relativePath": "",
"rootPath": "",
"type": "",
"updateTime": "",
"version": ""
},
"fileOffset": "",
"labels": {},
"rowOffset": "",
"tableOptions": {
"identifyingFields": [
{
"name": ""
}
]
}
},
"item": {
"byteItem": {
"data": "",
"type": ""
},
"table": {
"headers": [
{}
],
"rows": [
{
"values": [
{
"booleanValue": false,
"dateValue": {
"day": 0,
"month": 0,
"year": 0
},
"dayOfWeekValue": "",
"floatValue": "",
"integerValue": "",
"stringValue": "",
"timeValue": {
"hours": 0,
"minutes": 0,
"nanos": 0,
"seconds": 0
},
"timestampValue": ""
}
]
}
]
},
"value": ""
}
}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/:name:hybridInspect");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"hybridItem\": {\n \"findingDetails\": {\n \"containerDetails\": {\n \"fullPath\": \"\",\n \"projectId\": \"\",\n \"relativePath\": \"\",\n \"rootPath\": \"\",\n \"type\": \"\",\n \"updateTime\": \"\",\n \"version\": \"\"\n },\n \"fileOffset\": \"\",\n \"labels\": {},\n \"rowOffset\": \"\",\n \"tableOptions\": {\n \"identifyingFields\": [\n {\n \"name\": \"\"\n }\n ]\n }\n },\n \"item\": {\n \"byteItem\": {\n \"data\": \"\",\n \"type\": \"\"\n },\n \"table\": {\n \"headers\": [\n {}\n ],\n \"rows\": [\n {\n \"values\": [\n {\n \"booleanValue\": false,\n \"dateValue\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"dayOfWeekValue\": \"\",\n \"floatValue\": \"\",\n \"integerValue\": \"\",\n \"stringValue\": \"\",\n \"timeValue\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"timestampValue\": \"\"\n }\n ]\n }\n ]\n },\n \"value\": \"\"\n }\n }\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v2/:name:hybridInspect" {:content-type :json
:form-params {:hybridItem {:findingDetails {:containerDetails {:fullPath ""
:projectId ""
:relativePath ""
:rootPath ""
:type ""
:updateTime ""
:version ""}
:fileOffset ""
:labels {}
:rowOffset ""
:tableOptions {:identifyingFields [{:name ""}]}}
:item {:byteItem {:data ""
:type ""}
:table {:headers [{}]
:rows [{:values [{:booleanValue false
:dateValue {:day 0
:month 0
:year 0}
:dayOfWeekValue ""
:floatValue ""
:integerValue ""
:stringValue ""
:timeValue {:hours 0
:minutes 0
:nanos 0
:seconds 0}
:timestampValue ""}]}]}
:value ""}}}})
require "http/client"
url = "{{baseUrl}}/v2/:name:hybridInspect"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"hybridItem\": {\n \"findingDetails\": {\n \"containerDetails\": {\n \"fullPath\": \"\",\n \"projectId\": \"\",\n \"relativePath\": \"\",\n \"rootPath\": \"\",\n \"type\": \"\",\n \"updateTime\": \"\",\n \"version\": \"\"\n },\n \"fileOffset\": \"\",\n \"labels\": {},\n \"rowOffset\": \"\",\n \"tableOptions\": {\n \"identifyingFields\": [\n {\n \"name\": \"\"\n }\n ]\n }\n },\n \"item\": {\n \"byteItem\": {\n \"data\": \"\",\n \"type\": \"\"\n },\n \"table\": {\n \"headers\": [\n {}\n ],\n \"rows\": [\n {\n \"values\": [\n {\n \"booleanValue\": false,\n \"dateValue\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"dayOfWeekValue\": \"\",\n \"floatValue\": \"\",\n \"integerValue\": \"\",\n \"stringValue\": \"\",\n \"timeValue\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"timestampValue\": \"\"\n }\n ]\n }\n ]\n },\n \"value\": \"\"\n }\n }\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/v2/:name:hybridInspect"),
Content = new StringContent("{\n \"hybridItem\": {\n \"findingDetails\": {\n \"containerDetails\": {\n \"fullPath\": \"\",\n \"projectId\": \"\",\n \"relativePath\": \"\",\n \"rootPath\": \"\",\n \"type\": \"\",\n \"updateTime\": \"\",\n \"version\": \"\"\n },\n \"fileOffset\": \"\",\n \"labels\": {},\n \"rowOffset\": \"\",\n \"tableOptions\": {\n \"identifyingFields\": [\n {\n \"name\": \"\"\n }\n ]\n }\n },\n \"item\": {\n \"byteItem\": {\n \"data\": \"\",\n \"type\": \"\"\n },\n \"table\": {\n \"headers\": [\n {}\n ],\n \"rows\": [\n {\n \"values\": [\n {\n \"booleanValue\": false,\n \"dateValue\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"dayOfWeekValue\": \"\",\n \"floatValue\": \"\",\n \"integerValue\": \"\",\n \"stringValue\": \"\",\n \"timeValue\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"timestampValue\": \"\"\n }\n ]\n }\n ]\n },\n \"value\": \"\"\n }\n }\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/:name:hybridInspect");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"hybridItem\": {\n \"findingDetails\": {\n \"containerDetails\": {\n \"fullPath\": \"\",\n \"projectId\": \"\",\n \"relativePath\": \"\",\n \"rootPath\": \"\",\n \"type\": \"\",\n \"updateTime\": \"\",\n \"version\": \"\"\n },\n \"fileOffset\": \"\",\n \"labels\": {},\n \"rowOffset\": \"\",\n \"tableOptions\": {\n \"identifyingFields\": [\n {\n \"name\": \"\"\n }\n ]\n }\n },\n \"item\": {\n \"byteItem\": {\n \"data\": \"\",\n \"type\": \"\"\n },\n \"table\": {\n \"headers\": [\n {}\n ],\n \"rows\": [\n {\n \"values\": [\n {\n \"booleanValue\": false,\n \"dateValue\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"dayOfWeekValue\": \"\",\n \"floatValue\": \"\",\n \"integerValue\": \"\",\n \"stringValue\": \"\",\n \"timeValue\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"timestampValue\": \"\"\n }\n ]\n }\n ]\n },\n \"value\": \"\"\n }\n }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/:name:hybridInspect"
payload := strings.NewReader("{\n \"hybridItem\": {\n \"findingDetails\": {\n \"containerDetails\": {\n \"fullPath\": \"\",\n \"projectId\": \"\",\n \"relativePath\": \"\",\n \"rootPath\": \"\",\n \"type\": \"\",\n \"updateTime\": \"\",\n \"version\": \"\"\n },\n \"fileOffset\": \"\",\n \"labels\": {},\n \"rowOffset\": \"\",\n \"tableOptions\": {\n \"identifyingFields\": [\n {\n \"name\": \"\"\n }\n ]\n }\n },\n \"item\": {\n \"byteItem\": {\n \"data\": \"\",\n \"type\": \"\"\n },\n \"table\": {\n \"headers\": [\n {}\n ],\n \"rows\": [\n {\n \"values\": [\n {\n \"booleanValue\": false,\n \"dateValue\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"dayOfWeekValue\": \"\",\n \"floatValue\": \"\",\n \"integerValue\": \"\",\n \"stringValue\": \"\",\n \"timeValue\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"timestampValue\": \"\"\n }\n ]\n }\n ]\n },\n \"value\": \"\"\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/v2/:name:hybridInspect HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 1276
{
"hybridItem": {
"findingDetails": {
"containerDetails": {
"fullPath": "",
"projectId": "",
"relativePath": "",
"rootPath": "",
"type": "",
"updateTime": "",
"version": ""
},
"fileOffset": "",
"labels": {},
"rowOffset": "",
"tableOptions": {
"identifyingFields": [
{
"name": ""
}
]
}
},
"item": {
"byteItem": {
"data": "",
"type": ""
},
"table": {
"headers": [
{}
],
"rows": [
{
"values": [
{
"booleanValue": false,
"dateValue": {
"day": 0,
"month": 0,
"year": 0
},
"dayOfWeekValue": "",
"floatValue": "",
"integerValue": "",
"stringValue": "",
"timeValue": {
"hours": 0,
"minutes": 0,
"nanos": 0,
"seconds": 0
},
"timestampValue": ""
}
]
}
]
},
"value": ""
}
}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v2/:name:hybridInspect")
.setHeader("content-type", "application/json")
.setBody("{\n \"hybridItem\": {\n \"findingDetails\": {\n \"containerDetails\": {\n \"fullPath\": \"\",\n \"projectId\": \"\",\n \"relativePath\": \"\",\n \"rootPath\": \"\",\n \"type\": \"\",\n \"updateTime\": \"\",\n \"version\": \"\"\n },\n \"fileOffset\": \"\",\n \"labels\": {},\n \"rowOffset\": \"\",\n \"tableOptions\": {\n \"identifyingFields\": [\n {\n \"name\": \"\"\n }\n ]\n }\n },\n \"item\": {\n \"byteItem\": {\n \"data\": \"\",\n \"type\": \"\"\n },\n \"table\": {\n \"headers\": [\n {}\n ],\n \"rows\": [\n {\n \"values\": [\n {\n \"booleanValue\": false,\n \"dateValue\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"dayOfWeekValue\": \"\",\n \"floatValue\": \"\",\n \"integerValue\": \"\",\n \"stringValue\": \"\",\n \"timeValue\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"timestampValue\": \"\"\n }\n ]\n }\n ]\n },\n \"value\": \"\"\n }\n }\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/:name:hybridInspect"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"hybridItem\": {\n \"findingDetails\": {\n \"containerDetails\": {\n \"fullPath\": \"\",\n \"projectId\": \"\",\n \"relativePath\": \"\",\n \"rootPath\": \"\",\n \"type\": \"\",\n \"updateTime\": \"\",\n \"version\": \"\"\n },\n \"fileOffset\": \"\",\n \"labels\": {},\n \"rowOffset\": \"\",\n \"tableOptions\": {\n \"identifyingFields\": [\n {\n \"name\": \"\"\n }\n ]\n }\n },\n \"item\": {\n \"byteItem\": {\n \"data\": \"\",\n \"type\": \"\"\n },\n \"table\": {\n \"headers\": [\n {}\n ],\n \"rows\": [\n {\n \"values\": [\n {\n \"booleanValue\": false,\n \"dateValue\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"dayOfWeekValue\": \"\",\n \"floatValue\": \"\",\n \"integerValue\": \"\",\n \"stringValue\": \"\",\n \"timeValue\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"timestampValue\": \"\"\n }\n ]\n }\n ]\n },\n \"value\": \"\"\n }\n }\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"hybridItem\": {\n \"findingDetails\": {\n \"containerDetails\": {\n \"fullPath\": \"\",\n \"projectId\": \"\",\n \"relativePath\": \"\",\n \"rootPath\": \"\",\n \"type\": \"\",\n \"updateTime\": \"\",\n \"version\": \"\"\n },\n \"fileOffset\": \"\",\n \"labels\": {},\n \"rowOffset\": \"\",\n \"tableOptions\": {\n \"identifyingFields\": [\n {\n \"name\": \"\"\n }\n ]\n }\n },\n \"item\": {\n \"byteItem\": {\n \"data\": \"\",\n \"type\": \"\"\n },\n \"table\": {\n \"headers\": [\n {}\n ],\n \"rows\": [\n {\n \"values\": [\n {\n \"booleanValue\": false,\n \"dateValue\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"dayOfWeekValue\": \"\",\n \"floatValue\": \"\",\n \"integerValue\": \"\",\n \"stringValue\": \"\",\n \"timeValue\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"timestampValue\": \"\"\n }\n ]\n }\n ]\n },\n \"value\": \"\"\n }\n }\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v2/:name:hybridInspect")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v2/:name:hybridInspect")
.header("content-type", "application/json")
.body("{\n \"hybridItem\": {\n \"findingDetails\": {\n \"containerDetails\": {\n \"fullPath\": \"\",\n \"projectId\": \"\",\n \"relativePath\": \"\",\n \"rootPath\": \"\",\n \"type\": \"\",\n \"updateTime\": \"\",\n \"version\": \"\"\n },\n \"fileOffset\": \"\",\n \"labels\": {},\n \"rowOffset\": \"\",\n \"tableOptions\": {\n \"identifyingFields\": [\n {\n \"name\": \"\"\n }\n ]\n }\n },\n \"item\": {\n \"byteItem\": {\n \"data\": \"\",\n \"type\": \"\"\n },\n \"table\": {\n \"headers\": [\n {}\n ],\n \"rows\": [\n {\n \"values\": [\n {\n \"booleanValue\": false,\n \"dateValue\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"dayOfWeekValue\": \"\",\n \"floatValue\": \"\",\n \"integerValue\": \"\",\n \"stringValue\": \"\",\n \"timeValue\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"timestampValue\": \"\"\n }\n ]\n }\n ]\n },\n \"value\": \"\"\n }\n }\n}")
.asString();
const data = JSON.stringify({
hybridItem: {
findingDetails: {
containerDetails: {
fullPath: '',
projectId: '',
relativePath: '',
rootPath: '',
type: '',
updateTime: '',
version: ''
},
fileOffset: '',
labels: {},
rowOffset: '',
tableOptions: {
identifyingFields: [
{
name: ''
}
]
}
},
item: {
byteItem: {
data: '',
type: ''
},
table: {
headers: [
{}
],
rows: [
{
values: [
{
booleanValue: false,
dateValue: {
day: 0,
month: 0,
year: 0
},
dayOfWeekValue: '',
floatValue: '',
integerValue: '',
stringValue: '',
timeValue: {
hours: 0,
minutes: 0,
nanos: 0,
seconds: 0
},
timestampValue: ''
}
]
}
]
},
value: ''
}
}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v2/:name:hybridInspect');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v2/:name:hybridInspect',
headers: {'content-type': 'application/json'},
data: {
hybridItem: {
findingDetails: {
containerDetails: {
fullPath: '',
projectId: '',
relativePath: '',
rootPath: '',
type: '',
updateTime: '',
version: ''
},
fileOffset: '',
labels: {},
rowOffset: '',
tableOptions: {identifyingFields: [{name: ''}]}
},
item: {
byteItem: {data: '', type: ''},
table: {
headers: [{}],
rows: [
{
values: [
{
booleanValue: false,
dateValue: {day: 0, month: 0, year: 0},
dayOfWeekValue: '',
floatValue: '',
integerValue: '',
stringValue: '',
timeValue: {hours: 0, minutes: 0, nanos: 0, seconds: 0},
timestampValue: ''
}
]
}
]
},
value: ''
}
}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/:name:hybridInspect';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"hybridItem":{"findingDetails":{"containerDetails":{"fullPath":"","projectId":"","relativePath":"","rootPath":"","type":"","updateTime":"","version":""},"fileOffset":"","labels":{},"rowOffset":"","tableOptions":{"identifyingFields":[{"name":""}]}},"item":{"byteItem":{"data":"","type":""},"table":{"headers":[{}],"rows":[{"values":[{"booleanValue":false,"dateValue":{"day":0,"month":0,"year":0},"dayOfWeekValue":"","floatValue":"","integerValue":"","stringValue":"","timeValue":{"hours":0,"minutes":0,"nanos":0,"seconds":0},"timestampValue":""}]}]},"value":""}}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v2/:name:hybridInspect',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "hybridItem": {\n "findingDetails": {\n "containerDetails": {\n "fullPath": "",\n "projectId": "",\n "relativePath": "",\n "rootPath": "",\n "type": "",\n "updateTime": "",\n "version": ""\n },\n "fileOffset": "",\n "labels": {},\n "rowOffset": "",\n "tableOptions": {\n "identifyingFields": [\n {\n "name": ""\n }\n ]\n }\n },\n "item": {\n "byteItem": {\n "data": "",\n "type": ""\n },\n "table": {\n "headers": [\n {}\n ],\n "rows": [\n {\n "values": [\n {\n "booleanValue": false,\n "dateValue": {\n "day": 0,\n "month": 0,\n "year": 0\n },\n "dayOfWeekValue": "",\n "floatValue": "",\n "integerValue": "",\n "stringValue": "",\n "timeValue": {\n "hours": 0,\n "minutes": 0,\n "nanos": 0,\n "seconds": 0\n },\n "timestampValue": ""\n }\n ]\n }\n ]\n },\n "value": ""\n }\n }\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"hybridItem\": {\n \"findingDetails\": {\n \"containerDetails\": {\n \"fullPath\": \"\",\n \"projectId\": \"\",\n \"relativePath\": \"\",\n \"rootPath\": \"\",\n \"type\": \"\",\n \"updateTime\": \"\",\n \"version\": \"\"\n },\n \"fileOffset\": \"\",\n \"labels\": {},\n \"rowOffset\": \"\",\n \"tableOptions\": {\n \"identifyingFields\": [\n {\n \"name\": \"\"\n }\n ]\n }\n },\n \"item\": {\n \"byteItem\": {\n \"data\": \"\",\n \"type\": \"\"\n },\n \"table\": {\n \"headers\": [\n {}\n ],\n \"rows\": [\n {\n \"values\": [\n {\n \"booleanValue\": false,\n \"dateValue\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"dayOfWeekValue\": \"\",\n \"floatValue\": \"\",\n \"integerValue\": \"\",\n \"stringValue\": \"\",\n \"timeValue\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"timestampValue\": \"\"\n }\n ]\n }\n ]\n },\n \"value\": \"\"\n }\n }\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v2/:name:hybridInspect")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/v2/:name:hybridInspect',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
hybridItem: {
findingDetails: {
containerDetails: {
fullPath: '',
projectId: '',
relativePath: '',
rootPath: '',
type: '',
updateTime: '',
version: ''
},
fileOffset: '',
labels: {},
rowOffset: '',
tableOptions: {identifyingFields: [{name: ''}]}
},
item: {
byteItem: {data: '', type: ''},
table: {
headers: [{}],
rows: [
{
values: [
{
booleanValue: false,
dateValue: {day: 0, month: 0, year: 0},
dayOfWeekValue: '',
floatValue: '',
integerValue: '',
stringValue: '',
timeValue: {hours: 0, minutes: 0, nanos: 0, seconds: 0},
timestampValue: ''
}
]
}
]
},
value: ''
}
}
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v2/:name:hybridInspect',
headers: {'content-type': 'application/json'},
body: {
hybridItem: {
findingDetails: {
containerDetails: {
fullPath: '',
projectId: '',
relativePath: '',
rootPath: '',
type: '',
updateTime: '',
version: ''
},
fileOffset: '',
labels: {},
rowOffset: '',
tableOptions: {identifyingFields: [{name: ''}]}
},
item: {
byteItem: {data: '', type: ''},
table: {
headers: [{}],
rows: [
{
values: [
{
booleanValue: false,
dateValue: {day: 0, month: 0, year: 0},
dayOfWeekValue: '',
floatValue: '',
integerValue: '',
stringValue: '',
timeValue: {hours: 0, minutes: 0, nanos: 0, seconds: 0},
timestampValue: ''
}
]
}
]
},
value: ''
}
}
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/v2/:name:hybridInspect');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
hybridItem: {
findingDetails: {
containerDetails: {
fullPath: '',
projectId: '',
relativePath: '',
rootPath: '',
type: '',
updateTime: '',
version: ''
},
fileOffset: '',
labels: {},
rowOffset: '',
tableOptions: {
identifyingFields: [
{
name: ''
}
]
}
},
item: {
byteItem: {
data: '',
type: ''
},
table: {
headers: [
{}
],
rows: [
{
values: [
{
booleanValue: false,
dateValue: {
day: 0,
month: 0,
year: 0
},
dayOfWeekValue: '',
floatValue: '',
integerValue: '',
stringValue: '',
timeValue: {
hours: 0,
minutes: 0,
nanos: 0,
seconds: 0
},
timestampValue: ''
}
]
}
]
},
value: ''
}
}
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/v2/:name:hybridInspect',
headers: {'content-type': 'application/json'},
data: {
hybridItem: {
findingDetails: {
containerDetails: {
fullPath: '',
projectId: '',
relativePath: '',
rootPath: '',
type: '',
updateTime: '',
version: ''
},
fileOffset: '',
labels: {},
rowOffset: '',
tableOptions: {identifyingFields: [{name: ''}]}
},
item: {
byteItem: {data: '', type: ''},
table: {
headers: [{}],
rows: [
{
values: [
{
booleanValue: false,
dateValue: {day: 0, month: 0, year: 0},
dayOfWeekValue: '',
floatValue: '',
integerValue: '',
stringValue: '',
timeValue: {hours: 0, minutes: 0, nanos: 0, seconds: 0},
timestampValue: ''
}
]
}
]
},
value: ''
}
}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/:name:hybridInspect';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"hybridItem":{"findingDetails":{"containerDetails":{"fullPath":"","projectId":"","relativePath":"","rootPath":"","type":"","updateTime":"","version":""},"fileOffset":"","labels":{},"rowOffset":"","tableOptions":{"identifyingFields":[{"name":""}]}},"item":{"byteItem":{"data":"","type":""},"table":{"headers":[{}],"rows":[{"values":[{"booleanValue":false,"dateValue":{"day":0,"month":0,"year":0},"dayOfWeekValue":"","floatValue":"","integerValue":"","stringValue":"","timeValue":{"hours":0,"minutes":0,"nanos":0,"seconds":0},"timestampValue":""}]}]},"value":""}}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"hybridItem": @{ @"findingDetails": @{ @"containerDetails": @{ @"fullPath": @"", @"projectId": @"", @"relativePath": @"", @"rootPath": @"", @"type": @"", @"updateTime": @"", @"version": @"" }, @"fileOffset": @"", @"labels": @{ }, @"rowOffset": @"", @"tableOptions": @{ @"identifyingFields": @[ @{ @"name": @"" } ] } }, @"item": @{ @"byteItem": @{ @"data": @"", @"type": @"" }, @"table": @{ @"headers": @[ @{ } ], @"rows": @[ @{ @"values": @[ @{ @"booleanValue": @NO, @"dateValue": @{ @"day": @0, @"month": @0, @"year": @0 }, @"dayOfWeekValue": @"", @"floatValue": @"", @"integerValue": @"", @"stringValue": @"", @"timeValue": @{ @"hours": @0, @"minutes": @0, @"nanos": @0, @"seconds": @0 }, @"timestampValue": @"" } ] } ] }, @"value": @"" } } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v2/:name:hybridInspect"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v2/:name:hybridInspect" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"hybridItem\": {\n \"findingDetails\": {\n \"containerDetails\": {\n \"fullPath\": \"\",\n \"projectId\": \"\",\n \"relativePath\": \"\",\n \"rootPath\": \"\",\n \"type\": \"\",\n \"updateTime\": \"\",\n \"version\": \"\"\n },\n \"fileOffset\": \"\",\n \"labels\": {},\n \"rowOffset\": \"\",\n \"tableOptions\": {\n \"identifyingFields\": [\n {\n \"name\": \"\"\n }\n ]\n }\n },\n \"item\": {\n \"byteItem\": {\n \"data\": \"\",\n \"type\": \"\"\n },\n \"table\": {\n \"headers\": [\n {}\n ],\n \"rows\": [\n {\n \"values\": [\n {\n \"booleanValue\": false,\n \"dateValue\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"dayOfWeekValue\": \"\",\n \"floatValue\": \"\",\n \"integerValue\": \"\",\n \"stringValue\": \"\",\n \"timeValue\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"timestampValue\": \"\"\n }\n ]\n }\n ]\n },\n \"value\": \"\"\n }\n }\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/:name:hybridInspect",
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([
'hybridItem' => [
'findingDetails' => [
'containerDetails' => [
'fullPath' => '',
'projectId' => '',
'relativePath' => '',
'rootPath' => '',
'type' => '',
'updateTime' => '',
'version' => ''
],
'fileOffset' => '',
'labels' => [
],
'rowOffset' => '',
'tableOptions' => [
'identifyingFields' => [
[
'name' => ''
]
]
]
],
'item' => [
'byteItem' => [
'data' => '',
'type' => ''
],
'table' => [
'headers' => [
[
]
],
'rows' => [
[
'values' => [
[
'booleanValue' => null,
'dateValue' => [
'day' => 0,
'month' => 0,
'year' => 0
],
'dayOfWeekValue' => '',
'floatValue' => '',
'integerValue' => '',
'stringValue' => '',
'timeValue' => [
'hours' => 0,
'minutes' => 0,
'nanos' => 0,
'seconds' => 0
],
'timestampValue' => ''
]
]
]
]
],
'value' => ''
]
]
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/v2/:name:hybridInspect', [
'body' => '{
"hybridItem": {
"findingDetails": {
"containerDetails": {
"fullPath": "",
"projectId": "",
"relativePath": "",
"rootPath": "",
"type": "",
"updateTime": "",
"version": ""
},
"fileOffset": "",
"labels": {},
"rowOffset": "",
"tableOptions": {
"identifyingFields": [
{
"name": ""
}
]
}
},
"item": {
"byteItem": {
"data": "",
"type": ""
},
"table": {
"headers": [
{}
],
"rows": [
{
"values": [
{
"booleanValue": false,
"dateValue": {
"day": 0,
"month": 0,
"year": 0
},
"dayOfWeekValue": "",
"floatValue": "",
"integerValue": "",
"stringValue": "",
"timeValue": {
"hours": 0,
"minutes": 0,
"nanos": 0,
"seconds": 0
},
"timestampValue": ""
}
]
}
]
},
"value": ""
}
}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v2/:name:hybridInspect');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'hybridItem' => [
'findingDetails' => [
'containerDetails' => [
'fullPath' => '',
'projectId' => '',
'relativePath' => '',
'rootPath' => '',
'type' => '',
'updateTime' => '',
'version' => ''
],
'fileOffset' => '',
'labels' => [
],
'rowOffset' => '',
'tableOptions' => [
'identifyingFields' => [
[
'name' => ''
]
]
]
],
'item' => [
'byteItem' => [
'data' => '',
'type' => ''
],
'table' => [
'headers' => [
[
]
],
'rows' => [
[
'values' => [
[
'booleanValue' => null,
'dateValue' => [
'day' => 0,
'month' => 0,
'year' => 0
],
'dayOfWeekValue' => '',
'floatValue' => '',
'integerValue' => '',
'stringValue' => '',
'timeValue' => [
'hours' => 0,
'minutes' => 0,
'nanos' => 0,
'seconds' => 0
],
'timestampValue' => ''
]
]
]
]
],
'value' => ''
]
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'hybridItem' => [
'findingDetails' => [
'containerDetails' => [
'fullPath' => '',
'projectId' => '',
'relativePath' => '',
'rootPath' => '',
'type' => '',
'updateTime' => '',
'version' => ''
],
'fileOffset' => '',
'labels' => [
],
'rowOffset' => '',
'tableOptions' => [
'identifyingFields' => [
[
'name' => ''
]
]
]
],
'item' => [
'byteItem' => [
'data' => '',
'type' => ''
],
'table' => [
'headers' => [
[
]
],
'rows' => [
[
'values' => [
[
'booleanValue' => null,
'dateValue' => [
'day' => 0,
'month' => 0,
'year' => 0
],
'dayOfWeekValue' => '',
'floatValue' => '',
'integerValue' => '',
'stringValue' => '',
'timeValue' => [
'hours' => 0,
'minutes' => 0,
'nanos' => 0,
'seconds' => 0
],
'timestampValue' => ''
]
]
]
]
],
'value' => ''
]
]
]));
$request->setRequestUrl('{{baseUrl}}/v2/:name:hybridInspect');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v2/:name:hybridInspect' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"hybridItem": {
"findingDetails": {
"containerDetails": {
"fullPath": "",
"projectId": "",
"relativePath": "",
"rootPath": "",
"type": "",
"updateTime": "",
"version": ""
},
"fileOffset": "",
"labels": {},
"rowOffset": "",
"tableOptions": {
"identifyingFields": [
{
"name": ""
}
]
}
},
"item": {
"byteItem": {
"data": "",
"type": ""
},
"table": {
"headers": [
{}
],
"rows": [
{
"values": [
{
"booleanValue": false,
"dateValue": {
"day": 0,
"month": 0,
"year": 0
},
"dayOfWeekValue": "",
"floatValue": "",
"integerValue": "",
"stringValue": "",
"timeValue": {
"hours": 0,
"minutes": 0,
"nanos": 0,
"seconds": 0
},
"timestampValue": ""
}
]
}
]
},
"value": ""
}
}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/:name:hybridInspect' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"hybridItem": {
"findingDetails": {
"containerDetails": {
"fullPath": "",
"projectId": "",
"relativePath": "",
"rootPath": "",
"type": "",
"updateTime": "",
"version": ""
},
"fileOffset": "",
"labels": {},
"rowOffset": "",
"tableOptions": {
"identifyingFields": [
{
"name": ""
}
]
}
},
"item": {
"byteItem": {
"data": "",
"type": ""
},
"table": {
"headers": [
{}
],
"rows": [
{
"values": [
{
"booleanValue": false,
"dateValue": {
"day": 0,
"month": 0,
"year": 0
},
"dayOfWeekValue": "",
"floatValue": "",
"integerValue": "",
"stringValue": "",
"timeValue": {
"hours": 0,
"minutes": 0,
"nanos": 0,
"seconds": 0
},
"timestampValue": ""
}
]
}
]
},
"value": ""
}
}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"hybridItem\": {\n \"findingDetails\": {\n \"containerDetails\": {\n \"fullPath\": \"\",\n \"projectId\": \"\",\n \"relativePath\": \"\",\n \"rootPath\": \"\",\n \"type\": \"\",\n \"updateTime\": \"\",\n \"version\": \"\"\n },\n \"fileOffset\": \"\",\n \"labels\": {},\n \"rowOffset\": \"\",\n \"tableOptions\": {\n \"identifyingFields\": [\n {\n \"name\": \"\"\n }\n ]\n }\n },\n \"item\": {\n \"byteItem\": {\n \"data\": \"\",\n \"type\": \"\"\n },\n \"table\": {\n \"headers\": [\n {}\n ],\n \"rows\": [\n {\n \"values\": [\n {\n \"booleanValue\": false,\n \"dateValue\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"dayOfWeekValue\": \"\",\n \"floatValue\": \"\",\n \"integerValue\": \"\",\n \"stringValue\": \"\",\n \"timeValue\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"timestampValue\": \"\"\n }\n ]\n }\n ]\n },\n \"value\": \"\"\n }\n }\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v2/:name:hybridInspect", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/:name:hybridInspect"
payload = { "hybridItem": {
"findingDetails": {
"containerDetails": {
"fullPath": "",
"projectId": "",
"relativePath": "",
"rootPath": "",
"type": "",
"updateTime": "",
"version": ""
},
"fileOffset": "",
"labels": {},
"rowOffset": "",
"tableOptions": { "identifyingFields": [{ "name": "" }] }
},
"item": {
"byteItem": {
"data": "",
"type": ""
},
"table": {
"headers": [{}],
"rows": [{ "values": [
{
"booleanValue": False,
"dateValue": {
"day": 0,
"month": 0,
"year": 0
},
"dayOfWeekValue": "",
"floatValue": "",
"integerValue": "",
"stringValue": "",
"timeValue": {
"hours": 0,
"minutes": 0,
"nanos": 0,
"seconds": 0
},
"timestampValue": ""
}
] }]
},
"value": ""
}
} }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/:name:hybridInspect"
payload <- "{\n \"hybridItem\": {\n \"findingDetails\": {\n \"containerDetails\": {\n \"fullPath\": \"\",\n \"projectId\": \"\",\n \"relativePath\": \"\",\n \"rootPath\": \"\",\n \"type\": \"\",\n \"updateTime\": \"\",\n \"version\": \"\"\n },\n \"fileOffset\": \"\",\n \"labels\": {},\n \"rowOffset\": \"\",\n \"tableOptions\": {\n \"identifyingFields\": [\n {\n \"name\": \"\"\n }\n ]\n }\n },\n \"item\": {\n \"byteItem\": {\n \"data\": \"\",\n \"type\": \"\"\n },\n \"table\": {\n \"headers\": [\n {}\n ],\n \"rows\": [\n {\n \"values\": [\n {\n \"booleanValue\": false,\n \"dateValue\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"dayOfWeekValue\": \"\",\n \"floatValue\": \"\",\n \"integerValue\": \"\",\n \"stringValue\": \"\",\n \"timeValue\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"timestampValue\": \"\"\n }\n ]\n }\n ]\n },\n \"value\": \"\"\n }\n }\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/:name:hybridInspect")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"hybridItem\": {\n \"findingDetails\": {\n \"containerDetails\": {\n \"fullPath\": \"\",\n \"projectId\": \"\",\n \"relativePath\": \"\",\n \"rootPath\": \"\",\n \"type\": \"\",\n \"updateTime\": \"\",\n \"version\": \"\"\n },\n \"fileOffset\": \"\",\n \"labels\": {},\n \"rowOffset\": \"\",\n \"tableOptions\": {\n \"identifyingFields\": [\n {\n \"name\": \"\"\n }\n ]\n }\n },\n \"item\": {\n \"byteItem\": {\n \"data\": \"\",\n \"type\": \"\"\n },\n \"table\": {\n \"headers\": [\n {}\n ],\n \"rows\": [\n {\n \"values\": [\n {\n \"booleanValue\": false,\n \"dateValue\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"dayOfWeekValue\": \"\",\n \"floatValue\": \"\",\n \"integerValue\": \"\",\n \"stringValue\": \"\",\n \"timeValue\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"timestampValue\": \"\"\n }\n ]\n }\n ]\n },\n \"value\": \"\"\n }\n }\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/v2/:name:hybridInspect') do |req|
req.body = "{\n \"hybridItem\": {\n \"findingDetails\": {\n \"containerDetails\": {\n \"fullPath\": \"\",\n \"projectId\": \"\",\n \"relativePath\": \"\",\n \"rootPath\": \"\",\n \"type\": \"\",\n \"updateTime\": \"\",\n \"version\": \"\"\n },\n \"fileOffset\": \"\",\n \"labels\": {},\n \"rowOffset\": \"\",\n \"tableOptions\": {\n \"identifyingFields\": [\n {\n \"name\": \"\"\n }\n ]\n }\n },\n \"item\": {\n \"byteItem\": {\n \"data\": \"\",\n \"type\": \"\"\n },\n \"table\": {\n \"headers\": [\n {}\n ],\n \"rows\": [\n {\n \"values\": [\n {\n \"booleanValue\": false,\n \"dateValue\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"dayOfWeekValue\": \"\",\n \"floatValue\": \"\",\n \"integerValue\": \"\",\n \"stringValue\": \"\",\n \"timeValue\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"timestampValue\": \"\"\n }\n ]\n }\n ]\n },\n \"value\": \"\"\n }\n }\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v2/:name:hybridInspect";
let payload = json!({"hybridItem": json!({
"findingDetails": json!({
"containerDetails": json!({
"fullPath": "",
"projectId": "",
"relativePath": "",
"rootPath": "",
"type": "",
"updateTime": "",
"version": ""
}),
"fileOffset": "",
"labels": json!({}),
"rowOffset": "",
"tableOptions": json!({"identifyingFields": (json!({"name": ""}))})
}),
"item": json!({
"byteItem": json!({
"data": "",
"type": ""
}),
"table": json!({
"headers": (json!({})),
"rows": (json!({"values": (
json!({
"booleanValue": false,
"dateValue": json!({
"day": 0,
"month": 0,
"year": 0
}),
"dayOfWeekValue": "",
"floatValue": "",
"integerValue": "",
"stringValue": "",
"timeValue": json!({
"hours": 0,
"minutes": 0,
"nanos": 0,
"seconds": 0
}),
"timestampValue": ""
})
)}))
}),
"value": ""
})
})});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/v2/:name:hybridInspect \
--header 'content-type: application/json' \
--data '{
"hybridItem": {
"findingDetails": {
"containerDetails": {
"fullPath": "",
"projectId": "",
"relativePath": "",
"rootPath": "",
"type": "",
"updateTime": "",
"version": ""
},
"fileOffset": "",
"labels": {},
"rowOffset": "",
"tableOptions": {
"identifyingFields": [
{
"name": ""
}
]
}
},
"item": {
"byteItem": {
"data": "",
"type": ""
},
"table": {
"headers": [
{}
],
"rows": [
{
"values": [
{
"booleanValue": false,
"dateValue": {
"day": 0,
"month": 0,
"year": 0
},
"dayOfWeekValue": "",
"floatValue": "",
"integerValue": "",
"stringValue": "",
"timeValue": {
"hours": 0,
"minutes": 0,
"nanos": 0,
"seconds": 0
},
"timestampValue": ""
}
]
}
]
},
"value": ""
}
}
}'
echo '{
"hybridItem": {
"findingDetails": {
"containerDetails": {
"fullPath": "",
"projectId": "",
"relativePath": "",
"rootPath": "",
"type": "",
"updateTime": "",
"version": ""
},
"fileOffset": "",
"labels": {},
"rowOffset": "",
"tableOptions": {
"identifyingFields": [
{
"name": ""
}
]
}
},
"item": {
"byteItem": {
"data": "",
"type": ""
},
"table": {
"headers": [
{}
],
"rows": [
{
"values": [
{
"booleanValue": false,
"dateValue": {
"day": 0,
"month": 0,
"year": 0
},
"dayOfWeekValue": "",
"floatValue": "",
"integerValue": "",
"stringValue": "",
"timeValue": {
"hours": 0,
"minutes": 0,
"nanos": 0,
"seconds": 0
},
"timestampValue": ""
}
]
}
]
},
"value": ""
}
}
}' | \
http POST {{baseUrl}}/v2/:name:hybridInspect \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "hybridItem": {\n "findingDetails": {\n "containerDetails": {\n "fullPath": "",\n "projectId": "",\n "relativePath": "",\n "rootPath": "",\n "type": "",\n "updateTime": "",\n "version": ""\n },\n "fileOffset": "",\n "labels": {},\n "rowOffset": "",\n "tableOptions": {\n "identifyingFields": [\n {\n "name": ""\n }\n ]\n }\n },\n "item": {\n "byteItem": {\n "data": "",\n "type": ""\n },\n "table": {\n "headers": [\n {}\n ],\n "rows": [\n {\n "values": [\n {\n "booleanValue": false,\n "dateValue": {\n "day": 0,\n "month": 0,\n "year": 0\n },\n "dayOfWeekValue": "",\n "floatValue": "",\n "integerValue": "",\n "stringValue": "",\n "timeValue": {\n "hours": 0,\n "minutes": 0,\n "nanos": 0,\n "seconds": 0\n },\n "timestampValue": ""\n }\n ]\n }\n ]\n },\n "value": ""\n }\n }\n}' \
--output-document \
- {{baseUrl}}/v2/:name:hybridInspect
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["hybridItem": [
"findingDetails": [
"containerDetails": [
"fullPath": "",
"projectId": "",
"relativePath": "",
"rootPath": "",
"type": "",
"updateTime": "",
"version": ""
],
"fileOffset": "",
"labels": [],
"rowOffset": "",
"tableOptions": ["identifyingFields": [["name": ""]]]
],
"item": [
"byteItem": [
"data": "",
"type": ""
],
"table": [
"headers": [[]],
"rows": [["values": [
[
"booleanValue": false,
"dateValue": [
"day": 0,
"month": 0,
"year": 0
],
"dayOfWeekValue": "",
"floatValue": "",
"integerValue": "",
"stringValue": "",
"timeValue": [
"hours": 0,
"minutes": 0,
"nanos": 0,
"seconds": 0
],
"timestampValue": ""
]
]]]
],
"value": ""
]
]] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/:name:hybridInspect")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
dlp.projects.locations.jobTriggers.list
{{baseUrl}}/v2/:parent/jobTriggers
QUERY PARAMS
parent
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/:parent/jobTriggers");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v2/:parent/jobTriggers")
require "http/client"
url = "{{baseUrl}}/v2/:parent/jobTriggers"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/v2/:parent/jobTriggers"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/:parent/jobTriggers");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/:parent/jobTriggers"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/v2/:parent/jobTriggers HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v2/:parent/jobTriggers")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/:parent/jobTriggers"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/v2/:parent/jobTriggers")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v2/:parent/jobTriggers")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/v2/:parent/jobTriggers');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/v2/:parent/jobTriggers'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/:parent/jobTriggers';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v2/:parent/jobTriggers',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v2/:parent/jobTriggers")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v2/:parent/jobTriggers',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'GET', url: '{{baseUrl}}/v2/:parent/jobTriggers'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v2/:parent/jobTriggers');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'GET', url: '{{baseUrl}}/v2/:parent/jobTriggers'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/:parent/jobTriggers';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v2/:parent/jobTriggers"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v2/:parent/jobTriggers" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/:parent/jobTriggers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/v2/:parent/jobTriggers');
echo $response->getBody();
setUrl('{{baseUrl}}/v2/:parent/jobTriggers');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v2/:parent/jobTriggers');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v2/:parent/jobTriggers' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/:parent/jobTriggers' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v2/:parent/jobTriggers")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/:parent/jobTriggers"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/:parent/jobTriggers"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/:parent/jobTriggers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/v2/:parent/jobTriggers') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v2/:parent/jobTriggers";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/v2/:parent/jobTriggers
http GET {{baseUrl}}/v2/:parent/jobTriggers
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v2/:parent/jobTriggers
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/:parent/jobTriggers")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
dlp.projects.storedInfoTypes.create
{{baseUrl}}/v2/:parent/storedInfoTypes
QUERY PARAMS
parent
BODY json
{
"config": {
"description": "",
"dictionary": {
"cloudStoragePath": {
"path": ""
},
"wordList": {
"words": []
}
},
"displayName": "",
"largeCustomDictionary": {
"bigQueryField": {
"field": {
"name": ""
},
"table": {
"datasetId": "",
"projectId": "",
"tableId": ""
}
},
"cloudStorageFileSet": {
"url": ""
},
"outputPath": {}
},
"regex": {
"groupIndexes": [],
"pattern": ""
}
},
"locationId": "",
"storedInfoTypeId": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/:parent/storedInfoTypes");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"config\": {\n \"description\": \"\",\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {\n \"words\": []\n }\n },\n \"displayName\": \"\",\n \"largeCustomDictionary\": {\n \"bigQueryField\": {\n \"field\": {\n \"name\": \"\"\n },\n \"table\": {\n \"datasetId\": \"\",\n \"projectId\": \"\",\n \"tableId\": \"\"\n }\n },\n \"cloudStorageFileSet\": {\n \"url\": \"\"\n },\n \"outputPath\": {}\n },\n \"regex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n }\n },\n \"locationId\": \"\",\n \"storedInfoTypeId\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v2/:parent/storedInfoTypes" {:content-type :json
:form-params {:config {:description ""
:dictionary {:cloudStoragePath {:path ""}
:wordList {:words []}}
:displayName ""
:largeCustomDictionary {:bigQueryField {:field {:name ""}
:table {:datasetId ""
:projectId ""
:tableId ""}}
:cloudStorageFileSet {:url ""}
:outputPath {}}
:regex {:groupIndexes []
:pattern ""}}
:locationId ""
:storedInfoTypeId ""}})
require "http/client"
url = "{{baseUrl}}/v2/:parent/storedInfoTypes"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"config\": {\n \"description\": \"\",\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {\n \"words\": []\n }\n },\n \"displayName\": \"\",\n \"largeCustomDictionary\": {\n \"bigQueryField\": {\n \"field\": {\n \"name\": \"\"\n },\n \"table\": {\n \"datasetId\": \"\",\n \"projectId\": \"\",\n \"tableId\": \"\"\n }\n },\n \"cloudStorageFileSet\": {\n \"url\": \"\"\n },\n \"outputPath\": {}\n },\n \"regex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n }\n },\n \"locationId\": \"\",\n \"storedInfoTypeId\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/v2/:parent/storedInfoTypes"),
Content = new StringContent("{\n \"config\": {\n \"description\": \"\",\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {\n \"words\": []\n }\n },\n \"displayName\": \"\",\n \"largeCustomDictionary\": {\n \"bigQueryField\": {\n \"field\": {\n \"name\": \"\"\n },\n \"table\": {\n \"datasetId\": \"\",\n \"projectId\": \"\",\n \"tableId\": \"\"\n }\n },\n \"cloudStorageFileSet\": {\n \"url\": \"\"\n },\n \"outputPath\": {}\n },\n \"regex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n }\n },\n \"locationId\": \"\",\n \"storedInfoTypeId\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/:parent/storedInfoTypes");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"config\": {\n \"description\": \"\",\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {\n \"words\": []\n }\n },\n \"displayName\": \"\",\n \"largeCustomDictionary\": {\n \"bigQueryField\": {\n \"field\": {\n \"name\": \"\"\n },\n \"table\": {\n \"datasetId\": \"\",\n \"projectId\": \"\",\n \"tableId\": \"\"\n }\n },\n \"cloudStorageFileSet\": {\n \"url\": \"\"\n },\n \"outputPath\": {}\n },\n \"regex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n }\n },\n \"locationId\": \"\",\n \"storedInfoTypeId\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/:parent/storedInfoTypes"
payload := strings.NewReader("{\n \"config\": {\n \"description\": \"\",\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {\n \"words\": []\n }\n },\n \"displayName\": \"\",\n \"largeCustomDictionary\": {\n \"bigQueryField\": {\n \"field\": {\n \"name\": \"\"\n },\n \"table\": {\n \"datasetId\": \"\",\n \"projectId\": \"\",\n \"tableId\": \"\"\n }\n },\n \"cloudStorageFileSet\": {\n \"url\": \"\"\n },\n \"outputPath\": {}\n },\n \"regex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n }\n },\n \"locationId\": \"\",\n \"storedInfoTypeId\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/v2/:parent/storedInfoTypes HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 622
{
"config": {
"description": "",
"dictionary": {
"cloudStoragePath": {
"path": ""
},
"wordList": {
"words": []
}
},
"displayName": "",
"largeCustomDictionary": {
"bigQueryField": {
"field": {
"name": ""
},
"table": {
"datasetId": "",
"projectId": "",
"tableId": ""
}
},
"cloudStorageFileSet": {
"url": ""
},
"outputPath": {}
},
"regex": {
"groupIndexes": [],
"pattern": ""
}
},
"locationId": "",
"storedInfoTypeId": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v2/:parent/storedInfoTypes")
.setHeader("content-type", "application/json")
.setBody("{\n \"config\": {\n \"description\": \"\",\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {\n \"words\": []\n }\n },\n \"displayName\": \"\",\n \"largeCustomDictionary\": {\n \"bigQueryField\": {\n \"field\": {\n \"name\": \"\"\n },\n \"table\": {\n \"datasetId\": \"\",\n \"projectId\": \"\",\n \"tableId\": \"\"\n }\n },\n \"cloudStorageFileSet\": {\n \"url\": \"\"\n },\n \"outputPath\": {}\n },\n \"regex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n }\n },\n \"locationId\": \"\",\n \"storedInfoTypeId\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/:parent/storedInfoTypes"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"config\": {\n \"description\": \"\",\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {\n \"words\": []\n }\n },\n \"displayName\": \"\",\n \"largeCustomDictionary\": {\n \"bigQueryField\": {\n \"field\": {\n \"name\": \"\"\n },\n \"table\": {\n \"datasetId\": \"\",\n \"projectId\": \"\",\n \"tableId\": \"\"\n }\n },\n \"cloudStorageFileSet\": {\n \"url\": \"\"\n },\n \"outputPath\": {}\n },\n \"regex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n }\n },\n \"locationId\": \"\",\n \"storedInfoTypeId\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"config\": {\n \"description\": \"\",\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {\n \"words\": []\n }\n },\n \"displayName\": \"\",\n \"largeCustomDictionary\": {\n \"bigQueryField\": {\n \"field\": {\n \"name\": \"\"\n },\n \"table\": {\n \"datasetId\": \"\",\n \"projectId\": \"\",\n \"tableId\": \"\"\n }\n },\n \"cloudStorageFileSet\": {\n \"url\": \"\"\n },\n \"outputPath\": {}\n },\n \"regex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n }\n },\n \"locationId\": \"\",\n \"storedInfoTypeId\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v2/:parent/storedInfoTypes")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v2/:parent/storedInfoTypes")
.header("content-type", "application/json")
.body("{\n \"config\": {\n \"description\": \"\",\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {\n \"words\": []\n }\n },\n \"displayName\": \"\",\n \"largeCustomDictionary\": {\n \"bigQueryField\": {\n \"field\": {\n \"name\": \"\"\n },\n \"table\": {\n \"datasetId\": \"\",\n \"projectId\": \"\",\n \"tableId\": \"\"\n }\n },\n \"cloudStorageFileSet\": {\n \"url\": \"\"\n },\n \"outputPath\": {}\n },\n \"regex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n }\n },\n \"locationId\": \"\",\n \"storedInfoTypeId\": \"\"\n}")
.asString();
const data = JSON.stringify({
config: {
description: '',
dictionary: {
cloudStoragePath: {
path: ''
},
wordList: {
words: []
}
},
displayName: '',
largeCustomDictionary: {
bigQueryField: {
field: {
name: ''
},
table: {
datasetId: '',
projectId: '',
tableId: ''
}
},
cloudStorageFileSet: {
url: ''
},
outputPath: {}
},
regex: {
groupIndexes: [],
pattern: ''
}
},
locationId: '',
storedInfoTypeId: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v2/:parent/storedInfoTypes');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v2/:parent/storedInfoTypes',
headers: {'content-type': 'application/json'},
data: {
config: {
description: '',
dictionary: {cloudStoragePath: {path: ''}, wordList: {words: []}},
displayName: '',
largeCustomDictionary: {
bigQueryField: {field: {name: ''}, table: {datasetId: '', projectId: '', tableId: ''}},
cloudStorageFileSet: {url: ''},
outputPath: {}
},
regex: {groupIndexes: [], pattern: ''}
},
locationId: '',
storedInfoTypeId: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/:parent/storedInfoTypes';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"config":{"description":"","dictionary":{"cloudStoragePath":{"path":""},"wordList":{"words":[]}},"displayName":"","largeCustomDictionary":{"bigQueryField":{"field":{"name":""},"table":{"datasetId":"","projectId":"","tableId":""}},"cloudStorageFileSet":{"url":""},"outputPath":{}},"regex":{"groupIndexes":[],"pattern":""}},"locationId":"","storedInfoTypeId":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v2/:parent/storedInfoTypes',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "config": {\n "description": "",\n "dictionary": {\n "cloudStoragePath": {\n "path": ""\n },\n "wordList": {\n "words": []\n }\n },\n "displayName": "",\n "largeCustomDictionary": {\n "bigQueryField": {\n "field": {\n "name": ""\n },\n "table": {\n "datasetId": "",\n "projectId": "",\n "tableId": ""\n }\n },\n "cloudStorageFileSet": {\n "url": ""\n },\n "outputPath": {}\n },\n "regex": {\n "groupIndexes": [],\n "pattern": ""\n }\n },\n "locationId": "",\n "storedInfoTypeId": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"config\": {\n \"description\": \"\",\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {\n \"words\": []\n }\n },\n \"displayName\": \"\",\n \"largeCustomDictionary\": {\n \"bigQueryField\": {\n \"field\": {\n \"name\": \"\"\n },\n \"table\": {\n \"datasetId\": \"\",\n \"projectId\": \"\",\n \"tableId\": \"\"\n }\n },\n \"cloudStorageFileSet\": {\n \"url\": \"\"\n },\n \"outputPath\": {}\n },\n \"regex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n }\n },\n \"locationId\": \"\",\n \"storedInfoTypeId\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v2/:parent/storedInfoTypes")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/v2/:parent/storedInfoTypes',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
config: {
description: '',
dictionary: {cloudStoragePath: {path: ''}, wordList: {words: []}},
displayName: '',
largeCustomDictionary: {
bigQueryField: {field: {name: ''}, table: {datasetId: '', projectId: '', tableId: ''}},
cloudStorageFileSet: {url: ''},
outputPath: {}
},
regex: {groupIndexes: [], pattern: ''}
},
locationId: '',
storedInfoTypeId: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v2/:parent/storedInfoTypes',
headers: {'content-type': 'application/json'},
body: {
config: {
description: '',
dictionary: {cloudStoragePath: {path: ''}, wordList: {words: []}},
displayName: '',
largeCustomDictionary: {
bigQueryField: {field: {name: ''}, table: {datasetId: '', projectId: '', tableId: ''}},
cloudStorageFileSet: {url: ''},
outputPath: {}
},
regex: {groupIndexes: [], pattern: ''}
},
locationId: '',
storedInfoTypeId: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/v2/:parent/storedInfoTypes');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
config: {
description: '',
dictionary: {
cloudStoragePath: {
path: ''
},
wordList: {
words: []
}
},
displayName: '',
largeCustomDictionary: {
bigQueryField: {
field: {
name: ''
},
table: {
datasetId: '',
projectId: '',
tableId: ''
}
},
cloudStorageFileSet: {
url: ''
},
outputPath: {}
},
regex: {
groupIndexes: [],
pattern: ''
}
},
locationId: '',
storedInfoTypeId: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/v2/:parent/storedInfoTypes',
headers: {'content-type': 'application/json'},
data: {
config: {
description: '',
dictionary: {cloudStoragePath: {path: ''}, wordList: {words: []}},
displayName: '',
largeCustomDictionary: {
bigQueryField: {field: {name: ''}, table: {datasetId: '', projectId: '', tableId: ''}},
cloudStorageFileSet: {url: ''},
outputPath: {}
},
regex: {groupIndexes: [], pattern: ''}
},
locationId: '',
storedInfoTypeId: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/:parent/storedInfoTypes';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"config":{"description":"","dictionary":{"cloudStoragePath":{"path":""},"wordList":{"words":[]}},"displayName":"","largeCustomDictionary":{"bigQueryField":{"field":{"name":""},"table":{"datasetId":"","projectId":"","tableId":""}},"cloudStorageFileSet":{"url":""},"outputPath":{}},"regex":{"groupIndexes":[],"pattern":""}},"locationId":"","storedInfoTypeId":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"config": @{ @"description": @"", @"dictionary": @{ @"cloudStoragePath": @{ @"path": @"" }, @"wordList": @{ @"words": @[ ] } }, @"displayName": @"", @"largeCustomDictionary": @{ @"bigQueryField": @{ @"field": @{ @"name": @"" }, @"table": @{ @"datasetId": @"", @"projectId": @"", @"tableId": @"" } }, @"cloudStorageFileSet": @{ @"url": @"" }, @"outputPath": @{ } }, @"regex": @{ @"groupIndexes": @[ ], @"pattern": @"" } },
@"locationId": @"",
@"storedInfoTypeId": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v2/:parent/storedInfoTypes"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v2/:parent/storedInfoTypes" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"config\": {\n \"description\": \"\",\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {\n \"words\": []\n }\n },\n \"displayName\": \"\",\n \"largeCustomDictionary\": {\n \"bigQueryField\": {\n \"field\": {\n \"name\": \"\"\n },\n \"table\": {\n \"datasetId\": \"\",\n \"projectId\": \"\",\n \"tableId\": \"\"\n }\n },\n \"cloudStorageFileSet\": {\n \"url\": \"\"\n },\n \"outputPath\": {}\n },\n \"regex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n }\n },\n \"locationId\": \"\",\n \"storedInfoTypeId\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/:parent/storedInfoTypes",
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([
'config' => [
'description' => '',
'dictionary' => [
'cloudStoragePath' => [
'path' => ''
],
'wordList' => [
'words' => [
]
]
],
'displayName' => '',
'largeCustomDictionary' => [
'bigQueryField' => [
'field' => [
'name' => ''
],
'table' => [
'datasetId' => '',
'projectId' => '',
'tableId' => ''
]
],
'cloudStorageFileSet' => [
'url' => ''
],
'outputPath' => [
]
],
'regex' => [
'groupIndexes' => [
],
'pattern' => ''
]
],
'locationId' => '',
'storedInfoTypeId' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/v2/:parent/storedInfoTypes', [
'body' => '{
"config": {
"description": "",
"dictionary": {
"cloudStoragePath": {
"path": ""
},
"wordList": {
"words": []
}
},
"displayName": "",
"largeCustomDictionary": {
"bigQueryField": {
"field": {
"name": ""
},
"table": {
"datasetId": "",
"projectId": "",
"tableId": ""
}
},
"cloudStorageFileSet": {
"url": ""
},
"outputPath": {}
},
"regex": {
"groupIndexes": [],
"pattern": ""
}
},
"locationId": "",
"storedInfoTypeId": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v2/:parent/storedInfoTypes');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'config' => [
'description' => '',
'dictionary' => [
'cloudStoragePath' => [
'path' => ''
],
'wordList' => [
'words' => [
]
]
],
'displayName' => '',
'largeCustomDictionary' => [
'bigQueryField' => [
'field' => [
'name' => ''
],
'table' => [
'datasetId' => '',
'projectId' => '',
'tableId' => ''
]
],
'cloudStorageFileSet' => [
'url' => ''
],
'outputPath' => [
]
],
'regex' => [
'groupIndexes' => [
],
'pattern' => ''
]
],
'locationId' => '',
'storedInfoTypeId' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'config' => [
'description' => '',
'dictionary' => [
'cloudStoragePath' => [
'path' => ''
],
'wordList' => [
'words' => [
]
]
],
'displayName' => '',
'largeCustomDictionary' => [
'bigQueryField' => [
'field' => [
'name' => ''
],
'table' => [
'datasetId' => '',
'projectId' => '',
'tableId' => ''
]
],
'cloudStorageFileSet' => [
'url' => ''
],
'outputPath' => [
]
],
'regex' => [
'groupIndexes' => [
],
'pattern' => ''
]
],
'locationId' => '',
'storedInfoTypeId' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v2/:parent/storedInfoTypes');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v2/:parent/storedInfoTypes' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"config": {
"description": "",
"dictionary": {
"cloudStoragePath": {
"path": ""
},
"wordList": {
"words": []
}
},
"displayName": "",
"largeCustomDictionary": {
"bigQueryField": {
"field": {
"name": ""
},
"table": {
"datasetId": "",
"projectId": "",
"tableId": ""
}
},
"cloudStorageFileSet": {
"url": ""
},
"outputPath": {}
},
"regex": {
"groupIndexes": [],
"pattern": ""
}
},
"locationId": "",
"storedInfoTypeId": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/:parent/storedInfoTypes' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"config": {
"description": "",
"dictionary": {
"cloudStoragePath": {
"path": ""
},
"wordList": {
"words": []
}
},
"displayName": "",
"largeCustomDictionary": {
"bigQueryField": {
"field": {
"name": ""
},
"table": {
"datasetId": "",
"projectId": "",
"tableId": ""
}
},
"cloudStorageFileSet": {
"url": ""
},
"outputPath": {}
},
"regex": {
"groupIndexes": [],
"pattern": ""
}
},
"locationId": "",
"storedInfoTypeId": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"config\": {\n \"description\": \"\",\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {\n \"words\": []\n }\n },\n \"displayName\": \"\",\n \"largeCustomDictionary\": {\n \"bigQueryField\": {\n \"field\": {\n \"name\": \"\"\n },\n \"table\": {\n \"datasetId\": \"\",\n \"projectId\": \"\",\n \"tableId\": \"\"\n }\n },\n \"cloudStorageFileSet\": {\n \"url\": \"\"\n },\n \"outputPath\": {}\n },\n \"regex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n }\n },\n \"locationId\": \"\",\n \"storedInfoTypeId\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v2/:parent/storedInfoTypes", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/:parent/storedInfoTypes"
payload = {
"config": {
"description": "",
"dictionary": {
"cloudStoragePath": { "path": "" },
"wordList": { "words": [] }
},
"displayName": "",
"largeCustomDictionary": {
"bigQueryField": {
"field": { "name": "" },
"table": {
"datasetId": "",
"projectId": "",
"tableId": ""
}
},
"cloudStorageFileSet": { "url": "" },
"outputPath": {}
},
"regex": {
"groupIndexes": [],
"pattern": ""
}
},
"locationId": "",
"storedInfoTypeId": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/:parent/storedInfoTypes"
payload <- "{\n \"config\": {\n \"description\": \"\",\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {\n \"words\": []\n }\n },\n \"displayName\": \"\",\n \"largeCustomDictionary\": {\n \"bigQueryField\": {\n \"field\": {\n \"name\": \"\"\n },\n \"table\": {\n \"datasetId\": \"\",\n \"projectId\": \"\",\n \"tableId\": \"\"\n }\n },\n \"cloudStorageFileSet\": {\n \"url\": \"\"\n },\n \"outputPath\": {}\n },\n \"regex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n }\n },\n \"locationId\": \"\",\n \"storedInfoTypeId\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/:parent/storedInfoTypes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"config\": {\n \"description\": \"\",\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {\n \"words\": []\n }\n },\n \"displayName\": \"\",\n \"largeCustomDictionary\": {\n \"bigQueryField\": {\n \"field\": {\n \"name\": \"\"\n },\n \"table\": {\n \"datasetId\": \"\",\n \"projectId\": \"\",\n \"tableId\": \"\"\n }\n },\n \"cloudStorageFileSet\": {\n \"url\": \"\"\n },\n \"outputPath\": {}\n },\n \"regex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n }\n },\n \"locationId\": \"\",\n \"storedInfoTypeId\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/v2/:parent/storedInfoTypes') do |req|
req.body = "{\n \"config\": {\n \"description\": \"\",\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {\n \"words\": []\n }\n },\n \"displayName\": \"\",\n \"largeCustomDictionary\": {\n \"bigQueryField\": {\n \"field\": {\n \"name\": \"\"\n },\n \"table\": {\n \"datasetId\": \"\",\n \"projectId\": \"\",\n \"tableId\": \"\"\n }\n },\n \"cloudStorageFileSet\": {\n \"url\": \"\"\n },\n \"outputPath\": {}\n },\n \"regex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n }\n },\n \"locationId\": \"\",\n \"storedInfoTypeId\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v2/:parent/storedInfoTypes";
let payload = json!({
"config": json!({
"description": "",
"dictionary": json!({
"cloudStoragePath": json!({"path": ""}),
"wordList": json!({"words": ()})
}),
"displayName": "",
"largeCustomDictionary": json!({
"bigQueryField": json!({
"field": json!({"name": ""}),
"table": json!({
"datasetId": "",
"projectId": "",
"tableId": ""
})
}),
"cloudStorageFileSet": json!({"url": ""}),
"outputPath": json!({})
}),
"regex": json!({
"groupIndexes": (),
"pattern": ""
})
}),
"locationId": "",
"storedInfoTypeId": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/v2/:parent/storedInfoTypes \
--header 'content-type: application/json' \
--data '{
"config": {
"description": "",
"dictionary": {
"cloudStoragePath": {
"path": ""
},
"wordList": {
"words": []
}
},
"displayName": "",
"largeCustomDictionary": {
"bigQueryField": {
"field": {
"name": ""
},
"table": {
"datasetId": "",
"projectId": "",
"tableId": ""
}
},
"cloudStorageFileSet": {
"url": ""
},
"outputPath": {}
},
"regex": {
"groupIndexes": [],
"pattern": ""
}
},
"locationId": "",
"storedInfoTypeId": ""
}'
echo '{
"config": {
"description": "",
"dictionary": {
"cloudStoragePath": {
"path": ""
},
"wordList": {
"words": []
}
},
"displayName": "",
"largeCustomDictionary": {
"bigQueryField": {
"field": {
"name": ""
},
"table": {
"datasetId": "",
"projectId": "",
"tableId": ""
}
},
"cloudStorageFileSet": {
"url": ""
},
"outputPath": {}
},
"regex": {
"groupIndexes": [],
"pattern": ""
}
},
"locationId": "",
"storedInfoTypeId": ""
}' | \
http POST {{baseUrl}}/v2/:parent/storedInfoTypes \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "config": {\n "description": "",\n "dictionary": {\n "cloudStoragePath": {\n "path": ""\n },\n "wordList": {\n "words": []\n }\n },\n "displayName": "",\n "largeCustomDictionary": {\n "bigQueryField": {\n "field": {\n "name": ""\n },\n "table": {\n "datasetId": "",\n "projectId": "",\n "tableId": ""\n }\n },\n "cloudStorageFileSet": {\n "url": ""\n },\n "outputPath": {}\n },\n "regex": {\n "groupIndexes": [],\n "pattern": ""\n }\n },\n "locationId": "",\n "storedInfoTypeId": ""\n}' \
--output-document \
- {{baseUrl}}/v2/:parent/storedInfoTypes
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"config": [
"description": "",
"dictionary": [
"cloudStoragePath": ["path": ""],
"wordList": ["words": []]
],
"displayName": "",
"largeCustomDictionary": [
"bigQueryField": [
"field": ["name": ""],
"table": [
"datasetId": "",
"projectId": "",
"tableId": ""
]
],
"cloudStorageFileSet": ["url": ""],
"outputPath": []
],
"regex": [
"groupIndexes": [],
"pattern": ""
]
],
"locationId": "",
"storedInfoTypeId": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/:parent/storedInfoTypes")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
DELETE
dlp.projects.storedInfoTypes.delete
{{baseUrl}}/v2/:name
QUERY PARAMS
name
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/:name");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/v2/:name")
require "http/client"
url = "{{baseUrl}}/v2/:name"
response = HTTP::Client.delete url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Delete,
RequestUri = new Uri("{{baseUrl}}/v2/:name"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/:name");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/:name"
req, _ := http.NewRequest("DELETE", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
DELETE /baseUrl/v2/:name HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/v2/:name")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/:name"))
.method("DELETE", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/v2/:name")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/v2/:name")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('DELETE', '{{baseUrl}}/v2/:name');
xhr.send(data);
import axios from 'axios';
const options = {method: 'DELETE', url: '{{baseUrl}}/v2/:name'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/:name';
const options = {method: 'DELETE'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v2/:name',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v2/:name")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/v2/:name',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'DELETE', url: '{{baseUrl}}/v2/:name'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/v2/:name');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'DELETE', url: '{{baseUrl}}/v2/:name'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/:name';
const options = {method: 'DELETE'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v2/:name"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v2/:name" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/:name",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('DELETE', '{{baseUrl}}/v2/:name');
echo $response->getBody();
setUrl('{{baseUrl}}/v2/:name');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v2/:name');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v2/:name' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/:name' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/v2/:name")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/:name"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/:name"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/:name")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.delete('/baseUrl/v2/:name') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v2/:name";
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("DELETE").unwrap(), url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request DELETE \
--url {{baseUrl}}/v2/:name
http DELETE {{baseUrl}}/v2/:name
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/v2/:name
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/:name")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
dlp.projects.storedInfoTypes.get
{{baseUrl}}/v2/:name
QUERY PARAMS
name
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/:name");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v2/:name")
require "http/client"
url = "{{baseUrl}}/v2/:name"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/v2/:name"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/:name");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/:name"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/v2/:name HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v2/:name")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/:name"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/v2/:name")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v2/:name")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/v2/:name');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/v2/:name'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/:name';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v2/:name',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v2/:name")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v2/:name',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'GET', url: '{{baseUrl}}/v2/:name'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v2/:name');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'GET', url: '{{baseUrl}}/v2/:name'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/:name';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v2/:name"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v2/:name" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/:name",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/v2/:name');
echo $response->getBody();
setUrl('{{baseUrl}}/v2/:name');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v2/:name');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v2/:name' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/:name' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v2/:name")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/:name"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/:name"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/:name")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/v2/:name') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v2/:name";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/v2/:name
http GET {{baseUrl}}/v2/:name
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v2/:name
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/:name")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
dlp.projects.storedInfoTypes.list
{{baseUrl}}/v2/:parent/storedInfoTypes
QUERY PARAMS
parent
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/:parent/storedInfoTypes");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v2/:parent/storedInfoTypes")
require "http/client"
url = "{{baseUrl}}/v2/:parent/storedInfoTypes"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/v2/:parent/storedInfoTypes"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/:parent/storedInfoTypes");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/:parent/storedInfoTypes"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/v2/:parent/storedInfoTypes HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v2/:parent/storedInfoTypes")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/:parent/storedInfoTypes"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/v2/:parent/storedInfoTypes")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v2/:parent/storedInfoTypes")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/v2/:parent/storedInfoTypes');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/v2/:parent/storedInfoTypes'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/:parent/storedInfoTypes';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v2/:parent/storedInfoTypes',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v2/:parent/storedInfoTypes")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v2/:parent/storedInfoTypes',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'GET', url: '{{baseUrl}}/v2/:parent/storedInfoTypes'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v2/:parent/storedInfoTypes');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'GET', url: '{{baseUrl}}/v2/:parent/storedInfoTypes'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/:parent/storedInfoTypes';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v2/:parent/storedInfoTypes"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v2/:parent/storedInfoTypes" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/:parent/storedInfoTypes",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/v2/:parent/storedInfoTypes');
echo $response->getBody();
setUrl('{{baseUrl}}/v2/:parent/storedInfoTypes');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v2/:parent/storedInfoTypes');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v2/:parent/storedInfoTypes' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/:parent/storedInfoTypes' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v2/:parent/storedInfoTypes")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/:parent/storedInfoTypes"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/:parent/storedInfoTypes"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/:parent/storedInfoTypes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/v2/:parent/storedInfoTypes') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v2/:parent/storedInfoTypes";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/v2/:parent/storedInfoTypes
http GET {{baseUrl}}/v2/:parent/storedInfoTypes
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v2/:parent/storedInfoTypes
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/:parent/storedInfoTypes")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PATCH
dlp.projects.storedInfoTypes.patch
{{baseUrl}}/v2/:name
QUERY PARAMS
name
BODY json
{
"config": {
"description": "",
"dictionary": {
"cloudStoragePath": {
"path": ""
},
"wordList": {
"words": []
}
},
"displayName": "",
"largeCustomDictionary": {
"bigQueryField": {
"field": {
"name": ""
},
"table": {
"datasetId": "",
"projectId": "",
"tableId": ""
}
},
"cloudStorageFileSet": {
"url": ""
},
"outputPath": {}
},
"regex": {
"groupIndexes": [],
"pattern": ""
}
},
"updateMask": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/:name");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"config\": {\n \"description\": \"\",\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {\n \"words\": []\n }\n },\n \"displayName\": \"\",\n \"largeCustomDictionary\": {\n \"bigQueryField\": {\n \"field\": {\n \"name\": \"\"\n },\n \"table\": {\n \"datasetId\": \"\",\n \"projectId\": \"\",\n \"tableId\": \"\"\n }\n },\n \"cloudStorageFileSet\": {\n \"url\": \"\"\n },\n \"outputPath\": {}\n },\n \"regex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n }\n },\n \"updateMask\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/v2/:name" {:content-type :json
:form-params {:config {:description ""
:dictionary {:cloudStoragePath {:path ""}
:wordList {:words []}}
:displayName ""
:largeCustomDictionary {:bigQueryField {:field {:name ""}
:table {:datasetId ""
:projectId ""
:tableId ""}}
:cloudStorageFileSet {:url ""}
:outputPath {}}
:regex {:groupIndexes []
:pattern ""}}
:updateMask ""}})
require "http/client"
url = "{{baseUrl}}/v2/:name"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"config\": {\n \"description\": \"\",\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {\n \"words\": []\n }\n },\n \"displayName\": \"\",\n \"largeCustomDictionary\": {\n \"bigQueryField\": {\n \"field\": {\n \"name\": \"\"\n },\n \"table\": {\n \"datasetId\": \"\",\n \"projectId\": \"\",\n \"tableId\": \"\"\n }\n },\n \"cloudStorageFileSet\": {\n \"url\": \"\"\n },\n \"outputPath\": {}\n },\n \"regex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n }\n },\n \"updateMask\": \"\"\n}"
response = HTTP::Client.patch url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Patch,
RequestUri = new Uri("{{baseUrl}}/v2/:name"),
Content = new StringContent("{\n \"config\": {\n \"description\": \"\",\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {\n \"words\": []\n }\n },\n \"displayName\": \"\",\n \"largeCustomDictionary\": {\n \"bigQueryField\": {\n \"field\": {\n \"name\": \"\"\n },\n \"table\": {\n \"datasetId\": \"\",\n \"projectId\": \"\",\n \"tableId\": \"\"\n }\n },\n \"cloudStorageFileSet\": {\n \"url\": \"\"\n },\n \"outputPath\": {}\n },\n \"regex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n }\n },\n \"updateMask\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/:name");
var request = new RestRequest("", Method.Patch);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"config\": {\n \"description\": \"\",\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {\n \"words\": []\n }\n },\n \"displayName\": \"\",\n \"largeCustomDictionary\": {\n \"bigQueryField\": {\n \"field\": {\n \"name\": \"\"\n },\n \"table\": {\n \"datasetId\": \"\",\n \"projectId\": \"\",\n \"tableId\": \"\"\n }\n },\n \"cloudStorageFileSet\": {\n \"url\": \"\"\n },\n \"outputPath\": {}\n },\n \"regex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n }\n },\n \"updateMask\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/:name"
payload := strings.NewReader("{\n \"config\": {\n \"description\": \"\",\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {\n \"words\": []\n }\n },\n \"displayName\": \"\",\n \"largeCustomDictionary\": {\n \"bigQueryField\": {\n \"field\": {\n \"name\": \"\"\n },\n \"table\": {\n \"datasetId\": \"\",\n \"projectId\": \"\",\n \"tableId\": \"\"\n }\n },\n \"cloudStorageFileSet\": {\n \"url\": \"\"\n },\n \"outputPath\": {}\n },\n \"regex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n }\n },\n \"updateMask\": \"\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PATCH /baseUrl/v2/:name HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 596
{
"config": {
"description": "",
"dictionary": {
"cloudStoragePath": {
"path": ""
},
"wordList": {
"words": []
}
},
"displayName": "",
"largeCustomDictionary": {
"bigQueryField": {
"field": {
"name": ""
},
"table": {
"datasetId": "",
"projectId": "",
"tableId": ""
}
},
"cloudStorageFileSet": {
"url": ""
},
"outputPath": {}
},
"regex": {
"groupIndexes": [],
"pattern": ""
}
},
"updateMask": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/v2/:name")
.setHeader("content-type", "application/json")
.setBody("{\n \"config\": {\n \"description\": \"\",\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {\n \"words\": []\n }\n },\n \"displayName\": \"\",\n \"largeCustomDictionary\": {\n \"bigQueryField\": {\n \"field\": {\n \"name\": \"\"\n },\n \"table\": {\n \"datasetId\": \"\",\n \"projectId\": \"\",\n \"tableId\": \"\"\n }\n },\n \"cloudStorageFileSet\": {\n \"url\": \"\"\n },\n \"outputPath\": {}\n },\n \"regex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n }\n },\n \"updateMask\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/:name"))
.header("content-type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("{\n \"config\": {\n \"description\": \"\",\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {\n \"words\": []\n }\n },\n \"displayName\": \"\",\n \"largeCustomDictionary\": {\n \"bigQueryField\": {\n \"field\": {\n \"name\": \"\"\n },\n \"table\": {\n \"datasetId\": \"\",\n \"projectId\": \"\",\n \"tableId\": \"\"\n }\n },\n \"cloudStorageFileSet\": {\n \"url\": \"\"\n },\n \"outputPath\": {}\n },\n \"regex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n }\n },\n \"updateMask\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"config\": {\n \"description\": \"\",\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {\n \"words\": []\n }\n },\n \"displayName\": \"\",\n \"largeCustomDictionary\": {\n \"bigQueryField\": {\n \"field\": {\n \"name\": \"\"\n },\n \"table\": {\n \"datasetId\": \"\",\n \"projectId\": \"\",\n \"tableId\": \"\"\n }\n },\n \"cloudStorageFileSet\": {\n \"url\": \"\"\n },\n \"outputPath\": {}\n },\n \"regex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n }\n },\n \"updateMask\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v2/:name")
.patch(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/v2/:name")
.header("content-type", "application/json")
.body("{\n \"config\": {\n \"description\": \"\",\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {\n \"words\": []\n }\n },\n \"displayName\": \"\",\n \"largeCustomDictionary\": {\n \"bigQueryField\": {\n \"field\": {\n \"name\": \"\"\n },\n \"table\": {\n \"datasetId\": \"\",\n \"projectId\": \"\",\n \"tableId\": \"\"\n }\n },\n \"cloudStorageFileSet\": {\n \"url\": \"\"\n },\n \"outputPath\": {}\n },\n \"regex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n }\n },\n \"updateMask\": \"\"\n}")
.asString();
const data = JSON.stringify({
config: {
description: '',
dictionary: {
cloudStoragePath: {
path: ''
},
wordList: {
words: []
}
},
displayName: '',
largeCustomDictionary: {
bigQueryField: {
field: {
name: ''
},
table: {
datasetId: '',
projectId: '',
tableId: ''
}
},
cloudStorageFileSet: {
url: ''
},
outputPath: {}
},
regex: {
groupIndexes: [],
pattern: ''
}
},
updateMask: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PATCH', '{{baseUrl}}/v2/:name');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PATCH',
url: '{{baseUrl}}/v2/:name',
headers: {'content-type': 'application/json'},
data: {
config: {
description: '',
dictionary: {cloudStoragePath: {path: ''}, wordList: {words: []}},
displayName: '',
largeCustomDictionary: {
bigQueryField: {field: {name: ''}, table: {datasetId: '', projectId: '', tableId: ''}},
cloudStorageFileSet: {url: ''},
outputPath: {}
},
regex: {groupIndexes: [], pattern: ''}
},
updateMask: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/:name';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"config":{"description":"","dictionary":{"cloudStoragePath":{"path":""},"wordList":{"words":[]}},"displayName":"","largeCustomDictionary":{"bigQueryField":{"field":{"name":""},"table":{"datasetId":"","projectId":"","tableId":""}},"cloudStorageFileSet":{"url":""},"outputPath":{}},"regex":{"groupIndexes":[],"pattern":""}},"updateMask":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v2/:name',
method: 'PATCH',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "config": {\n "description": "",\n "dictionary": {\n "cloudStoragePath": {\n "path": ""\n },\n "wordList": {\n "words": []\n }\n },\n "displayName": "",\n "largeCustomDictionary": {\n "bigQueryField": {\n "field": {\n "name": ""\n },\n "table": {\n "datasetId": "",\n "projectId": "",\n "tableId": ""\n }\n },\n "cloudStorageFileSet": {\n "url": ""\n },\n "outputPath": {}\n },\n "regex": {\n "groupIndexes": [],\n "pattern": ""\n }\n },\n "updateMask": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"config\": {\n \"description\": \"\",\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {\n \"words\": []\n }\n },\n \"displayName\": \"\",\n \"largeCustomDictionary\": {\n \"bigQueryField\": {\n \"field\": {\n \"name\": \"\"\n },\n \"table\": {\n \"datasetId\": \"\",\n \"projectId\": \"\",\n \"tableId\": \"\"\n }\n },\n \"cloudStorageFileSet\": {\n \"url\": \"\"\n },\n \"outputPath\": {}\n },\n \"regex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n }\n },\n \"updateMask\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v2/:name")
.patch(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PATCH',
hostname: 'example.com',
port: null,
path: '/baseUrl/v2/:name',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
config: {
description: '',
dictionary: {cloudStoragePath: {path: ''}, wordList: {words: []}},
displayName: '',
largeCustomDictionary: {
bigQueryField: {field: {name: ''}, table: {datasetId: '', projectId: '', tableId: ''}},
cloudStorageFileSet: {url: ''},
outputPath: {}
},
regex: {groupIndexes: [], pattern: ''}
},
updateMask: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PATCH',
url: '{{baseUrl}}/v2/:name',
headers: {'content-type': 'application/json'},
body: {
config: {
description: '',
dictionary: {cloudStoragePath: {path: ''}, wordList: {words: []}},
displayName: '',
largeCustomDictionary: {
bigQueryField: {field: {name: ''}, table: {datasetId: '', projectId: '', tableId: ''}},
cloudStorageFileSet: {url: ''},
outputPath: {}
},
regex: {groupIndexes: [], pattern: ''}
},
updateMask: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PATCH', '{{baseUrl}}/v2/:name');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
config: {
description: '',
dictionary: {
cloudStoragePath: {
path: ''
},
wordList: {
words: []
}
},
displayName: '',
largeCustomDictionary: {
bigQueryField: {
field: {
name: ''
},
table: {
datasetId: '',
projectId: '',
tableId: ''
}
},
cloudStorageFileSet: {
url: ''
},
outputPath: {}
},
regex: {
groupIndexes: [],
pattern: ''
}
},
updateMask: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PATCH',
url: '{{baseUrl}}/v2/:name',
headers: {'content-type': 'application/json'},
data: {
config: {
description: '',
dictionary: {cloudStoragePath: {path: ''}, wordList: {words: []}},
displayName: '',
largeCustomDictionary: {
bigQueryField: {field: {name: ''}, table: {datasetId: '', projectId: '', tableId: ''}},
cloudStorageFileSet: {url: ''},
outputPath: {}
},
regex: {groupIndexes: [], pattern: ''}
},
updateMask: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/:name';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"config":{"description":"","dictionary":{"cloudStoragePath":{"path":""},"wordList":{"words":[]}},"displayName":"","largeCustomDictionary":{"bigQueryField":{"field":{"name":""},"table":{"datasetId":"","projectId":"","tableId":""}},"cloudStorageFileSet":{"url":""},"outputPath":{}},"regex":{"groupIndexes":[],"pattern":""}},"updateMask":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"config": @{ @"description": @"", @"dictionary": @{ @"cloudStoragePath": @{ @"path": @"" }, @"wordList": @{ @"words": @[ ] } }, @"displayName": @"", @"largeCustomDictionary": @{ @"bigQueryField": @{ @"field": @{ @"name": @"" }, @"table": @{ @"datasetId": @"", @"projectId": @"", @"tableId": @"" } }, @"cloudStorageFileSet": @{ @"url": @"" }, @"outputPath": @{ } }, @"regex": @{ @"groupIndexes": @[ ], @"pattern": @"" } },
@"updateMask": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v2/:name"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PATCH"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v2/:name" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"config\": {\n \"description\": \"\",\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {\n \"words\": []\n }\n },\n \"displayName\": \"\",\n \"largeCustomDictionary\": {\n \"bigQueryField\": {\n \"field\": {\n \"name\": \"\"\n },\n \"table\": {\n \"datasetId\": \"\",\n \"projectId\": \"\",\n \"tableId\": \"\"\n }\n },\n \"cloudStorageFileSet\": {\n \"url\": \"\"\n },\n \"outputPath\": {}\n },\n \"regex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n }\n },\n \"updateMask\": \"\"\n}" in
Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/:name",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'config' => [
'description' => '',
'dictionary' => [
'cloudStoragePath' => [
'path' => ''
],
'wordList' => [
'words' => [
]
]
],
'displayName' => '',
'largeCustomDictionary' => [
'bigQueryField' => [
'field' => [
'name' => ''
],
'table' => [
'datasetId' => '',
'projectId' => '',
'tableId' => ''
]
],
'cloudStorageFileSet' => [
'url' => ''
],
'outputPath' => [
]
],
'regex' => [
'groupIndexes' => [
],
'pattern' => ''
]
],
'updateMask' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PATCH', '{{baseUrl}}/v2/:name', [
'body' => '{
"config": {
"description": "",
"dictionary": {
"cloudStoragePath": {
"path": ""
},
"wordList": {
"words": []
}
},
"displayName": "",
"largeCustomDictionary": {
"bigQueryField": {
"field": {
"name": ""
},
"table": {
"datasetId": "",
"projectId": "",
"tableId": ""
}
},
"cloudStorageFileSet": {
"url": ""
},
"outputPath": {}
},
"regex": {
"groupIndexes": [],
"pattern": ""
}
},
"updateMask": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v2/:name');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'config' => [
'description' => '',
'dictionary' => [
'cloudStoragePath' => [
'path' => ''
],
'wordList' => [
'words' => [
]
]
],
'displayName' => '',
'largeCustomDictionary' => [
'bigQueryField' => [
'field' => [
'name' => ''
],
'table' => [
'datasetId' => '',
'projectId' => '',
'tableId' => ''
]
],
'cloudStorageFileSet' => [
'url' => ''
],
'outputPath' => [
]
],
'regex' => [
'groupIndexes' => [
],
'pattern' => ''
]
],
'updateMask' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'config' => [
'description' => '',
'dictionary' => [
'cloudStoragePath' => [
'path' => ''
],
'wordList' => [
'words' => [
]
]
],
'displayName' => '',
'largeCustomDictionary' => [
'bigQueryField' => [
'field' => [
'name' => ''
],
'table' => [
'datasetId' => '',
'projectId' => '',
'tableId' => ''
]
],
'cloudStorageFileSet' => [
'url' => ''
],
'outputPath' => [
]
],
'regex' => [
'groupIndexes' => [
],
'pattern' => ''
]
],
'updateMask' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v2/:name');
$request->setRequestMethod('PATCH');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v2/:name' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"config": {
"description": "",
"dictionary": {
"cloudStoragePath": {
"path": ""
},
"wordList": {
"words": []
}
},
"displayName": "",
"largeCustomDictionary": {
"bigQueryField": {
"field": {
"name": ""
},
"table": {
"datasetId": "",
"projectId": "",
"tableId": ""
}
},
"cloudStorageFileSet": {
"url": ""
},
"outputPath": {}
},
"regex": {
"groupIndexes": [],
"pattern": ""
}
},
"updateMask": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/:name' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"config": {
"description": "",
"dictionary": {
"cloudStoragePath": {
"path": ""
},
"wordList": {
"words": []
}
},
"displayName": "",
"largeCustomDictionary": {
"bigQueryField": {
"field": {
"name": ""
},
"table": {
"datasetId": "",
"projectId": "",
"tableId": ""
}
},
"cloudStorageFileSet": {
"url": ""
},
"outputPath": {}
},
"regex": {
"groupIndexes": [],
"pattern": ""
}
},
"updateMask": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"config\": {\n \"description\": \"\",\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {\n \"words\": []\n }\n },\n \"displayName\": \"\",\n \"largeCustomDictionary\": {\n \"bigQueryField\": {\n \"field\": {\n \"name\": \"\"\n },\n \"table\": {\n \"datasetId\": \"\",\n \"projectId\": \"\",\n \"tableId\": \"\"\n }\n },\n \"cloudStorageFileSet\": {\n \"url\": \"\"\n },\n \"outputPath\": {}\n },\n \"regex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n }\n },\n \"updateMask\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("PATCH", "/baseUrl/v2/:name", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/:name"
payload = {
"config": {
"description": "",
"dictionary": {
"cloudStoragePath": { "path": "" },
"wordList": { "words": [] }
},
"displayName": "",
"largeCustomDictionary": {
"bigQueryField": {
"field": { "name": "" },
"table": {
"datasetId": "",
"projectId": "",
"tableId": ""
}
},
"cloudStorageFileSet": { "url": "" },
"outputPath": {}
},
"regex": {
"groupIndexes": [],
"pattern": ""
}
},
"updateMask": ""
}
headers = {"content-type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/:name"
payload <- "{\n \"config\": {\n \"description\": \"\",\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {\n \"words\": []\n }\n },\n \"displayName\": \"\",\n \"largeCustomDictionary\": {\n \"bigQueryField\": {\n \"field\": {\n \"name\": \"\"\n },\n \"table\": {\n \"datasetId\": \"\",\n \"projectId\": \"\",\n \"tableId\": \"\"\n }\n },\n \"cloudStorageFileSet\": {\n \"url\": \"\"\n },\n \"outputPath\": {}\n },\n \"regex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n }\n },\n \"updateMask\": \"\"\n}"
encode <- "json"
response <- VERB("PATCH", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/:name")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"config\": {\n \"description\": \"\",\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {\n \"words\": []\n }\n },\n \"displayName\": \"\",\n \"largeCustomDictionary\": {\n \"bigQueryField\": {\n \"field\": {\n \"name\": \"\"\n },\n \"table\": {\n \"datasetId\": \"\",\n \"projectId\": \"\",\n \"tableId\": \"\"\n }\n },\n \"cloudStorageFileSet\": {\n \"url\": \"\"\n },\n \"outputPath\": {}\n },\n \"regex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n }\n },\n \"updateMask\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.patch('/baseUrl/v2/:name') do |req|
req.body = "{\n \"config\": {\n \"description\": \"\",\n \"dictionary\": {\n \"cloudStoragePath\": {\n \"path\": \"\"\n },\n \"wordList\": {\n \"words\": []\n }\n },\n \"displayName\": \"\",\n \"largeCustomDictionary\": {\n \"bigQueryField\": {\n \"field\": {\n \"name\": \"\"\n },\n \"table\": {\n \"datasetId\": \"\",\n \"projectId\": \"\",\n \"tableId\": \"\"\n }\n },\n \"cloudStorageFileSet\": {\n \"url\": \"\"\n },\n \"outputPath\": {}\n },\n \"regex\": {\n \"groupIndexes\": [],\n \"pattern\": \"\"\n }\n },\n \"updateMask\": \"\"\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v2/:name";
let payload = json!({
"config": json!({
"description": "",
"dictionary": json!({
"cloudStoragePath": json!({"path": ""}),
"wordList": json!({"words": ()})
}),
"displayName": "",
"largeCustomDictionary": json!({
"bigQueryField": json!({
"field": json!({"name": ""}),
"table": json!({
"datasetId": "",
"projectId": "",
"tableId": ""
})
}),
"cloudStorageFileSet": json!({"url": ""}),
"outputPath": json!({})
}),
"regex": json!({
"groupIndexes": (),
"pattern": ""
})
}),
"updateMask": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PATCH").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PATCH \
--url {{baseUrl}}/v2/:name \
--header 'content-type: application/json' \
--data '{
"config": {
"description": "",
"dictionary": {
"cloudStoragePath": {
"path": ""
},
"wordList": {
"words": []
}
},
"displayName": "",
"largeCustomDictionary": {
"bigQueryField": {
"field": {
"name": ""
},
"table": {
"datasetId": "",
"projectId": "",
"tableId": ""
}
},
"cloudStorageFileSet": {
"url": ""
},
"outputPath": {}
},
"regex": {
"groupIndexes": [],
"pattern": ""
}
},
"updateMask": ""
}'
echo '{
"config": {
"description": "",
"dictionary": {
"cloudStoragePath": {
"path": ""
},
"wordList": {
"words": []
}
},
"displayName": "",
"largeCustomDictionary": {
"bigQueryField": {
"field": {
"name": ""
},
"table": {
"datasetId": "",
"projectId": "",
"tableId": ""
}
},
"cloudStorageFileSet": {
"url": ""
},
"outputPath": {}
},
"regex": {
"groupIndexes": [],
"pattern": ""
}
},
"updateMask": ""
}' | \
http PATCH {{baseUrl}}/v2/:name \
content-type:application/json
wget --quiet \
--method PATCH \
--header 'content-type: application/json' \
--body-data '{\n "config": {\n "description": "",\n "dictionary": {\n "cloudStoragePath": {\n "path": ""\n },\n "wordList": {\n "words": []\n }\n },\n "displayName": "",\n "largeCustomDictionary": {\n "bigQueryField": {\n "field": {\n "name": ""\n },\n "table": {\n "datasetId": "",\n "projectId": "",\n "tableId": ""\n }\n },\n "cloudStorageFileSet": {\n "url": ""\n },\n "outputPath": {}\n },\n "regex": {\n "groupIndexes": [],\n "pattern": ""\n }\n },\n "updateMask": ""\n}' \
--output-document \
- {{baseUrl}}/v2/:name
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"config": [
"description": "",
"dictionary": [
"cloudStoragePath": ["path": ""],
"wordList": ["words": []]
],
"displayName": "",
"largeCustomDictionary": [
"bigQueryField": [
"field": ["name": ""],
"table": [
"datasetId": "",
"projectId": "",
"tableId": ""
]
],
"cloudStorageFileSet": ["url": ""],
"outputPath": []
],
"regex": [
"groupIndexes": [],
"pattern": ""
]
],
"updateMask": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/:name")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()