Method: projects.locations.image.redact

Redacts 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/redacting-sensitive-data-images to learn more.

When no InfoTypes or CustomInfoTypes are specified in this request, the system will automatically choose what detectors to run. By default this may be all types, but may change over time as detectors are updated.

HTTP request

POST https://dlp.googleapis.com/v2/{parent=projects/*}/locations/{locationId}/image:redact

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
parent

string

The parent resource name, for example projects/my-project-id.

Authorization requires the following Google IAM permission on the specified resource parent:

  • serviceusage.services.use

locationId

string

The geographic location to process the request. Reserved for future extensions.

Request body

The request body contains data with the following structure:

JSON representation
{
  "inspectConfig": {
    object (InspectConfig)
  },
  "imageRedactionConfigs": [
    {
      object (ImageRedactionConfig)
    }
  ],
  "includeFindings": boolean,
  "byteItem": {
    object (ByteContentItem)
  }
}
Fields
inspectConfig

object (InspectConfig)

Configuration for the inspector.

imageRedactionConfigs[]

object (ImageRedactionConfig)

The configuration for specifying what content to redact from images.

includeFindings

boolean

Whether the response should include findings along with the redacted image.

byteItem

object (ByteContentItem)

The content must be PNG, JPEG, SVG or BMP.

Response body

If successful, the response body contains an instance of RedactImageResponse.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

Try it!

Was this page helpful? Let us know how we did:

Send feedback about...

Data Loss Prevention Documentation