I am only able to get collection details through API call but it only tells the basic information about the collection. I want to find the assert details lying under the collection
I have tried with the GET API call ({{Endpoint_Uri}}/collections/?api-version=2019-11-01-preview) and tried with Python as well. Below is the code:
from purviewautomation import (ServicePrincipalAuthentication,
PurviewCollections)
auth = ServicePrincipalAuthentication(tenant_id="Tenantid",
client_id="client_id",
client_secret="client_secret")
client = PurviewCollections(purview_account_name="account_name",auth=auth)
print(client.list_collections())
You can use the below Python code to export all the Assets which are there in a collection.
You can also refer to this blog which has detailed information about exporting Assets in csv.
Output:
AFAIK, there is no Rest API to fetch the Assets list from a collection. As per the ms docs, you can fetch the Asset details by using Guid, Unique Attribute and Classifications.