Freigeben über


DiscoveryOperations Class

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through

PurviewCatalogClient's

<xref:discovery> attribute.

Inheritance
builtins.object
DiscoveryOperations

Constructor

DiscoveryOperations(*args, **kwargs)

Methods

auto_complete

Get auto complete options.

browse

Browse entities by path or entity type.

query

Gets data using search.

suggest

Get search suggestions by query criteria.

auto_complete

Get auto complete options.

auto_complete(auto_complete_request: MutableMapping[str, Any], **kwargs: Any) -> MutableMapping[str, Any]

Parameters

Name Description
auto_complete_request
Required
<xref:JSON>

An object specifying the autocomplete criteria.

Returns

Type Description
<xref:JSON>

JSON object

Exceptions

Type Description

Examples


   # JSON input template you can fill out and use as your body input.
   auto_complete_request = {
       "filter": {},  # Optional. The filter for the autocomplete request.
       "keywords": "str",  # Optional. The keywords applied to all fields that
         support autocomplete operation. It must be at least 1 character, and no more than
         100 characters.
       "limit": 0  # Optional. The number of autocomplete results we hope to return.
         The default value is 50. The value must be a number between 1 and 100.
   }

   # response body for status code(s): 200
   response.json() == {
       "value": [
           {
               "queryPlusText": "str",  # Optional. The completed search
                 query text.
               "text": "str"  # Optional. The completed term or phrase.
           }
       ]
   }

browse

Browse entities by path or entity type.

browse(browse_request: MutableMapping[str, Any], **kwargs: Any) -> MutableMapping[str, Any]

Parameters

Name Description
browse_request
Required
<xref:JSON>

An object specifying the browse criteria.

Returns

Type Description
<xref:JSON>

JSON object

Exceptions

Type Description

Examples


   # JSON input template you can fill out and use as your body input.
   browse_request = {
       "entityType": "str",  # Optional. The entity type to browse as the root level
         entry point.
       "limit": 0,  # Optional. The number of browse items we hope to return. The
         maximum value is 10000.
       "offset": 0,  # Optional. The offset. The default value is 0. The maximum
         value is 100000.
       "path": "str"  # Optional. The path to browse the next level child entities.
   }

   # response body for status code(s): 200
   response.json() == {
       "@search.count": 0,  # Optional. The total number of browse results.
       "value": [
           {
               "entityType": "str",  # Optional. The type name of the
                 record.
               "id": "str",  # Optional. The GUID of the record.
               "isLeaf": bool,  # Optional. If the record is a leaf entity.
               "name": "str",  # Optional. The name of the record.
               "owner": [
                   {
                       "contactType": "str",  # Optional. The
                         contact type of the owner. The value will be Owner.
                       "displayName": "str",  # Optional. The
                         display name of the owner.
                       "id": "str",  # Optional. The GUID of the
                         owner.
                       "mail": "str"  # Optional. The mail of the
                         owner.
                   }
               ],
               "path": "str",  # Optional. The path of the record.
               "qualifiedName": "str"  # Optional. The qualified name of the
                 record.
           }
       ]
   }

query

Gets data using search.

query(search_request: MutableMapping[str, Any], **kwargs: Any) -> MutableMapping[str, Any]

Parameters

Name Description
search_request
Required
<xref:JSON>

An object specifying the search criteria.

Returns

Type Description
<xref:JSON>

JSON object

Exceptions

Type Description

