Metadata Policy - List All
List or Get metadata policies
GET {Endpoint}/policyStore/metadataPolicies?api-version=2021-07-01-preview
GET {Endpoint}/policyStore/metadataPolicies?collectionName={collectionName}&api-version=2021-07-01-preview
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
Endpoint
|
path | True |
string |
The endpoint of your Purview account. Example: https://{accountName}.purview.azure.com. |
api-version
|
query | True |
string |
The api version to use. |
collection
|
query |
string |
The name of an existing collection for which one policy needs to be fetched. |
Responses
Name | Type | Description |
---|---|---|
200 OK |
Success |
|
Other Status Codes |
An error response received from the Metadata Policy Service Headers x-ms-error-code: string |
Security
azure_auth
Azure Active Directory OAuth2 Flow.
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
Name | Description |
---|---|
user_impersonation | impersonate your user account |
Examples
MetadataPolicy_ListAll
Sample Request
GET {Endpoint}/policyStore/metadataPolicies?api-version=2021-07-01-preview
Sample Response
x-ms-request-id: 8e58266a-de42-40d5-b3c4-c6a7e159cfba
{
"values": [
{
"name": "policy_mycollection",
"id": "98ed42ff-b67f-44df-8c8c-7e6b43e77055",
"version": 1,
"properties": {
"description": "",
"decisionRules": [
{
"kind": "decisionrule",
"effect": "Permit",
"dnfCondition": [
[
{
"attributeName": "resource.purview.collection",
"attributeValueIncludes": "mycollection"
},
{
"attributeName": "derived.purview.permission",
"attributeValueIncludes": "permission:mycollection"
}
]
]
}
],
"attributeRules": [
{
"kind": "attributerule",
"id": "purviewmetadatarole_builtin_collection-administrator:mycollection",
"name": "purviewmetadatarole_builtin_collection-administrator:mycollection",
"dnfCondition": [
[
{
"attributeName": "principal.microsoft.id",
"attributeValueIncludedIn": [
"69e520f2-5f26-4074-9fe1-5187d85ec005"
]
},
{
"attributeName": "derived.purview.role",
"attributeValueIncludes": "purviewmetadatarole_builtin_collection-administrator"
}
],
[
{
"attributeName": "derived.purview.permission",
"attributeValueIncludes": "purviewmetadatarole_builtin_collection-administrator:myparentcollection"
}
]
]
},
{
"kind": "attributerule",
"id": "permission:mycollection",
"name": "permission:mycollection",
"dnfCondition": [
[
{
"attributeName": "derived.purview.permission",
"attributeValueIncludes": "purviewmetadatarole_builtin_collection-administrator:mycollection"
}
],
[
{
"attributeName": "derived.purview.permission",
"attributeValueIncludes": "permission:myparentcollection"
}
]
]
}
],
"collection": {
"type": "CollectionReference",
"referenceName": "mycollection"
},
"parentCollectionName": "myparentcollection"
}
},
{
"name": "policy_myparentcollection",
"id": "b69bb29e-91dc-41f5-af94-3eb86f9c45e8",
"version": 6,
"properties": {
"description": "",
"decisionRules": [
{
"kind": "decisionrule",
"effect": "Permit",
"dnfCondition": [
[
{
"attributeName": "resource.purview.collection",
"attributeValueIncludes": "myparentcollection"
},
{
"attributeName": "derived.purview.permission",
"attributeValueIncludes": "permission:myparentcollection"
}
]
]
}
],
"attributeRules": [
{
"kind": "attributerule",
"id": "purviewmetadatarole_builtin_collection-administrator:myparentcollection",
"name": "purviewmetadatarole_builtin_collection-administrator:myparentcollection",
"dnfCondition": [
[
{
"attributeName": "principal.microsoft.id",
"attributeValueIncludedIn": [
"6545aabd-7f83-4e63-adc1-45dcab61d5c3"
]
},
{
"attributeName": "derived.purview.role",
"attributeValueIncludes": "purviewmetadatarole_builtin_collection-administrator"
}
]
]
},
{
"kind": "attributerule",
"id": "purviewmetadatarole_builtin_purview-reader:myparentcollection",
"name": "purviewmetadatarole_builtin_purview-reader:myparentcollection",
"dnfCondition": [
[
{
"attributeName": "principal.microsoft.id",
"attributeValueIncludedIn": [
"6545aabd-7f83-4e63-adc1-45dcab61d5c3"
]
},
{
"attributeName": "derived.purview.role",
"attributeValueIncludes": "purviewmetadatarole_builtin_purview-reader"
}
]
]
},
{
"kind": "attributerule",
"id": "purviewmetadatarole_builtin_data-curator:myparentcollection",
"name": "purviewmetadatarole_builtin_data-curator:myparentcollection",
"dnfCondition": [
[
{
"attributeName": "principal.microsoft.id",
"attributeValueIncludedIn": [
"6545aabd-7f83-4e63-adc1-45dcab61d5c3"
]
},
{
"attributeName": "derived.purview.role",
"attributeValueIncludes": "purviewmetadatarole_builtin_data-curator"
}
]
]
},
{
"kind": "attributerule",
"id": "purviewmetadatarole_builtin_data-source-administrator:myparentcollection",
"name": "purviewmetadatarole_builtin_data-source-administrator:myparentcollection",
"dnfCondition": [
[
{
"attributeName": "principal.microsoft.id",
"attributeValueIncludedIn": [
"6545aabd-7f83-4e63-adc1-45dcab61d5c3"
]
},
{
"attributeName": "derived.purview.role",
"attributeValueIncludes": "purviewmetadatarole_builtin_data-source-administrator"
}
]
]
},
{
"kind": "attributerule",
"id": "permission:myparentcollection",
"name": "permission:myparentcollection",
"dnfCondition": [
[
{
"attributeName": "derived.purview.permission",
"attributeValueIncludes": "purviewmetadatarole_builtin_collection-administrator:myparentcollection"
}
],
[
{
"attributeName": "derived.purview.permission",
"attributeValueIncludes": "purviewmetadatarole_builtin_purview-reader:myparentcollection"
}
],
[
{
"attributeName": "derived.purview.permission",
"attributeValueIncludes": "purviewmetadatarole_builtin_data-curator:myparentcollection"
}
],
[
{
"attributeName": "derived.purview.permission",
"attributeValueIncludes": "purviewmetadatarole_builtin_data-source-administrator:myparentcollection"
}
]
]
}
],
"collection": {
"type": "CollectionReference",
"referenceName": "myparentcollection"
}
}
}
]
}
Definitions
Name | Description |
---|---|
Attribute |
Attribute matcher for a rule |
Attribute |
The attribute rule for a policy |
Collection |
The collection reference for a policy |
Decision |
The effect for rule |
Decision |
The decision rule for a policy |
Error |
The error model for metadata policy |
Error |
The error response model for metadata policy |
Kind |
The kind of rule |
Metadata |
|
Metadata |
List of Metadata Policies |
Metadata |
AttributeMatcher
Attribute matcher for a rule
Name | Type | Description |
---|---|---|
attributeName |
string |
AttributeName |
attributeValueExcludedIn |
string[] |
List of values excluded for attribute |
attributeValueExcludes |
string |
Value excluded for attribute |
attributeValueIncludedIn |
string[] |
List of values for attribute |
attributeValueIncludes |
string |
Value for attribute |
AttributeRule
The attribute rule for a policy
Name | Type | Description |
---|---|---|
dnfCondition |
The dnf Condition for a rule |
|
id |
string |
The id for rule |
kind |
The kind of rule |
|
name |
string |
The name for rule |
CollectionReference
The collection reference for a policy
Name | Type | Default Value | Description |
---|---|---|---|
referenceName |
string |
The name of reference |
|
type |
string |
CollectionReference |
The type of reference |
Decision
The effect for rule
Name | Type | Description |
---|---|---|
Deny |
string |
|
Permit |
string |
DecisionRule
The decision rule for a policy
Name | Type | Description |
---|---|---|
dnfCondition |
The dnf Condition for a rule |
|
effect |
The effect for rule |
|
kind |
The kind of rule |
ErrorModel
The error model for metadata policy
Name | Type | Description |
---|---|---|
code |
string |
The error code |
details |
The error details |
|
message |
string |
The error message |
target |
string |
The error target |
ErrorResponseModel
The error response model for metadata policy
Name | Type | Description |
---|---|---|
error |
The error model for metadata policy |
Kind
The kind of rule
Name | Type | Description |
---|---|---|
decisionrule |
string |
MetadataPolicy
Name | Type | Description |
---|---|---|
id |
string |
The id of policy |
name |
string |
The name of policy |
properties | ||
version |
integer |
The version of policy |
MetadataPolicyList
List of Metadata Policies
Name | Type | Description |
---|---|---|
nextLink |
string |
|
values |
MetadataPolicyProperties
Name | Type | Description |
---|---|---|
attributeRules |
The AttributeRules of policy |
|
collection |
The collection reference for a policy |
|
decisionRules |
The DecisionRules of policy |
|
description |
string |
The description of policy |
parentCollectionName |
string |
The parent collection of the policy |