LogoLogo
2025.1Book a demo
  • Immuta Documentation - 2025.1
  • Configuration
    • Deploy Immuta
      • Requirements
      • Install
        • Managed Public Cloud
        • Red Hat OpenShift
      • Upgrade
        • Migrating to the New Helm Chart
        • Upgrading IEHC
      • Guides
        • Ingress Configuration
        • TLS Configuration
        • Cosign Verification
        • Production Best Practices
        • Rotating Credentials
        • External Cache Configuration
        • Enabling Legacy Query Engine
        • Private Container Registries
        • Air-Gapped Environments
      • Disaster Recovery
      • Troubleshooting
      • Conventions
    • Connect Data Platforms
      • Data Platforms Overview
      • Amazon S3
      • AWS Lake Formation
        • Register an AWS Lake Formation Connection
        • AWS Lake Formation Reference Guide
      • Azure Synapse Analytics
        • Getting Started with Azure Synapse Analytics
        • Configure Azure Synapse Analytics Integration
        • Reference Guides
          • Azure Synapse Analytics Integration
          • Azure Synapse Analytics Pre-Configuration Details
      • Databricks
        • Databricks Spark
          • Getting Started with Databricks Spark
          • How-to Guides
            • Configure a Databricks Spark Integration
            • Manually Update Your Databricks Cluster
            • Install a Trusted Library
            • Project UDFs Cache Settings
            • Run R and Scala spark-submit Jobs on Databricks
            • DBFS Access
            • Troubleshooting
          • Reference Guides
            • Databricks Spark Integration Configuration
              • Installation and Compliance
              • Customizing the Integration
              • Setting Up Users
              • Spark Environment Variables
              • Ephemeral Overrides
            • Security and Compliance
            • Registering and Protecting Data
            • Accessing Data
              • Delta Lake API
        • Databricks Unity Catalog
          • Getting Started with Databricks Unity Catalog
          • How-to Guides
            • Register a Databricks Unity Catalog Connection
            • Configure a Databricks Unity Catalog Integration
            • Migrate to Unity Catalog
          • Databricks Unity Catalog Integration Reference Guide
      • Google BigQuery
      • Redshift
        • Getting Started with Redshift
        • How-to Guides
          • Configure Redshift Integration
          • Configure Redshift Spectrum
        • Reference Guides
          • Redshift Integration
          • Redshift Pre-Configuration Details
      • Snowflake
        • Getting Started with Snowflake
        • How-to Guides
          • Register a Snowflake Connection
          • Configure a Snowflake Integration
          • Snowflake Table Grants Migration
          • Edit or Remove Your Snowflake Integration
          • Integration Settings
            • Enable Snowflake Table Grants
            • Use Snowflake Data Sharing with Immuta
            • Configure Snowflake Lineage Tag Propagation
            • Enable Snowflake Low Row Access Policy Mode
              • Upgrade Snowflake Low Row Access Policy Mode
        • Reference Guides
          • Snowflake Integration
          • Snowflake Data Sharing
          • Snowflake Lineage Tag Propagation
          • Snowflake Low Row Access Policy Mode
          • Snowflake Table Grants
          • Warehouse Sizing Recommendations
        • Explanatory Guides
          • Phased Snowflake Onboarding
      • Starburst (Trino)
        • Getting Started with Starburst (Trino)
        • How-to Guides
          • Configure Starburst (Trino) Integration
          • Customize Read and Write Access Policies for Starburst (Trino)
        • Starburst (Trino) Integration Reference Guide
      • Queries Immuta Runs in Remote Platforms
      • Legacy Integrations
        • Securing Hive and Impala Without Sentry
        • Enabling ImmutaGroupsMapping
      • Connect Your Data
        • Connections
          • How-to Guides
            • Run Object Sync
            • Manage Connection Settings
            • Use the Connection Upgrade Manager
              • Troubleshooting
          • Reference Guides
            • Connections Reference Guide
            • Upgrading to Connections
              • Before You Begin
              • API Changes
              • FAQ
        • Data Sources
          • Data Sources in Immuta
          • Register Data Sources
            • Amazon S3 Data Source
            • Azure Synapse Analytics Data Source
            • Databricks Data Source
            • Google BigQuery Data Source
            • Redshift Data Source
            • Snowflake Data Source
              • Bulk Create Snowflake Data Sources
            • Starburst (Trino) Data Source
          • Data Source Settings
            • How-to Guides
              • Manage Data Sources and Data Source Settings
              • Manage Data Source Members
              • Manage Access Requests and Tasks
              • Manage Data Dictionary Descriptions
              • Disable Immuta from Sampling Raw Data
            • Data Source Health Checks Reference Guide
          • Schema Monitoring
            • How-to Guides
              • Run Schema Monitoring and Column Detection Jobs
              • Manage Schema Monitoring
            • Reference Guides
              • Schema Monitoring
              • Schema Projects
            • Why Use Schema Monitoring?
    • Manage Data Metadata
      • Connect External Catalogs
        • Getting Started with External Catalogs
        • Configure an External Catalog
        • Reference Guides
          • External Catalogs
          • Custom REST Catalogs
            • Custom REST Catalog Interface Endpoints
      • Data Identification
        • Introduction
        • Getting Started with Data Identification
        • How-to Guides
          • Use Identification
          • Manage Identifiers
          • Run and Manage Identification
          • Manage Identification Frameworks
          • Use Sensitive Data Discovery (SDD)
        • Reference Guides
          • How Competitive Criteria Analysis Works
          • Built-in Identifier Reference
            • Built-In Identifier Changelog
          • Built-in Discovered Tags Reference
      • Data Classification
        • How-to Guides
          • Activate Classification Frameworks
          • Adjust Identification and Classification Framework Tags
          • How to Use a Built-In Classification Framework with Your Own Tags
        • Classification Frameworks Reference Guide
      • Manage Tags
        • How-to Guides
          • Create and Manage Tags
          • Add Tags to Data Sources and Projects
        • Tags Reference Guide
    • Manage Users
      • Getting Started with Users
      • Identity Managers (IAMs)
        • How-to Guides
          • Okta LDAP Interface
          • OpenID Connect
            • OpenID Connect Protocol
            • Okta and OpenID Connect
            • OneLogin with OpenID Connect
          • SAML
            • SAML Protocol
            • Microsoft Entra ID
            • Okta SAML SCIM
        • Reference Guides
          • Identity Managers
          • SAML Single Logout
          • SAML Protocol Configuration Options
      • Immuta Users
        • How-to Guides
          • Managing Personas and Permissions
          • Manage Attributes and Groups
          • User Impersonation
          • External User ID Mapping
          • External User Info Endpoint
        • Reference Guides
          • Attributes and Groups in Immuta
          • Permissions and Personas
    • Organize Data into Domains
      • Getting Started with Domains
      • Domains Reference Guide
    • Application Settings
      • How-to Guides
        • App Settings
        • BI Tools
          • BI Tool Configuration Recommendations
          • Power BI Configuration Example
          • Tableau Configuration Example
        • Add a License Key
        • Add ODBC Drivers
        • Manage Encryption Keys
        • System Status Bundle
      • Reference Guides
        • Data Processing, Encryption, and Masking Practices
        • Metadata Ingestion
  • Governance
    • Introduction
      • Automate Data Access Control Decisions
        • The Two Paths: Orchestrated RBAC and ABAC
        • Managing User Metadata
        • Managing Data Metadata
        • Author Policy
        • Test and Deploy Policy
      • Compliantly Open More Sensitive Data for ML and Analytics
        • Managing User Metadata
        • Managing Data Metadata
        • Author Policy
    • Author Policies for Data Access Control
      • Introduction
        • Scalability and Evolvability
        • Understandability
        • Distributed Stewardship
        • Consistency
        • Availability of Data
      • Policies
        • Authoring Policies at Scale
        • Data Engineering with Limited Policy Downtime
        • Subscription Policies
          • How-to Guides
            • Author a Subscription Policy
            • Author an ABAC Subscription Policy
            • Subscription Policies Advanced DSL Guide
            • Author a Restricted Subscription Policy
            • Clone, Activate, or Stage a Global Policy
          • Reference Guides
            • Subscription Policies
            • Subscription Policy Access Types
            • Advanced Use of Special Functions
        • Data Policies
          • Overview
          • How-to Guides
            • Author a Masking Data Policy
            • Author a Minimization Policy
            • Author a Purpose-Based Restriction Policy
            • Author a Restricted Data Policy
            • Author a Row-Level Policy
            • Author a Time-Based Restriction Policy
            • Policy Certifications and Diffs
          • Reference Guides
            • Data Policy Types
            • Masking Policies
            • Row-Level Policies
            • Custom WHERE Clause Functions
            • Data Policy Conflicts and Fallback
            • Custom Data Policy Certifications
            • Orchestrated Masking Policies
      • Projects and Purpose-Based Access Control
        • Projects and Purpose Controls
          • Getting Started
          • How-to Guides
            • Create a Project
            • Create and Manage Purposes
            • Project Management
              • Manage Projects and Project Settings
              • Manage Project Data Sources
              • Manage Project Members
          • Reference Guides
            • Projects and Purposes
          • Why Use Purposes?
        • Equalized Access
          • Manage Project Equalization
          • Project Equalization Reference Guide
          • Why Use Project Equalization?
        • Masked Joins
          • Enable Masked Joins
          • Why Use Masked Joins?
        • Writing to Projects
          • How-to Guides
            • Create and Manage Snowflake Project Workspaces
            • Create and Manage Databricks Spark Project Workspaces
            • Write Data to the Workspace
          • Reference Guides
            • Project Workspaces
            • Project UDFs (Databricks)
    • Observe Access and Activity
      • Introduction
      • Audit
        • How-to Guides
          • Export Audit Logs to S3
          • Export Audit Logs to ADLS
          • Run Governance Reports
        • Reference Guides
          • Universal Audit Model (UAM)
            • UAM Schema
          • Query Audit Logs
            • Snowflake Query Audit Logs
            • Databricks Unity Catalog Query Audit Logs
            • Databricks Spark Query Audit Logs
            • Starburst (Trino) Query Audit Logs
          • Audit Export GraphQL Reference Guide
          • Governance Report Types
          • Unknown Users in Audit Logs
      • Dashboards
        • Use the Audit Dashboards How-To Guide
        • Audit Dashboards Reference Guide
      • Monitors
        • Manage Monitors and Observations
        • Monitors Reference Guide
    • Access Data
      • Subscribe to a Data Source
      • Query Data
        • Querying Snowflake Data
        • Querying Databricks Data
        • Querying Databricks SQL Data
        • Querying Starburst (Trino) Data
        • Querying Redshift Data
        • Querying Azure Synapse Analytics Data
        • Connect to a Database Tool to Run Ad Hoc Queries
      • Subscribe to Projects
  • Releases
    • Release Notes
      • Immuta v2025.1 Release Notes
        • User Interface Changes in v2025.1 LTS
      • Immuta LTS Changelog
      • Immuta Image Digests
      • Immuta CLI Release Notes
    • Immuta Release Lifecycle
    • Immuta Support Matrix Overview
    • Preview Features
      • Features in Preview
    • Deprecations and EOL
  • Developer Guides
    • The Immuta CLI
      • Install and Configure the Immuta CLI
      • Manage Your Immuta Tenant
      • Manage Data Sources
      • Manage Sensitive Data Discovery
        • Manage Sensitive Data Discovery Rules
        • Manage Identification Frameworks
        • Run Sensitive Data Discovery on Data Sources
      • Manage Policies
      • Manage Projects
      • Manage Purposes
      • Manage Audit
    • The Immuta API
      • Integrations API
        • Getting Started
        • How-to Guides
          • Configure an Amazon S3 Integration
          • Configure an Azure Synapse Analytics Integration
          • Configure a Databricks Unity Catalog Integration
          • Configure a Google BigQuery Integration
          • Configure a Redshift Integration
          • Configure a Snowflake Integration
          • Configure a Starburst (Trino) Integration
        • Reference Guides
          • Integrations API Endpoints
          • Integration Configuration Payload
          • Response Schema
          • HTTP Status Codes and Error Messages
      • Connections API
        • How-to Guides
          • Register a Connection
            • Register a Snowflake Connection
            • Register a Databricks Unity Catalog Connection
            • Register an AWS Lake Formation Connection
          • Manage a Connection
          • Deregister a Connection
        • Connection Registration Payloads Reference Guide
      • Immuta V2 API
        • Data Source Payload Attribute Details
        • Data Source Request Payload Examples
        • Create Policies API Examples
        • Create Projects API Examples
        • Create Purposes API Examples
      • Immuta V1 API
        • Authenticate with the API
        • Configure Your Instance of Immuta
          • Get Job Status
          • Manage Frameworks
          • Manage IAMs
          • Manage Licenses
          • Manage Notifications
          • Manage Tags
          • Manage Webhooks
          • Search Filters
          • Manage Identification
            • Identification Frameworks to Identifiers in Domains
            • Manage Sensitive Data Discovery (SDD)
        • Connect Your Data
          • Create and Manage an Amazon S3 Data Source
          • Create an Azure Synapse Analytics Data Source
          • Create an Azure Blob Storage Data Source
          • Create a Databricks Data Source
          • Create a Presto Data Source
          • Create a Redshift Data Source
          • Create a Snowflake Data Source
          • Create a Starburst (Trino) Data Source
          • Manage the Data Dictionary
        • Use Domains
        • Manage Data Access
          • Manage Access Requests
          • Manage Data and Subscription Policies
          • Manage Write Policies
            • Write Policies Payloads and Response Schema Reference Guide
          • Policy Handler Objects
          • Search Connection Strings
          • Search for Organizations
          • Search Schemas
        • Subscribe to and Manage Data Sources
        • Manage Projects and Purposes
          • Manage Projects
          • Manage Purposes
        • Generate Governance Reports
