Skip to content

Cloud Data Loss Prevention (DLP) API API

by googleapis.com

OAuthHTTPSAnalytics
Open documentation ↗

Overview

Provides methods for detection, risk analysis, and de-identification of privacy-sensitive fragments in text, images, and Google Cloud Platform storage repositories.

Cloud Data Loss Prevention (DLP) API is an analytics API from googleapis.com. Requests are authenticated with OAuth. It is served over HTTPS. Its OpenAPI description documents 23 endpoints.

At a glance

Authentication
OAuth
HTTPS
Yes
CORS
Unknown
Category
Analytics
Base URL
https://dlp.googleapis.com/
Version
v2
Endpoints
23
Spec updated
2023-04-21

Make a first request

Replace the placeholders; the documentation says exactly where credentials go.

cURL
curl -X GET "https://dlp.googleapis.com/v2/infoTypes" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer YOUR_TOKEN"
JavaScript
const response = await fetch("https://dlp.googleapis.com/v2/infoTypes", {
  method: "GET",
  headers: {
    "Accept": "application/json",
    "Authorization": "Bearer YOUR_TOKEN",
  },
});
const data = await response.json();
console.log(data);
Python
import requests

response = requests.request(
    "GET",
    "https://dlp.googleapis.com/v2/infoTypes",
    headers={
    "Accept": "application/json",
    "Authorization": "Bearer YOUR_TOKEN",
    },
    timeout=30,
)
print(response.json())

Endpoints

MethodPathWhat it does
GET/v2/infoTypesReturns a list of the sensitive information types that DLP API supports. See https://cloud.google.com/dlp/docs/infotypes-reference to learn more.
GET/v2/{name}Gets a stored infoType. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more.
PATCH/v2/{name}Updates the stored infoType by creating a new version. The existing version will continue to be used until the new version is ready. See https://cloud.google.co
DELETE/v2/{name}Deletes a stored infoType. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more.
POST/v2/{name}:activateActivate a job trigger. Causes the immediate execute of a trigger instead of waiting on the trigger event to occur.
POST/v2/{name}:cancelStarts asynchronous cancellation on a long-running DlpJob. The server makes a best effort to cancel the DlpJob, but success is not guaranteed. See https://cloud
POST/v2/{name}:finishFinish a running hybrid DlpJob. Triggers the finalization steps and running of any enabled actions that have not yet run.
POST/v2/{name}:hybridInspectInspect hybrid content and store findings to a trigger. The inspection will be processed asynchronously. To review the findings monitor the jobs within the trig
POST/v2/{parent}/content:deidentifyDe-identifies potentially sensitive info from a ContentItem. This method has limits on input size and output size. See https://cloud.google.com/dlp/docs/deident
POST/v2/{parent}/content:inspectFinds potentially sensitive info in content. This method has limits on input size, processing time, and output size. When no InfoTypes or CustomInfoTypes are sp
POST/v2/{parent}/content:reidentifyRe-identifies content that has been de-identified. See https://cloud.google.com/dlp/docs/pseudonymization#re-identification_in_free_text_code_example to learn m
GET/v2/{parent}/deidentifyTemplatesLists DeidentifyTemplates. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.
POST/v2/{parent}/deidentifyTemplatesCreates a DeidentifyTemplate for reusing frequently used configuration for de-identifying content, images, and storage. See https://cloud.google.com/dlp/docs/cr
GET/v2/{parent}/dlpJobsLists DlpJobs that match the specified filter in the request. See https://cloud.google.com/dlp/docs/inspecting-storage and https://cloud.google.com/dlp/docs/com
POST/v2/{parent}/dlpJobsCreates a new job to inspect storage or calculate risk metrics. See https://cloud.google.com/dlp/docs/inspecting-storage and https://cloud.google.com/dlp/docs/c
POST/v2/{parent}/image:redactRedacts potentially sensitive info from an image. This method has limits on input size, processing time, and output size. See https://cloud.google.com/dlp/docs/
GET/v2/{parent}/infoTypesReturns a list of the sensitive information types that DLP API supports. See https://cloud.google.com/dlp/docs/infotypes-reference to learn more.
GET/v2/{parent}/inspectTemplatesLists InspectTemplates. See https://cloud.google.com/dlp/docs/creating-templates to learn more.
POST/v2/{parent}/inspectTemplatesCreates an InspectTemplate for reusing frequently used configuration for inspecting content, images, and storage. See https://cloud.google.com/dlp/docs/creating
GET/v2/{parent}/jobTriggersLists job triggers. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.
POST/v2/{parent}/jobTriggersCreates a job trigger to run DLP actions such as scanning storage for sensitive information on a set schedule. See https://cloud.google.com/dlp/docs/creating-jo
GET/v2/{parent}/storedInfoTypesLists stored infoTypes. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more.
POST/v2/{parent}/storedInfoTypesCreates a pre-built stored infoType to be used for inspection. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more.

Questions

Does the Cloud Data Loss Prevention (DLP) API API need an API key?

Yes. The Cloud Data Loss Prevention (DLP) API API uses OAuth authentication; the documentation explains how to get credentials.

Does the Cloud Data Loss Prevention (DLP) API API support HTTPS?

Yes, the Cloud Data Loss Prevention (DLP) API API is served over HTTPS.

How many endpoints does the Cloud Data Loss Prevention (DLP) API API have?

Its OpenAPI description lists 23 endpoints in version v2. All of them are shown on this page.

What are alternatives to the Cloud Data Loss Prevention (DLP) API API?

Other Analytics APIs include Google Play Integrity API, versionhistory.googleapis.com API, Doc Converter, Perspective Comment Analyzer API, Safe Browsing API.

Compare alternatives →

Google Play Integrity API

Analytics

The Play Integrity API helps you check that you're interacting with your genuine app on a genuine Android device powered by Google Play services. The Play Integrity API has replaced SafetyNet Attestation and Android Device Verification.

OAuth1 endpoints

versionhistory.googleapis.com API

Analytics

Version History API - Prod

No auth4 endpoints

Doc Converter

Analytics

This api converts file formats of OpenXml and OpenOffice documents formats to vector files (e.g., svg)

No auth1 endpoints

Perspective Comment Analyzer API

Analytics

The Perspective Comment Analyzer API provides information about the potential impact of a comment on a conversation (e.g. it can provide a score for the "toxicity" of a comment). Users can leverage the "SuggestCommentScore" method to submit corrections to improve Perspective over time. Users can set the "doNotStore" flag to ensure that all submitted comments are automatically deleted after scores are returned.

OAuth2 endpoints

Safe Browsing API

Analytics

Enables client applications to check web resources (most commonly URLs) against Google-generated lists of unsafe web resources. The Safe Browsing APIs are for non-commercial use only. If you need to use APIs to detect malicious URLs for commercial purposes – meaning “for sale or revenue-generating purposes” – please refer to the Web Risk API.

No auth7 endpoints

Web Fonts Developer API

Analytics

The Google Web Fonts Developer API lets you retrieve information about web fonts served by Google.

No auth1 endpoints

Listed from APIs.guru (CC0).