يجب تقديم تفويض.
يسرد جميع روابط فلاتر الملف الشخصي للملف الشخصي. جرِّبه الآن أو اطّلِع على مثال.
الطلب
طلب HTTP
GET https://www.googleapis.com/analytics/v3/management/accounts/accountId/webproperties/webPropertyId/profiles/profileId/profileFilterLinks
المَعلمات
اسم المعلَمة | القيمة | الوصف |
---|---|---|
مَعلمات المسار | ||
accountId |
string |
رقم تعريف الحساب لاسترداد روابط فلاتر الملف الشخصي لها. |
profileId |
string |
رقم تعريف الملف الشخصي لاسترداد روابط الفلاتر له. يمكن أن يكون معرّف ملفّ شخصي محدّدًا أو "الكل تقريبًا"، ما يشير إلى جميع الملفات الشخصية التي يمكن للمستخدِم الوصول إليها. |
webPropertyId |
string |
رقم تعريف الموقع الإلكتروني لروابط فلاتر الملف الشخصي التي تخصّ. يمكن أن يكون معرّف موقع إلكتروني محدّد أو "الكل تقريبًا"، ما يشير إلى جميع المواقع الإلكترونية التي يمكن للمستخدِم الوصول إليها. |
مَعلمات طلب البحث الاختيارية | ||
max-results |
integer |
الحدّ الأقصى لعدد روابط فلاتر الملف الشخصي المطلوب تضمينها في هذا الردّ |
start-index |
integer |
فهرس الكيان الأول المطلوب استرداده. يمكنك استخدام هذه المَعلمة كآلية تقسيم على صفحات إلى جانب المَعلمة max-results. |
التفويض
يتطلب هذا الطلب تفويضًا باستخدام نطاق واحد على الأقل من النطاقات التالية (مزيد من المعلومات عن المصادقة والترخيص).
النطاق |
---|
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 ] }
اسم الموقع | القيمة | الوصف | Notes |
---|---|---|---|
kind |
string |
نوع المجموعة | |
username |
string |
رقم تعريف البريد الإلكتروني للمستخدم الذي تمت المصادقة عليه | |
totalResults |
integer |
إجمالي عدد النتائج لطلب البحث، بغض النظر عن عدد النتائج في الرد. | |
startIndex |
integer |
هو فهرس البدء للموارد، والذي يكون 1 تلقائيًا، أو يتم تحديده بطريقة أخرى من خلال مَعلمة طلب البحث لفهرس البدء. | |
itemsPerPage |
integer |
الحد الأقصى لعدد الموارد التي يمكن أن يحتوي عليها الرد، بغض النظر عن العدد الفعلي للموارد المعروضة. وتتراوح قيمتها بين 1 و1,000 مع قيمة 1000 تلقائيًا، أو يتم تحديدها من خلال مَعلمة طلب البحث max-results. | |
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')
تجربة
استخدِم مستكشف واجهات برمجة التطبيقات أدناه لطلب هذه الطريقة على البيانات المباشرة والاطّلاع على الردّ. ويمكنك بدلاً من ذلك تجربة المستكشف المستقل.