Powered by GitBook

Other versions

  • SaaS
  • 2024.3
  • 2024.2

Copyright © 2014-2025 Immuta Inc. All rights reserved.

On this page
  • Policy workflow
  • Create and manage policies
  • Create a global policy with a specified entity type
  • Create or update a policy for a specific data source
  • Apply a global policy to a data source
  • Update a global policy
  • Review policies
  • Search for policies
  • Find policies by policy ID
  • Find policies by entity type
  • Find the number of data sources a specified policy applies to
  • Get the policy information for a specific data source
  • Get the differences between two policy versions
  • Get the policy handler metadata for a specific data source
  • Delete a global policy
  • Request example
  • Response example
Export as PDF
  1. Developer Guides
  2. The Immuta API
  3. Immuta V1 API
  4. Manage Data Access

Manage Data and Subscription Policies

Policy API reference guide

PreviousManage Access RequestsNextManage Write Policies

Last updated 4 months ago

The policy endpoint allows you to manage and review policies in Immuta. This page outlines the endpoint and its request and response parameters.

Additional fields may be included in some responses you receive; however, these attributes are for internal purposes and are therefore undocumented.

Policy workflow

  1. .

  2. .

  3. .

Create and manage policies

Method
Path
Purpose

POST

/policy/global

POST or PUT

