Accounts: update

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

একটি GTM অ্যাকাউন্ট আপডেট করে। এখন এটি চেষ্টা করুন বা একটি উদাহরণ দেখুন

অনুরোধ

HTTP অনুরোধ

PUT https://www.googleapis.com/tagmanager/v1/accounts/accountId

পরামিতি

পরামিতি নাম মান বর্ণনা
পাথ প্যারামিটার
accountId string GTM অ্যাকাউন্ট আইডি।
ঐচ্ছিক ক্যোয়ারী পরামিতি
fingerprint string প্রদান করা হলে, এই আঙ্গুলের ছাপ অবশ্যই স্টোরেজে থাকা অ্যাকাউন্টের আঙ্গুলের ছাপের সাথে মিলবে।

অনুমোদন

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

ব্যাপ্তি
https://www.googleapis.com/auth/tagmanager.manage.accounts

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

অনুরোধের অংশে, নিম্নলিখিত বৈশিষ্ট্য সহ একটি অ্যাকাউন্ট সম্পদ সরবরাহ করুন:

সম্পত্তির নাম মান বর্ণনা মন্তব্য
ঐচ্ছিক বৈশিষ্ট্য
name string অ্যাকাউন্ট প্রদর্শনের নাম। লিখনযোগ্য
shareData boolean অ্যাকাউন্টটি Google এবং অন্যদের সাথে বেনামে ডেটা ভাগ করে কিনা৷ লিখনযোগ্য

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

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

উদাহরণ

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

জাভা

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

/*
 * Note: This code assumes you have an authorized tagmanager service object.
 */

/*
 * This request updates an existing account for the authorized user.
 */

// Construct the account object
Account account = new Account();
account.setName("Primary GTM Account");
account.setShareData(false);

try {
  Account response = tagmanager.accounts().update("123456", account).execute();
} catch (GoogleJsonResponseException e) {
  System.err.println("There was a service error: "
      + e.getDetails().getCode() + " : "
      + e.getDetails().getMessage());
}

/*
 * The results of the update method are stored in the response object.
 * The following code shows how to access the updated name and fingerprint.
 */
System.out.println("Updated Name = " + response.getName());
System.out.println("Updated Fingerprint = " + response.getFingerprint());

পাইথন

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

# Note: This code assumes you have an authorized tagmanager service object.

# This request updates an existing account for the authorized user.
try:
  response = tagmanager.accounts().update(
      accountId='123456',
      body={
          'name': 'Primary GTM Account',
          'shareData': False
      }
  ).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))

# The results of the update method are stored in the response object.
# The following code shows how to access the updated name and fingerprint.
print 'Updated Name = %s' % response.get('name')
print 'Updated Fingerprint = %s' % response.get('fingerprint')

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

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