Uploads: deleteUploadData

অনুমোদন প্রয়োজন

পূর্ববর্তী আপলোডের সাথে সম্পর্কিত ডেটা মুছুন। এখন এটি চেষ্টা করুন বা একটি উদাহরণ দেখুন

স্ট্যান্ডার্ড প্যারামিটারগুলি ছাড়াও, এই পদ্ধতিটি প্যারামিটার টেবিলে তালিকাভুক্ত পরামিতিগুলিকে সমর্থন করে।

অনুরোধ

HTTP অনুরোধ

POST https://www.googleapis.com/analytics/v3/management/accounts/accountId/webproperties/webPropertyId/customDataSources/customDataSourceId/deleteUploadData

পরামিতি

পরামিতি নাম মান বর্ণনা
পাথ প্যারামিটার
accountId string আপলোড মুছে ফেলার জন্য অ্যাকাউন্ট আইডি.
customDataSourceId string আপলোড মুছে ফেলার জন্য কাস্টম ডেটা উৎস আইডি।
webPropertyId string আপলোড মুছে ফেলার জন্য ওয়েব সম্পত্তি আইডি.

অনুমোদন

এই অনুরোধের জন্য নিম্নলিখিত স্কোপের মধ্যে অন্তত একটির অনুমোদন প্রয়োজন ( প্রমাণিকরণ এবং অনুমোদন সম্পর্কে আরও পড়ুন )।

ব্যাপ্তি
https://www.googleapis.com/auth/analytics
https://www.googleapis.com/auth/analytics.edit

শরীরের অনুরোধ

অনুরোধের অংশে, নিম্নলিখিত কাঠামোর সাথে ডেটা সরবরাহ করুন:

{
  "customDataImportUids": [
    string
  ]
}
সম্পত্তির নাম মান বর্ণনা মন্তব্য
customDataImportUids[] list আপলোড UID-এর একটি তালিকা।

প্রতিক্রিয়া

সফল হলে, এই পদ্ধতিটি একটি খালি প্রতিক্রিয়া বডি প্রদান করে।

উদাহরণ

দ্রষ্টব্য: এই পদ্ধতির জন্য উপলব্ধ কোড উদাহরণগুলি সমস্ত সমর্থিত প্রোগ্রামিং ভাষার প্রতিনিধিত্ব করে না (সমর্থিত ভাষার তালিকার জন্য ক্লায়েন্ট লাইব্রেরি পৃষ্ঠা দেখুন)।

জাভা

জাভা ক্লায়েন্ট লাইব্রেরি ব্যবহার করে।

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


// Construct a list of file ids to delete.
List<String> filesToDelete = Arrays.asList("ZYXABC123zyxabc",
    "lmnopEFGXYZ123a", "999AAA888bbb777");

// Construct the body of the Delete Request and set the file ids.
AnalyticsDataimportDeleteUploadDataRequest body = new
    AnalyticsDataimportDeleteUploadDataRequest();
body.setCustomDataImportUids(filesToDelete);

// This request deletes three uploaded files for the authorized user.
try {
  analytics.management().uploads().deleteUploadData("123456",
      "UA-123456-1", "122333444455555", body).execute();
} catch (GoogleJsonResponseException e) {
  System.err.println("There was a service error: "
      + e.getDetails().getCode() + " : "
      + e.getDetails().getMessage());
}

পিএইচপি

পিএইচপি ক্লায়েন্ট লাইব্রেরি ব্যবহার করে।

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

// Construct a list of upload ids to delete.
$uploadIds = array('ABBCCCDDDDEEEEE');

// Construct the body of the Delete Request and set the upload ids.
$body = new
    Google_Service_Analytics_AnalyticsDataimportDeleteUploadDataRequest();
$body->setCustomDataImportUids($uploadIds);

// This request deletes the uploads.
try {
  $uploads = $analytics->management_uploads->deleteUploadData('123456',
      'UA-123456-1', '122333444455555', $body);

} catch (apiServiceException $e) {
  print 'There was an Analytics API service error '
      . $e->getCode() . ':' . $e->getMessage();

} catch (apiException $e) {
  print 'There was a general API error '
      . $e->getCode() . ':' . $e->getMessage();
}


পাইথন

পাইথন ক্লায়েন্ট লাইব্রেরি ব্যবহার করে।

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

# This request deletes a list of uploads.
try:
  analytics.management().uploads().deleteUploadData(
      accountId='123456',
      webPropertyId='UA-123456-1',
      customDataSourceId='ABCDEFG123456abcdefg',
      body={
          'customDataImportUids': ['ZYXABC123zyxabc',
                                   'lmnopEFGXYZ123a',
                                   '999AAA888bbb777']
      }
  ).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))

জাভাস্ক্রিপ্ট

জাভাস্ক্রিপ্ট ক্লায়েন্ট লাইব্রেরি ব্যবহার করে।

/*
 * Note: This code assumes you have an authorized Analytics client object.
 * See the Data Import Developer Guide for details.
 */

/*
 * This request deletes a list of existing uploads.
 */
function deleteUploads() {
  var request = gapi.client.analytics.management.uploads.deleteUploadData({
    'accountId': '123456',
    'webPropertyId': 'UA-123456-1',
    'customDataSourceId': 'ABCDEFG123abcDEF123',
    'resource': {
      'customDataImportUids': ['AAABBBCCCDDD111222',
                               'xLh4wXtzQT6uxe-_OWelog']
    }
  });
  request.execute(function (response) { // Handle the response. });
}

এটা চেষ্টা করুন!

লাইভ ডেটাতে এই পদ্ধতিতে কল করতে এবং প্রতিক্রিয়া দেখতে নীচের APIs এক্সপ্লোরার ব্যবহার করুন। বিকল্পভাবে, স্বতন্ত্র এক্সপ্লোরার ব্যবহার করে দেখুন।