/policy/handler/{dataSourceId}

POST

/policy/global/applyPolicy

PUT

/policy/global/{policyId}

Create a global policy with a specified entity type

POST /policy/global

Create a Global Policy with a given entityType.

Query parameters

Attribute
Description
Required

body

array Contains Global Policy metadata.

Yes

Payload parameters

Response parameters

When successful, the response returns the body of the request payload.

Request example

This example request creates a Global Policy (saved in the example-payload.json file) in the Immuta tenant.

curl \
    --request POST \
    --header "Content-Type: application/json" \
    --header "Authorization: Bearer dea464c07bd07300095caa8" \
    --data @example-payload.json \
    https://demo.immuta.com/policy/global

Request payload example

{
  "type": "data",
  "template": false,
  "ownerRestrictions": null,
  "actions": [{
    "type": "masking",
    "rules": [{
      "type": "masking",
      "exceptions": null,
      "config": {
        "fields": [{
          "name": "Discovered.Passport",
          "displayName": "Discovered > Passport",
          "hasLeafNodes": false,
          "source": "curated"
        }],
        "maskingConfig": {
          "type": "Consistent Value",
          "metadata": {}
        }
      }
    }],
    "description": ""
  }],
  "circumstances": [{
    "operator": "or",
    "type": "columnTags",
    "columnTag": {
      "name": "Discovered.Passport",
      "displayName": "Discovered > Passport",
      "hasLeafNodes": false,
      "source": "curated"
    }
  }],
  "name": "Mask Passports",
  "certification": {
    "text": "This certifies that all columns containing passports in this data source have been tagged appropriately.",
    "label": "Certified",
    "tags": [],
    "recertify": true
  },
  "staged": false
}

Response example

