Skip to main content

This package provides a command line interface to Azure Purview's REST API.

Project description

Azure Purview CLI

This package provides a command line interface to Azure Purview's REST API.
purviewcli

Pre-Requisites

The identity executing Azure Purview CLI commands will need access to the deployed Azure Purview resource along with the following role assignments:

  • Purview Data Curator
  • Purview Data Source Administrator

Azure Identity

The purviewcli package uses DefaultAzureCredential from the azure-identity library. Read the azure-identity documentation to understand the authentication hierarchy (i.e. Environment Variables > Managed Identity > Visual Studio Code > Azure CLI > Interactive).

Environment Variable

Set the PURVIEW_NAME environment variable to the Azure Purview account name.

export PURVIEW_NAME=<purview-account-name>

Note: Syntax to set an environment variable may vary depending on your environment.

Installation

pip install purviewcli

Usage

pv command (mandatory parameters) [optional parameters]

Commands

Search

pv search [--keywords=<keywords> --limit=<limit> --offset=<offset> --facet=<facet>...]

Entity

Entity

createEntity (--entityName=<entityName> --entityType=<entityType> --qualifiedName=<qualifiedName>) [--status=<status> --description=<description> --source=<source>]
createEntityBulk (--entityName=<entityName>... --entityType=<entityType>... --qualifiedName=<qualifiedName>...)
getEntity (--guid=<guid>) [--ignoreRelationships --minExtInfo]
getEntityHeader (--guid=<guid>)
getEntityAudit (--guid=<guid>) [--auditAction=<auditAction> --count=<count> --startKey=<startKey>]
getEntityBulk (--guid=<guid>...) [--ignoreRelationships --minExtInfo]
getEntityBulkHeaders [--tagUpdateStartTime=<tagUpdateStartTime>]
getEntityBusinessmetadataImportTemplate
deleteEntity (--guid=<guid>)
deleteEntityBulk (--guid=<guid>...)

Label

assignLabels (--guid=<guid> --label=<label>...)

Classification

addEntityClassifications (--guid=<guid> --classificationName=<classificationName>...)
getEntityClassification (--guid=<guid> --classificationName=<classificationName>)
getEntityClassifications (--guid=<guid>)
deleteEntityClassification (--guid=<guid> --classificationName=<classificationName>)

Unique Attribute

getEntityUniqueAttributeType (--typeName=<typeName> --attrKey=<attrKey> --attrVal=<attrVal>) [--ignoreRelationships --minExtInfo]
getEntityUniqueAttributeTypeHeader (--typeName=<typeName> --attrKey=<attrKey> --attrVal=<attrVal>)
getEntityBulkUniqueAttributeType (--typeName=<typeName>) [--ignoreRelationships --minExtInfo]

Glossary

Glossary

createGlossary (--name=<name>)
getGlossary [--glossaryGuid=<glossaryGuid>] [--limit=<limit> --offset=<offset> --sort=<sort>]
getGlossaryDetailed (--glossaryGuid=<glossaryGuid>)
deleteGlossary (--glossaryGuid=<glossaryGuid>)

Category

createGlossaryCategory (--categoryName=<name>) [--glossaryGuid=<glossaryGuid>]
createGlossaryCategories (--categoryName=<name>...) [--glossaryGuid=<glossaryGuid>]
getGlossaryCategory (--categoryGuid=<categoryGuid>)
deleteGlossaryCategory (--categoryGuid=<categoryGuid>)
getGlossaryCategories (--glossaryGuid=<glossaryGuid>) [--limit=<limit> --offset=<offset> --sort=<sort>]
getGlossaryCategoriesHeaders (--glossaryGuid=<glossaryGuid>) [--limit=<limit> --offset=<offset> --sort=<sort>]
getGlossaryCategoryRelated (--categoryGuid=<categoryGuid>) [--limit=<limit> --offset=<offset> --sort=<sort>]
getGlossaryCategoryTerms (--categoryGuid=<categoryGuid>) [--limit=<limit> --offset=<offset> --sort=<sort>]

Terms

createGlossaryTerm (--termName=<termName>) [--glossaryGuid=<glossaryGuid> --status=<status> --longDescription=<longDescription> --abbreviation=<abbreviation> --synonym=<synonym>... --related=<related>... --resourceName=<resourceName>... --resourceUrl=<resourceUrl>... --expertId=<expertId>... --stewardId=<stewardId>...]
createGlossaryTerms (--termName=<termName>...) [--glossaryGuid=<glossaryGuid> --status=<status>... --longDescription=<longDescription>...]
getGlossaryTerm (--termGuid=<termGuid>)
updateGlossaryTerm (--termGuid=<termGuid>) [--termName=<termName> --glossaryGuid=<glossaryGuid> --status=<status> --longDescription=<longDescription> --abbreviation=<abbreviation> --synonym=<synonym>... --related=<related>... --resourceName=<resourceName>... --resourceUrl=<resourceUrl>... --expertId=<expertId>... --stewardId=<stewardId>...]
deleteGlossaryTerm (--termGuid=<termGuid>)
purgeGlossaryTerms [--glossaryGuid=<glossaryGuid>]
getGlossaryTerms (--glossaryGuid=<glossaryGuid>) [--limit=<limit> --offset=<offset> --sort=<sort>]
getGlossaryTermsHeaders (--glossaryGuid=<glossaryGuid>) [--limit=<limit> --offset=<offset> --sort=<sort>]
getGlossaryTermsRelated (--termGuid=<termGuid>) [--limit=<limit> --offset=<offset> --sort=<sort>]

Assigned Entities

