API Collections - List By Subscription
获取已载入到 Microsoft Defender for API 的订阅中的 API 集合列表。
GET https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Security/apiCollections?api-version=2023-11-15
URI 参数
名称 | 在 | 必需 | 类型 | 说明 |
---|---|---|---|---|
subscription
|
path | True |
string (uuid) |
目标订阅的 ID。 该值必须是 UUID。 |
api-version
|
query | True |
string minLength: 1 |
用于此操作的 API 版本。 |
响应
名称 | 类型 | 说明 |
---|---|---|
200 OK |
这表示成功的响应。 响应包含 API 集合的列表。 |
|
Other Status Codes |
描述操作失败的原因的错误响应。 |
安全性
azure_auth
Azure Active Directory OAuth2 Flow
类型:
oauth2
流向:
implicit
授权 URL:
https://login.microsoftonline.com/common/oauth2/authorize
作用域
名称 | 说明 |
---|---|
user_impersonation | 模拟用户帐户 |
示例
Gets a list of API collections within a subscription that have been onboarded to Microsoft Defender for APIs
示例请求
GET https://management.azure.com/subscriptions/3fa85f64-5717-4562-b3fc-2c963f66afa6/providers/Microsoft.Security/apiCollections?api-version=2023-11-15
示例响应
{
"value": [
{
"id": "/subscriptions/3fa85f64-5717-4562-b3fc-2c963f66afa6/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/providers/Microsoft.Security/apiCollections/echo-api",
"name": "echo-api",
"type": "Microsoft.Security/apiCollections",
"properties": {
"provisioningState": "Succeeded",
"displayName": "Echo API",
"discoveredVia": "/subscriptions/3fa85f64-5717-4562-b3fc-2c963f66afa6/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1",
"baseUrl": "https://apimservice1.azure-api.net/echo",
"numberOfApiEndpoints": 6,
"numberOfInactiveApiEndpoints": 3,
"numberOfUnauthenticatedApiEndpoints": 1,
"numberOfExternalApiEndpoints": 3,
"numberOfApiEndpointsWithSensitiveDataExposed": 1,
"sensitivityLabel": "Highly Confidential"
}
}
],
"nextLink": "https://management.azure.com/subscriptions/3fa85f64-5717-4562-b3fc-2c963f66afa6/providers/Microsoft.Security/apiCollections?api-version=2023-11-15&$skipToken=ac943fd6a934"
}
定义
名称 | 说明 |
---|---|
Api |
由 Microsoft Defender for API 表示的 API 集合。 |
Api |
MICROSOFT Defender for API 所表示的 API 集合列表的页面。 |
Error |
资源管理错误附加信息。 |
Error |
错误详细信息。 |
Error |
错误响应 |
Provisioning |
获取 API 集合的预配状态。 |
ApiCollection
由 Microsoft Defender for API 表示的 API 集合。
名称 | 类型 | 说明 |
---|---|---|
id |
string |
资源 ID |
name |
string |
资源名称 |
properties.baseUrl |
string (uri) |
此 API 集合的基本 URI。 此 API 集合的所有终结点都会扩展此基 URI。 |
properties.discoveredVia |
string (arm-id) |
从中发现此 API 集合的资源的资源 ID。 |
properties.displayName |
string |
API 集合的显示名称。 |
properties.numberOfApiEndpoints |
integer (int64) |
在此 API 集合中发现的 API 终结点数。 |
properties.numberOfApiEndpointsWithSensitiveDataExposed |
integer (int64) |
此 API 集合中公开其请求和/或响应中的敏感数据的 API 终结点数。 |
properties.numberOfExternalApiEndpoints |
integer (int64) |
此 API 集合中观察到来自 Internet 的 API 流量的 API 终结点数。 |
properties.numberOfInactiveApiEndpoints |
integer (int64) |
此 API 集合中在过去 30 天内未收到任何 API 流量的 API 终结点数。 |
properties.numberOfUnauthenticatedApiEndpoints |
integer (int64) |
此 API 集合中未经身份验证的 API 终结点数。 |
properties.provisioningState |
获取 API 集合的预配状态。 |
|
properties.sensitivityLabel |
string |
此 API 集合中来自 Microsoft Purview 的最高优先级敏感度标签。 |
type |
string |
资源类型 |
ApiCollectionList
MICROSOFT Defender for API 所表示的 API 集合列表的页面。
名称 | 类型 | 说明 |
---|---|---|
nextLink |
string |
要提取下一页的 URI。 |
value |
此页面中的 API 集合。 |
ErrorAdditionalInfo
资源管理错误附加信息。
名称 | 类型 | 说明 |
---|---|---|
info |
object |
其他信息。 |
type |
string |
其他信息类型。 |
ErrorDetail
错误详细信息。
名称 | 类型 | 说明 |
---|---|---|
additionalInfo |
错误附加信息。 |
|
code |
string |
错误代码。 |
details |
错误详细信息。 |
|
message |
string |
错误消息。 |
target |
string |
错误目标。 |
ErrorResponse
错误响应
名称 | 类型 | 说明 |
---|---|---|
error |
错误对象。 |
ProvisioningState
获取 API 集合的预配状态。
值 | 说明 |
---|---|
Canceled | |
Failed | |
InProgress | |
Succeeded |