Discovery - Suggest
Get search suggestions by query criteria.
POST {endpoint}/datamap/api/search/suggest?api-version=2023-09-01
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
endpoint
|
path | True |
string |
|
api-version
|
query | True |
string |
The API version to use for this operation. |
Request Body
Name | Type | Description |
---|---|---|
filter |
|
The filter for the search. |
keywords |
string |
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 |
integer |
The number of suggestions we hope to return. The default value is 5. The value must be a number between 1 and 100. |
Responses
Name | Type | Description |
---|---|---|
200 OK |
The request has succeeded. |
|
Other Status Codes |
An unexpected error response. |
Security
OAuth2Auth
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
Name | Description |
---|---|
https://purview.azure.net/.default |
Examples
Discovery_Suggest
Sample request
POST {endpoint}/datamap/api/search/suggest?api-version=2023-09-01
{
"keywords": "exampledata",
"filter": {
"and": [
{
"entityType": "azure_blob_path",
"includeSubTypes": false
}
]
},
"limit": 10
}
Sample response
{
"value": [
{
"@search.text": "<em>exampledata.csv</em>",
"@search.score": 9.81402,
"description": "Example Description",
"id": "af7a01b0-1b14-4ab6-83a5-12cb11a717ed",
"name": "exampledata.csv",
"owner": "$superuser",
"qualifiedName": "https://exampleaccount.blob.core.windows.net/examplepath/exampledata.csv",
"entityType": "azure_blob_path",
"assetType": [
"Azure Blob Storage"
],
"classification": [
"MICROSOFT.GOVERNMENT.US.PASSPORT_NUMBER"
],
"contact": [
{
"id": "8a597ffc-6993-4772-ac25-86b7251e1234",
"info": "Example Info",
"contactType": "Expert"
}
],
"label": [
"Example.Label"
],
"term": [
{
"name": "Example Term",
"glossaryName": "Glossary"
}
]
}
]
}
Definitions
Name | Description |
---|---|
Atlas |
An error response from the service |
Contact |
The contact in the search and suggest result. |
Suggest |
The payload of suggest request. |
Suggest |
The result item of the search suggest. |
Suggest |
The value item of the search suggest. |
Term |
The context. |
AtlasErrorResponse
An error response from the service
Name | Type | Description |
---|---|---|
errorCode |
string |
The error code. |
errorMessage |
string |
The error message. |
requestId |
string |
The request ID. |
ContactSearchResultValue
The contact in the search and suggest result.
Name | Type | Description |
---|---|---|
contactType |
string |
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 |
string |
The GUID of the contact. |
info |
string |
The description of the contact. |
SuggestOptions
The payload of suggest request.
Name | Type | Description |
---|---|---|
filter |
|
The filter for the search. |
keywords |
string |
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 |
integer |
The number of suggestions we hope to return. The default value is 5. The value must be a number between 1 and 100. |
SuggestResult
The result item of the search suggest.
Name | Type | Description |
---|---|---|
value |
The result value |
SuggestResultValue
The value item of the search suggest.
Name | Type | Description |
---|---|---|
@search.score |
number |
The search score calculated by the search engine. The results are ordered by search score by default. |
@search.text |
string |
The target text that contains the keyword as prefix. The keyword is wrapped with emphasis mark. |
assetType |
string[] |
The asset types of the asset. |
classification |
string[] |
The classifications of the record. |
contact |
The contacts of the asset. |
|
createTime |
integer |
The create time of the record. The Unix epoch format. |
description |
string |
The description of the asset. |
endorsement |
string |
The endorsement of the asset. |
entityType |
string |
The type name of the asset. |
glossary |
string |
The glossary name of the term. |
glossaryType |
string |
The type name of the term. Could be AtlasGlossary, AtlasGlossaryTerm or AtlasGlossaryCategory. |
id |
string |
The GUID of the record. |
label |
string[] |
The labels of the asset. |
longDescription |
string |
The definition of the term. |
name |
string |
The name of the record. |
objectType |
string |
The object type of the record. Object type is the top-level property to distinguish whether a record is an asset or a term. |
owner |
string |
The owner of the record. |
qualifiedName |
string |
The qualified name of the record. |
term |
The terms assigned to the asset. |
|
termStatus |
string |
The status of the term. |
termTemplate |
string[] |
The term template names used by the term. |
updateTime |
integer |
The last update time of the record. The Unix epoch format. |
TermSearchResultValue
The context.
Name | Type | Description |
---|---|---|
glossaryName |
string |
The name of the glossary which contains the term. |
guid |
string |
The GUID of the term. |
name |
string |
The name of the term. |