किसी प्रोफ़ाइल के लिए सभी प्रोफ़ाइल फ़िल्टर लिंक की सूची बनाता है. इसे अभी आज़माएं या उदाहरण देखें.
अनुरोध करें
एचटीटीपी अनुरोध
GET https://www.googleapis.com/analytics/v3/management/accounts/accountId/webproperties/webPropertyId/profiles/profileId/profileFilterLinks
पैरामीटर
पैरामीटर का नाम | वैल्यू | जानकारी |
---|---|---|
पाथ पैरामीटर | ||
accountId |
string |
खाता आईडी, जिसके लिए प्रोफ़ाइल फ़िल्टर के लिंक वापस पाना है. |
profileId |
string |
के लिए फ़िल्टर लिंक पुनर्प्राप्त करने के लिए प्रोफ़ाइल आईडी. यह खास प्रोफ़ाइल आईडी या #39;~all' हो सकता है. इसमें ऐसे सभी प्रोफ़ाइल शामिल होते हैं जिन्हें उपयोगकर्ता ऐक्सेस करता है. |
webPropertyId |
string |
के लिए प्रोफ़ाइल फ़िल्टर लिंक के लिए वेब प्रॉपर्टी आईडी. यह एक खास वेब प्रॉपर्टी आईडी या '~all' हो सकता है. यह उन सभी वेब प्रॉपर्टी के बारे में बताता है जिनका ऐक्सेस उपयोगकर्ता के पास है. |
क्वेरी के वैकल्पिक पैरामीटर | ||
max-results |
integer |
इस जवाब में शामिल करने के लिए, प्रोफ़ाइल फ़िल्टर के लिंक की ज़्यादा से ज़्यादा संख्या. |
start-index |
integer |
पुनर्प्राप्त करने वाली पहली इकाई का इंडेक्स. इस पैरामीटर का इस्तेमाल, ज़्यादा से ज़्यादा नतीजों वाले पैरामीटर के साथ-साथ, पेजों को क्रम में लगाने के तरीके के तौर पर करें. |
अनुमति देना
इस अनुरोध के लिए, इनमें से कम से कम किसी एक दायरे की अनुमति ज़रूरी है (पुष्टि करने और अनुमति देने के बारे में ज़्यादा पढ़ें).
अनुमति देने का |
---|
https://www.googleapis.com/auth/analytics.edit |
https://www.googleapis.com/auth/analytics.readonly |
अनुरोध का मुख्य भाग
इस तरीके से अनुरोध का मुख्य हिस्सा न दें.
जवाब
अगर इस तरीके का इस्तेमाल किया जाता है, तो जवाब के मुख्य हिस्से में यह स्ट्रक्चर मौजूद होता है:
{ "kind": "analytics#profileFilterLinks", "username": string, "totalResults": integer, "startIndex": integer, "itemsPerPage": integer, "previousLink": string, "nextLink": string, "items": [ management.profileFilterLinks Resource ] }
प्रॉपर्टी का नाम | वैल्यू | जानकारी | नोट |
---|---|---|---|
kind |
string |
संग्रह का प्रकार. | |
username |
string |
पुष्टि किए गए उपयोगकर्ता का ईमेल आईडी | |
totalResults |
integer |
क्वेरी के नतीजों की कुल संख्या, भले ही जवाब में कितने भी नतीजे हों. | |
startIndex |
integer |
रिसॉर्स का शुरुआती इंडेक्स. यह डिफ़ॉल्ट रूप से एक होता है या किसी और तरीके से, शुरुआती इंडेक्स क्वेरी पैरामीटर से तय किया जाता है. | |
itemsPerPage |
integer |
जवाब की संख्या ज़्यादा से ज़्यादा इतने संसाधन हो सकते हैं कि रिस्पॉन्स में कितने संसाधन शामिल हैं. इसकी वैल्यू 1 से 1,000 के बीच होती है. इसमें डिफ़ॉल्ट रूप से 1,000 की वैल्यू होती है. इसके अलावा, ज़्यादा से ज़्यादा नतीजों वाले क्वेरी पैरामीटर से तय की जाती है. | |
previousLink |
string |
इस प्रोफ़ाइल के फ़िल्टर लिंक के संग्रह के लिए पिछले पेज से लिंक करें. | |
nextLink |
string |
इस प्रोफ़ाइल के फ़िल्टर लिंक के संग्रह के लिए अगले पेज का लिंक. | |
items[] |
list |
प्रोफ़ाइल के फ़िल्टर लिंक की सूची. |
उदाहरण
ध्यान दें: इस तरीके के लिए दिए गए कोड के उदाहरणों में इसके साथ काम करने वाली सभी प्रोग्रामिंग भाषाएं नहीं दिखाई गई हैं (इसके साथ काम करने वाली भाषाओं की सूची के लिए क्लाइंट लाइब्रेरी वाला पेज देखें).
Java
Java क्लाइंट लाइब्रेरी का इस्तेमाल करता है.
/* * Note: This code assumes you have an authorized Analytics service object. * See the Filters Developer Guide for details. */ /* * Example #1: * Requests a list of all profile filter links for the authorized user. */ try { ProfileFilterLinks filterLinks = analytics.management(). profileFilterLinks().list("123456", "UA-123456-1", "7654321").execute(); } catch (GoogleJsonResponseException e) { System.err.println("There was a service error: " + e.getDetails().getCode() + " : " + e.getDetails().getMessage()); } /* * Example 2: * The results of the list method are stored in the filterLinks object. * The following code shows how to iterate through them. */ for (ProfileFilterLink link : filterLinks.getItems()) { System.out.println("Link Id = " + link.getId()); System.out.println("Link Kind = " + link.getKind()); // Get the profile reference. ProfileRef profileRef = link.getProfileRef(); System.out.println("Profile Id = " + profileRef.getId()); System.out.println("Profile Kind = " + profileRef.getKind()); System.out.println("Profile Account Id = " + profileRef.getAccountId()); System.out.println("Profile Property Id = " + profileRef.getWebPropertyId()); System.out.println("Profile Name = " + profileRef.getName()); // Get the filter reference. FilterRef filterRef = link.getFilterRef(); System.out.println("Filter Id = " + filterRef.getId()); System.out.println("Filter Account Id = " + filterRef.getAccountId()); System.out.println("Filter Name = " + filterRef.getName()); }
Python
Python क्लाइंट लाइब्रेरी का इस्तेमाल करता है.
# Note: This code assumes you have an authorized Analytics service object. # See the Filters Developer Guide for details. # Example #1: # Requests a list of all profile filter links for the authorized user. try: filterLinks = analytics.management().profileFilterLinks().list( accountId='123456' webPropertyId='UA-123456-1', profileId='7654321' ).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)) # Example #2: # The results of the list method are stored in the filterLinks object. # The following code shows how to iterate through them. for link in filterLinks.get('items', []): print 'Link Id = %s' % link.get('id') print 'Link Kind = %s' % link.get('kind') # Get the profile reference. profileRef = link.get('profileRef', {}) print 'Profile Id = %s' % profileRef.get('id') print 'Profile Kind = %s' % profileRef.get('kind') print 'Profile Account Id = %s' % profileRef.get('accountId') print 'Profile Property Id = %s' % profileRef.get('webPropertyId') print 'Profile Name = %s' % profile.get('name') # Get the filter reference. filterRef = link.get('filterRef', {}) print 'Filter Id = %s' % filterRef.get('id') print 'Filter Account Id = %s' % filterRef.get('accountId') print 'Filter Name = %s' % filterRef.get('name')
इसे आज़माएं!
इस तरीके को लाइव डेटा पर कॉल करने और जवाब देखने के लिए, नीचे दिए गए एपीआई एक्सप्लोरर का इस्तेमाल करें. इसके अलावा, स्टैंडअलोन एक्सप्लोरर आज़माकर देखें.