Skip to content

Add Microsoft.Security views API spec #34531

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 15 commits into
base: main
Choose a base branch
from
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
{
"parameters": {
"api-version": "2025-05-01-preview",
"parameters": {
"scopes": [
"/subscriptions/cfbbd179-59d2-4052-aa06-9270a38aa9d6",
"/subscriptions/8e22af33-2b2b-4f43-be9a-82aae2f0c2b5/resourcegroups/cus-test-platform/providers/Microsoft.Security/securityConnectors/TestNotifications"
],
"scenarioName": "secureScopre/cloudInitiativeMetrics",
"scenarioParameters": {
"startDateTime": "2025-05-06T07:06:02.280Z"
}
}
},
"responses": {
"200": {
"body": {
"scenarioResult": {
"overtimeMetrics": {
"type": "overtimeMetricsResponse",
"properties": {
"overtimeMetrics": {
"secureScoreOverTime": [
{
"values": [
95.44,
93.15,
95.28,
95.3,
81.83,
59.89,
41.92,
40.81,
0,
0,
88.86,
0,
66.02,
49.55
],
"dates": [
"2025-04-29T00:00:00Z",
"2025-04-28T00:00:00Z",
"2025-04-27T00:00:00Z",
"2025-04-26T00:00:00Z",
"2025-04-24T00:00:00Z",
"2025-04-23T00:00:00Z",
"2025-04-21T00:00:00Z",
"2025-04-19T00:00:00Z",
"2025-04-18T00:00:00Z",
"2025-04-16T00:00:00Z",
"2025-04-14T00:00:00Z",
"2025-04-13T00:00:00Z",
"2025-04-12T00:00:00Z",
"2025-04-10T00:00:00Z"
]
}
]
}
}
}
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,176 @@
{

Check notice on line 1 in specification/security/resource-manager/Microsoft.Security/preview/2025-05-01-preview/view.json

View workflow job for this annotation

GitHub Actions / TypeSpec Requirement

Brownfield services will soon be required to convert from OpenAPI to TypeSpec. See https://aka.ms/azsdk/typespec.
"swagger": "2.0",
"info": {
"title": "Microsoft Defender for Cloud",
"description": "API spec for Microsoft.Security (Azure Security Center) resource provider",
"version": "2025-05-01-preview"
},
"host": "management.azure.com",
"schemes": [
"https"
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"security": [
{
"azure_auth": [
"user_impersonation"
]
}
],
"securityDefinitions": {
"azure_auth": {
"type": "oauth2",
"authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize",
"flow": "implicit",
"description": "Azure Active Directory OAuth2 Flow",
"scopes": {
"user_impersonation": "impersonate your user account"
}
}
},
"paths": {
"/providers/Microsoft.Security/view": {
"post": {
"tags": [
"View"
],
"description": "Fetch Microsoft Defender for Cloud data over a specified view",
"operationId": "View",
"parameters": [
{
"$ref": "../../../common/v1/types.json#/parameters/ApiVersion"
},
{
"name": "parameters",
"in": "body",
"schema": {
"$ref": "#/definitions/ParametersSchema"
},
"description": "Additional parameters supplied to the operation."
}
],
"responses": {
"200": {
"description": "Result of the query operation",
"schema": {
"$ref": "#/definitions/ScenarioResponse"
}
},
"default": {
"description": "An error occurred while processing the request. See the error.code parameter to identify the specific error.",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-ms-examples": {
"View example": {
"$ref": "./examples/View_example.json"
}
}
}
}
},
"definitions": {
"ParametersSchema": {
"description": "Schema for operation parameters.",
"type": "object",
"properties": {
"scopes": {
"type": "array",
"items": {
"type": "string"
},
"description": "The list of scopes for which the data is requested"
},
"scenarioName": {
"type": "string",
"description": "The name of the scenario for which the data is requested"
},
"scenarioParameters": {
"type": "object",
"description": "The parameters for the specified scenario and view"
}
},
"required": [
"scopes",
"scenarioName",
"scenarioParameters"
]
},
"ScenarioResponse": {
"description": "Query result.",
"type": "object",
"properties": {
"scenarioResult": {
"type": "object",
"description": "The result of the query operation."
}
}
},
"ErrorResponse": {
"title": "Error response.",
"type": "object",
"description": "An error response from the API.",
"properties": {
"error": {
"$ref": "#/definitions/Error",
"description": "Error information."
}
},
"required": [
"error"
]
},
"Error": {
"title": "Error info.",
"type": "object",
"description": "Error details.",
"properties": {
"code": {
"type": "string",
"description": "Error code identifying the specific error."
},
"message": {
"type": "string",
"description": "A human readable error message."
},
"details": {
"type": "array",
"description": "Error details",
"items": {
"$ref": "#/definitions/ErrorDetails"
},
"x-ms-identifiers": []
}
},
"required": [
"code",
"message"
]
},
"ErrorDetails": {
"title": "Error details.",
"type": "object",
"properties": {
"code": {
"type": "string",
"description": "Error code identifying the specific error."
},
"message": {
"type": "string",
"description": "A human readable error message."
}
},
"required": [
"code",
"message"
]
}
}
}
10 changes: 10 additions & 0 deletions specification/security/resource-manager/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,15 @@ tag: package-composite-v3

The following packages may be composed from multiple api-versions.

### Tag: package-preview-2025-05

These settings apply only when `--tag=package-preview-2025-05` is specified on the command line.

```yaml $(tag) == 'package-preview-2025-05'
input-file:
- Microsoft.Security/preview/2025-05-01-preview/view.json
```

### Tag: package-2025-03
These settings apply only when `--tag=package-2025-03` is specified on the command line.

Expand Down Expand Up @@ -579,6 +588,7 @@ input-file:
- Microsoft.Security/preview/2023-12-01-preview/securityContacts.json
- Microsoft.Security/preview/2024-08-01-preview/securityConnectors.json
- Microsoft.Security/preview/2024-10-01-preview/operations.json
- Microsoft.Security/preview/2025-05-01-preview/view.json
- Microsoft.Security/stable/2017-08-01/complianceResults.json
- Microsoft.Security/stable/2019-01-01/advancedThreatProtectionSettings.json
- Microsoft.Security/stable/2019-08-01/deviceSecurityGroups.json
Expand Down
Loading