你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Dataset - List

使用 提取所有现有数据集的列表。

若要列出所有数据集,将发出 GET 没有其他参数的请求。

列出数据响应

列表 API 以格式返回所有数据集 json 的完整列表。 响应包含以下字段 (,如果它们不是 null 或空) :

created - 创建数据集的时间戳。 datasetId - 数据集的 ID。 description - 数据集的说明。 datasetSources - 发出创建请求时使用的源数据。 ontology - 在转换服务中用于输入数据的源 本体

描述 datasetSources 发出创建请求时使用的源数据,如果) 不为 null 或为空,则包含以下元素 (:

conversionIds -) 未提供任何 (null 的列表 conversionId 。 appendDatasetId - datasetId 如果) 未使用追加操作,则 (null。 featureCounts - 数据集中每个特征类型的计数。

下面是返回 、 timestampdatasetSourcesdatasetIddescriptionontology 3 个数据集资源的示例响应:

{
  "datasets": [
    {
      "timestamp": "2020-01-01T22:50:48.123Z",
      "datasetId": "f6495f62-94f8-0ec2-c252-45626f82fcb2",
      "description": "Some description or comment for the dataset.",
      "datasetSources": {
        "conversionIds": [
          "15d21452-c9bb-27b6-5e79-743ca5c3205d"
        ],      },
      "": "facility-2.0",
      "featureCounts": {
        "directoryInfo": 2,
        "category": 10,
        "facility": 1,
        "level": 3,
        "unit": 183,
        "zone": 3,
        "verticalPenetration": 6,
        "opening": 48,
        "areaElement": 108
      }
    },
    {
      "timestamp": "2020-01-01T22:57:53.123Z",
      "datasetId": "8b1288fa-1958-4a2b-b68e-13a7i5af7d7c",
      "description": "Create from upload '0c1288fa-2058-4a1b-b68d-13a5f5af7d7c'.",
      "datasetSources": {
        "conversionIds": [
          "0c1288fa-2058-4a1b-b68d-13a5f5af7d7c"
        ],
        "appendDatasetId": "46d1edb6-d29e-4786-9589-dbd4efd7a977"
      },
      "ontology": "facility-2.0",
      "featureCounts": {
        "directoryInfo": 2,
        "category": 10,
        "facility": 1,
        "level": 3,
        "unit": 183,
        "zone": 3,
        "verticalPenetration": 6,
        "opening": 48,
        "areaElement": 108
      }
    }
  ]
}
GET https://{geography}.atlas.microsoft.com/datasets?api-version=2.0

URI 参数

名称 必需 类型 说明
geography
path True

string

此参数指定 Azure Maps Creator 资源所在的位置。 有效值是 us 和 eu。

api-version
query True

string

Azure Maps API 的版本号。

请求头

名称 必需 类型 说明
x-ms-client-id

string

指定要与Microsoft Entra ID安全模型一起使用的帐户。 它表示Azure Maps帐户的唯一 ID,可以从Azure Maps管理平面帐户 API 检索。 若要在 Azure Maps 中使用Microsoft Entra ID安全性,请参阅以下文章以获取指导。

响应

名称 类型 说明
200 OK

DatasetListResult

数据集请求已成功完成。 响应正文包含以前创建的数据集。

Other Status Codes

ErrorResponse

发生了意外错误。

安全性

AADToken

这些是 OAuth 2.0 流Microsoft Entra。 与 Azure 基于角色的访问控制配对后,它可用于控制对 Azure Maps REST API 的访问。 Azure 基于角色的访问控制用于指定对一个或多个Azure Maps资源帐户或子资源的访问权限。 可以通过内置角色或由一个或多个权限组成的自定义角色授予任何用户、组或服务主体访问权限,以Azure Maps REST API。

若要实现方案,建议查看 身份验证概念。 总之,此安全定义提供了一个解决方案,用于通过能够对特定 API 和作用域进行访问控制的对象对应用程序 () 建模。

备注

  • 此安全定义需要使用x-ms-client-id 标头来指示应用程序请求访问哪个Azure Maps资源。 这可以从 地图管理 API 获取。

Authorization URL特定于 Azure 公有云实例。 主权云具有唯一的授权 URL 和Microsoft Entra ID配置。 * Azure 基于角色的访问控制是通过 Azure 门户、PowerShell、CLI、Azure SDK 或 REST API 从 Azure 管理平面配置的。 * 使用 Azure Maps Web SDK 可以针对多个用例基于配置设置应用程序。

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

名称 说明
https://atlas.microsoft.com/.default https://atlas.microsoft.com/.default

subscription-key

这是在Azure 门户或使用 PowerShell、CLI、Azure SDK 或 REST API 创建Azure Maps帐户时预配的共享密钥。

使用此密钥,任何应用程序都可以访问所有 REST API。 换句话说,此密钥可以用作颁发它们的帐户中的主密钥。

对于公开的应用程序,我们建议使用机密客户端应用程序方法来访问Azure Maps REST API,以便安全地存储密钥。

Type: apiKey
In: query

SAS Token

这是一个共享访问签名令牌,通过 Azure 管理平面通过 Azure 门户、PowerShell、CLI、Azure SDK 或 REST API 在Azure Maps资源上列出 SAS 操作创建。

使用此令牌,任何应用程序都有权使用 Azure 基于角色的访问控制进行访问,并精细控制特定令牌的过期、速率和区域 () 。 换句话说,SAS 令牌可用于允许应用程序以比共享密钥更安全的方式控制访问。

对于公开的应用程序,我们建议在 映射帐户资源 上配置允许的来源的特定列表,以限制呈现滥用,并定期续订 SAS 令牌。

Type: apiKey
In: header

示例

List all the previously created datasets

Sample Request

GET https://us.atlas.microsoft.com/datasets?api-version=2.0

Sample Response

{
  "datasets": [
    {
      "created": "2021-05-21T03:04:05.678Z",
      "datasetId": "f6495f62-94f8-0ec2-c252-45626f82fcb2",
      "description": "Some description or comment for the dataset.",
      "datasetSources": {
        "conversionIds": [
          "db63843c-3c70-4b4e-94ff-dfcf4013c4a9"
        ]
      },
      "featureCounts": {
        "directoryInfo": 1,
        "category": 18,
        "facility": 1,
        "level": 6,
        "unit": 775,
        "opening": 471,
        "areaElement": 496
      },
      "ontology": "facility-2.0"
    },
    {
      "created": "2021-05-21T03:04:05.678Z",
      "datasetId": "7c1288fa-2058-4a1b-b68f-13a6h5af7d7c",
      "description": "Some other description or comment for the dataset.",
      "datasetSources": {
        "conversionIds": [
          "15d21452-c9bb-27b6-5e79-743ca5c3205d"
        ],
        "appendDatasetId": "8b1288fa-1958-4a2b-b68e-13a7i5af7d7c"
      },
      "featureCounts": {
        "directoryInfo": 2,
        "category": 10,
        "facility": 1,
        "level": 3,
        "unit": 183,
        "zone": 3,
        "verticalPenetration": 6,
        "opening": 48,
        "areaElement": 108
      },
      "ontology": "facility-2.0"
    }
  ]
}

定义

名称 说明
Dataset

数据集的详细信息。

DatasetListResult

数据集列表 API 的响应模型。 响应正文将包含之前创建的所有数据集的列表。

DatasetSources

有关数据集的创建请求的详细信息。

ErrorAdditionalInfo

资源管理错误附加信息。

ErrorDetail

错误详细信息。

ErrorResponse

错误响应

Dataset

数据集的详细信息。

名称 类型 说明
created

string

为数据集创建的时间戳。

datasetId

string

数据集的 ID。

datasetSources

DatasetSources

有关数据集的创建请求的详细信息。

description

string

数据集的说明。

featureCounts

object

数据集的特征计数。

ontology

string

此数据集的本体版本。

DatasetListResult

数据集列表 API 的响应模型。 响应正文将包含之前创建的所有数据集的列表。

名称 类型 说明
datasets

Dataset[]

之前创建的所有数据集的列表。

nextLink

string

如果存在,则为下一页数据的位置。

DatasetSources

有关数据集的创建请求的详细信息。

名称 类型 说明
appendDatasetId

string

追加到 以创建当前数据集的数据集。

conversionIds

string[]

用于创建数据集的列表 conversionId

ErrorAdditionalInfo

资源管理错误附加信息。

名称 类型 说明
info

object

其他信息。

type

string

其他信息类型。

ErrorDetail

错误详细信息。

名称 类型 说明
additionalInfo

ErrorAdditionalInfo[]

错误附加信息。

code

string

错误代码。

details

ErrorDetail[]

错误详细信息。

message

string

错误消息。

target

string

错误目标。

ErrorResponse

错误响应

名称 类型 说明
error

ErrorDetail

错误对象。