অনুমোদন প্রয়োজন
একটি প্রদত্ত ভিউ (প্রোফাইল) এর জন্য প্রোফাইল-ব্যবহারকারীর লিঙ্কগুলি তালিকাভুক্ত করে। এখন এটি চেষ্টা করুন বা একটি উদাহরণ দেখুন ।
স্ট্যান্ডার্ড প্যারামিটারগুলি ছাড়াও, এই পদ্ধতিটি প্যারামিটার টেবিলে তালিকাভুক্ত পরামিতিগুলিকে সমর্থন করে।
অনুরোধ
HTTP অনুরোধ
GET https://www.googleapis.com/analytics/v3/management/accounts/accountId/webproperties/webPropertyId/profiles/profileId/entityUserLinks
পরামিতি
পরামিতি নাম | মান | বর্ণনা |
---|---|---|
পাথ প্যারামিটার | ||
accountId | string | অ্যাকাউন্ট আইডি যা প্রদত্ত ভিউ (প্রোফাইল) এর অন্তর্গত। |
profileId | string | প্রোফাইল-ব্যবহারকারীর লিঙ্কগুলি পুনরুদ্ধার করতে (প্রোফাইল) আইডি দেখুন৷ হয় একটি নির্দিষ্ট প্রোফাইল আইডি বা '~সমস্ত' হতে পারে, যা ব্যবহারকারীর অ্যাক্সেস আছে এমন সমস্ত প্রোফাইলকে বোঝায়। |
webPropertyId | string | ওয়েব প্রপার্টি আইডি যা প্রদত্ত ভিউ (প্রোফাইল) এর অন্তর্গত। হয় একটি নির্দিষ্ট ওয়েব সম্পত্তি আইডি বা '~সমস্ত' হতে পারে, যা ব্যবহারকারীর অ্যাক্সেস আছে এমন সমস্ত ওয়েব বৈশিষ্ট্যকে বোঝায়। |
ঐচ্ছিক ক্যোয়ারী পরামিতি | ||
max-results | integer | এই প্রতিক্রিয়াতে অন্তর্ভুক্ত করার জন্য প্রোফাইল-ব্যবহারকারীর লিঙ্কগুলির সর্বাধিক সংখ্যা। |
start-index | integer | পুনরুদ্ধার করার জন্য প্রথম প্রোফাইল-ব্যবহারকারী লিঙ্কের একটি সূচক। সর্বাধিক-ফলাফল পরামিতি সহ একটি পৃষ্ঠা সংখ্যা পদ্ধতি হিসাবে এই প্যারামিটারটি ব্যবহার করুন৷ |
অনুমোদন
এই অনুরোধের জন্য নিম্নলিখিত স্কোপের মধ্যে অন্তত একটির অনুমোদন প্রয়োজন ( প্রমাণিকরণ এবং অনুমোদন সম্পর্কে আরও পড়ুন )।
ব্যাপ্তি |
---|
https://www.googleapis.com/auth/analytics.manage.users |
https://www.googleapis.com/auth/analytics.manage.users.readonly |
শরীরের অনুরোধ
এই পদ্ধতির সাথে একটি অনুরোধ সংস্থা সরবরাহ করবেন না।
প্রতিক্রিয়া
সফল হলে, এই পদ্ধতিটি নিম্নলিখিত কাঠামো সহ একটি প্রতিক্রিয়া বডি প্রদান করে:
{ "kind": "analytics#entityUserLinks", "totalResults": integer, "startIndex": integer, "itemsPerPage": integer, "previousLink": string, "nextLink": string, "items": [ management.profileUserLinks Resource ] }
সম্পত্তির নাম | মান | বর্ণনা | মন্তব্য |
---|---|---|---|
kind | string | সংগ্রহের ধরন। | |
totalResults | integer | উত্তরে ফলাফলের সংখ্যা নির্বিশেষে প্রশ্নের জন্য মোট ফলাফলের সংখ্যা। | |
startIndex | integer | এন্ট্রিগুলির প্রারম্ভিক সূচক, যা ডিফল্টরূপে 1 বা অন্যথায় স্টার্ট-ইনডেক্স ক্যোয়ারী প্যারামিটার দ্বারা নির্দিষ্ট করা হয়। | |
itemsPerPage | integer | প্রত্যাবর্তিত এন্ট্রির প্রকৃত সংখ্যা নির্বিশেষে প্রতিক্রিয়াটিতে সর্বাধিক সংখ্যক এন্ট্রি থাকতে পারে। এটির মান 1 থেকে 1000 পর্যন্ত ডিফল্টভাবে 1000 এর মান সহ, বা অন্যথায় সর্বোচ্চ-ফলাফল ক্যোয়ারী প্যারামিটার দ্বারা নির্দিষ্ট করা হয়। | |
previousLink | string | এই অ্যাকাউন্ট সংগ্রহের জন্য পূর্ববর্তী লিঙ্ক। | |
nextLink | string | এই অ্যাকাউন্ট সংগ্রহের জন্য পরবর্তী লিঙ্ক। | |
items[] | list | সত্তা ব্যবহারকারী লিঙ্কের একটি তালিকা। |
উদাহরণ
দ্রষ্টব্য: এই পদ্ধতির জন্য উপলব্ধ কোড উদাহরণগুলি সমস্ত সমর্থিত প্রোগ্রামিং ভাষার প্রতিনিধিত্ব করে না (সমর্থিত ভাষার তালিকার জন্য ক্লায়েন্ট লাইব্রেরি পৃষ্ঠা দেখুন)।
জাভা
জাভা ক্লায়েন্ট লাইব্রেরি ব্যবহার করে।
/* * Note: This code assumes you have an authorized Analytics service object. * See the User Permissions Developer Guide for details. */ /* * Example #1: * This request lists all View (Profile) User Links for the authorized user. */ try { EntityUserLinks profileLinks = analytics.management(). profileUserLinks().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 profileLinks object. * The following code shows how to iterate through them. */ for (EntityUserLink profileUserLink : profileLinks.getItems()) { Entity entity = profileUserLink.getEntity(); ProfileRef profileRef = entity.getProfileRef(); UserRef userRef = profileUserLink.getUserRef(); Permissions permissions = profileUserLink.getPermissions(); System.out.println("Profile User Link Id: " + profileUserLink.getId()); System.out.println("Profile User Link kind: " + userRef.getKind()); System.out.println("User Email: " + userRef.getEmail()); System.out.println("Permissions effective: " + permissions.getEffective()); System.out.println("Permissions local: " + permissions.getLocal()); System.out.println("Profile Id: " + profileRef.getId()); System.out.println("Profile Kind: " + profileRef.getKind()); System.out.println("Profile Name: " + profileRef.getName()); }
পিএইচপি
পিএইচপি ক্লায়েন্ট লাইব্রেরি ব্যবহার করে।
/** * Note: This code assumes you have an authorized Analytics service object. * See the User Permissions Developer Guide for details. */ /** * Example #1: * Requests a list of all view (profile) user links for the authorized user. */ try { $profileUserlinks = $analytics->management_profileUserLinks ->listManagementProfileUserLinks('123456', 'UA-123456-1', '756321'); } 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(); } /** * Example #2: * The results of the list method are stored in the profileUserlinks object. * The following code shows how to iterate through them. */ foreach ($profileUserlinks->getItems() as $profileUserLink) { $entity = $profileUserLink->getEntity(); $profileRef = $entity->getProfileRef(); $userRef = $profileUserLink->getUserRef(); $permissions = $profileUserLink->getPermissions(); $html = <<<HTML <pre> Profile user link id = {$profileUserLink->getId()} Profile user link kind = {$profileUserLink->getKind()} Profile id = {$profileRef->getId()} Profile name = {$profileRef->getName()} Profile kind = {$profileRef->getKind()} Permissions local = {$permissions->getLocal()} Permissions effective = {$permissions->getEffective()} User id = {$userRef->getId()} User kind = {$userRef->getKind()} User email = {$userRef->getEmail()} </pre> HTML; print $html; }
পাইথন
পাইথন ক্লায়েন্ট লাইব্রেরি ব্যবহার করে।
# Note: This code assumes you have an authorized Analytics service object. # See the User Permissions Developer Guide for details. # Example #1: # Requests a list of profile-user links for a given view (profile). try: profile_links = analytics.management().profileUserLinks().list( accountId='123456', webPropertyId='UA-123456-1', profileId='12345678' ).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 profile_links object. # The following code shows how to iterate through them. for profileUserLink in profile_links.get('items', []): entity = profileUserLink.get('entity', {}) profileRef = entity.get('profileRef', {}) userRef = profileUserLink.get('userRef', {}) permissions = profileUserLink.get('permissions', {}) print 'Profile User Link Id = %s' % profileUserLink.get('id') print 'Profile User Link kind = %s' % profileUserLink.get('kind') print 'User Email = %s' % userRef.get('email') print 'Permissions effective = %s' % permissions.get('effective') print 'Permissions local = %s' % permissions.get('local') print 'Profile Id = %s' % profileRef.get('id') print 'Profile kind = %s' % profileRef.get('kind') print 'Profile Name = %s\n' % profileRef.get('name')
জাভাস্ক্রিপ্ট
জাভাস্ক্রিপ্ট ক্লায়েন্ট লাইব্রেরি ব্যবহার করে।
/* * Note: This code assumes you have an authorized Analytics client object. * See the User Permissions Developer Guide for details. */ /* * Example 1: * Requests a list of all View (Profile) User links for the authorized user. */ function listProfileUserLinks() { var request = gapi.client.analytics.management.profileUserLinks.list({ 'accountId': '123456', 'webPropertyId': 'UA-123456-1', 'profileId': '7654321' }); request.execute(printProfileUserLinks); } /* * Example 2: * The results of the list method are passed as the results object. * The following code shows how to iterate through them. */ function printProfileUserLinks(results) { if (results && !results.error) { var profileLinks = results.items; for (var i = 0, profileUserLink; profileUserLink = profileLinks[i]; i++) { var entity = profileUserLink.entity; var profileRef = entity.profileRef; var userRef = profileUserLink.userRef; var permissions = profileUserLink.permissions; console.log('Profile User Link Id: ' + profileUserLink.id); console.log('Profile User Link Kind: ' + profileUserLink.kind); console.log('User Email: ' + userRef.email); console.log('Permissions effective: ' + permissions.effective); console.log('Permissions local: ' + permissions.local); console.log('Profile Id: ' + profileRef.id); console.log('Profile Kind: ' + profileRef.kind); console.log('Profile Name: ' + profileRef.name); } } }
এটা চেষ্টা করুন!
লাইভ ডেটাতে এই পদ্ধতিতে কল করতে এবং প্রতিক্রিয়া দেখতে নীচের APIs এক্সপ্লোরার ব্যবহার করুন। বিকল্পভাবে, স্বতন্ত্র এক্সপ্লোরার ব্যবহার করে দেখুন।