assignEntities (--termGuid=<termGuid> --guid=<guid>...)
getAssignedEntities (--termGuid=<termGuid>) [--limit=<limit> --offset=<offset> --sort=<sort>]
deleteAssignedEntities (--termGuid=<termGuid> --guid=<guid>...)

Template

getGlossaryTemplate

Lineage

Lineage

getLineage (--guid=<guid>) [--depth=<depth> --width=<width> --direction=<direction> --forceNewApi --includeParent --getDerivedLineage]
getLineageUniqueAttributeType (--typeName=<typeName>) [--depth=<depth> --direction=<direction>]

Relationship

Relationship

createRelationship (--typeName=<typeName> --status=<status> --end1Guid=<end1Guid> --end2Guid=<end2Guid>)
getRelationship (--guid=<guid>) [--extendedInfo]
updateRelationship (--guid=<guid>) [--status=<status> --end1Guid=<end1Guid> --end2Guid=<end2Guid>]
deleteRelationship (--guid=<guid>)

Types

Business Metadata Definition

getBusinessmetadatadef (--guid=<guid> | --name=<name>)

Classification Definition

createClassificationdefs (--defName=<defName>...) [--defDescription=<defDescription>... --defDisplayName=<defDisplayName>...]
getClassificationdef (--guid=<guid> | --name=<name>)
updateClassificationdefs (--defName=<defName>...) [--defDescription=<defDescription>... --defDisplayName=<defDisplayName>...]
deleteClassificationdef (--guid=<guid> | --name=<name>)

Entity Definition

getEntitydef (--guid=<guid> | --name=<name>)

Enum Definition

getEnumdef (--guid=<guid> | --name=<name>)

Relationship Definition

getRelationshipdef (--guid=<guid> | --name=<name>)

Struct Definition

getStructdef (--guid=<guid> | --name=<name>)

Type Definition

getTypedef (--guid=<guid> | --name=<name>)
getTypedefs [--type=<type>]
getTypedefsHeaders
deleteTypedefName (--name=<name>)

Scan

Scan

getScan (--datasource=<datasource> --scanName=<scanName>)
getScans (--datasource=<datasource>)
getScanHistory (--datasource=<datasource> --scanName=<scanName>)
getScanFilters (--datasource=<datasource> --scanName=<scanName>)
runScan (--datasource=<datasource> --scanName=<scanName>) [--scanLevel=<scanLevel>]

Scan Rule Set

getScanRulesets
getSystemScanRulesets
getSystemScanRulesetsSettings

Source

getSource (--datasource=<datasource>)
getSources
deleteSource (--datasource=<datasource>)
createCollection (--collection=<collection>) [--parentCollection=<parentCollection>]
deleteCollection (--collection=<collection>)
registerSource (--datasource=<datasource> --kind=<kind>) [--accountUri=<accountUri> --subscriptionId=<subscriptionId> --resourceGroup=<resourceGroup> --location=<location> --resourceName=<resourceName> --endpoint=<endpoint> --serverEndpoint=<serverEndpoint> --tenant=<tenant> --parentCollection=<parentCollection> --host=<host> --applicationServer=<applicationServer> --systemNumber=<systemNumber> --clusterUrl=<clusterUrl> --roleARN=<roleARN> --serviceUrl=<serviceUrl>]

Classification Rules

getClassificationRule (--classificationName=<classificationName>)
getClassificationRules

Guardian (Insights)

getAssetDistributionByDataSource [--registeredSourceGroup=<registeredSourceGroup> --classificationCategory=<classificationCategory> --classificationName=<classificationName>]
getAssetDistributionByTopPaths (--datasource=<datasource>) [--registeredSourceGroup=<registeredSourceGroup> --classificationCategory=<classificationCategory> --classificationName=<classificationName>]
getFileTypeSizeTimeSeries (--fileType=<fileType> --window=<window>) [--registeredSourceGroup=<registeredSourceGroup> --datasource=<datasource>]
getFileTypeSizeTrendByDataSource (--fileType=<fileType> --window=<window>) [--registeredSourceGroup=<registeredSourceGroup> --datasource=<datasource>]
getTopFileTypesBySize [--registeredSourceGroup=<registeredSourceGroup> --datasource=<datasource>]
getTopLevelSummary [--registeredSourceGroup=<registeredSourceGroup>]
getRegisteredSourceGroupsWithAssets

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

purviewcli-0.1.3.tar.gz (14.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

purviewcli-0.1.3-py3-none-any.whl (33.6 kB view details)

Uploaded Python 3

File details

Details for the file purviewcli-0.1.3.tar.gz.

File metadata

  • Download URL: purviewcli-0.1.3.tar.gz
  • Upload date:
  • Size: 14.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.55.1 CPython/3.7.6

File hashes

Hashes for purviewcli-0.1.3.tar.gz
Algorithm Hash digest
SHA256 3ee4c9e3b20364d53aea79475e2fc995bded2bf8dc4a65c1f0cdb34a6d693b74
MD5 8e0ea7eaa39a2d3dee997005d937c192
BLAKE2b-256 819f27c2ecef6d18980cdb28b6d6861f5098c4d25073903705713bcc844906b5

See more details on using hashes here.

File details

Details for the file purviewcli-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: purviewcli-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 33.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.55.1 CPython/3.7.6

File hashes

Hashes for purviewcli-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 846dca2a49d9e29143eb911858da88b6084a8663249485554ab84c77803f91bc
MD5 125af4ca542d68d01866bca2a518213f
BLAKE2b-256 4c69fa7a8ceed40449b3cb1cb8e99f9cbdfbc5811d1f06f60a8da737ca2ffca0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page