你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
Discovery - Query
使用搜索获取数据。
POST {endpoint}/datamap/api/search/query?api-version=2023-09-01
URI 参数
名称 | 在 | 必需 | 类型 | 说明 |
---|---|---|---|---|
endpoint
|
path | True |
string |
|
api-version
|
query | True |
string |
要用于此操作的 API 版本。 |
请求正文
名称 | 类型 | 说明 |
---|---|---|
continuationToken |
string |
用于获取下一批数据的令牌。 默认为“Null”以获取第一批,并且将在每个响应中返回新令牌,除非没有更多数据。 |
facets |
用于搜索的分面。 请参阅有关受支持方面用法的示例。 |
|
filter |
搜索的筛选器。 请参阅有关受支持筛选器用法的示例。 |
|
keywords |
string |
应用于所有可搜索字段的关键字。 |
limit |
integer |
搜索结果的数量限制。 默认值为 50;最大值为 1000。 |
orderby |
Orderby[] |
搜索结果的排序顺序可以指定多个字段。 |
taxonomySetting |
用于搜索的分类设置。 |
响应
名称 | 类型 | 说明 |
---|---|---|
200 OK |
请求已成功。 |
|
Other Status Codes |
意外的错误响应。 |
安全性
OAuth2Auth
类型:
oauth2
流向:
implicit
授权 URL:
https://login.microsoftonline.com/common/oauth2/authorize
作用域
名称 | 说明 |
---|---|
https://purview.azure.net/.default |
示例
Discovery_Query
示例请求
POST {endpoint}/datamap/api/search/query?api-version=2023-09-01
{
"keywords": "exampledata",
"filter": {
"and": [
{
"objectType": "Files"
},
{
"entityType": "azure_blob_path"
}
]
},
"limit": 10,
"orderby": [
{
"name": "ASC"
},
{
"updateTime": "DESC"
}
],
"facets": [
{
"facet": "assetType",
"count": 0,
"sort": {
"count": "desc"
}
},
{
"facet": "classification",
"count": 10,
"sort": {
"count": "desc"
}
},
{
"facet": "contactId",
"count": 10,
"sort": {
"count": "desc"
}
},
{
"facet": "label",
"count": 10,
"sort": {
"count": "desc"
}
},
{
"facet": "term",
"count": 10,
"sort": {
"count": "desc"
}
}
]
}
示例响应
{
"@search.count": 2,
"@search.count.approximate": false,
"value": [
{
"@search.score": 1,
"id": "bfecbcc3-1838-45fe-96d6-112de8a170f9",
"qualifiedName": "https://exampleaccount.blob.core.windows.net/examplepath/exampledata1.txt",
"name": "exampledata1.txt",
"description": null,
"owner": null,
"entityType": "azure_blob_path",
"classification": [],
"label": [],
"assetType": [
"Azure Blob Storage"
],
"term": [],
"contact": []
},
{
"@search.score": 1,
"id": "14d857b9-e2c1-4118-8bfa-12e53ae6ce7f",
"qualifiedName": "https://exampleaccount.blob.core.windows.net/examplepath/exampledata2.txt",
"name": "exampledata2.txt",
"description": null,
"owner": null,
"entityType": "azure_blob_path",
"classification": [],
"label": [],
"assetType": [
"Azure Blob Storage"
],
"term": [],
"contact": []
}
]
}
Discovery_Query_And
示例请求
POST {endpoint}/datamap/api/search/query?api-version=2023-09-01
{
"keywords": null,
"limit": 10,
"filter": {
"and": [
{
"entityType": "azure_blob_path"
},
{
"attributeName": "qualifiedName",
"operator": "contains",
"attributeValue": ".csv"
}
]
}
}
示例响应
{
"@search.count": 5,
"@search.count.approximate": false,
"value": [
{
"@search.score": 1,
"@search.highlights": {
"qualifiedName": [
"https://exampleaccount.blob.core.windows.net/examplepath/<em>csv</em>/exampledata.csv"
]
},
"id": "63b92968-c9ac-4af8-8cff-f61d147bbf88",
"qualifiedName": "https://exampleaccount.blob.core.windows.net/examplepath/csv/exampledata.csv",
"name": "exampledata.csv",
"description": null,
"owner": null,
"entityType": "azure_blob_path",
"classification": [],
"label": [
"Example.Label"
],
"assetType": [
"Azure Blob Storage"
],
"term": [],
"contact": []
},
{
"@search.score": 1,
"@search.highlights": {
"qualifiedName": [
"https://exampleaccount.blob.core.windows.net/examplepath/<em>csv</em>/AllTypes.csv"
]
},
"id": "2605db54-086d-4d6c-adb6-f0bbed6c6eab",
"qualifiedName": "https://exampleaccount.blob.core.windows.net/examplepath/csv/AllTypes.csv",
"name": "AllTypes.csv",
"description": null,
"owner": null,
"entityType": "azure_blob_path",
"classification": [],
"label": [
"Example.Label"
],
"assetType": [
"Azure Blob Storage"
],
"term": [],
"contact": []
}
]
}
Discovery_Query_AndOrNested
示例请求
POST {endpoint}/datamap/api/search/query?api-version=2023-09-01
{
"keywords": null,
"limit": 10,
"filter": {
"and": [
{
"entityType": "azure_blob_path"
},
{
"attributeName": "qualifiedName",
"operator": "contains",
"attributeValue": ".csv"
},
{
"or": [
{
"attributeName": "name",
"operator": "eq",
"attributeValue": "exampledata.csv"
},
{
"attributeName": "qualifiedName",
"operator": "prefix",
"attributeValue": "https://"
}
]
}
]
}
}
示例响应
{
"@search.count": 2,
"@search.count.approximate": false,
"value": [
{
"@search.score": 1,
"@search.highlights": {
"qualifiedName": [
"https://exampleaccount.blob.core.windows.net/examplepath/<em>csv</em>/exampledata.csv"
]
},
"id": "63b92968-c9ac-4af8-8cff-f61d147bbf88",
"qualifiedName": "https://exampleaccount.blob.core.windows.net/examplepath/csv/exampledata.csv",
"name": "exampledata.csv",
"description": null,
"owner": null,
"entityType": "azure_blob_path",
"classification": [],
"label": [
"Example.Label"
],
"assetType": [
"Azure Blob Storage"
],
"term": [],
"contact": []
},
{
"@search.score": 1,
"@search.highlights": {
"qualifiedName": [
"https://exampleaccount.blob.core.windows.net/examplepath/<em>csv</em>/AllTypes.csv"
],
"name": [
"<em>AllTypes.csv</em>"
]
},
"id": "2605db54-086d-4d6c-adb6-f0bbed6c6eab",
"qualifiedName": "https://exampleaccount.blob.core.windows.net/examplepath/csv/AllTypes.csv",
"name": "AllTypes.csv",
"description": null,
"owner": null,
"entityType": "azure_blob_path",
"classification": [],
"label": [
"Example.Label"
],
"assetType": [
"Azure Blob Storage"
],
"term": [],
"contact": []
}
]
}
Discovery_Query_AssetType
示例请求
POST {endpoint}/datamap/api/search/query?api-version=2023-09-01
{
"keywords": null,
"limit": 10,
"filter": {
"or": [
{
"assetType": "SQL Server"
},
{
"assetType": "Azure SQL Server"
},
{
"assetType": "Azure SQL Database"
},
{
"assetType": "Azure SQL Data Warehouse"
},
{
"assetType": "Azure SQL Managed Instance"
},
{
"assetType": "Azure Storage Account"
},
{
"assetType": "Azure Blob Storage"
},
{
"assetType": "Azure Files"
},
{
"assetType": "Azure Table Storage"
},
{
"assetType": "Azure Data Lake Storage Gen1"
},
{
"assetType": "Azure Data Lake Storage Gen2"
},
{
"assetType": "Azure Cosmos DB"
},
{
"assetType": "Azure Data Factory"
},
{
"assetType": "Azure Cognitive Search"
},
{
"assetType": "Power BI"
},
{
"assetType": "Azure Data Explorer"
},
{
"assetType": "Amazon S3"
},
{
"assetType": "Azure Data Share"
},
{
"assetType": "Teradata"
},
{
"assetType": "SAP S4HANA"
},
{
"assetType": "SAP ECC"
},
{
"assetType": "SQL Server Integration Services"
},
{
"assetType": "hive"
},
{
"assetType": "Azure Database for MySQL"
},
{
"assetType": "Azure Database for MariaDB"
},
{
"assetType": "Azure Database for PostgreSQL"
},
{
"assetType": "Azure Synapse Analytics"
}
]
}
}
示例响应
{
"continuationToken": "<token>",
"@search.count": 5155,
"@search.count.approximate": true,
"value": [
{
"@search.score": 1,
"id": "24c16e53-1bfd-4d6c-b4ce-b1f6f6f60000",
"qualifiedName": "mssql://exampleaccount.database.windows.net:3342/examplesqlmidb/dbo/exampledata1",
"name": "exampledata1",
"description": null,
"owner": null,
"entityType": "azure_sql_mi_table",
"classification": [],
"label": [],
"assetType": [
"Azure SQL Managed Instance"
],
"term": [],
"contact": []
},
{
"@search.score": 1,
"id": "d7b516fc-5d38-40f8-baeb-72f6f6f60000",
"qualifiedName": "mssql://exampleaccount.database.windows.net:3342/examplesqlmidb/dbo/exampledata2",
"name": "exampledata2",
"description": null,
"owner": null,
"entityType": "azure_sql_mi_table",
"classification": [],
"label": [],
"assetType": [
"Azure SQL Managed Instance"
],
"term": [],
"contact": []
}
]
}
Discovery_Query_Attribute
示例请求
POST {endpoint}/datamap/api/search/query?api-version=2023-09-01
{
"keywords": null,
"limit": 10,
"filter": {
"or": [
{
"attributeName": "name",
"operator": "eq",
"attributeValue": "exampledata.csv"
},
{
"attributeName": "createTime",
"operator": "ge",
"attributeValue": 1545580800000
},
{
"attributeName": "modifiedTime",
"operator": "timerange",
"attributeValue": "LAST_24H|LAST_7D|LAST_30D|LAST_365D|MORE_THAN_365D"
}
]
}
}
示例响应
{
"@search.count": 4,
"@search.count.approximate": false,
"value": [
{
"@search.score": 1,
"id": "63b92968-c9ac-4af8-8cff-f61d147bbf88",
"qualifiedName": "https://exampleaccount.blob.core.windows.net/examplepath/csv/exampledata.csv",
"name": "exampledata.csv",
"description": null,
"owner": null,
"entityType": "azure_blob_path",
"classification": [],
"label": [
"Example.Label"
],
"assetType": [
"Azure Blob Storage"
],
"term": [],
"contact": []
},
{
"@search.score": 1,
"id": "55b2290d-e11d-4ed2-8c7a-0d8d35eb6254",
"qualifiedName": "https://examplegen2account.dfs.core.windows.net/examplepath/csv/exampledata.csv",
"name": "exampledata.csv",
"description": null,
"owner": "$superuser",
"entityType": "azure_datalake_gen2_path",
"classification": [],
"label": [
"Example.Label"
],
"assetType": [
"Azure Data Lake Storage Gen2"
],
"term": [],
"contact": []
},
{
"@search.score": 1,
"id": "55ceaddf-30ac-40f3-b656-71f6f6f60000",
"entityType": "azure_sql_mi_table",
"name": "exampleData_v1",
"qualifiedName": "mssql://exampleaccount.database.windows.net:3342/examplesqlmidb/dbo/exampleData_v1",
"assetType": [
"Azure SQL Managed Instance"
]
},
{
"@search.score": 1,
"id": "89416661-5269-4f3d-ba35-e0f6f6f60000",
"entityType": "azure_sql_mi_table",
"name": "exampleData_v2",
"qualifiedName": "mssql://exampleaccount.database.windows.net:3342/examplesqlmidb/dbo/exampleData_v2",
"assetType": [
"Azure SQL Managed Instance"
]
}
]
}
Discovery_Query_BusinessMetadataAttribute
示例请求
POST {endpoint}/datamap/api/search/query?api-version=2023-09-01
{
"keywords": null,
"limit": 10,
"filter": {
"or": [
{
"attributeName": "<BusinessMetadataName>.<StringAttributeName>",
"operator": "eq|ne|contains|prefix",
"attributeValue": "string value"
},
{
"attributeName": "<BusinessMetadataName>.<NumberAttributeName>",
"operator": "eq|ne|gt|ge|lt|le",
"attributeValue": 123
},
{
"attributeName": "<BusinessMetadataName>.<BooleanAttributeName>",
"operator": "eq|ne",
"attributeValue": true
},
{
"attributeName": "<BusinessMetadataName>.<DateAttributeName>",
"operator": "timerange",
"attributeValue": "LAST_24H|LAST_7D|LAST_30D|LAST_365D|MORE_THAN_365D"
}
]
}
}
示例响应
{
"@search.count": 1,
"@search.count.approximate": false,
"value": [
{
"@search.score": 1,
"id": "63b92968-c9ac-4af8-8cff-f61d147bbf88",
"qualifiedName": "https://exampleaccount.blob.core.windows.net/examplepath/csv/exampledata.csv",
"name": "exampledata.csv",
"entityType": "azure_blob_path",
"objectType": "Files"
}
]
}
Discovery_Query_Classification
示例请求
POST {endpoint}/datamap/api/search/query?api-version=2023-09-01
{
"keywords": null,
"limit": 10,
"filter": {
"classification": "MICROSOFT.PERSONAL.EMAIL",
"includeSubClassifications": true
}
}
示例响应
{
"@search.count": 5,
"@search.count.approximate": false,
"value": [
{
"@search.score": 1,
"id": "b9638b91-884f-4e5e-98b5-29f6f6f60000",
"qualifiedName": "mssql://exampleserver.database.windows.net/examplesqldb/examplepath/exampledata1",
"name": "exampledata1",
"description": null,
"owner": null,
"entityType": "azure_sql_table",
"classification": [
"MICROSOFT.PERSONAL.NAME",
"MICROSOFT.PERSONAL.EU.PHONE_NUMBER",
"MICROSOFT.PERSONAL.US.PHONE_NUMBER",
"MICROSOFT.PERSONAL.EMAIL"
],
"label": [],
"assetType": [
"Azure SQL Database"
],
"term": [],
"contact": []
},
{
"@search.score": 1,
"id": "01aefb9a-61cd-4a02-a572-70f6f6f60000",
"qualifiedName": "mssql://exampleserver.database.windows.net/exampledw/examplepath/exampledata2",
"name": "exampledata2",
"description": null,
"owner": null,
"entityType": "azure_sql_dw_table",
"classification": [
"MICROSOFT.GOVERNMENT.CITY_NAME",
"MICROSOFT.GOVERNMENT.US.STATE",
"MICROSOFT.PERSONAL.NAME",
"MICROSOFT.PERSONAL.EU.PHONE_NUMBER",
"MICROSOFT.PERSONAL.EMAIL"
],
"label": [],
"assetType": [
"Azure SQL Data Warehouse"
],
"term": [],
"contact": []
}
]
}
Discovery_Query_Collection
示例请求
POST {endpoint}/datamap/api/search/query?api-version=2023-09-01
{
"keywords": null,
"limit": 10,
"filter": {
"collectionId": "collectionName"
}
}
示例响应
{
"@search.count": 5,
"@search.count.approximate": false,
"value": [
{
"@search.score": 1,
"id": "b9638b91-884f-4e5e-98b5-29f6f6f60000",
"qualifiedName": "mssql://exampleserver.database.windows.net/examplesqldb/examplepath/exampledata1",
"name": "exampledata1",
"description": null,
"owner": null,
"entityType": "azure_sql_table",
"classification": [
"MICROSOFT.PERSONAL.NAME",
"MICROSOFT.PERSONAL.EU.PHONE_NUMBER",
"MICROSOFT.PERSONAL.US.PHONE_NUMBER",
"MICROSOFT.PERSONAL.EMAIL"
],
"label": [],
"assetType": [
"Azure SQL Database"
],
"term": [],
"contact": []
},
{
"@search.score": 1,
"id": "01aefb9a-61cd-4a02-a572-70f6f6f60000",
"qualifiedName": "mssql://exampleserver.database.windows.net/exampledw/examplepath/exampledata2",
"name": "exampledata2",
"description": null,
"owner": null,
"entityType": "azure_sql_dw_table",
"classification": [
"MICROSOFT.GOVERNMENT.CITY_NAME",
"MICROSOFT.GOVERNMENT.US.STATE",
"MICROSOFT.PERSONAL.NAME",
"MICROSOFT.PERSONAL.EU.PHONE_NUMBER",
"MICROSOFT.PERSONAL.EMAIL"
],
"label": [],
"assetType": [
"Azure SQL Data Warehouse"
],
"term": [],
"contact": []
}
]
}
Discovery_Query_Facet
示例请求
POST {endpoint}/datamap/api/search/query?api-version=2023-09-01
{
"keywords": null,
"filter": {
"objectType": "Tables"
},
"limit": 10,
"facets": [
{
"facet": "assetType",
"count": 10
},
{
"facet": "classification",
"count": 10
},
{
"facet": "term",
"count": 10
},
{
"facet": "label",
"count": 10
}
]
}
示例响应
{
"continuationToken": "<token>",
"@search.count": 5156,
"@search.count.approximate": false,
"@search.facets": {
"classification": [
{
"count": 8,
"value": "MICROSOFT.PERSONAL.NAME"
},
{
"count": 6,
"value": "MICROSOFT.PERSONAL.EU.PHONE_NUMBER"
},
{
"count": 5,
"value": "MICROSOFT.PERSONAL.EMAIL"
},
{
"count": 5,
"value": "MICROSOFT.PERSONAL.US.PHONE_NUMBER"
},
{
"count": 4,
"value": "MICROSOFT.GOVERNMENT.CITY_NAME"
},
{
"count": 2,
"value": "MICROSOFT.GOVERNMENT.US.STATE"
}
],
"assetType": [
{
"count": 1476,
"value": "Azure SQL Database"
},
{
"count": 1358,
"value": "Azure SQL Data Warehouse"
},
{
"count": 1331,
"value": "Azure SQL Managed Instance"
},
{
"count": 293,
"value": "Azure Data Lake Storage Gen1"
},
{
"count": 261,
"value": "Azure Blob Storage"
},
{
"count": 231,
"value": "Azure Data Lake Storage Gen2"
},
{
"count": 194,
"value": "Azure Files"
},
{
"count": 18,
"value": "Azure Cosmos DB"
}
],
"label": [
{
"count": 835,
"value": "Example.Label"
}
],
"term": [
{
"count": 1,
"value": "terma"
}
]
},
"value": [
{
"@search.score": 1,
"id": "24c16e53-1bfd-4d6c-b4ce-b1f6f6f60000",
"qualifiedName": "mssql://exampleaccount.database.windows.net:3342/examplesqlmidb/dbo/exampledata",
"name": "exampledata",
"description": null,
"owner": null,
"entityType": "azure_sql_mi_table",
"classification": [],
"label": [],
"assetType": [
"Azure SQL Managed Instance"
],
"term": [],
"contact": []
},
{
"@search.score": 1,
"id": "d7b516fc-5d38-40f8-baeb-72f6f6f60000",
"qualifiedName": "mssql://exampleaccount.database.windows.net:3342/examplesqlmidb/dbo/exampledata2",
"name": "exampledata2",
"description": null,
"owner": null,
"entityType": "azure_sql_mi_table",
"classification": [],
"label": [],
"assetType": [
"Azure SQL Managed Instance"
],
"term": [],
"contact": []
}
]
}
Discovery_Query_FileExtension
示例请求
POST {endpoint}/datamap/api/search/query?api-version=2023-09-01
{
"keywords": null,
"limit": 10,
"filter": {
"and": [
{
"fileExtension": "txt"
}
]
}
}
示例响应
{
"continuationToken": "<token>",
"@search.count": 49,
"@search.count.approximate": false,
"value": [
{
"@search.score": 1,
"id": "bfecbcc3-1838-45fe-96d6-112de8a170f9",
"qualifiedName": "https://exampleaccount.blob.core.windows.net/examplepath/exampledata.txt",
"name": "exampledata.txt",
"description": null,
"owner": null,
"entityType": "azure_blob_path",
"classification": [],
"label": [],
"assetType": [
"Azure Blob Storage"
],
"term": [],
"contact": []
},
{
"@search.score": 1,
"id": "14d857b9-e2c1-4118-8bfa-12e53ae6ce7f",
"qualifiedName": "https://exampleaccount.blob.core.windows.net/examplepath/exampledata.txt",
"name": "exampledata.txt",
"description": null,
"owner": null,
"entityType": "azure_blob_path",
"classification": [],
"label": [],
"assetType": [
"Azure Blob Storage"
],
"term": [],
"contact": []
}
]
}
Discovery_Query_GlossaryTerm
示例请求
POST {endpoint}/datamap/api/search/query?api-version=2023-09-01
{
"keywords": "<term name>",
"limit": 10,
"filter": {
"and": [
{
"objectType": "Glossary terms"
},
{
"or": [
{
"glossaryType": "AtlasGlossary"
},
{
"glossaryType": "AtlasGlossaryTerm"
}
]
}
]
},
"facets": [
{
"facet": "termStatus",
"count": 10,
"sort": {
"count": "desc"
}
},
{
"facet": "termTemplate",
"count": 10,
"sort": {
"count": "desc"
}
}
]
}
示例响应
{
"@search.count": 2,
"@search.count.approximate": false,
"value": [
{
"@search.score": 1,
"objectType": "Glossary terms",
"glossaryType": "AtlasGlossaryTerm",
"id": "b1e51cc4-9249-4c81-bbc7-e2f3117706f3",
"name": "termSample1",
"glossary": "DefaultGlossary",
"longDescription": "it is the definition of the term",
"termStatus": "Approved",
"termTemplate": [
"termTemplateSample"
],
"createTime": 1625819659805,
"updateTime": 1625819659805,
"qualifiedName": "termSample1@DefaultGlossary"
},
{
"@search.score": 1,
"objectType": "Glossary terms",
"glossaryType": "AtlasGlossary",
"id": "b28f35e4-fcd4-43ca-91a3-daf432c87156",
"name": "DefaultGlossary",
"longDescription": "it is the definition of the glossary",
"createTime": 1625819658745,
"updateTime": 1640656877302,
"qualifiedName": "DefaultGlossary"
}
],
"@search.facets": {
"termTemplate": [
{
"count": 1,
"value": "termTemplateSample"
}
],
"termStatus": [
{
"count": 1,
"value": "Approved"
}
]
}
}
Discovery_Query_Id
示例请求
POST {endpoint}/datamap/api/search/query?api-version=2023-09-01
{
"keywords": null,
"limit": 10,
"filter": {
"and": [
{
"id": "bfecbcc3-1838-45fe-96d6-112de8a170f9"
}
]
}
}
示例响应
{
"@search.count": 1,
"@search.count.approximate": false,
"value": [
{
"@search.score": 1,
"id": "bfecbcc3-1838-45fe-96d6-112de8a170f9",
"qualifiedName": "https://exampleaccount.blob.core.windows.net/examplepath/exampledata.txt",
"name": "exampledata.txt",
"description": null,
"owner": null,
"entityType": "azure_blob_path",
"classification": [],
"label": [],
"assetType": [
"Azure Blob Storage"
],
"term": [],
"contact": []
}
]
}
Discovery_Query_Not
示例请求
POST {endpoint}/datamap/api/search/query?api-version=2023-09-01
{
"keywords": null,
"limit": 10,
"filter": {
"not": {
"classification": "MICROSOFT.SYSTEM.TEMP_FILE"
}
}
}
示例响应
{
"continuationToken": "<token>",
"@search.count": 5158,
"@search.count.approximate": false,
"value": [
{
"@search.score": 1,
"id": "11fd6e94-2dc6-4ebd-822c-caf6f6f60000",
"qualifiedName": "mssql://exampleaccount.database.windows.net:3342/exampledb/dbo/exampledata",
"name": "exampledata",
"description": null,
"owner": null,
"entityType": "azure_sql_mi_table",
"classification": [],
"label": [],
"assetType": [
"Azure SQL Managed Instance"
],
"term": [],
"contact": []
},
{
"@search.score": 1,
"id": "1af82c87-798c-41a2-abab-93f6f6f60000",
"qualifiedName": "mssql://exampleaccount.database.windows.net:3342/exampledb/dbo/exampledata2",
"name": "exampledata2",
"description": null,
"owner": null,
"entityType": "azure_sql_mi_table",
"classification": [],
"label": [],
"assetType": [
"Azure SQL Managed Instance"
],
"term": [],
"contact": []
}
]
}
Discovery_Query_ObjectType
示例请求
POST {endpoint}/datamap/api/search/query?api-version=2023-09-01
{
"keywords": null,
"limit": 10,
"filter": {
"or": [
{
"objectType": "Dashboards"
},
{
"objectType": "Data pipelines"
},
{
"objectType": "Files"
},
{
"objectType": "Folders"
},
{
"objectType": "Glossary terms"
},
{
"objectType": "Reports"
},
{
"objectType": "Stored procedures"
},
{
"objectType": "Tables"
}
]
}
}
示例响应
{
"@search.count": 2,
"@search.count.approximate": false,
"value": [
{
"@search.score": 1,
"objectType": "Tables",
"id": "24c16e53-1bfd-4d6c-b4ce-b1f6f6f60000",
"entityType": "azure_sql_mi_table",
"name": "exampledata1",
"qualifiedName": "mssql://exampleaccount.database.windows.net:3342/examplesqlmidb/dbo/exampledata1",
"assetType": [
"Azure SQL Managed Instance"
]
},
{
"@search.score": 1,
"objectType": "Glossary terms",
"id": "b1e51cc4-9249-4c81-bbc7-e2f3117706f3",
"glossaryType": "AtlasGlossaryTerm",
"name": "termSample1",
"glossary": "DefaultGlossary",
"longDescription": "it is the definition of the term",
"termStatus": "Approved",
"termTemplate": [
"termTemplateSample"
],
"qualifiedName": "termSample1@DefaultGlossary"
}
]
}
Discovery_Query_PaginationContinuationPage
示例请求
POST {endpoint}/datamap/api/search/query?api-version=2023-09-01
{
"keywords": "exampledata",
"filter": {
"and": [
{
"objectType": "Files"
},
{
"entityType": "azure_blob_path"
}
]
},
"limit": 2,
"continuationToken": "<token>",
"orderby": [
{
"name": "ASC"
},
{
"updateTime": "DESC"
}
],
"facets": [
{
"facet": "assetType",
"count": 0,
"sort": {
"count": "desc"
}
},
{
"facet": "classification",
"count": 10,
"sort": {
"count": "desc"
}
},
{
"facet": "contactId",
"count": 10,
"sort": {
"count": "desc"
}
},
{
"facet": "label",
"count": 10,
"sort": {
"count": "desc"
}
},
{
"facet": "term",
"count": 10,
"sort": {
"count": "desc"
}
}
]
}
示例响应
{
"@search.count": 6,
"@search.count.approximate": false,
"continuationToken": "<token>",
"value": [
{
"@search.score": 1,
"id": "bfecbcc3-1838-45fe-96d6-112de8a170f9",
"qualifiedName": "https://exampleaccount.blob.core.windows.net/examplepath/exampledata1.txt",
"name": "exampledata1.txt",
"description": null,
"owner": null,
"entityType": "azure_blob_path",
"classification": [],
"label": [],
"assetType": [
"Azure Blob Storage"
],
"term": [],
"contact": []
},
{
"@search.score": 1,
"id": "14d857b9-e2c1-4118-8bfa-12e53ae6ce7f",
"qualifiedName": "https://exampleaccount.blob.core.windows.net/examplepath/exampledata2.txt",
"name": "exampledata2.txt",
"description": null,
"owner": null,
"entityType": "azure_blob_path",
"classification": [],
"label": [],
"assetType": [
"Azure Blob Storage"
],
"term": [],
"contact": []
}
]
}
Discovery_Query_PaginationFirstPage
示例请求
POST {endpoint}/datamap/api/search/query?api-version=2023-09-01
{
"keywords": "exampledata",
"filter": {
"and": [
{
"objectType": "Files"
},
{
"entityType": "azure_blob_path"
}
]
},
"limit": 2,
"orderby": [
{
"name": "ASC"
},
{
"updateTime": "DESC"
}
],
"facets": [
{
"facet": "assetType",
"count": 0,
"sort": {
"count": "desc"
}
},
{
"facet": "classification",
"count": 10,
"sort": {
"count": "desc"
}
},
{
"facet": "contactId",
"count": 10,
"sort": {
"count": "desc"
}
},
{
"facet": "label",
"count": 10,
"sort": {
"count": "desc"
}
},
{
"facet": "term",
"count": 10,
"sort": {
"count": "desc"
}
}
]
}
示例响应
{
"@search.count": 6,
"@search.count.approximate": false,
"continuationToken": "<token>",
"value": [
{
"@search.score": 1,
"id": "bfecbcc3-1838-45fe-96d6-112de8a170f9",
"qualifiedName": "https://exampleaccount.blob.core.windows.net/examplepath/exampledata1.txt",
"name": "exampledata1.txt",
"description": null,
"owner": null,
"entityType": "azure_blob_path",
"classification": [],
"label": [],
"assetType": [
"Azure Blob Storage"
],
"term": [],
"contact": []
},
{
"@search.score": 1,
"id": "14d857b9-e2c1-4118-8bfa-12e53ae6ce7f",
"qualifiedName": "https://exampleaccount.blob.core.windows.net/examplepath/exampledata2.txt",
"name": "exampledata2.txt",
"description": null,
"owner": null,
"entityType": "azure_blob_path",
"classification": [],
"label": [],
"assetType": [
"Azure Blob Storage"
],
"term": [],
"contact": []
}
]
}
Discovery_Query_PaginationLastPage
示例请求
POST {endpoint}/datamap/api/search/query?api-version=2023-09-01
{
"keywords": "exampledata",
"filter": {
"and": [
{
"objectType": "Files"
},
{
"entityType": "azure_blob_path"
}
]
},
"limit": 2,
"continuationToken": "<token>",
"orderby": [
{
"name": "ASC"
},
{
"updateTime": "DESC"
}
],
"facets": [
{
"facet": "assetType",
"count": 0,
"sort": {
"count": "desc"
}
},
{
"facet": "classification",
"count": 10,
"sort": {
"count": "desc"
}
},
{
"facet": "contactId",
"count": 10,
"sort": {
"count": "desc"
}
},
{
"facet": "label",
"count": 10,
"sort": {
"count": "desc"
}
},
{
"facet": "term",
"count": 10,
"sort": {
"count": "desc"
}
}
]
}
示例响应
{
"@search.count": 6,
"@search.count.approximate": false,
"value": [
{
"@search.score": 1,
"id": "bfecbcc3-1838-45fe-96d6-112de8a170f9",
"qualifiedName": "https://exampleaccount.blob.core.windows.net/examplepath/exampledata1.txt",
"name": "exampledata1.txt",
"description": null,
"owner": null,
"entityType": "azure_blob_path",
"classification": [],
"label": [],
"assetType": [
"Azure Blob Storage"
],
"term": [],
"contact": []
},
{
"@search.score": 1,
"id": "14d857b9-e2c1-4118-8bfa-12e53ae6ce7f",
"qualifiedName": "https://exampleaccount.blob.core.windows.net/examplepath/exampledata2.txt",
"name": "exampledata2.txt",
"description": null,
"owner": null,
"entityType": "azure_blob_path",
"classification": [],
"label": [],
"assetType": [
"Azure Blob Storage"
],
"term": [],
"contact": []
}
]
}
Discovery_Query_SystemTime
示例请求
POST {endpoint}/datamap/api/search/query?api-version=2023-09-01
{
"keywords": null,
"limit": 10,
"filter": {
"or": [
{
"createTime": {
"operator": "lt",
"timeThreshold": 1545580800000
}
},
{
"updateTime": "LAST_24H|LAST_7D|LAST_30D|LAST_365D|MORE_THAN_365D"
}
]
}
}
示例响应
{
"@search.count": 2,
"@search.count.approximate": false,
"value": [
{
"@search.score": 1,
"id": "55ceaddf-30ac-40f3-b656-71f6f6f60000",
"entityType": "azure_sql_mi_table",
"name": "exampleData_v1",
"qualifiedName": "mssql://exampleaccount.database.windows.net:3342/examplesqlmidb/dbo/exampleData_v1",
"assetType": [
"Azure SQL Managed Instance"
]
},
{
"@search.score": 1,
"id": "89416661-5269-4f3d-ba35-e0f6f6f60000",
"entityType": "azure_sql_mi_table",
"name": "exampleData_v2",
"qualifiedName": "mssql://exampleaccount.database.windows.net:3342/examplesqlmidb/dbo/exampleData_v2",
"assetType": [
"Azure SQL Managed Instance"
]
}
]
}
Discovery_Query_Taxonomy
示例请求
POST {endpoint}/datamap/api/search/query?api-version=2023-09-01
{
"keywords": "exampledata",
"filter": {
"and": [
{
"objectType": "Files"
},
{
"not": {
"or": [
{
"attributeName": "size",
"operator": "eq",
"attributeValue": 0
},
{
"attributeName": "fileSize",
"operator": "eq",
"attributeValue": 0
}
]
}
},
{
"not": {
"classification": "MICROSOFT.SYSTEM.TEMP_FILE"
}
}
]
},
"limit": 10,
"taxonomySetting": {
"assetTypes": [
"Azure Blob Storage"
],
"facet": {
"count": 10,
"sort": {
"count": "desc"
}
}
}
}
示例响应
{
"continuationToken": "<token>",
"@search.count": 339,
"@search.count.approximate": false,
"value": [
{
"@search.score": 1,
"id": "bfecbcc3-1838-45fe-96d6-112de8a170f9",
"qualifiedName": "https://exampleaccount.blob.core.windows.net/examplepath/exampledata1.txt",
"name": "exampledata1.txt",
"description": null,
"owner": null,
"entityType": "azure_blob_path",
"classification": [],
"label": [],
"assetType": [
"Azure Blob Storage"
],
"term": [],
"contact": []
},
{
"@search.score": 1,
"id": "14d857b9-e2c1-4118-8bfa-12e53ae6ce7f",
"qualifiedName": "https://exampleaccount.blob.core.windows.net/examplepath/exampledata2.txt",
"name": "exampledata2.txt",
"description": null,
"owner": null,
"entityType": "azure_blob_path",
"classification": [],
"label": [],
"assetType": [
"Azure Blob Storage"
],
"term": [],
"contact": []
}
]
}
Discovery_Query_TermAssignment
示例请求
POST {endpoint}/datamap/api/search/query?api-version=2023-09-01
{
"keywords": "<asset name>",
"limit": 3,
"filter": {
"or": [
{
"term": "ExampleTerm"
},
{
"term": "ExampleTerm",
"glossary": "GlossaryName"
},
{
"termGuid": "<term guid>"
}
]
}
}
示例响应
{
"@search.count": 1,
"@search.count.approximate": false,
"value": [
{
"@search.score": 1,
"id": "b20ac13a-7883-4376-b076-bac9f8f214a8",
"qualifiedName": "https://exampleaccount.blob.core.windows.net/examplecontainer",
"name": "examplecontainer",
"description": null,
"owner": null,
"entityType": "azure_blob_container",
"classification": [],
"assetType": [
"Azure Blob Storage"
],
"term": [
{
"name": "ExampleTerm",
"glossaryName": "Glossary"
}
],
"contact": [],
"label": [
"Example.Label"
]
}
]
}
Discovery_Query_Type
示例请求
POST {endpoint}/datamap/api/search/query?api-version=2023-09-01
{
"keywords": null,
"limit": 10,
"filter": {
"and": [
{
"entityType": "azure_blob_path",
"includeSubTypes": false
}
]
}
}
示例响应
{
"continuationToken": "<token>",
"@search.count": 221,
"value": [
{
"@search.score": 1,
"id": "1d797ddf-47bf-4151-8fe8-918590d62e70",
"qualifiedName": "https://exampleaccount.blob.core.windows.net/examplepath/exampledata.csv",
"name": "exampledata.csv",
"description": null,
"owner": null,
"entityType": "azure_blob_path",
"classification": [],
"label": [
"Example.Label"
],
"assetType": [
"Azure Blob Storage"
],
"term": [],
"contact": []
},
{
"@search.score": 1,
"id": "d3e83b17-c730-4898-94c8-58579cda04f6",
"qualifiedName": "https://exampleaccount.blob.core.windows.net/examplepath/exampledata2.csv",
"name": "exampledata2.csv",
"description": null,
"owner": null,
"entityType": "azure_blob_path",
"classification": [],
"label": [
"Example.Label"
],
"assetType": [
"Azure Blob Storage"
],
"term": [],
"contact": []
}
]
}
定义
名称 | 说明 |
---|---|
Atlas |
来自服务的错误响应 |
Contact |
搜索和建议结果中的联系人。 |
Query |
高级搜索请求的搜索查询。 |
Query |
搜索结果的结果。 |
Search |
搜索结果项的内容。 |
Search |
搜索结果项的内容。 |
Search |
包含索引字段 assetType、classification、contactId 和 label 的分面列表。 在请求中指定 facet 时,facet 的值将作为 的 @search.facets元素返回。 |
Search |
排序条件 |
Search |
由索引字段 ID 、qualifiedName、name、description、entityType 组成的突出显示列表。 当关键字 (keyword) 出现在这些字段中时,附加有强调标记的字段的值将作为 的元素@search.highlights返回。 |
Search |
搜索结果的值项。 |
Search |
搜索排序顺序 |
Search |
搜索请求的分类设置 |
Term |
上下文。 |
AtlasErrorResponse
来自服务的错误响应
名称 | 类型 | 说明 |
---|---|---|
errorCode |
string |
错误代码。 |
errorMessage |
string |
错误消息。 |
requestId |
string |
请求 ID。 |
ContactSearchResultValue
搜索和建议结果中的联系人。
名称 | 类型 | 说明 |
---|---|---|
contactType |
string |
联系人的类型。 它可以是实体的“专家”或“所有者”。 对于术语表术语,它可以是专家或专员。 |
id |
string |
联系人的 GUID。 |
info |
string |
联系人的说明。 |
QueryOptions
高级搜索请求的搜索查询。
名称 | 类型 | 说明 |
---|---|---|
continuationToken |
string |
用于获取下一批数据的令牌。 默认为“Null”获取第一批,并且会在每个响应中返回新令牌,除非没有其他数据。 |
facets |
用于搜索的分面。 请参阅有关使用受支持方面的示例。 |
|
filter |
搜索的筛选器。 请参阅有关使用受支持筛选器的示例。 |
|
keywords |
string |
应用于所有可搜索字段的关键字。 |
limit |
integer |
搜索结果数的限制。 默认值为 50;最大值为 1000。 |
orderby |
Orderby[] |
搜索结果的排序顺序可以指定多个字段。 |
taxonomySetting |
搜索的分类设置。 |
QueryResult
搜索结果的结果。
名称 | 类型 | 说明 |
---|---|---|
@search.count |
integer |
搜索结果总数 (而不是单页) 的文档数。 |
@search.count.approximate |
boolean |
如果“@search.count”是近似值,则为“True”,反之亦然。 |
@search.facets |
包含索引字段 assetType、classification、contactId 和 label 的分面列表。 在请求中指定 facet 时,facet 的值将作为 的 @search.facets元素返回。 |
|
continuationToken |
string |
用于获取下一批数据的令牌。 如果没有更多数据,则不存在。 |
value |
搜索结果值 |
SearchFacetItem
搜索结果项的内容。
名称 | 类型 | 说明 |
---|---|---|
count |
integer |
分面项的计数。 |
facet |
string |
facet 项的名称。 |
sort |
定义项的排序条件 |
SearchFacetItemValue
搜索结果项的内容。
名称 | 类型 | 说明 |
---|---|---|
count |
integer |
分面项的计数。 |
value |
string |
facet 项的名称。 |
SearchFacetResultValue
包含索引字段 assetType、classification、contactId 和 label 的分面列表。 在请求中指定 facet 时,facet 的值将作为 的 @search.facets元素返回。
名称 | 类型 | 说明 |
---|---|---|
assetType |
资产类型 |
|
classification |
分类 |
|
contactId |
联系人 ID |
|
contactType |
联系类型 |
|
entityType |
实体类型 |
|
glossaryType |
术语表类型 |
|
label |
Label |
|
term |
术语 |
|
termStatus |
术语状态 |
|
termTemplate |
术语模板 |
SearchFacetSort
排序条件
名称 | 类型 | 说明 |
---|---|---|
count |
按计数排序 |
|
value |
按值排序 |
SearchHighlights
由索引字段 ID 、qualifiedName、name、description、entityType 组成的突出显示列表。 当关键字 (keyword) 出现在这些字段中时,附加有强调标记的字段的值将作为 的元素@search.highlights返回。
名称 | 类型 | 说明 |
---|---|---|
description |
string[] |
说明 |
entityType |
string[] |
实体类型 |
id |
string[] |
ID |
name |
string[] |
名称 |
qualifiedName |
string[] |
限定名称 |
SearchResultValue
搜索结果的值项。
名称 | 类型 | 说明 |
---|---|---|
@search.highlights |
由索引字段 ID 、qualifiedName、name、description、entityType 组成的突出显示列表。 当关键字 (keyword) 出现在这些字段中时,附加有强调标记的字段的值将作为 的元素@search.highlights返回。 |
|
@search.score |
number |
由搜索引擎计算的搜索分数。 默认情况下,结果按搜索分数排序。 |
assetType |
string[] |
资产的资产类型。 |
classification |
string[] |
记录的分类。 |
contact |
资产的联系人。 |
|
createTime |
integer |
记录的创建时间。 Unix 纪元格式。 |
description |
string |
资产的说明。 |
endorsement |
string |
资产的认可。 |
entityType |
string |
资产的类型名称。 |
glossary |
string |
术语的术语表名称。 |
glossaryType |
string |
术语的类型名称。 可以是 AtlasGlossary、AtlasGlossaryTerm 或 AtlasGlossaryCategory。 |
id |
string |
记录的 GUID。 |
label |
string[] |
资产的标签。 |
longDescription |
string |
术语的定义。 |
name |
string |
记录的名称。 |
objectType |
string |
记录的对象类型。 对象类型是顶级属性,用于区分记录是资产还是术语。 |
owner |
string |
记录的所有者。 |
qualifiedName |
string |
记录的限定名称。 |
term |
分配给资产的术语。 |
|
termStatus |
string |
术语的状态。 |
termTemplate |
string[] |
术语使用的术语模板名称。 |
updateTime |
integer |
记录的上次更新时间。 Unix 纪元格式。 |
SearchSortOrder
搜索排序顺序
名称 | 类型 | 说明 |
---|---|---|
asc |
string |
使用升序进行排序 |
desc |
string |
使用降序进行排序 |
SearchTaxonomySetting
搜索请求的分类设置
名称 | 类型 | 说明 |
---|---|---|
assetTypes |
string[] |
资源类型 |
facet |
搜索结果项的内容。 |
TermSearchResultValue
上下文。
名称 | 类型 | 说明 |
---|---|---|
glossaryName |
string |
包含术语的术语表的名称。 |
guid |
string |
术语的 GUID。 |
name |
string |
术语的名称。 |