Unexpected response from DLP API when collecting "recipient matches pattern" data
search cancel

Unexpected response from DLP API when collecting "recipient matches pattern" data

book

Article ID: 268442

calendar_today

Updated On:

Products

Data Loss Prevention Enterprise Suite

Issue/Introduction

Enforce response to API request returns HTTP 415 and no other data is returned.

 

Environment

Release : 16.0

Cause

ContentType and headers missing from powershell command used to connect to Enforce.

Resolution

Add ContentType and Accept header to the powershell command to resolve the HTTP 415 error returned from Enforce.

Example: Powershell command (New lines added for readability.)

Invoke-WebRequest "https://$url/ProtectManager/webservices/v2/senderRecipientPattern/$idToUpdate" -Method Put -Body $outRaw -WebSession $dlpsession

-ContentType "application/json"

-Headers @{ "Accept" = "application/json" }