সেভ করা পৃষ্ঠা গুছিয়ে রাখতে 'সংগ্রহ' ব্যবহার করুন
আপনার পছন্দ অনুযায়ী কন্টেন্ট সেভ করুন ও সঠিক বিভাগে রাখুন।
এই গাইডটি Google ড্রাইভ অ্যাক্টিভিটি API-তে একটি প্রতিক্রিয়ার প্রধান উপাদানগুলি ব্যাখ্যা করে, উদাহরণগুলি দেখায় এবং কীভাবে সেগুলিকে ব্যাখ্যা করতে হয়৷
বস্তু
DriveActivity : ড্রাইভ অ্যাক্টিভিটি এপিআই-এ প্রশ্নগুলির দ্বারা ফেরত দেওয়া প্রাথমিক সংস্থান। এটি বর্ণনা করে যে এক বা একাধিক অভিনেতা এক বা একাধিক ক্রিয়া সম্পাদন করছেন যা এক বা একাধিক লক্ষ্যকে প্রভাবিত করে।
Timestamp এবং TimeRange : এগুলি যথাক্রমে বর্ণনা করে, হয় যখন ক্রিয়াকলাপটি ঘটেছিল তখন একটি একক বিন্দু, অথবা যখন কার্যকলাপটি একটি নির্দিষ্ট সময়ের মধ্যে ঘটেছিল তখন শুরু এবং শেষ হয়৷
Actor : সাধারণত, একজন Actor একজন শেষ ব্যবহারকারী। যাইহোক, কখনও কখনও, একটি সিস্টেম ইভেন্ট একটি Action ট্রিগার করতে পারে যখন একজন অ্যাডমিনিস্ট্রেটর একজন ব্যবহারকারী হিসাবে বা নিজের মতো কাজ করে, বা যখন কোনও অজ্ঞাত ব্যক্তি দ্বারা সঞ্চালিত হয়। Actor বার্তা এই প্রতিটি ক্ষেত্রে encapsulates.
Target : একটি Target হল একটি ক্রিয়াকলাপের বস্তু, যেমন একটি ফাইল, একটি ফোল্ডার, একটি শেয়ার্ড ড্রাইভ বা একটি ফাইল মন্তব্য৷ উল্লেখ্য যে অনেক ধরনের কর্মের ধরন একাধিক ধরনের লক্ষ্য সমর্থন করে। উদাহরণস্বরূপ, যদিও Edit সাধারণত ড্রাইভ ফাইলগুলিতে প্রযোজ্য, Rename এবং Create মতো অন্যান্য ক্রিয়াগুলি ড্রাইভ ফোল্ডার এবং শেয়ার্ড ড্রাইভেও প্রযোজ্য হতে পারে। ড্রাইভ আইটেম নয় এমন লক্ষ্যগুলি এখনও একটিকে উল্লেখ করতে পারে, যেমন একটি ড্রাইভের রুট ফোল্ডার বা একটি ফাইল মন্তব্য ধারণকারী মূল নথি৷
Action : প্রতিটি DriveActivity রিসোর্সে এক বা একাধিক সম্পর্কিত অ্যাকশন থাকে। একটি Action একটি ইভেন্টের মতো স্বয়ংসম্পূর্ণ, যাতে এটি কেবলমাত্র অ্যাকশন সম্পর্কে বিস্তারিত প্রকার এবং তথ্যই নয়, একজন Actor , একটি Target এবং হয় একটি Timestamp বা TimeRange । অপ্রয়োজনীয়তা এড়াতে, যখন সামগ্রিক DriveActivity একই হয় তখন একটি Action তার নিজস্ব Target , Actor বা সময় ক্ষেত্রগুলি পূরণ করে না৷
ActionDetail : এটি একটি Action সম্পর্কে নির্দিষ্ট ধরনের এবং বিস্তারিত তথ্য। উদাহরণস্বরূপ, একটি Move অ্যাকশন বিশদটির একটি উত্স এবং গন্তব্য অবস্থান রয়েছে এবং একটি PermissionChange নির্দিষ্ট করে যে কে এখন একটি নথি অ্যাক্সেস করতে পারে এবং কোন বিশেষাধিকারগুলি সহ।
উদাহরণ প্রতিক্রিয়া
নমুনা প্রতিক্রিয়া দেখতে নিম্নলিখিত পর্যালোচনা করুন.
একজন ব্যবহারকারী ড্রাইভে একটি ফাইল সম্পাদনা করেছেন৷
একটি DriveActivity রিসোর্স শুধুমাত্র একটি কাজ অন্তর্ভুক্ত করতে পারে, যেমন একজন ব্যবহারকারী একটি ফাইল সম্পাদনা করে।
ACCOUNT_ID : ব্যবহারকারীর ID। এটি আরও তথ্য পেতে People API এর সাথে ব্যবহার করা যেতে পারে।
ITEM_ID : ড্রাইভ আইটেমের আইডি।
TITLE : ড্রাইভ আইটেমের শিরোনাম।
মনে রাখবেন যে এই প্রতিক্রিয়ার Action অবজেক্টে Actor , Target বা timestamp অন্তর্ভুক্ত নয় কারণ সেগুলি সামগ্রিক DriveActivity মতোই৷
দুই ব্যবহারকারী একই সময়ে একই ফাইল সম্পাদনা করেছেন
যখন একটি ConsolidationStrategy ব্যবহার করা হয়, তখন সম্পর্কিত ক্রিয়াগুলিকে একটি সম্মিলিত DriveActivity গোষ্ঠীভুক্ত করা হয়। এই উদাহরণে, দুটি অনুরূপ ক্রিয়াগুলিকে গোষ্ঠীভুক্ত করা হয়েছে: দুটি ভিন্ন ব্যবহারকারীর থেকে একটি Edit কর্মের ধরন৷
ACCOUNT_ID_1 : প্রথম ব্যবহারকারীর ID। এটি আরও তথ্য পেতে People API এর সাথে ব্যবহার করা যেতে পারে।
ACCOUNT_ID_2 : দ্বিতীয় ব্যবহারকারীর ID।
ITEM_ID : ড্রাইভ আইটেমের আইডি।
TITLE : ড্রাইভ আইটেমের শিরোনাম।
মনে রাখবেন যে এই প্রতিক্রিয়ার Action অবজেক্টটি Target অন্তর্ভুক্ত করে না কারণ এটি সামগ্রিক DriveActivity মতো।
উদাহরণটি আরও ব্যাখ্যা করে যে কীভাবে অ্যাপগুলি DriveActivity শুধুমাত্র সংক্ষিপ্ত তথ্য ব্যবহার করতে পারে, ব্যক্তিগত ক্রিয়াগুলি না দেখে৷ প্রতিক্রিয়াটি নির্দেশ করে যে দুটি ব্যবহারকারী একটি প্রদত্ত ফাইলকে সময়ের ব্যবধানে সম্পাদনা করেছেন।
একজন ব্যবহারকারী একটি নতুন ডিরেক্টরিতে দুটি ফাইল সরান
এই উদাহরণে, ConsolidationStrategy দুটি সম্পর্কিত Move ক্রিয়াগুলিকে গোষ্ঠীভুক্ত করেছে কারণ ফাইলগুলি একই উত্স থেকে একই গন্তব্যে একই সময়ে সরানো হয়েছিল।
[[["সহজে বোঝা যায়","easyToUnderstand","thumb-up"],["আমার সমস্যার সমাধান হয়েছে","solvedMyProblem","thumb-up"],["অন্যান্য","otherUp","thumb-up"]],[["এতে আমার প্রয়োজনীয় তথ্য নেই","missingTheInformationINeed","thumb-down"],["খুব জটিল / অনেক ধাপ","tooComplicatedTooManySteps","thumb-down"],["পুরনো","outOfDate","thumb-down"],["অনুবাদ সংক্রান্ত সমস্যা","translationIssue","thumb-down"],["নমুনা / কোড সংক্রান্ত সমস্যা","samplesCodeIssue","thumb-down"],["অন্যান্য","otherDown","thumb-down"]],["2025-03-26 UTC-তে শেষবার আপডেট করা হয়েছে।"],[],[],null,["# Drive Activity API data model\n\nThis guide explains the main components of a response in the Google Drive Activity API,\nshowing examples and how to interpret them.\n\nObjects\n-------\n\n- [`DriveActivity`](/drive/activity/v2/reference/rest/v2/activity/driveactivity): This is the primary\n resource returned by queries to the Drive Activity API. It describes one\n or more actors performing one or more actions affecting one or more targets.\n\n- [`Timestamp`](https://protobuf.dev/reference/protobuf/google.protobuf/#timestamp)\n and [`TimeRange`](/drive/activity/v2/reference/rest/v2/activity/timerange): These describe,\n respectively, either a single point in time when the activity occurred, or\n the start and end of when the activity occurred over a span of time.\n\n- [`Actor`](/drive/activity/v2/reference/rest/v2/activity/actor): Typically, an `Actor` is an end user.\n However, sometimes, a system event can trigger an [`Action`](/drive/activity/v2/reference/rest/v2/activity/action) when an administrator is acting as a user or as\n themselves, or when performed by an unidentifiable person. The `Actor`\n message encapsulates each of these cases.\n\n- [`Target`](/drive/activity/v2/reference/rest/v2/activity/target): A `Target` is the object of an\n activity, like a file, a folder, a shared drive, or a file comment. Note\n that many action types support more than one kind of target. For example,\n though `Edit` generally applies to Drive files, other actions\n like `Rename` and `Create` can also apply to Drive folders\n and shared drives. Targets that aren't Drive items can still\n refer to one, such as the root folder of a drive or the parent document\n containing a file comment.\n\n- [`Action`](/drive/activity/v2/reference/rest/v2/activity/action): Each `DriveActivity` resource has one\n or more related actions. An `Action` is self-contained, like an\n *event* , in that it comprises not only the detailed type and information\n about the action, but also an `Actor`, a `Target`, and either a `Timestamp`\n or `TimeRange`. To avoid redundancy, an `Action` doesn't populate its own\n `Target`, `Actor`, or time fields when those are the same as the overall\n `DriveActivity`.\n\n- [`ActionDetail`](/drive/activity/v2/reference/rest/v2/activity/actiondetail): This is the specific type\n and detailed information about an `Action`. For example, a `Move` action\n detail has a source and destination location, and a `PermissionChange`\n specifies who can now access a document and with what privileges.\n\nExample responses\n-----------------\n\nReview the following to see sample responses.\n\n### A user edited a file in Drive\n\nA `DriveActivity` resource might include only one action, such as a user\nediting one file. \n\n \"activities\":[{\n \"primaryActionDetail\":{ \"edit\":{} },\n \"actors\":[ { \"user\":{ \"knownUser\":{ \"personName\":\"people/\u003cvar translate=\"no\"\u003eACCOUNT_ID\u003c/var\u003e\" } } } ],\n \"targets\":[ { \"driveItem\":{ \"name\":\"items/\u003cvar translate=\"no\"\u003eITEM_ID\u003c/var\u003e\", \"title\":\"\u003cvar translate=\"no\"\u003eTITLE\u003c/var\u003e\", \"file\":{} } } ],\n \"timestamp\":{ \"seconds\":\"1536794657\", \"nanos\":791000000 },\n \"actions\":[ { \"detail\":{ \"edit\":{} } } ]\n }]\n\nThis output includes the following values:\n\n- \u003cvar translate=\"no\"\u003eACCOUNT_ID\u003c/var\u003e: the ID of the user. It can be used with the [People API](/people) to get more information.\n- \u003cvar translate=\"no\"\u003eITEM_ID\u003c/var\u003e: the ID of the Drive item.\n- \u003cvar translate=\"no\"\u003eTITLE\u003c/var\u003e: the title of the Drive item.\n\nNote that the `Action` object in this response doesn't include the `Actor`,\n`Target`, or `timestamp` because they're the same as the overall\n`DriveActivity`.\n\n### Two users edited the same file at similar times\n\nWhen a [`ConsolidationStrategy`](/drive/activity/v2/reference/rest/v2/activity/query#consolidationstrategy)\nis used, related actions are grouped into one combined `DriveActivity`. In this\nexample, two similar actions are grouped: one `Edit` action type from two\ndifferent users. \n\n \"activities\":[{\n \"primaryActionDetail\":{ \"edit\":{} },\n \"actors\":[\n { \"user\":{ \"knownUser\":{ \"personName\":\"people/\u003cvar translate=\"no\"\u003eACCOUNT_ID_1\u003c/var\u003e\" } } },\n { \"user\":{ \"knownUser\":{ \"personName\":\"people/\u003cvar translate=\"no\"\u003eACCOUNT_ID_2\u003c/var\u003e\" } } }\n ],\n \"targets\":[\n { \"driveItem\":{ \"name\":\"items/\u003cvar translate=\"no\"\u003eITEM_ID\u003c/var\u003e\", \"title\":\"\u003cvar translate=\"no\"\u003eTITLE\u003c/var\u003e\", \"file\":{} } }\n ],\n \"timeRange\":{\n \"startTime\":{ \"seconds\":\"1541089823\", \"nanos\":712000000 },\n \"endTime\":{ \"seconds\":\"1541089830\", \"nanos\":830000000 }\n },\n \"actions\":[\n {\n \"detail\":{ \"edit\":{} },\n \"actor\":{ \"user\":{ \"knownUser\":{ \"personName\":\"people/\u003cvar translate=\"no\"\u003eACCOUNT_ID_1\u003c/var\u003e\" } } },\n \"timestamp\":{ \"seconds\":\"1541089830\", \"nanos\":830000000 }\n },\n {\n \"detail\":{ \"edit\":{} },\n \"actor\":{ \"user\":{ \"knownUser\":{ \"personName\":\"people/\u003cvar translate=\"no\"\u003eACCOUNT_ID_2\u003c/var\u003e\" } } },\n \"timestamp\":{ \"seconds\":\"1541089823\", \"nanos\":712000000 }\n }\n ]\n }]\n\nThis output includes the following values:\n\n- \u003cvar translate=\"no\"\u003eACCOUNT_ID_1\u003c/var\u003e: the ID of the first user. It can be used with the [People API](/people) to get more information.\n- \u003cvar translate=\"no\"\u003eACCOUNT_ID_2\u003c/var\u003e: the ID of the second user.\n- \u003cvar translate=\"no\"\u003eITEM_ID\u003c/var\u003e: the ID of the Drive item.\n- \u003cvar translate=\"no\"\u003eTITLE\u003c/var\u003e: the title of the Drive item.\n\nNote that the `Action` object in this response doesn't include the `Target`\nbecause it's the same as the overall `DriveActivity`.\n\nThe example also illustrates how apps might use only the summary information in\n`DriveActivity`, without looking at the individual actions. The response\nindicates that two users edited a given file over a span of time.\n\n### A user moved two files into a new directory\n\nIn this example, the `ConsolidationStrategy` grouped two related `Move` actions\nbecause the files were moved from the same source to the same destination at the\nsame time. \n\n \"activities\":[{\n \"primaryActionDetail\":{\n \"move\":{\n \"addedParents\":[ { ... } ]\n \"removedParents\":[ { ... } ]\n }\n },\n \"actors\":[ { \"user\":{ \"knownUser\":{ \"personName\":\"people/\u003cvar translate=\"no\"\u003eACCOUNT_ID\u003c/var\u003e\" } } } ],\n \"targets\":[\n { \"driveItem\":{ \"name\":\"items/\u003cvar translate=\"no\"\u003eITEM_ID_1\u003c/var\u003e\", \"title\":\"\u003cvar translate=\"no\"\u003eTITLE_1\u003c/var\u003e\", \"file\":{} } },\n { \"driveItem\":{ \"name\":\"items/\u003cvar translate=\"no\"\u003eITEM_ID_2\u003c/var\u003e\", \"title\":\"* \u003cvar translate=\"no\"\u003eTITLE_2\u003c/var\u003e\", \"file\":{} } }\n ],\n \"timestamp\":{ \"seconds\":\"1541090960\", \"nanos\":985000000 },\n \"actions\":[\n {\n \"detail\":{ \"move\":{ \"addedParents\":[ { ... } ] \"removedParents\":[ { ... } ] } },\n \"target\":{ \"driveItem\":{ \"name\":\"items/\u003cvar translate=\"no\"\u003eITEM_ID_1\u003c/var\u003e\", \"title\":\"\u003cvar translate=\"no\"\u003eTITLE_1\u003c/var\u003e\", \"file\":{} } }\n },\n {\n \"detail\":{ \"move\":{ \"addedParents\":[ { ... } ] \"removedParents\":[ { ... } ] } },\n \"target\":{ \"driveItem\":{ \"name\":\"items/\u003cvar translate=\"no\"\u003eITEM_ID_2\u003c/var\u003e\", \"title\":\"* \u003cvar translate=\"no\"\u003eTITLE_2\u003c/var\u003e\", \"file\":{} } }\n }\n ]\n }]\n\nThis output includes the following values:\n\n- \u003cvar translate=\"no\"\u003eACCOUNT_ID\u003c/var\u003e: the ID of the user. It can be used with the [People API](/people) to get more information.\n- \u003cvar translate=\"no\"\u003eITEM_ID_1\u003c/var\u003e: the ID of the first Drive item.\n- \u003cvar translate=\"no\"\u003eITEM_ID_2\u003c/var\u003e: the ID of the second Drive item.\n- \u003cvar translate=\"no\"\u003eTITLE_1\u003c/var\u003e: the title of the first Drive item.\n- \u003cvar translate=\"no\"\u003eTITLE_2\u003c/var\u003e: the title of the second Drive item.\n\nNote that the `Action` object in this response doesn't include the `Actor` or\n`timestamp` because they're the same as the overall `DriveActivity`."]]