{"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, exemption, 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.
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
booleanDefault 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.
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}