Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
Add purge to management plane API
  • Loading branch information
Ace Eldeib committed Feb 22, 2018
commit d5da3d5e3149ffbe684c25b103946673470659e6
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,42 @@
}
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components/{resourceName}/purge": {
"post": {
"description": "Purges data in an Application Insights component by a set of user-defined filters.",
"operationId": "Components_Purge",
"parameters": [
{
"$ref": "#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "#/parameters/ApiVersionParameter"
},
{
"$ref": "#/parameters/SubscriptionIdParameter"
},
{
"$ref": "#/parameters/ResourceNameParameter"
},
{
"$ref": "#/parameters/ComponentPurgeParameter"
}
],
"responses": {
"202": {
"description": "Accepted request for purging an Application Insights component.",
"schema": {
"$ref": "#/definitions/ComponentPurgeResponse"
}
}
},
"x-ms-examples": {
"ComponentPurge": {
"$ref": "./examples/ComponentsPurge.json"
}
}
}
}
},
"definitions": {
Expand Down Expand Up @@ -434,6 +470,51 @@
"description": "The URI to get the next set of Application Insights component defintions if too many components where returned in the result set."
}
}
},
"ComponentPurgeBody": {
"description": "Describes the body of a purge request for an App Insights component",
"required": [
"table",
"filters"
],
"properties": {
"table": {
"type": "string",
"description": "Table from which to purge data."
},
"filters": {
"type": "array",
"description": "The set of columns and filters (queries) to run over them to purge the resulting data.",
"items": {
"$ref": "#/definitions/ComponentPurgeBodyFilters"
}
}
}
},
"ComponentPurgeBodyFilters": {
"description": "User-defined filters to return data which will be purged from the table.",
"properties": {
"column": {
"description": "The column of the table over which the given query should run",
"type": "string"
},
"filter": {
"description": "A query to to run over the provided table and column to purge the corresponding data.",
"type": "string"
}
}
},
"ComponentPurgeResponse": {
"description": "Response containing operationId for a specific purge action.",
"properties": {
"operationId": {
"description": "Id to use when querying for status for a particular purge operation.",
"type": "string"
}
},
"required": [
"operationId"
]
}
},
"parameters": {
Expand Down Expand Up @@ -466,6 +547,15 @@
"type": "string",
"description": "The name of the Application Insights component resource.",
"x-ms-parameter-location": "method"
},
"ComponentPurgeParameter": {
"name": "body",
"in": "body",
"description": "Describes the body of a request to purge data in a single table of an Application Insights component",
"required": true,
"schema": {
"$ref": "#/definitions/ComponentPurgeBody"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"parameters": {
"api-version": "2015-05-01",
"subscriptionId": "subid",
"resourceGroupName": "my-resource-group",
"resourceName": "my-component",
"body": {
"table": "requests",
"filters": [
{
"column": "duration",
"filter": ">1000"
},
{
"column": "timestamp",
"filter": ">= datetime(2017-09-01T00:00:00.000Z)"
},
{
"column": "application_Version",
"filter": "in ('Draft_master_20171018.2', 'Draft_master_2017024.1')"
}
]
}
},
"responses": {
"202": {
"body": {
"operationId": "7d7cf277-9113-4ab3-8359-d0364b74d01d"
}
}
}
}