如何通过 Postman 获取我的架构(来自 Azure 架构注册表)?

How can I get my schema(from Azure Schema Registry) through Postman?

我正在尝试从 Azure 架构注册表中获取架构。 是否有可能通过 REST API 与 Schema Registry 通信?

如果要从一个事件中心命名空间中的架构组中获取架构,请参考以下步骤

  1. 创建服务主体并将 Azure RABC 角色 Schema Registry Reader 分配给 sp。更多详情请参考官方document
az ad sp create-for-rbac -n "MyApp" --role "Schema Registry Reader"  --scope <the scope according to your need>
  1. 获取令牌
POST https://login.microsoftonline.com/<tennat id>/oauth2/v2.0/token

Content-Type: application/x-www-form-urlencoded

grant_type=client_credentials
&client_id=
&client_secret=
&scope=https://eventhubs.azure.net/.default
  1. 致电API

一个。列出架构组

https://<namespace name>.servicebus.windows.net/$schemagroups?api-version=2020-09-01-preview

Authorization: Bearer <token>

b。在一组中列出架构

https://<namespace name>.servicebus.windows.net/$schemagroups/<group name>/schemas?api-version=2020-09-01-preview

Authorization: Bearer <token>

c。获取一个架构

https://<namespace name>.servicebus.windows.net/$schemagroups/<group name>/schemas/<>?api-version=2020-09-01-preview

Authorization: Bearer <token>