-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
base: main
Are you sure you want to change the base?
Changes from 2 commits
a6feb8a
be6338c
5c7db8d
178dbbb
f37a74f
5483ab3
57e0a3f
476e082
515ffb5
21275f3
d5847b4
42afb2c
f8c188a
a86a6de
0d33e1d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
{ | ||
Check failure on line 1 in specification/security/resource-manager/Microsoft.Security/preview/2025-05-01-preview/examples/View_example.json
|
||
"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,153 @@ | ||
{ | ||
Check notice on line 1 in specification/security/resource-manager/Microsoft.Security/preview/2025-05-01-preview/views.json
|
||
"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/views": { | ||
"post": { | ||
"tags": [ | ||
"Views" | ||
], | ||
"description": "Fetch Microsoft Defender for Cloud data over a specified view", | ||
"operationId": "Views", | ||
"parameters": [ | ||
{ | ||
"$ref": "../../../common/v1/types.json#/parameters/ApiVersion" | ||
}, | ||
{ | ||
"name": "scenarioName", | ||
"in": "body", | ||
"required": true, | ||
"type": "string", | ||
"description": "The name of the scenario for which the data is requested" | ||
}, | ||
{ | ||
"name": "scenarioParameters", | ||
"in": "body", | ||
"required": true, | ||
"type": "object", | ||
"description": "The parameters for the specified scenario and view" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. lets discuss why the scenario needs a generic schema There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Scheduled a dedicated discussion on the topic |
||
} | ||
], | ||
"responses": { | ||
"200": { | ||
"description": "Result of the query operation", | ||
"schema": { | ||
"$ref": "#/definitions/ScenarioResponse" | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. lets discuss why the scenario needs a generic schema |
||
}, | ||
"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": { | ||
"ScenarioResponse": { | ||
"description": "Query result.", | ||
"type": "object" | ||
}, | ||
"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." | ||
} | ||
}, | ||
"additionalProperties": { | ||
"type": "object" | ||
}, | ||
"required": [ | ||
"code", | ||
"message" | ||
] | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rename to getView or fetchView or similar verb
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Renamed to 'view'