Examples


   # JSON input template you can fill out and use as your body input.
   search_request = {
       "facets": [
           {
               "count": 0,  # Optional. The count of the facet item.
               "facet": "str",  # Optional. The name of the facet item.
               "sort": {}  # Optional. Any object.
           }
       ],
       "filter": {},  # Optional. The filter for the search. See examples for the
         usage of supported filters.
       "keywords": "str",  # Optional. The keywords applied to all searchable
         fields.
       "limit": 0,  # Optional. The limit of the number of the search result.
         default value is 50; maximum value is 1000.
       "offset": 0,  # Optional. The offset. The default value is 0. The maximum
         value is 100000.
       "taxonomySetting": {
           "assetTypes": [
               "str"  # Optional.
           ],
           "facet": {
               "count": 0,  # Optional. The count of the facet item.
               "facet": "str",  # Optional. The name of the facet item.
               "sort": {}  # Optional. Any object.
           }
       }
   }

   # response body for status code(s): 200
   response.json() == {
       "@search.count": 0,  # Optional. The total number of search results (not the
         number of documents in a single page).
       "@search.facets": {
           "assetType": [
               {
                   "count": 0,  # Optional. The count of the facet item.
                   "value": "str"  # Optional. The name of the facet
                     item.
               }
           ],
           "classification": [
               {
                   "count": 0,  # Optional. The count of the facet item.
                   "value": "str"  # Optional. The name of the facet
                     item.
               }
           ],
           "classificationCategory": [
               {
                   "count": 0,  # Optional. The count of the facet item.
                   "value": "str"  # Optional. The name of the facet
                     item.
               }
           ],
           "contactId": [
               {
                   "count": 0,  # Optional. The count of the facet item.
                   "value": "str"  # Optional. The name of the facet
                     item.
               }
           ],
           "fileExtension": [
               {
                   "count": 0,  # Optional. The count of the facet item.
                   "value": "str"  # Optional. The name of the facet
                     item.
               }
           ],
           "label": [
               {
                   "count": 0,  # Optional. The count of the facet item.
                   "value": "str"  # Optional. The name of the facet
                     item.
               }
           ],
           "term": [
               {
                   "count": 0,  # Optional. The count of the facet item.
                   "value": "str"  # Optional. The name of the facet
                     item.
               }
           ]
       },
       "value": [
           {
               "@search.highlights": {
                   "description": [
                       "str"  # Optional. A highlight list that
                         consists of index fields id ,qualifiedName, name, description,
                         entityType. When the keyword appears in those fields, the value
                         of the field, attached with emphasis mark, is returned as an
                         element of @search.highlights.
                   ],
                   "entityType": [
                       "str"  # Optional. A highlight list that
                         consists of index fields id ,qualifiedName, name, description,
                         entityType. When the keyword appears in those fields, the value
                         of the field, attached with emphasis mark, is returned as an
                         element of @search.highlights.
                   ],
                   "id": [
                       "str"  # Optional. A highlight list that
                         consists of index fields id ,qualifiedName, name, description,
                         entityType. When the keyword appears in those fields, the value
                         of the field, attached with emphasis mark, is returned as an
                         element of @search.highlights.
                   ],
                   "name": [
                       "str"  # Optional. A highlight list that
                         consists of index fields id ,qualifiedName, name, description,
                         entityType. When the keyword appears in those fields, the value
                         of the field, attached with emphasis mark, is returned as an
                         element of @search.highlights.
                   ],
                   "qualifiedName": [
                       "str"  # Optional. A highlight list that
                         consists of index fields id ,qualifiedName, name, description,
                         entityType. When the keyword appears in those fields, the value
                         of the field, attached with emphasis mark, is returned as an
                         element of @search.highlights.
                   ]
               },
               "@search.score": 0.0,  # Optional. The search score
                 calculated by the search engine. The results are ordered by search score
                 by default.
               "@search.text": "str",  # Optional. The target text that
                 contains the keyword as prefix. The keyword is wrapped with emphasis
                 mark.
               "assetType": [
                   "str"  # Optional. The asset types of the record.
               ],
               "classification": [
                   "str"  # Optional. The classifications of the record.
               ],
               "contact": [
                   {
                       "contactType": "str",  # Optional. The type
                         of the contact. It can be Expert or Owner for an entity. It can
                         be Expert or Steward for a glossary term.
                       "id": "str",  # Optional. The GUID of the
                         contact.
                       "info": "str"  # Optional. The description of
                         the contact.
                   }
               ],
               "description": "str",  # Optional. The description of the
                 record.
               "entityType": "str",  # Optional. The type name of the
                 record.
               "id": "str",  # Optional. The GUID of the record.
               "label": [
                   "str"  # Optional. The labels of the record.
               ],
               "name": "str",  # Optional. The name of the record.
               "owner": "str",  # Optional. The owner of the record. This is
                 an Atlas native attribute.
               "qualifiedName": "str",  # Optional. The qualified name of
                 the record.
               "term": [
                   {
                       "glossaryName": "str",  # Optional. The name
                         of the glossary which contains the term.
                       "guid": "str",  # Optional. The GUID of the
                         term.
                       "name": "str"  # Optional. The name of the
                         term.
                   }
               ]
           }
       ]
   }

suggest

Get search suggestions by query criteria.

suggest(suggest_request: MutableMapping[str, Any], **kwargs: Any) -> MutableMapping[str, Any]

Parameters

Name Description
suggest_request
Required
<xref:JSON>

An object specifying the suggest criteria.

Returns

Type Description
<xref:JSON>

JSON object

Exceptions

Type Description

Examples


   # JSON input template you can fill out and use as your body input.
   suggest_request = {
       "filter": {},  # Optional. The filter for the search.
       "keywords": "str",  # Optional. The keywords applied to all fields that
         support suggest operation. It must be at least 1 character, and no more than 100
         characters. In the index schema we defined a default suggester which lists all
         the supported fields and specifies a search mode.
       "limit": 0  # Optional. The number of suggestions we hope to return. The
         default value is 5. The value must be a number between 1 and 100.
   }

   # response body for status code(s): 200
   response.json() == {
       "value": [
           {
               "@search.score": 0.0,  # Optional. The search score
                 calculated by the search engine. The results are ordered by search score
                 by default.
               "@search.text": "str",  # Optional. The target text that
                 contains the keyword as prefix. The keyword is wrapped with emphasis
                 mark.
               "assetType": [
                   "str"  # Optional. The asset types of the record.
               ],
               "classification": [
                   "str"  # Optional. The classifications of the record.
               ],
               "contact": [
                   {
                       "contactType": "str",  # Optional. The type
                         of the contact. It can be Expert or Owner for an entity. It can
                         be Expert or Steward for a glossary term.
                       "id": "str",  # Optional. The GUID of the
                         contact.
                       "info": "str"  # Optional. The description of
                         the contact.
                   }
               ],
               "description": "str",  # Optional. The description of the
                 record.
               "entityType": "str",  # Optional. The type name of the
                 record.
               "id": "str",  # Optional. The GUID of the record.
               "label": [
                   "str"  # Optional. The labels of the record.
               ],
               "name": "str",  # Optional. The name of the record.
               "owner": "str",  # Optional. The owner of the record. This is
                 an Atlas native attribute.
               "qualifiedName": "str",  # Optional. The qualified name of
                 the record.
               "term": [
                   {
                       "glossaryName": "str",  # Optional. The name
                         of the glossary which contains the term.
                       "guid": "str",  # Optional. The GUID of the
                         term.
                       "name": "str"  # Optional. The name of the
                         term.
                   }
               ]
           }
       ]
   }