Hide

Daily Uploads: delete

Requires authorization

Delete uploaded data for the given date. See an example.

In addition to the standard parameters, this method supports the parameters listed in the parameters table.

Request

HTTP request

DELETE https://www.googleapis.com/analytics/v3/management/accounts/accountId/webproperties/webPropertyId/customDataSources/customDataSourceId/dailyUploads/date

Parameters

Parameter name Value Description
Path parameters
accountId string Account Id associated with daily upload delete.
customDataSourceId string Custom data source Id associated with daily upload delete.
date string Date for which data is to be deleted. Date should be formatted as YYYY-MM-DD.
webPropertyId string Web property Id associated with daily upload delete.
Required query parameters
type string Type of data for this delete.

Acceptable values are:
  • "cost": Value for specifying cost data upload.

Authorization

This request requires authorization with at least one of the following scopes (read more about authentication and authorization).

Scope
https://www.googleapis.com/auth/analytics
https://www.googleapis.com/auth/analytics.edit

Request body

Do not supply a request body with this method.

Response

If successful, this method returns an empty response body.

Examples

Note: The code examples available for this method do not represent all supported programming languages (see the client libraries page for a list of supported languages).

Java

Uses the Java client library.

/*
 * Note: This code assumes you have an authorized Analytics service object.
 * See the Daily Uploads Developer Guide for details.
 */


// This request deletes a daily upload for the authorized user.
try {
  analytics.management().dailyUploads().delete("123456",
      "UA-123456-1", "7654321", "2012-10-31", "cost").execute();
} catch (GoogleJsonResponseException e) {
  System.err.println("There was a service error: "
      + e.getDetails().getCode() + " : "
      + e.getDetails().getMessage());
}

Python

Uses the Python client library.

# Note: This code assumes you have an authorized Analytics service object.
# See the Daily Upload Developer Guide for details.

# This request deletes a dailyUpload for a particular date.
try:
  delete = analytics.management().dailyUploads().delete(
      accountId='1234',
      webPropertyId='UA-1234-1',
      customDataSourceId='123456789',
      type='cost',
      date='2012-10-31').execute()

except TypeError, error:
  # Handle errors in constructing a query.
  print 'There was an error in constructing your query : %s' % error

except HttpError, error:
  # Handle API errors.
  print ('There was an API error : %s : %s' %
         (error.resp.status, error.resp.reason))