Uploads: get

अनुमति की ज़रूरत है

उन अपलोड की सूची बनाएं जिनका ऐक्सेस उपयोगकर्ता के पास है. इसे अभी आज़माएं या उदाहरण देखें.

स्टैंडर्ड पैरामीटर के अलावा, यह तरीका पैरामीटर टेबल में दिए गए पैरामीटर के साथ काम करता है.

अनुरोध

एचटीटीपी अनुरोध

GET https://www.googleapis.com/analytics/v3/management/accounts/accountId/webproperties/webPropertyId/customDataSources/customDataSourceId/uploads/uploadId

पैरामीटर

पैरामीटर का नाम वैल्यू ब्यौरा
पाथ पैरामीटर
accountId string अपलोड की जानकारी वापस पाने के लिए खाता आईडी.
customDataSourceId string अपलोड को फिर से पाने के लिए कस्टम डेटा सोर्स आईडी.
uploadId string फिर से पाने के लिए आईडी अपलोड करें.
webPropertyId string अपलोड की फिर से हासिल करने के लिए वेब प्रॉपर्टी आईडी.

अनुमति

इस अनुरोध के लिए, इनमें से कम से कम एक स्कोप के साथ अनुमति देना ज़रूरी है (पुष्टि करने और अनुमति देने के बारे में ज़्यादा पढ़ें).

स्कोप
https://www.googleapis.com/auth/analytics
https://www.googleapis.com/auth/analytics.edit
https://www.googleapis.com/auth/analytics.readonly

अनुरोध का मुख्य भाग

इस तरीके का इस्तेमाल करके, अनुरोध का मुख्य हिस्सा न दें.

जवाब

अगर यह तरीका काम करता है, तो जवाब के मुख्य हिस्से में अपलोड किया गया संसाधन दिखता है.

उदाहरण

ध्यान दें: इस तरीके के लिए दिए गए कोड के उदाहरणों में इसके साथ काम करने वाली सभी प्रोग्रामिंग भाषाएं नहीं दिखाई गई हैं (इसके साथ काम करने वाली भाषाओं की सूची के लिए क्लाइंट लाइब्रेरी वाला पेज देखें).

Java

Java क्लाइंट लाइब्रेरी का इस्तेमाल करता है.

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


// This request gets an upload for the authorized user.
try {
  analytics.management().uploads().get("123456", "UA-123456-1",
      "122333444455555", "ABBCCCDDDDEEEEE").execute();
} catch (GoogleJsonResponseException e) {
  System.err.println("There was a service error: "
      + e.getDetails().getCode() + " : "
      + e.getDetails().getMessage());
}

PHP

PHP क्लाइंट लाइब्रेरी का इस्तेमाल किया जाता है.

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

// This request gets an upload for the authorized user.
try {
  $uploads = $analytics->management_uploads->get('123456', 'UA-123456-1',
      '122333444455555', 'ABBCCCDDDDEEEEE');

} 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();
}


Python

Python क्लाइंट लाइब्रेरी का इस्तेमाल करता हो.

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

# This request gets an upload object with a particular uploadId.
try:
  upload = analytics.management().uploads().get(
      accountId='123456',
      webPropertyId='UA-123456-1',
      customDataSourceId='abcdefg1234567',
      uploadId='AAABBBCCCDDD111222'
  ).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))

JavaScript

JavaScript क्लाइंट लाइब्रेरी का इस्तेमाल करता हो.

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

/*
 * This request gets an existing upload.
 */
function getUpload() {
  var request = gapi.client.analytics.management.uploads.get({
    'accountId': '123456',
    'webPropertyId': 'UA-123456-1',
    'customDataSourceId': 'ABCDEFG123abcDEF123',
    'uploadId': 'AAABBBCCCDDD111222'
  });
  request.execute(function (response) { // Handle the response. });
}

इसे आज़माएं!

लाइव डेटा पर इस तरीके को कॉल करने और रिस्पॉन्स देखने के लिए, नीचे दिया गया एपीआई एक्सप्लोरर इस्तेमाल करें. इसके अलावा, Standalone Explorer का इस्तेमाल भी किया जा सकता है.