تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
تتّبع مساحات التخزين السحابي المشتركة نماذج مختلفة عن "ملفاتي" من حيث التنظيم والمشاركة والملكية. إذا كان تطبيقك سينشئ ملفات ويديرها في مساحات تخزين سحابي مشتركة، عليك توفير إمكانية استخدام مساحات التخزين السحابي المشتركة في تطبيقك، وتعتمد درجة تعقيد عملية التنفيذ على وظائف تطبيقك.
للبدء، يجب تضمين مَعلمة طلب البحث supportsAllDrives=true في طلباتك عندما ينفّذ تطبيقك العمليات التالية:
الإصدار 3 من Drive API
files.get
files.list
files.create
files.update
files.copy
files.delete
changes.list
changes.getStartPageToken
permissions.list
permissions.get
permissions.create
permissions.update
permissions.delete
Drive API v2
files.get
files.list
files.insert
files.update
files.patch
files.copy
files.trash
files.untrash
files.delete
files.touch
children.insert
parents.insert
changes.list
changes.getStartPageToken
changes.get
permissions.list
permissions.get
permissions.insert
permissions.update
permissions.patch
permissions.delete
تُعلم المَعلمة supportsAllDrives=true خدمة Google Drive بأنّ تطبيقك مصمّم للتعامل مع الملفات في مساحات التخزين السحابي المشتركة.
تتطلّب التطبيقات التي تقرأ الأذونات أو تعدّلها أو تتتبّع التغييرات أو تبحث في عدة مجموعات من النصوص إمكانات إضافية في مساحة التخزين السحابي المشتركة. توضّح بقية هذا المستند التغييرات الإضافية المطلوبة لتنفيذ هذه المهام.
تحتوي الطريقة list على مَعلمات طلب البحث التالية الخاصة بمساحة التخزين السحابي المشتركة:
استبدِل driveId بمعرّف مساحة التخزين السحابي المشتركة التي تريد البحث فيها.
corpora: نص العناصر (الملفات أو المستندات) التي ينطبق عليها طلب البحث
الجهات المتوافقة هي user وdomain وdrive وallDrives. استخدِم user أو drive بدلاً من allDrives لتوفير الطاقة. يتم تلقائيًا ضبط مجموعة المستندات على user.
includeItemsFromAllDrives: تحديد ما إذا كان يجب تضمين العناصر في "ملفاتي" ومساحات التخزين السحابي المشتركة في النتائج. في حال عدم توفّرها أو ضبطها على "خطأ"، لن يتم عرض عناصر مساحة التخزين السحابي المشتركة.
supportsAllDrives: ما إذا كان التطبيق الذي يقدّم الطلب يتيح استخدام كل من "ملفاتي" ومساحة التخزين السحابي المشتركة. إذا كانت القيمة false، لن يتم تضمين عناصر مساحة التخزين السحابي المشتركة في الردّ.
تخصّ أوضاع طلب البحث التالية مساحات Drive المشتركة:
includeItemsFromAllDrives
corpora
وصف طلب البحث
true
user
يبحث عن الملفات التي وصل إليها المستخدم، بما في ذلك الملفات في مساحة التخزين السحابي المشتركة و"ملفاتي".
true
domain
طلبات البحث عن الملفات التي تمت مشاركتها مع النطاق، بما في ذلك الملفات في مساحة التخزين السحابي المشتركة و"ملفاتي"
true
drive
يطلب البحث عن جميع العناصر في مساحة التخزين السحابي المشتركة المحدّدة. يجب تحديد driveId في الطلب.
true
allDrives
يبحث عن الملفات التي وصل إليها المستخدم وجميع مساحات التخزين السحابي المشتركة التي يكون عضوًا فيها. يُرجى العِلم أنّ الردّ قد يتضمّن incompleteSearch:true، ما يشير إلى أنّه لم يتم البحث في بعض المدونات اللغوية لهذا الطلب.
تحتوي الطريقة list على مَعلمات طلب البحث التالية الخاصة بمساحة التخزين السحابي المشتركة:
driveId: مساحة التخزين السحابي المشتركة التي يتم عرض التغييرات منها. في حال تحديدها، تشير أرقام تعريف التغييرات إلى التغييرات التي أُجريت على العناصر داخل مساحة التخزين السحابي المشتركة والتي توفّر الحالة الحالية للملف. للإشارة إلى تغيير معيّن في مساحة تخزين سحابي مشتركة، يجب استخدام كل من رقم تعريف مساحة التخزين السحابي المشتركة ورقم تعريف التغيير كمعرّف.
includeItemsFromAllDrives: تحدّد ما إذا كان يجب تضمين ملفات مساحة التخزين السحابي المشتركة أو التغييرات في قائمة التغييرات.
supportsAllDrives: ما إذا كان التطبيق الذي يقدّم الطلب يتيح استخدام مساحات التخزين السحابي المشتركة. إذا كانت القيمة false، لن يتم عرض عناصر مساحة التخزين السحابي المشتركة، بما في ذلك مساحات التخزين السحابي المشتركة والملفات داخل مساحة التخزين السحابي المشتركة.
تخصّ أوضاع طلب البحث التالية مساحات Drive المشتركة:
includeItemsFromAllDrives
driveId
وصف طلب البحث
true
لا
تعكس التغييرات التعديلات التي أُجريت على الملفات داخل مساحات التخزين السحابي المشتركة أو خارجها والتي وصل إليها المستخدم، بالإضافة إلى التغييرات التي أُجريت على مساحات التخزين السحابي المشتركة التي يكون المستخدم عضوًا فيها.
true
نعم
تعكس التغييرات التغييرات التي تم إجراؤها على مساحة التخزين السحابي المشتركة المحدّدة والعناصر الموجودة داخلها.
تفعيل إمكانية استخدام مساحة التخزين السحابي المشتركة في واجهة مستخدم Drive
للوصول إلى محتوى مساحة التخزين السحابي المشتركة باستخدام واجهة مستخدم Drive، تأكَّد من وضع علامة في المربّع إتاحة مساحات التخزين السحابي المشتركة ضمن علامة التبويب دمج واجهة مستخدم Drive في Google Drive API ضمن وحدة تحكّم Google Cloud. لمزيد من المعلومات، يُرجى الاطّلاع على ضبط عملية دمج واجهة مستخدم Drive.
استخدام Google Picker مع مساحات التخزين السحابي المشتركة
يتيح Google Picker اختيار الملفات في مساحات التخزين السحابي المشتركة. للحصول على تفاصيل حول تفعيل إمكانية استخدام مساحات التخزين السحابي المشتركة وإضافة طرق عرض مساحات التخزين السحابي المشتركة في أداة الاختيار، يُرجى الاطّلاع على واجهة برمجة تطبيقات Google Picker.
تاريخ التعديل الأخير: 2025-08-13 (حسب التوقيت العالمي المتفَّق عليه)
[[["يسهُل فهم المحتوى.","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-08-13 (حسب التوقيت العالمي المتفَّق عليه)"],[],[],null,["# Implement shared drive support\n\nShared drives follow different organization, sharing, and ownership models from\nMy Drive. If your app is going to create and manage files on\nshared drives, you must implement shared drive support in your app. The\ncomplexity of your implementation depends on the functionality of your app.\n\nTo begin, you must include the `supportsAllDrives=true` query parameter in your\nrequests when your app performs the following operations: \n\n### Drive API v3\n\n- `files.get`\n- `files.list`\n- `files.create`\n- `files.update`\n- `files.copy`\n- `files.delete`\n- `changes.list`\n- `changes.getStartPageToken`\n- `permissions.list`\n- `permissions.get`\n- `permissions.create`\n- `permissions.update`\n- `permissions.delete`\n\n### Drive API v2\n\n- `files.get`\n- `files.list`\n- `files.insert`\n- `files.update`\n- `files.patch`\n- `files.copy`\n- `files.trash`\n- `files.untrash`\n- `files.delete`\n- `files.touch`\n- `children.insert`\n- `parents.insert`\n- `changes.list`\n- `changes.getStartPageToken`\n- `changes.get`\n- `permissions.list`\n- `permissions.get`\n- `permissions.insert`\n- `permissions.update`\n- `permissions.patch`\n- `permissions.delete`\n\nThe `supportsAllDrives=true` parameter informs Google Drive that your\napplication is designed to handle files on shared drives.\n\nApplications that read or modify permissions, track changes, or search across\nmultiple corpora require additional shared drive capabilities. The remainder of\nthis document highlights additional changes required to perform these tasks.\n\nSearch for content on a shared drive\n------------------------------------\n\nUse the [`list`](/workspace/drive/api/reference/rest/v3/files/list) method on the [`files`](/workspace/drive/api/reference/rest/v3/files) resource to find user files in shared drives. To\nsearch for a shared drive, see [Search for shared\ndrives](/workspace/drive/api/guides/search-shareddrives).\n\nThe `list` method contains the following shared drive-specific query parameters:\n\n- `driveId`: ID of the shared drive to search.\n\n- `corpora`: Bodies of items (files or documents) to which the query applies.\n Supported bodies are `user`, `domain`, `drive`, and `allDrives`. Prefer\n `user` or `drive` to `allDrives` for efficiency. By default, corpora is set\n to `user`.\n\n- `includeItemsFromAllDrives`: Whether both My Drive and shared\n drive items should be included in results. If not present or set to false,\n then shared drive items are not returned.\n\n- `supportsAllDrives`: Whether the requesting application supports both My\n Drive and shared drive. If false, shared drive items are not\n included in the response.\n\nThe following query modes are specific to shared drives:\n\n| `includeItemsFromAllDrives` | `corpora` | Query description |\n|-----------------------------|-------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `true` | `user` | Queries files that the user has accessed, including both shared drive and My Drive files. |\n| `true` | `domain` | Queries files that are shared to the domain, including both shared drive and My Drive files. |\n| `true` | `drive` | Queries all items in the specified shared drive. The `driveId` must be specified in the request. |\n| `true` | `allDrives` | Queries files that the user has accessed and all shared drives in which they're a member. Note that the response might include `incompleteSearch:true`, indicating that some corpora were not searched for this request. |\n\nTrack changes on a shared drive\n-------------------------------\n\nUse the [`list`](/workspace/drive/api/reference/rest/v3/changes/list) method on the [`changes`](/workspace/drive/api/reference/rest/v3/changes) resource to track changes on a shared drive. For\nmore information, see [Track changes for users and shared\ndrives](/workspace/drive/api/guides/about-changes).\n\nThe `list` method contains the following shared drive-specific query parameters:\n\n- `driveId`: The shared drive from which changes are returned. If specified,\n the change IDs refer to changes to items within the shared drive providing\n the current state of a file. To refer to a specific shared drive change,\n both the shared drive ID and change ID must be used as an identifier.\n\n- `includeItemsFromAllDrives`: Whether shared drive files or changes should be\n included in the list of changes.\n\n- `supportsAllDrives`: Whether the requesting application supports shared\n drives. If false, then shared drive items, including both shared drives and\n files within a shared drive, aren't returned.\n\nThe following query modes are specific to shared drives:\n\n| `includeItemsFromAllDrives` | `driveId` | Query description |\n|-----------------------------|-----------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `true` | No | Changes are reflective of changes to files inside or outside of shared drives that the user has accessed, as well as changes to shared drives in which the user is a member. |\n| `true` | Yes | Changes are reflective of changes to the particular shared drive that was specified and items inside that shared drive. |\n\n| **Note:** If you're using the older Drive API v2, the [`get`](/workspace/drive/api/reference/rest/v2/changes/get) and [`list`](/workspace/drive/api/reference/rest/v2/changes/list) methods have several parameters specific to shared drives.\n\nFor additional details about change log behavior, see [Track changes for users\nand shared drives](/workspace/drive/api/guides/about-changes).\n\nEnable shared drive support in the Drive UI\n-------------------------------------------\n\nTo access shared drive content using the Drive UI, make sure you\nhave checked the\n**Shared drives support** box on the **Drive UI integration** tab\nof the Google Drive API in the\n[Google Cloud console](https://console.cloud.google.com/apis/dashboard). For more\ninformation, see [Configure a Drive UI integration](/workspace/drive/api/guides/enable-sdk).\n\nUse the Google Picker with shared drives\n----------------------------------------\n\nThe [Google Picker](/workspace/drive/api/guides/picker) supports selecting items in shared\ndrives. For details about enabling shared drive support and adding shared drives\nviews in the picker, see the [Google Picker API](/drive/picker/reference/picker).\n\nRelated topics\n--------------\n\n- [Manage shared drives](/workspace/drive/api/guides/manage-shareddrives)"]]