{
  "id": 8,
  "policyKey": "Mask Passports",
  "name": "Mask Passports",
  "type": "data",
  "template": false,
  "staged": false,
  "systemGenerated": false,
  "deleted": false,
  "certification": {
    "tags": [],
    "text": "This certifies that all columns containing passports in this data source have been tagged appropriately.",
    "label": "Certified",
    "recertify": true
  },
  "actions": [{
    "type": "masking",
    "rules": [{
      "type": "masking",
      "config": {
        "fields": [{
          "name": "Discovered.Passport",
          "source": "curated",
          "hasLeafNodes": false
        }],
        "maskingConfig": {
          "type": "Consistent Value",
          "metadata": {}
        }
      },
      "exceptions": null
    }],
    "description": null
  }],
  "circumstances": [{
    "type": "columnTags",
    "operator": "or",
    "columnTag": {
      "name": "Discovered.Passport",
      "hasLeafNodes": false
    }
  }],
  "metadata": null,
  "clonedFrom": null,
  "createdBy": 2,
  "createdAt": "2021-09-21T18:35:48.615Z",
  "updatedAt": "2021-09-21T18:35:48.615Z",
  "createdByName": "Katie",
  "ownerRestrictions": null
}

Create or update a policy for a specific data source

POST or PUT /policy/handler/{dataSourceId}

Create (POST) or update (PUT) a policy for the specified data source.

Query parameters

Attribute
Description
Required

dataSourceId

integer The ID of the data source.

Yes

jsonPolicies

array[object] An array of JSON rules objects.

Yes

Response parameters

Attribute
Description

id

integer The policy handler ID.

url

string The URL of the Immuta tenant.

dataSourceId

integer The ID of the data source the policy is applied to.

createdBy

integer The ID of the user who created the policy.

ca

string The certificate authority.

jsonPolicies

array[object] Policy metadata, including the policy type (visibility, masking, time, minimization, external, prerequisite, customWhere, showRowsNever, or rowOrObjectRestriction), rules, and description.

rules

string The conditions of the policy.

createdAt

timestamp The date the policy was created.

updatedAt

timestamp The date the policy was modified.

Request example

This example request applies the policy specified in the payload to the data source with the ID 2.

curl \
    --request POST \
    --header "Content-Type: application/json" \
    --header "Authorization: Bearer dea464c07bd07300095caa8" \
    --data @example-payload.json \
    https://demo.immuta.com/policy/handler/2

Request payload example

{
  "jsonPolicies": [{
    "type": "masking",
    "rules": [{
      "type": "masking",
      "config": {
        "fields": ["amount"],
        "maskingConfig": {
          "type": "Consistent Value",
          "metadata": {
            "constant": null
          }
        }
      },
      "exceptions": null
    }],
    "createdAt": "2021-09-20T20:03:18.001Z",
    "createdBy": 2,
    "description": null
  }, {
    "type": "masking",
    "rules": [{
      "type": "masking",
      "config": {
        "fields": ["geo_latitude"],
        "maskingConfig": {
          "type": "Consistent Value",
          "metadata": {}
        }
      },
      "exceptions": null
    }],
    "createdAt": "2021-09-20T20:02:02.213Z",
    "createdBy": 2,
    "description": null
  }, {
    "type": "prerequisite",
    "rules": [{
      "type": "prerequisite",
      "exceptions": null,
      "config": {
        "qualifications": {
          "operator": "and",
          "conditions": [{
            "type": "purposes",
            "value": "Re-identification Prohibited"
          }]
        }
      }
    }],
    "description": ""
  }],
  "dataSourcePolicyHandler": {
    "handlerId": 26,
    "visibilitySchema": {
      "fields": []
    }
  }
}

Response example

{
  "id": 42,
  "dataSourceId": 2,
  "createdBy": 2,
  "ca": ["-----BEGIN CERTIFICATE-----\ncertificatedata\n-----END CERTIFICATE-----"],
  "jsonPolicies": [
    {
      "type": "masking",
      "rules": [
        {
          "type": "masking",
          "config": {
            "fields": [
              "amount"
            ],
            "maskingConfig": {
              "type": "Consistent Value",
              "metadata": {
                "constant": null
              }
            }
          },
          "exceptions": null
        }
      ],
      "createdAt": "2021-09-20T20:03:18.001Z",
      "createdBy": 2,
      "description": null
    },
    {
      "type": "masking",
      "rules": [
        {
          "type": "masking",
          "config": {
            "fields": [
              "geo_latitude"
            ],
            "maskingConfig": {
              "type": "Consistent Value",
              "metadata": {}
            }
          },
          "exceptions": null
        }
      ],
      "createdAt": "2021-09-20T20:02:02.213Z",
      "createdBy": 2,
      "description": null
    },
    {
      "type": "prerequisite",
      "rules": [
        {
          "type": "prerequisite",
          "config": {
            "qualifications": {
              "operator": "and",
              "conditions": [
                {
                  "type": "purposes",
                  "value": "Re-identification Prohibited"
                }
              ]
            }
          },
          "exceptions": null
        }
      ],
      "createdAt": "2021-09-20T20:05:35.925Z",
      "createdBy": 2,
      "description": null
    }
  ],
  "createdAt": "2021-09-21T18:49:34.021Z",
  "updatedAt": "2021-09-21T18:49:34.021Z"
}

Apply a global policy to a data source

Note: Global policies that contain the condition "with columns tagged" or "on all data sources" will automatically apply to relevant data sources when the policy is created. The endpoint detailed below can be used to apply Global Policies that contain the condition "when selected by data owners," as these policies are not automatically applied to data sources.

POST /policy/global/applyPolicy

Apply the Global Policy to the specified data source.

Query parameters

Attribute
Description
Required

payload

array Contains Global Policy and data source metadata.

Yes

Payload parameters

Attribute
Description
Required

policyID

integer The ID of the Global Policy.

Yes

dataSourceID

integer The ID of the data source to apply the policy to.

Yes

merged

boolean Default false.

Yes

Response parameters

None. When successful, no message will display.

Request example

This example request applies the specified Global Policy to the specified data source (saved in the example-payload.json file) in the Immuta tenant.

curl \
    --request POST \
    --header "Content-Type: application/json" \
    --header "Authorization: Bearer dea464c07bd07300095caa8" \
    --data @example-payload.json \
    https://demo.immuta.com/policy/global/applyPolicy

Request payload example

The following payload will apply the Global Policy with the ID 1 to the data source with ID 1.

