Skip to content
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

Incident entities #10648

Merged
merged 4 commits into from
Sep 14, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3099,6 +3099,54 @@
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{operationalInsightsResourceProvider}/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/incidents/{incidentId}/entities": {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

{workspaceName}/ [](start = 131, length = 16)

Consider adding GET for workspace level incidents also?

"post": {
moranraz marked this conversation as resolved.
Show resolved Hide resolved
"x-ms-examples": {
"Gets all incident related entities": {
"$ref": "./examples/incidents/entities/GetAllIncidentEntities.json"
moranraz marked this conversation as resolved.
Show resolved Hide resolved
}
},
"tags": [
"IncidentEntities"
],
"description": "Gets all incident related entities.",
"operationId": "Incidents_ListOfEntities",
"parameters": [
{
"$ref": "#/parameters/ApiVersion"
},
{
"$ref": "#/parameters/SubscriptionId"
},
{
"$ref": "#/parameters/ResourceGroupName"
},
{
"$ref": "#/parameters/OperationalInsightsResourceProvider"
},
{
"$ref": "#/parameters/WorkspaceName"
},
{
"$ref": "#/parameters/IncidentId"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/IncidentEntitiesResponse"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/CloudError"
}
}
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{operationalInsightsResourceProvider}/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/incidents/{incidentId}/relations": {
"get": {
"x-ms-examples": {
Expand Down Expand Up @@ -6267,6 +6315,44 @@
],
"type": "object"
},
"IncidentEntitiesResponse": {
"description": "The incident related entities response.",
"properties": {
"entities": {
"description": "Array of the incident related entities.",
"type": "array",
"items": {
"$ref": "#/definitions/Entity"
}
},
"metaData": {
"description": "The metadata from the incident related entities results.",
"type": "array",
"items": {
"$ref": "#/definitions/IncidentEntitiesResultsMetadata"
}
}
}
},
"IncidentEntitiesResultsMetadata": {
"description": "Information of a specific aggregation in the incident related entities result.",
"properties": {
"count": {
"description": "Total number of aggregations of the given kind in the incident related entities result.",
"type": "integer",
"format": "int32"
},
"entityKind": {
"$ref": "#/definitions/EntityInnerKind",
"description": "The kind of the aggregated entity."
}
},
"required": [
"entityKind",
"count"
],
"type": "object"
},
"IncidentLabel": {
"description": "Represents an incident label",
"properties": {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"parameters": {
"api-version": "2019-01-01-preview",
"subscriptionId": "d0cfe6b2-9ac0-4464-9919-dccaee2e48c0",
"resourceGroupName": "myRg",
"workspaceName": "myWorkspace",
"operationalInsightsResourceProvider": "Microsoft.OperationalIinsights",
"incidentId": "afbd324f-6c48-459c-8710-8d1e1cd03812"
},
"responses": {
"200": {
"body": {
"entities": [
{
"id": "/subscriptions/d0cfe6b2-9ac0-4464-9919-dccaee2e48c0/resourceGroups/myRg/providers/Microsoft.OperationalInsights/workspaces/myWorkspace/providers/Microsoft.SecurityInsights/Entities/e1d3d618-e11f-478b-98e3-bb381539a8e1",
"name": "e1d3d618-e11f-478b-98e3-bb381539a8e1",
"type": "Microsoft.SecurityInsights/Entities",
"kind": "Account",
"properties": {
"friendlyName": "administrator",
"accountName": "administrator",
"ntDomain": "domain"
}
}
],
"metaData": [
{
"entityKind": "Account",
"count": 1
}
]
}
}
}
}