API Reference > Manage data access assets > Data protection API
  

Data protection API

Use the data protection API to create, update, delete, or retrieve data protections.
Data protections use data de-identification techniques to protect data while maintaining data consistency, reversibility, and format.
For more information on data protections, see Creating data protections in the Data Governance and Catalog help.

Retrieve data protection assets

Send a GET request to retrieve the details of data protections. The prefix, indicated by <prefix>, for each endpoint is /data360/dam/api/v1/.

Methods and endpoints

The following table describes retrieval methods and associated endpoints for the data protection API:
Method
Endpoint
Description
GET
<baseApiUrl><prefix>/data-protections
Retrieve the list of all published data protections.
GET
<baseApiUrl><prefix>/data-protections/{ID}
Retrieve the draft or published version of a specified data protection.

Request parameters

The following table describes the parameters that you can specify in the endpoint of the request:
Parameter
Type
Description
offset
Integer
Optional. Specify the record number from which to begin returning assets. The default value is zero.
limit
Integer
Optional. Specify the total number of records to return. The default value is 500.
fetchDraft
Boolean
Optional. Retrieve the draft version of a specified data protection. When using the <baseApiUrl><prefix>/data-protections/{ID} endpoint, use fetchDraft=true.The default value is false.
Note:
To retrieve the draft version of all data protections, see Retrieve assets in the catalog.

Create data protection assets

Send a POST request to create data protections. The prefix, indicated by <prefix>, for each endpoint is /data360/dam/api/v1/.

Method and endpoint

The following table describes the creation method and associated endpoint for the data protection API:
Method
Endpoint
Description
POST
<baseApiUrl><prefix>/data-protections
Create new data protections.

Request parameters

The following table describes the parameters that you can specify in the endpoint of the request:
Parameter
Type
Description
name
String
Required. Specify the name of the asset.
externalId
String
Optional. Specify the external identifier of the asset.
description
String
Optional. Specify the description of the asset.
stakeholders
Object
Optional. Specify the following attributes to add a stakeholder to the asset.
stakeholderId: The internal ID of the stakeholder. You can find this ID by looking at the URL of the stakeholder page in Data Governance and Catalog.
roleId: The internal ID of the role for the stakeholder. You can find this ID in the role details in Administrator. Navigate to the User Roles page, open the user role, and copy the ID at the end of the URL.
stakeholderType: Specify whether the stakeholder is a USER or GROUP.
dataProtectionTechniques
Object
Required. Specify the data de-identification technique.
dataProtectionTechniqueType: String. The data de-identification technique.
appliesToDataType: String. The data type for the selected data de-identification technique.
parameters: String. Additional required parameters for the selected data de-identification technique.
The following table lists the supported data types and the required parameters for each data de-identification technique:
Data De-identification Technique
Supported Data Types
Required Parameters
CONSTANT_TEXT_VALUE_FUNCTION
  • - STRING
  • - INTEGER
  • - DECIMAL
"value": "****"
GENERALIZE_DATE_FUNCTION
  • - DATE
  • - TIMESTAMP
"preserve_date_type": "YEAR|MONTH"
HASH_FUNCTION
STRING
"hash_algorithm": "<HASHING_FUNCTION>"
"compatibility_mode": true|false
NUMERIC_TOKENISE_FUNCTION
INTEGER
"regex": ""
"consistent": true|false
REDACT_WITH_NULL_FUNCTION
  • - UNKNOWN
  • - STRING
  • - INTEGER
  • - DECIMAL
  • - DATE
  • - TIMESTAMP
none
RETAIN_FUNCTION
  • - UNKNOWN
  • - STRING
  • - INTEGER
  • - DECIMAL
  • - DATE
  • - TIMESTAMP
none
SUBSTITUTE_FUNCTION
STRING
"filename": "<FILENAME>"
"consistent": true|false
TOKENISE_FUNCTION
STRING
"regex": ""
"consistent": true|false
TRUNCATE_FUNCTION
STRING
"length": "", "behaviour": "PRESERVE_FIRST_FEW_CHARACTERS"

Request body

In the body of the request, specify the parameters in the following format:
{

"name": "Protection: Preserve 4 Characters",

"externalId": "Protection: Preserve 4 Characters",

"description": "",

"dataProtectionTechniques": [

{

"dataProtectionTechniqueType": "REDACT_WITH_NULL_FUNCTION",

"appliesToDataType": "UNKNOWN",

"parameters": null

},

{

"dataProtectionTechniqueType": "TRUNCATE_FUNCTION",

"appliesToDataType": "STRING",

"parameters": {

"length": "4",

"behaviour": "PRESERVE_FIRST_FEW_CHARACTERS"

}

},

{

"dataProtectionTechniqueType": "REDACT_WITH_NULL_FUNCTION",

"appliesToDataType": "INTEGER",

"parameters": null

},

{

"dataProtectionTechniqueType": "REDACT_WITH_NULL_FUNCTION",

"appliesToDataType": "DECIMAL",

"parameters": null

},

{

"dataProtectionTechniqueType": "GENERALIZE_DATE_FUNCTION",

"appliesToDataType": "DATE",

"parameters": {"preserve_date_type": "YEAR"}

}, {

"dataProtectionTechniqueType": "REDACT_WITH_NULL_FUNCTION",

"appliesToDataType": "TIMESTAMP",

"parameters": null

}

]

}

Modify data protection assets

Send a PUT request to replace a specific data protection. The prefix, indicated by <prefix>, for each endpoint is /data360/dam/api/v1/.

Method and endpoint

The following table describes the modification method and associated endpoint for the data protection API:
Method
Endpoint
Description
PUT
<baseApiUrl><prefix>/data-protections/{ID}
Replace a specified data protection.

Request parameters

The following table describes the parameters that you can specify in the endpoint of the request:
Parameter
Type
Description
name
String
Required. Specify the name of the asset.
externalId
String
Optional. Specify the external identifier of the asset.
description
String
Optional. Specify the description of the asset.
stakeholders
Object
Optional. Specify the following attributes to add a stakeholder to the asset.
stakeholderId: The internal ID of the stakeholder. You can find this ID by looking at the URL of the stakeholder page in Data Governance and Catalog.
roleId: The internal ID of the role for the stakeholder. You can find this ID in the role details in Administrator. Navigate to the User Roles page, open the user role, and copy the ID at the end of the URL.
stakeholderType: Specify whether the stakeholder is a USER or GROUP.
dataProtectionTechniques
Object
Required. Specify the data de-identification technique.
dataProtectionTechniqueType: String. The data de-identification technique.
appliesToDataType: String. The data type for the selected data de-identification technique.
parameters: String. Additional required parameters for the selected data de-identification technique.

Request body

In the body of the request, specify the parameters in the following format:
{

"name": "Protection: Retain [Updated]",

"externalId": "Protection: Retain",

"description": "Protection function retain [Updated]",

"dataProtectionTechniques": [

{

"dataProtectionTechniqueType": "RETAIN_FUNCTION",

"appliesToDataType": "UNKNOWN",

"parameters": null

},

{

"dataProtectionTechniqueType": "RETAIN_FUNCTION",

"appliesToDataType": "STRING",

"parameters": null

}

]

}

Delete data protection assets

Send a DELETE request to delete a specific data protection. The prefix, indicated by <prefix>, for each endpoint is /data360/dam/api/v1/.

Method and endpoint

The following table describes the deletion method and associated endpoint for the data protection API:
Method
Endpoint
Description
DELETE
<baseApiUrl><prefix>/data-protections/{ID}
Delete a specified data protection.

Request body

This endpoint has no request body.