{
  "policyId": 1,
  "dataSourceId": 1,
  "merged": false
}

Update a global policy

PUT /policy/global/{policyId}

Update the specified policy.

Query parameters

Attribute
Description
Required

policyID

integer The ID of the Global Policy you want to update.

Yes

payload

array Contains Global Policy and metadata.

Yes

Payload parameters

Response parameters

When successful, the response returns the body of the request payload.

Request example

This example request updates the specified Global Policy (8) with changes to the metadata saved in the example-payload.json file.

curl \
    --request PUT \
    --header "Content-Type: application/json" \
    --header "Authorization: Bearer dea464c07bd07300095caa8" \
    --data @example-payload.json \
    https://demo.immuta.com/policy/global/8

Request payload example

In this payload, the user updated the description attribute to update the policy.

{
  "id": 8,
  "policyKey": "Mask Passports",
  "name": "Mask Passport",
  "type": "data",
  "template": false,
  "staged": false,
  "systemGenerated": false,
  "deleted": false,
  "certification": {
    "tags": ["Discovered.Passport"],
    "text": "This certifies that all columns containing passports in this data source have been tagged appropriately.",
    "label": "Certified"
  },
  "actions": [{
    "type": "masking",
    "rules": [{
      "type": "masking",
      "config": {
        "fields": [{
          "name": "Discovered.Passport",
          "source": "curated",
          "hasLeafNodes": false,
          "displayName": "Discovered > Passport"
        }],
        "maskingConfig": {
          "type": "Consistent Value",
          "metadata": {}
        }
      },
      "exceptions": null
    }],
    "description": "This policy masks all passports for data sources with columns tagged Discovered.Passport."
  }],
  "circumstances": [{
    "type": "columnTags",
    "operator": "or",
    "columnTag": {
      "name": "Discovered.Passport",
      "hasLeafNodes": false,
      "displayName": "Discovered > Passport"
    }
  }],
  "metadata": null,
  "clonedFrom": null,
  "createdBy": 2,
  "createdAt": "2021-09-21T18:35:48.615Z",
  "updatedAt": "2021-09-21T18:41:36.054Z",
  "createdByName": "Katie",
  "ownerRestrictions": null
}

Response example

{
  "id": 6,
  "policyKey": "mask-passports",
  "name": "Mask Passports",
  "type": "data",
  "template": false,
  "createdBy": 2,
  "createdByName": "Kate",
  "createdAt": "2021-09-14",
  "updatedAt": "2021-09-15",
  "actions": [
    {
      "type": "masking",
      "rules": [
        {
          "type": "masking",
          "exceptions": null,
          "config": {
            "fields": [
              {
                "name": "Discovered.Passport",
                "hasLeafNodes": false,
                "source": "curated"
              }
            ],
            "maskingConfig": {
              "type": "Consistent Value",
              "metadata": {}
            }
          }
        }
      ],
      "description": "This policy masks all passports for data sources with columns tagged Discovered.Passport."
      }
    ],
      "circumstances": [
        {
          "operator": "or",
          "type": "columnTags",
          "columnTag": {
            "name": "Discovered.Passport",
            "hasLeafNodes": false
          }
        }
      ],
  "clonedFrom": 0,
  "staged": false,
  "systemGenerated": false,
  "deleted": false,
  "certification": {
    "label": "string",
    "text": "string",
    "tags": [
      "string"
    ],
    "recertify": false
  }
}

Review policies

Method
Path
Purpose

POST

/policy/search

GET

/policy/global/{policyId}

GET

/policy/global

GET

/policy/global/appliedTo/{policyId}

GET

/policy/dataSourcePolicies/{dataSourceId}

GET

/policy/diff/{dataSourceId}

GET

/policy/handler/{dataSourceId}

Search for policies

POST /policy/search

Searches for specified policies.

Query parameters

Attribute
Description
Required

body

array[object] Facets of the policy to search by, including the rule type, where the policy applies, exceptions, and policy circumstances.

No

type

string The type of policy to search for: data or subscription.

No

scope

string Indicates whether the policy is global or local.

No

size

integer Pages results by default; size is the number of results to return per page.

No

offset

integer Used in combination with size to fetch pages.

No

sortField

string Indicates which field to sort the policies by: name, createdBy, createdAt, state, isNotApplied, or scope.

No

sortOrder

string Indicates whether to sort policies in ascending or descending order: asc or desc.

No

searchText

string Searches text; this will filter policies by name.

No

countOnly

boolean When true, will only return the number of policies found in the search.

No

mode

string Attribute options include similarPolicies, impactedUsers, or impactedDataSources.

No

excludedPolicies

array[integer] Global Policy IDs to exclude.

No

Response parameters

Attribute
Description

Count

integer The number of policies found that match the search criteria.

Hits

array Policy metadata, including the name, scope, type, and data sources it applies to.

Request example

This example request searches for a Global Policy that contains the text mask in Immuta.

curl \
    --request POST \
    --header "Content-Type: application/json" \
    --header "Authorization: Bearer dea464c07bd07300095caa8" \
    https://demo.immuta.com/policy/search?scope=global&searchText=mask

Response example

{
  "count": 1,
  "hits": [{
    "name": "Mask Passports",
    "createdBy": "Katie",
    "state": "active",
    "isNotApplied": false,
    "scope": "global",
    "type": "data",
    "globalPolicyId": 8,
    "policyId": null,
    "dataSourceId": null,
    "createdAt": "2021-09-21T18:35:48.615Z",
    "detailLabels": {
      "ruleType": ["masking"],
      "tags": ["Discovered.Passport"]
    },
    "enforcedOn": {
      "count": 1,
      "hits": [{
        "id": 1,
        "name": "Public Credit Accounts"
      }]
    }
  }]
}

Find policies by policy ID

GET /policy/global/{policyId}

Find the policy with the specified ID.

Query parameters

