Skip to content

Commit e738cbd

Browse files
Merge pull request #245613 from abandyop/patch-18
Update tutorial-metadata-policy-collections-apis.md
2 parents 3242c29 + 276d632 commit e738cbd

File tree

1 file changed

+15
-14
lines changed

1 file changed

+15
-14
lines changed

articles/purview/tutorial-metadata-policy-collections-apis.md

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,13 @@ The following table gives an overview of the [Microsoft Purview Metadata Policy
2727
2828
| API function | REST method | API endpoint | Description |
2929
| --- | --- | --- | --- |
30-
| Read All Metadata Roles| GET| https://{pv-acc-name}.purview.azure.com /policystore/metadataroles?&api-version=2021-07-01| Reads all metadata roles from your Microsoft Purview account.|
31-
| Read Metadata Policy By Collection Name| GET| https://{pv-acc-name}.purview.azure.com /policystore/collections/{collectionName}/metadataPolicy?&api-version=2021-07-01| Reads the metadata policy by using a specified collection name (the six character random name that's generated by Microsoft Purview when it creates the policy).|
32-
| Read Metadata Policy By PolicyID| GET| https://{pv-acc-name}.purview.azure.com /policystore/metadataPolicies/{policyId}?&api-version=2021-07-01| Reads the metadata policy by using a specified policy ID. The policy ID is in GUID format.|
33-
| Read All Metadata Policies| GET| https://{pv-acc-name}.purview.azure.com /policystore/metadataPolicies?&api-version=2021-07-01| Reads all metadata policies from your Microsoft Purview account. You can pick a certain policy to work with from the JSON output list that's generated by this API.|
34-
| Update/PUT Metadata Policy| PUT| https://{pv-acc-name}.purview.azure.com /policystore/metadataPolicies/{policyId}?&api-version=2021-07-01| Updates the metadata policy by using a specified policy ID. The policy ID is in GUID format.|
35-
| | |
30+
| Read All Metadata Roles| GET| https://{pv-acc-name}.purview.azure.com /policystore/metadataroles?&api-version={latest-api-version}^| Reads all metadata roles from your Microsoft Purview account.|
31+
| Read Metadata Policy By Collection Name| GET| https://{pv-acc-name}.purview.azure.com /policystore/collections/{collectionName}/metadataPolicy?&api-version={latest-api-version}^| Reads the metadata policy by using a specified collection name (the six character random name that's generated by Microsoft Purview when it creates the policy).|
32+
| Read Metadata Policy By PolicyID| GET| https://{pv-acc-name}.purview.azure.com /policystore/metadataPolicies/{policyId}?&api-version={latest-api-version}^| Reads the metadata policy by using a specified policy ID. The policy ID is in GUID format.|
33+
| Read All Metadata Policies| GET| https://{pv-acc-name}.purview.azure.com /policystore/metadataPolicies?&api-version={latest-api-version}^| Reads all metadata policies from your Microsoft Purview account. You can pick a certain policy to work with from the JSON output list that's generated by this API.|
34+
| Update/PUT Metadata Policy| PUT| https://{pv-acc-name}.purview.azure.com /policystore/metadataPolicies/{policyId}?&api-version={latest-api-version}^| Updates the metadata policy by using a specified policy ID. The policy ID is in GUID format.|
35+
| ^ Refer the [Microsoft Purview Metadata Policy API Reference](/rest/api/purview/metadatapolicydataplane/Metadata-Policy) for {latest-api-version}
36+
3637

3738
## Microsoft Purview catalog collections API reference summary
3839

@@ -98,7 +99,7 @@ Use Microsoft Purview REST APIs to add or remove a user, group, or service princ
9899
To list all the available metadata access permission roles, run the following command:
99100

100101
```ruby
101-
GET https://{your_purview_account_name}.purview.azure.com/policystore/metadataroles?api-version=2021-07-01
102+
GET https://{your_purview_account_name}.purview.azure.com/policystore/metadataroles?api-version={latest-api-version}^
102103
```
103104

104105
The output JSON will describe the roles and their associated permissions in this format.
@@ -235,7 +236,7 @@ The default metadata roles are listed in the following table:
235236
## Get all metadata policies
236237

237238
```ruby
238-
GET https://{your_purview_account_name}.purview.azure.com/policystore/metadataPolicies?api-version=2021-07-01
239+
GET https://{your_purview_account_name}.purview.azure.com/policystore/metadataPolicies?api-version={latest-api-version}^
239240
```
240241
The preceding command lists all available metadata policies across the entire collections hierarchy in tree format, from the root collection at the top to all its child policies. Each child collection contains each of its next level children.
241242

@@ -612,7 +613,7 @@ As described in the following two sections, both APIs serve the same purpose, an
612613
### Get the metadata policy of the collection by using the collection name
613614

614615
```ruby
615-
GET https://{your_purview_account_name}.purview.azure.com/policystore/collections/{collectionName}/metadataPolicy?api-version=2021-07-01
616+
GET https://{your_purview_account_name}.purview.azure.com/policystore/collections/{collectionName}/metadataPolicy?api-version={latest-api-version}^
616617
```
617618

618619
1. The Microsoft Purview account name is {your_purview_account_name}. Replace it with your Microsoft Purview account name.
@@ -623,7 +624,7 @@ GET https://{your_purview_account_name}.purview.azure.com/policystore/collection
623624

624625
1. Replace "{collectionName}" in the API URL with the value of "referenceName": "{6-char-collection-name}". For example, if your six-character collection name is "7xkdg2," the API URL will be formatted as:
625626

626-
https://{your_purview_account_name}.purview.azure.com/policystore/collections/7xkdg2/metadataPolicy?api-version=2021-07-01
627+
https://{your_purview_account_name}.purview.azure.com/policystore/collections/7xkdg2/metadataPolicy?api-version={latest-api-version}^
627628

628629
1. Execute the following API:
629630

@@ -715,7 +716,7 @@ GET https://{your_purview_account_name}.purview.azure.com/policystore/collection
715716
### Get the metadata policy of the collection by using the policy ID
716717

717718
```ruby
718-
GET https://{your_purview_account_name}.purview.azure.com/policystore/metadataPolicies/{policyId}?api-version=2021-07-01
719+
GET https://{your_purview_account_name}.purview.azure.com/policystore/metadataPolicies/{policyId}?api-version={latest-api-version}^
719720
```
720721

721722
1. The Microsoft Purview account name is {your_purview_account_name}. Replace it with your Microsoft Purview account name.
@@ -726,7 +727,7 @@ GET https://{your_purview_account_name}.purview.azure.com/policystore/metadataPo
726727

727728
1. Replace "{policyId}" in the API URL with the value of "id". For example, if your "{policy-guid}" is "c6639bb2-9c41-4be0-912b-775750e725de," the API URL will be formatted as:
728729

729-
https://{your_purview_account_name}.purview.azure.com/policystore/metadataPolicies/c6639bb2-9c41-4be0-912b-775750e725de?api-version=2021-07-01
730+
https://{your_purview_account_name}.purview.azure.com/policystore/metadataPolicies/c6639bb2-9c41-4be0-912b-775750e725de?api-version={latest-api-version}^
730731

731732
1. Now execute the following API:
732733

@@ -822,7 +823,7 @@ GET https://{your_purview_account_name}.purview.azure.com/policystore/metadataPo
822823
## Update the collection policy
823824

824825
```ruby
825-
PUT https://{your_purview_account_name}.purview.azure.com/policystore/metadataPolicies/{policyId}?api-version=2021-07-01
826+
PUT https://{your_purview_account_name}.purview.azure.com/policystore/metadataPolicies/{policyId}?api-version={latest-api-version}^
826827
```
827828

828829
In this section, you update the policy JSON that you obtained in the preceding step by adding or removing a user, group, or service principal from the collection. You then push it to the Microsoft Purview service by using a PUT REST method.
@@ -927,7 +928,7 @@ Whether you're adding or removing a user, group, or service principal, you'll fo
927928
By default, the user who created the Microsoft Purview account is the Root Collection Administrator (that is, the administrator of the topmost level of the collection hierarchy). However, in some cases, an organization may want to change the Root Collection Administrator using the API.
928929

929930
```ruby
930-
POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Purview/accounts/{accountName}/addRootCollectionAdmin?api-version=2021-07-01
931+
POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Purview/accounts/{accountName}/addRootCollectionAdmin?api-version={latest-api-version}^
931932
```
932933
To run the preceding command, you need only to pass the new Root Collection Administrator's object ID. As we mentioned before, the object ID can be that of any user, group, or service principal.
933934

0 commit comments

Comments
 (0)