API Collections - Onboard Azure Api Management Api
将 Azure API 管理 API 载入到 Microsoft Defender for API。 系统将开始监视 Azure 管理 API 中的操作,以便进行侵入性行为,并为检测到的攻击提供警报。
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/providers/Microsoft.Security/apiCollections/{apiId}?api-version=2023-11-15
URI 参数
| 名称 | 在 | 必需 | 类型 | 说明 |
|---|---|---|---|---|
|
api
|
path | True |
string minLength: 1maxLength: 256 pattern: ^[^*#&+:<>?]+$ |
API 修订标识符。 API 管理服务实例中必须是唯一的。 非当前修订有;rev=n 作为后缀,其中 n 是修订号。 |
|
resource
|
path | True |
string minLength: 1maxLength: 90 |
资源组的名称。 名称不区分大小写。 |
|
service
|
path | True |
string minLength: 1maxLength: 50 pattern: ^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$ |
API 管理服务的名称。 |
|
subscription
|
path | True |
string (uuid) |
目标订阅的 ID。 该值必须是 UUID。 |
|
api-version
|
query | True |
string minLength: 1 |
用于此操作的 API 版本。 |
响应
| 名称 | 类型 | 说明 |
|---|---|---|
| 200 OK |
这表示创建或更新操作的成功响应。 响应包含 API 集合的属性。 |
|
| 201 Created |
这表示创建或更新操作的成功响应。 响应包含 API 集合的属性。 标头 Location: string |
|
| Other Status Codes |
描述操作失败的原因的错误响应。 |
安全性
azure_auth
Azure Active Directory OAuth2 流
类型:
oauth2
流向:
implicit
授权 URL:
https://login.microsoftonline.com/common/oauth2/authorize
作用域
| 名称 | 说明 |
|---|---|
| user_impersonation | 模拟用户帐户 |
示例
Onboard an Azure API Management API to Microsoft Defender for APIs
示例请求
示例响应
{
"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"
}
}
Location: https://management.azure.com/subscriptions/3fa85f64-5717-4562-b3fc-2c963f66afa6/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/providers/Microsoft.Security/apiCollections/echo-api?api-version=2023-11-15&$asyncScope=eyJydSI6NTM4MjczMzI4NDQ3MjA1NzY2fQ==
{
"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": "InProgress"
}
}
定义
| 名称 | 说明 |
|---|---|
|
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 |
资源类型 |
ErrorAdditionalInfo
资源管理错误附加信息。
| 名称 | 类型 | 说明 |
|---|---|---|
| info |
object |
其他信息。 |
| type |
string |
其他信息类型。 |
ErrorDetail
错误详细信息。
| 名称 | 类型 | 说明 |
|---|---|---|
| additionalInfo |
错误附加信息。 |
|
| code |
string |
错误代码。 |
| details |
错误详细信息。 |
|
| message |
string |
错误消息。 |
| target |
string |
错误目标。 |
ErrorResponse
错误响应
| 名称 | 类型 | 说明 |
|---|---|---|
| error |
错误对象。 |
ProvisioningState
获取 API 集合的预配状态。
| 值 | 说明 |
|---|---|
| Succeeded | |
| Failed | |
| Canceled | |
| InProgress |