Attribute
Description
Required

policyId

integer The ID of the Global Policy.

Yes

Response parameters

Request example

This example request returns the Global Policy with the ID 1.

curl \
    --request GET \
    --header "Content-Type: application/json" \
    --header "Authorization: Bearer dea464c07bd07300095caa8" \
    https://demo.immuta.com/policy/global/1

Response example

{
  "id": 1,
  "policyKey": "New Column Added",
  "name": "New Column Added",
  "type": "data",
  "template": false,
  "staged": false,
  "systemGenerated": true,
  "deleted": false,
  "certification": null,
  "actions": [
    {
      "type": "masking",
      "rules": [
        {
          "type": "masking",
          "config": {
            "fields": [
              {
                "name": "New",
                "source": "curated",
                "hasLeafNodes": false
              }
            ],
            "maskingConfig": {
              "type": "Consistent Value",
              "metadata": {
                "constant": null
              }
            }
          },
          "exceptions": null
        }
      ],
      "description": null
    }
  ],
  "circumstances": [
    {
      "type": "columnTags",
      "operator": "or",
      "columnTag": {
        "name": "New",
        "hasLeafNodes": false
      }
    }
  ],
  "metadata": null,
  "clonedFrom": null,
  "createdBy": 1,
  "createdAt": "2021-09-09T13:47:03.448Z",
  "updatedAt": "2021-09-16T14:10:05.694Z",
  "createdByName": "Immuta System Account",
  "ownerRestrictions": null
}

Find policies by entity type

GET /policy/global

Find the policy with the specified entity type.

Query parameters

Attribute
Description
Required

offset

integer Used in combination with size to fetch pages.

No

size

integer Pages results by default; size is the number of results to return per page.

No

sortField

string Indicates which field to sort the policies by: name or createdAt. Default createdAt.

No

sortOrder

string Indicates whether to sort policies in ascending or descending order: asc or desc. Default desc.

No

searchText

string Searches text; this will filter policies by name.

No

type

string The type of policy to search for: data or subscription.

No

scope

string Indicates whether the policy is global or local.

No

nameOnly

boolean When true, only returns the policy name, type, and ID.

No

templates

boolean When true, returns templates only. When false, returns non-templates only. When omitted, returns both.

No

Response parameters

Attribute
Description

name

string The name of the policy.

id

integer The policy ID.

type

string The type of policy: data or subscription.

hits

array Policy metadata, including the name, scope, type, and dataSources it applies to.

Request example

This example request returns the name, type, and ID of all policies.

curl \
    --request GET \
    --header "Content-Type: application/json" \
    --header "Authorization: Bearer dea464c07bd07300095caa8" \
    https://demo.immuta.com/policy/global?nameOnly=true

Response example

[
  {
    "name": "Mask Passports",
    "id": 6,
    "type": "data"
  },
  {
    "name": "New Column Added",
    "id": 1,
    "type": "data"
  }
]

Find the number of data sources a specified policy applies to

GET /policy/global/appliedTo/{policyId}

Find the number of data sources the specified policy applies to.

Query parameters

Attribute
Description
Required

policyId

integer The ID of the Global Policy.

Yes

Response parameters

Attribute
Description

count

integer The number of data sources the policy applies to.

Request example

This example request returns the number of data sources the Global Policy with the ID 6 applies to.

curl \
    --request GET \
    --header "Content-Type: application/json" \
    --header "Authorization: Bearer dea464c07bd07300095caa8" \
    https://demo.immuta.com/policy/global/appliedTo/6

Response example

{
  "count": 1
}

Get the policy information for a specific data source

GET /policy/dataSourcePolicies/{dataSourceId}

Get the policy information for the specified data source.

Query parameters

Attribute
Description
Required

dataSourceId

integer The ID of the data source.

Yes

retrieveAll

boolean When false, filters out any custom domain-specific language rules.

No

excludeGlobal

boolean When true, filters out any policy actions driven by a Global Policy.

No

Response parameters

Attribute
Description

body

array Contains policy metadata, including the policy type, rules, exceptions, and date of creation.

Request example

This example request returns the information of policies applied to the data source with the ID 2.

curl \
    --request GET \
    --header "Content-Type: application/json" \
    --header "Authorization: Bearer dea464c07bd07300095caa8" \
    https://demo.immuta.com/policy/dataSourcePolicies/2

Response example

[
  {
    "type": "masking",
    "rules": [
      {
        "type": "masking",
        "config": {
          "fields": [
            "amount"
          ],
          "maskingConfig": {
            "type": "Consistent Value",
            "metadata": {
              "constant": null
            }
          }
        },
        "exceptions": null
      }
    ],
    "createdAt": "2021-09-20T20:03:18.001Z",
    "createdBy": 2,
    "description": null
  },
  {
    "type": "masking",
    "rules": [
      {
        "type": "masking",
        "config": {
          "fields": [
            "geo_latitude"
          ],
          "maskingConfig": {
            "type": "Consistent Value",
            "metadata": {}
          }
        },
        "exceptions": null
      }
    ],
    "createdAt": "2021-09-20T20:02:02.213Z",
    "createdBy": 2,
    "description": null
  },
  {
    "type": "prerequisite",
    "rules": [
      {
        "type": "prerequisite",
        "config": {
          "qualifications": {
            "operator": "and",
            "conditions": [
              {
                "type": "purposes",
                "value": "Re-identification Prohibited"
              }
            ]
          }
        },
        "exceptions": null
      }
    ],
    "createdAt": "2021-09-20T20:05:35.925Z",
    "createdBy": 2,
    "description": null
  }
]

Get the differences between two policy versions

GET /policy/diff/{dataSourceId}

Get the differences between two policy handler versions.

Query parameters

Attribute
Description
Required

dataSourceId

integer The ID of the data source.

Yes

previousHandlerId

integer The ID of the previous policy.

No

currentHandlerId

