Skip to main content
Skip table of contents

API calls for ASDD profile set import and export

A profile set defines the set of classifiers or expressions that will be used to identify sensitive information in the rule set when a profiling job is run. Refer to Discovering your sensitive data for an overview of profile sets and related concepts. More information about ASDD profile set import and export can be found in the ASDD profile set import and export article. More information about configuring profile sets can be found in the Configuring Profile Sets article.

In order to perform ASDD profile set import and export using the API client, you should have some familiarity with REST APIs and JSON data encoding. Access the API Client, as described in the Masking API Client section, and authenticate by pressing the Authorize button at the upper right part of the screen. 

The ASDD profile set import and export endpoints utilize the file upload and download endpoints, respectively.

The generated curl command for file upload and download visible in the API client is incorrect If using curl over the API client is desired, see API calls involving file upload and download for more information on how to format file upload and download curl requests correctly.

ASDD profile set import

Import requires two API calls:

  1. POST /file-upload (under fileUpload)

  2. POST /configuration-install (under configuration)

These API path's purposes are as expected based on the path and operation; the purpose of POST /file-upload is to upload the profile set configuration zip file to the engine file system, and the purpose of POST /configuration-install is to unpack the zip file and import the profile set configuration onto the engine.

Example

In this example, a new profile set is configured that has a new domain and a few classifiers (one PATH classifier, one LIST and one TYPE). The content of the Standard.json file is as follows:

CODE
{
  "profileSetName": "Custom ASDD Profile Set",
  "domains": [
    { 
      "domain": "CUSTOM_PII", 
      "maskingAlgorithmName": "dlpx-core:CM Alpha-Numeric"
    }
  ],
  "classifiers": [
    {
      "domain": "CUSTOM_PII",
      "name": "Capital - Path",
      "type": "PATH",
      "properties": {
        "paths": [
          {
            "allowPartialMatch": true,
            "caseSensitive": false,
            "fieldValue": "(?i)capital",
            "matchStrength": 0.67,
            "matchType": "REGEX",
            "parentValue": ""
          },
          {
            "allowPartialMatch": true,
            "caseSensitive": false,
            "fieldValue": "(?i)capital[ _-]?(city)?",
            "matchStrength": 0.5,
            "matchType": "REGEX",
            "parentValue": ""
          }
        ],
        "rejectStrength": 0.0
      }
    },
    {
      "domain": "CUSTOM_PII",
      "name": "Capital - Type",
      "type": "TYPE",
      "properties": {
        "allowedTypes": [
          {
            "minimumLength": 10,
            "typeName": "String"
          }
        ],
        "matchAutoIncrementingColumn": false
      }
    },
    {
      "domain": "CUSTOM_PII",
      "name": "Capitals - List",
      "type": "LIST",
      "properties": {
        "rejectStrength": 0.5,
        "valueLists": [
          {
            "file": "file://de_capitals.txt",
            "matchStrength": 1.0
          }
        ]
      }
    }
  ]
}

The above profile set configuration file (Standard.json) and the file used by the LIST classifier (de_capitals.txt) are contained in a zip file that is uploaded to the engine filesystem via POST /file-upload (with the default permanent query parameter value of false). The API response is:

CODE
{
  "fileReferenceId": "delphix-file://upload/f_8f90c13fb1b9434abdbe871da894a2a8/custom_profile_set_1.zip",
  "filename": "custom_profile_set_1.zip",
  "fileSize": 3724,
  "persistenceType": "OBJECT/TEMPORARY"
}

The fileReferenceID value returned by POST /file-upload is used for the POST /configuration-install request to initiate profile set import:

CODE
{
  "fileReferenceId": "delphix-file://upload/f_8f90c13fb1b9434abdbe871da894a2a8/custom_profile_set_1.zip"
}

The API response is:

CODE
{
  "fileReferenceId": "delphix-file://upload/f_8f90c13fb1b9434abdbe871da894a2a8/custom_profile_set_1.zip",
  "requiresRestart": false
}

ASDD profile set export

Export requires two API calls:

  1. POST /profile-sets/{profileSetId}/export

  2. GET /file-downloads/{fileDownloadId}

This API path's purpose is as expected based on the path and operation; the purpose of POST /profile-sets/{profileSetId}/export is to export the given profile set's configuration in a zip file in the same format expected for import. This API call is asynchronous, so it spawns an async task with a file reference that you can then download via GET /file-downloads/{fileDownloadId} when the task is complete. The API response for the custom profile set imported above (POST /profile-sets/5/export) is:

CODE
{
  "asyncTaskId": 1,
  "operation": "EXPORT_PROFILE_SET",
  "reference": "EXPORT_PROFILE_SET-cHJvZmlsZV9zZXRfNS56aXA=",
  "status": "WAITING",
  "cancellable": false
}

GET /file-downloads/EXPORT_PROFILE_SET-cHJvZmlsZV9zZXRfNS56aXA= then provides a link to download the file in the response body. 

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.