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
Prev Previous commit
Next Next commit
Adding purge status operation
  • Loading branch information
Ace Eldeib committed Feb 22, 2018
commit 891212c0bfb6b3267802c8984cf607d3242dcaac
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,42 @@
}
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components/{resourceName}/operations/{purgeId}": {
"get": {
"description": "Gets the status of a previously submitted purge using the id returned from the original purge request.",
"operationId": "Components_GetPurgeStatus",
"parameters": [
{
"$ref": "#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "#/parameters/ApiVersionParameter"
},
{
"$ref": "#/parameters/SubscriptionIdParameter"
},
{
"$ref": "#/parameters/ResourceNameParameter"
},
{
"$ref": "#/parameters/ComponentPurgeIdParameter"
}
],
"responses": {
"200": {
"description": "Returns status of purge operation in body of response. e.g.: running, completed.",
"schema": {
"$ref": "#/definitions/ComponentPurgeStatusResponse"
}
}
},
"x-ms-examples": {
"ComponentPurgeStatus": {
"$ref": "./examples/ComponentsPurgeStatus.json"
}
}
}
}
},
"definitions": {
Expand Down Expand Up @@ -515,6 +551,18 @@
"required": [
"operationId"
]
},
"ComponentPurgeStatusResponse": {
"description": "Response containing status for a specific purge operation.",
"properties": {
"status": {
"description": "Status of the operation represented by the requested Id.",
"type": "string"
Copy link
Member

Choose a reason for hiding this comment

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

Can this be an enum so that callers are aware of the possible values?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes it can! 👍

}
},
"required": [
"status"
]
}
},
"parameters": {
Expand Down Expand Up @@ -556,6 +604,13 @@
"schema": {
"$ref": "#/definitions/ComponentPurgeBody"
}
},
"ComponentPurgeIdParameter": {
"name": "purgeId",
"in": "path",
"required": true,
"type": "string",
"description": "In a purge status request, this is the Id of the operation the status of which is returned."
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"parameters": {
"api-version": "2015-05-01",
"subscriptionId": "subid",
"resourceGroupName": "my-resource-group",
"resourceName": "my-component",
"purgeId": "6779dd32-272a-45d3-a9b8-84d7f47abfb7"
},
"responses": {
"200": {
"body": {
"status": "completed"
}
}
}
}