integer The ID of the current policy.

No

Response parameters

Attribute
Description

current

array Contains policy metadata of the current policy, including the policy type, rules, exceptions, and date of creation.

previous

array Contains policy metadata of the previous policy, including the policy type, rules, exceptions, and date of creation.

hasChanges

boolean When true, indicates the policy was changed.

Request example

This example request returns the information of policies applied to the data source with the ID 3.

curl \
    --request GET \
    --header "Content-Type: application/json" \
    --header "Authorization: Bearer dea464c07bd07300095caa8" \
    https://demo.immuta.com/policy/diff/3?currentHandlerId=47&previousHandlerId=46

Response example

{
  "current": [{
    "type": "rowOrObjectRestriction",
    "rules": [{
      "type": "visibility",
      "config": {
        "predicate": "(`city` in (@groups()))",
        "qualifications": {
          "operator": "and",
          "conditions": [{
            "type": "groups",
            "field": "city"
          }]
        }
      },
      "exceptions": null
    }],
    "createdAt": "2021-09-28T18:46:00.868Z",
    "createdBy": 2,
    "description": null
  }],
  "previous": [{
    "type": "rowOrObjectRestriction",
    "rules": [{
      "type": "visibility",
      "config": {
        "predicate": "(`city` in (@groups()))",
        "qualifications": {
          "operator": "and",
          "conditions": [{
            "type": "groups",
            "field": "city"
          }]
        }
      },
      "exceptions": null
    }],
    "createdAt": "2021-09-28T18:46:00.868Z",
    "createdBy": 2,
    "description": null
  }],
  "hasChanges": false
}

Get the policy handler metadata for a specific data source

GET /policy/handler/{dataSourceId}

Get the policy handler metadata for a specific data source.

Query parameters

Attribute
Description
Required

dataSourceId

integer The ID of the data source.

Yes

Response parameters

Attribute
Description

hits

array Policy metadata, including the name, scope, rules, and policy type.

Request example

This example request returns the policy handler metadata for policies applied to the data source with the ID 1.

curl \
    --request GET \
    --header "Content-Type: application/json" \
    --header "Authorization: Bearer dea464c07bd07300095caa8" \
    https://demo.immuta.com/policy/handler/1

Response example

{
  "id": 44,
  "dataSourceId": 1,
  "rules": "rule masking_0_0 {  when { model_0_0 : MaskingModel ; } then { Masked(model_0_0, 0, 0) } } rule masking_5_0 {  when { model_5_0 : MaskingModel ; } then { Masked(model_5_0, 5, 0) } } rule masking_6_0 {  when { model_6_0 : MaskingModel ; } then { Masked(model_6_0, 6, 0) } }",
  "jsonPolicies": [
    {
      "type": "masking",
      "rules": [
        {
          "type": "masking",
          "config": {
            "fields": [
              "email"
            ],
            "maskingConfig": {
              "type": "Consistent Value",
              "metadata": {
                "constant": null
              }
            }
          },
          "exceptions": null
        }
      ],
      "createdAt": "2021-09-21T19:27:27.589Z",
      "createdBy": 2,
      "description": null
    },
    {
      "type": "masking",
      "rules": [
        {
          "type": "masking",
          "config": {
            "fields": [
              "email"
            ],
            "maskingConfig": {
              "type": "Consistent Value",
              "metadata": {}
            }
          },
          "exceptions": null
        }
      ],
      "global": {
        "id": 0,
        "tag": "Discovered.Passport",
        "name": "string",
        "reason": "test",
        "staged": false,
        "deleted": false,
        "conflict": "existingMasking",
        "disabled": true,
        "metadata": {
          "HEDReportVersion": "string",
          "certificationExpirationInterval": "string"
        },
        "template": false,
        "createdAt": "2021-09-14T00:00:00.000Z",
        "createdBy": "Katie",
        "policyKey": "string",
        "updatedAt": "2021-09-14T00:00:00.000Z",
        "clonedFrom": 0,
        "certification": true,
        "createdByName": "Katie",
        "changedOnApply": [],
        "systemGenerated": false,
        "ownerRestrictions": null
      },
      "description": null
    },
    {
      "type": "masking",
      "rules": [
        {
          "type": "masking",
          "config": {
            "fields": [
              "last_name"
            ],
            "maskingConfig": {
              "type": "Consistent Value",
              "metadata": {}
            }
          },
          "exceptions": null
        }
      ],
      "global": {
        "id": 0,
        "tag": "Discovered.Passport",
        "name": "string",
        "reason": "test",
        "staged": false,
        "deleted": false,
        "conflict": null,
        "disabled": true,
        "metadata": {
          "HEDReportVersion": "string",
          "certificationExpirationInterval": "string"
        },
        "template": false,
        "createdAt": "2021-09-14T00:00:00.000Z",
        "createdBy": "Katie",
        "policyKey": "string",
        "updatedAt": "2021-09-14T00:00:00.000Z",
        "clonedFrom": 0,
        "certification": true,
        "createdByName": "Katie",
        "changedOnApply": [],
        "systemGenerated": false,
        "ownerRestrictions": null
      },
      "description": null
    },
    {
      "type": "masking",
      "rules": [
        {
          "type": "masking",
          "config": {
            "fields": [
              "ssn"
            ],
            "maskingConfig": {
              "type": "Consistent Value",
              "metadata": {}
            }
          },
          "exceptions": null
        }
      ],
      "global": {
        "id": 0,
        "tag": "Discovered.Passport",
        "name": "string",
        "reason": "test",
        "staged": false,
        "deleted": false,
        "conflict": null,
        "disabled": true,
        "metadata": {
          "HEDReportVersion": "string",
          "certificationExpirationInterval": "string"
        },
        "template": false,
        "createdAt": "2021-09-14T00:00:00.000Z",
        "createdBy": "Katie",
        "policyKey": "string",
        "updatedAt": "2021-09-14T00:00:00.000Z",
        "clonedFrom": 0,
        "certification": true,
        "createdByName": "Katie",
        "changedOnApply": [],
        "systemGenerated": false,
        "ownerRestrictions": null
      },
      "description": null
    },
    {
      "type": "masking",
      "rules": [
        {
          "type": "masking",
          "config": {
            "fields": [
              "email"
            ],
            "maskingConfig": {
              "type": "Consistent Value",
              "metadata": {}
            }
          },
          "exceptions": null
        }
      ],
      "global": {
        "id": 8,
        "tag": "Discovered.Passport",
        "name": "Mask Passports",
        "reason": null,
        "staged": false,
        "deleted": false,
        "conflict": "existingMasking",
        "disabled": true,
        "metadata": null,
        "template": false,
        "createdAt": "2021-09-21T18:35:48.615Z",
        "createdBy": "Katie",
        "policyKey": "Mask Passport",
        "updatedAt": "2021-09-21T18:41:54.299Z",
        "clonedFrom": null,
        "certification": true,
        "createdByName": "Katie",
        "changedOnApply": [],
        "systemGenerated": false,
        "ownerRestrictions": null
      },
      "description": "This policy masks all passports for data sources with columns tagged Discovered.Passport."
    },
    {
      "type": "masking",
      "rules": [
        {
          "type": "masking",
          "config": {
            "fields": [
              "last_name"
            ],
            "maskingConfig": {
              "type": "Consistent Value",
              "metadata": {}
            }
          },
          "exceptions": null
        }
      ],
      "global": {
        "id": 8,
        "tag": "Discovered.Passport",
        "name": "Mask Passport",
        "reason": null,
        "staged": false,
        "deleted": false,
        "conflict": null,
        "disabled": false,
        "metadata": null,
        "template": false,
        "createdAt": "2021-09-21T18:35:48.615Z",
        "createdBy": "Katie",
        "policyKey": "Mask Passport",
        "updatedAt": "2021-09-21T18:41:54.299Z",
        "clonedFrom": null,
        "certification": true,
        "createdByName": "Katie",
        "changedOnApply": [],
        "systemGenerated": false,
        "ownerRestrictions": null
      },
      "description": "This policy masks all passports for data sources with columns tagged Discovered.Passport."
    },
    {
      "type": "masking",
      "rules": [
        {
          "type": "masking",
          "config": {
            "fields": [
              "ssn"
            ],
            "maskingConfig": {
              "type": "Consistent Value",
              "metadata": {}
            }
          },
          "exceptions": null
        }
      ],
      "global": {
        "id": 8,
        "tag": "Discovered.Passport",
        "name": "Mask Passport",
        "reason": null,
        "staged": false,
        "deleted": false,
        "conflict": null,
        "disabled": false,
        "metadata": null,
        "template": false,
        "createdAt": "2021-09-21T18:35:48.615Z",
        "createdBy": "Katie",
        "policyKey": "Mask Passports",
        "updatedAt": "2021-09-21T18:41:54.299Z",
        "clonedFrom": null,
        "certification": true,
        "createdByName": "Katie",
        "changedOnApply": [],
        "systemGenerated": false,
        "ownerRestrictions": null
      },
      "description": "This policy masks all passports for data sources with columns tagged Discovered.Passport."
    }
  ],
  "createdAt": "2021-09-21T19:27:27.977Z",
  "updatedAt": "2021-09-21T19:27:27.977Z"
}

