Delete campaign
Delete a campaign previously created by a call to Create campaign.
The campaign must be finished or not yet activated in order to delete it (see Campaign life-cycle for more details). The current state of the campaign can be retrieved using the Get campaign command.
Method | Request URI | HTTP version |
|---|---|---|
DELETE | https://management.azure.com/subscriptions/{subscription-id}/resourcegroups/{resource-group-name}/providers/Microsoft.MobileEngagement/appcollections/{app-collection}/apps/{app-resource-name}/campaigns/{kind}/{id}?api-version=2014-12-01 | HTTP/1.1 |
Parameter | Description |
|---|---|
kind | Kind of campaign. Valid values are: announcements, polls, dataPushes, and nativePushes. |
id | Campaign identifier as returned by a call to Create campaign. You can get a list of campaigns by calling List campaigns. |
Parameter | Description |
|---|---|
api-version | API version, the only supported value is 2014-12-01. |
The following table describes required and optional request headers.
Request Header | Description |
|---|---|
Authorization | See Authentication. |
Accept (optional) | Its recommended to pass */* or application/json to have JSON error responses. |
None.
The response is empty if the campaign was deleted successfully, the HTTP status code will be 200.
Code | Description |
|---|---|
200 | Deleted successfully. |
400 | Can be caused by one of the following conditions:
Check response body for details. |
401 | Authentication error. |
404 | Campaign not found. |
For information about status codes, see Status and Error Codes.
Content-Length | A length of 0 is return if the campaign was successfully deleted. Otherwise, content length of the error response body. |
None if the campaign was deleted successfully. The HTTP status code will be 200.
DELETE /subscriptions/84211edf-7c40-4c47-b152-a6a7233843b7/resourcegroups/MobileEngagement/providers/Microsoft.MobileEngagement/appcollections/myAppCollection/apps/myApp-android/campaigns/announcements/1?api-version=2014-12-01 HTTP/1.1 Host: management.azure.com Accept: */* Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6Ik1uQ19WWmNBVGZNNXBPWWlKSE1iYTlnb0VLWSIsImtpZCI6Ik1uQ19WWmNBVGZNNXBPWWlKSE1iYTlnb0VLWSJ9.eyJhdWQiOiJodHRwczovL21hbmFnZW1lbnQuY29yZS53aW5kb3dzLm5ldC8iL HTTP/1.1 200 OK Content-Length: 0