Delete a global policy

DELETE /policy/global/{policyId}

Delete the specified Global Policy.

Query parameters

Attribute
Description
Required

policyId

integer The ID of the policy.

Yes

Response parameters

Request example

The following request deletes the Global Policy with ID 6.

curl \
    --request DELETE \
    --header "Content-Type: application/json" \
    --header "Authorization: Bearer dea464c07bd07300095caa8" \
    https://demo.immuta.com/policy/global/6

Response example

{
  "id": 6,
  "policyKey": "mask-passports",
  "name": "Mask Passports",
  "type": "data",
  "template": false,
  "staged": false,
  "systemGenerated": false,
  "deleted": false,
  "certification": {
    "tags": [
      "string"
    ],
    "text": "string",
    "label": "string"
  },
  "actions": [
    {
      "type": "masking",
      "rules": [
        {
          "type": "masking",
          "config": {
            "fields": [
              {
                "name": "Discovered.Passport",
                "source": "curated",
                "hasLeafNodes": false
              }
            ],
            "maskingConfig": {
              "type": "Consistent Value",
              "metadata": {}
            }
          },
          "exceptions": null
        }
      ],
      "description": "This policy masks all passports for data sources with columns tagged Discovered.Passport."
    }
  ],
  "circumstances": [
    {
      "type": "columnTags",
      "operator": "or",
      "columnTag": {
        "name": "Discovered.Passport",
        "hasLeafNodes": false
      }
    }
  ],
  "metadata": null,
  "clonedFrom": 0,
  "createdBy": 2,
  "createdAt": "2021-09-14T00:00:00.000Z",
  "updatedAt": "2021-09-15T18:46:17.661Z",
  "createdByName": "Katie",
  "ownerRestrictions": null
}

.

.

.

.

See the for payload examples and details.

See the for payload examples and details.

.

.

.

.

.

.

.

The response returns a .

The response returns a of the policy that was deleted.

Policy Handler Objects tutorial
Policy Handler Objects tutorial
policy object
policy object
Create and manage policies
Search for, review, and compare policies
Delete Global Policies
Create a Global Policy with a given entityType
Create (POST) or update (PUT) a policy for the specified data source
Apply a Global Policy to a data source
Update the specified Global Policy
Search all policies
Find the policy with the specified ID
Find a list of Global Policies with the specified entityType
Find the number of data sources the specified policy is currently applied to
Get the policy information for the specified data source
Get the differences between two policy handler versions
Get the policy handler metadata for a specific data source