الاختلافات بين مساحات التخزين السحابي المشتركة وواجهة برمجة التطبيقات لـ "ملفاتي"
تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
تتّبع مساحات التخزين السحابي المشتركة نماذج مختلفة عن "ملفاتي" من حيث التنظيم والمشاركة والملكية. وبالتالي، لا يُسمح بإجراء بعض العمليات في "ملفاتي" على المحتوى في مساحة تخزين سحابي مشتركة.
يوضّح هذا الدليل الاختلافات في واجهة برمجة التطبيقات الخاصة بمساحات التخزين السحابي المشتركة في الموارد files
وchanges
.
ملف الموارد
لا تتم تعبئة الحقول التالية في مورد files
إلا للملفات الموجودة في مساحة تخزين سحابي مشتركة:
hasAugmentedPermissions
: ما إذا تم منح أي مستخدمين إذن الوصول إلى الملف مباشرةً.
capabilities/canAddFolderFromAnotherDrive
: ما إذا كان بإمكان المستخدم الحالي إضافة مجلد من مساحة تخزين أخرى (مساحة تخزين سحابي مشتركة مختلفة أو "ملفاتي") إلى هذا المجلد.
capabilities/canDeleteChildren
: تشير إلى ما إذا كان بإمكان المستخدم الحالي حذف العناصر الفرعية لهذا المجلد.
-
capabilities/canMoveChildrenOutOfDrive
: ما إذا كان بإمكان المستخدم الحالي نقل العناصر الفرعية لهذا المجلد خارج مساحة التخزين السحابي المشتركة.
capabilities/canMoveChildrenWithinDrive
: ما إذا كان بإمكان المستخدم الحالي نقل عناصر فرعية من هذا المجلد داخل مساحة التخزين السحابي المشتركة.
-
capabilities/canMoveItemWithinDrive
: ما إذا كان بإمكان المستخدم الحالي نقل عنصر مساحة التخزين السحابي المشتركة هذا ضمن مساحة التخزين السحابي المشتركة.
-
capabilities/canReadDrive
: ما إذا كان لدى المستخدم الحالي إذن الوصول للقراءة إلى مساحة التخزين السحابي المشتركة التي ينتمي إليها هذا الملف.
capabilities/canTrashChildren
: ما إذا كان بإمكان المستخدم الحالي نقل العناصر الفرعية لهذا المجلد إلى المهملات.
driveId
: رقم تعريف مساحة التخزين السحابي المشتركة التي يوجد فيها الملف
-
trashingUser
: إذا تم نقل الملف إلى المهملات بشكل صريح، يظهر المستخدم الذي نقل الملف إلى المهملات.
-
trashedTime
: الوقت الذي تم فيه نقل العنصر إلى المهملات إذا كنت تستخدم الإصدار القديم من Drive API 2، يُطلق على هذا الحقل الاسم trashedDate
.
لا تتم تعبئة الحقول التالية للملفات الموجودة في مساحة تخزين سحابي مشتركة:
permissions
: بسبب الحجم المحتمل لقوائم التحكم بالوصول (ACL) في مساحات التخزين السحابي المشتركة، لا يتم عرض الأذونات كجزء من الملفات. استخدِم طريقة
permissions.list
التي تتيح تقسيم النتائج إلى صفحات، لعرض قائمة بالأذونات
لملف ضمن مساحة تخزين سحابي مشتركة أو مجلد مساحة التخزين السحابي المشتركة.
-
owners
وownerNames
وownedByMe
: تمتلك مساحة التخزين السحابي المشتركة الملفات الموجودة فيها، وليس المستخدمين الفرديين.
folderColorRgb
: لا يمكن تلوين المجلدات بشكل فردي.
shared
: تتم مشاركة جميع الملفات في مساحة تخزين سحابي مشتركة.
-
writersCanShare
: لا يمكن تقييد المشاركة حسب الدور في مساحات Drive المشتركة.
لا يتم ضبط الحقول التالية إلا عندما يتم منح المستخدم أذونات الوصول إلى الملفات على أحد العناصر:
sharedWithMeDate
sharingUser
تتطلّب الحقول التالية اهتمامًا خاصًا عند استخدامها مع مساحات التخزين المشتركة:
parents.isRoot
: تكون قيمة هذا الحقل صحيحة فقط بالنسبة إلى المجلد الجذر في "ملفاتي"، وتكون خاطئة بالنسبة إلى المجلد ذي المستوى الأعلى في مساحة التخزين السحابي المشتركة.
parents
: لا يظهر أحد الوالدَين في قائمة الوالدَين إذا لم يكن المستخدم الذي يقدّم الطلب عضوًا في مساحة التخزين السحابي المشتركة وليس لديه إذن الوصول إلى الوالد. بالإضافة إلى ذلك، باستثناء المجلد ذي المستوى الأعلى، يجب أن تحتوي قائمة العناصر الرئيسية على عنصر واحد فقط إذا كان الملف يقع ضمن مساحة تخزين سحابي مشتركة.
capabilities/canRemoveChildren
: استخدِم capabilities/canDeleteChildren
أو capabilities/canTrashChildren
.
تغيير المرجع
تتوفّر الحقول الجديدة التالية في مصدر
changes
لمساحة تخزين سحابي مشتركة:
-
changeType
: نوع التغيير القيم المحتمَلة هي file
وdrive
.
driveId
: رقم تعريف مساحة التخزين السحابي المشتركة المرتبطة بهذا التغيير
drive
: الحالة المعدَّلة لمساحة التخزين السحابي المشتركة. يتم عرض هذه السمة إذا كانت قيمة changeType
هي drive
وكان المستخدم لا يزال عضوًا في مساحة التخزين السحابي المشتركة.
قد تكون هناك تغييرات إضافية مطلوبة للتطبيقات التي تحتاج إلى مزامنة المحتوى مع مساحات التخزين السحابي المشتركة أو تتبُّع النشاط. لمزيد من التفاصيل، يُرجى الاطّلاع على تتبُّع التغييرات للمستخدمين ومساحات التخزين السحابي المشتركة.
إنّ محتوى هذه الصفحة مرخّص بموجب ترخيص Creative Commons Attribution 4.0 ما لم يُنصّ على خلاف ذلك، ونماذج الرموز مرخّصة بموجب ترخيص Apache 2.0. للاطّلاع على التفاصيل، يُرجى مراجعة سياسات موقع Google Developers. إنّ Java هي علامة تجارية مسجَّلة لشركة Oracle و/أو شركائها التابعين.
تاريخ التعديل الأخير: 2025-08-29 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2025-08-29 (حسب التوقيت العالمي المتفَّق عليه)"],[],[],null,["# Shared drive versus My Drive API differences\n\nShared drives follow different organization, sharing, and ownership models from\na My Drive. As such, some My Drive operations\naren't permitted for content in a shared drive.\n\nThis guide outlines shared drive-specific API differences in the `files` and\n`changes` resources.\n\nFile resource\n-------------\n\nThe following fields in the [`files`](/workspace/drive/api/reference/rest/v3/files) resource are\nonly populated for files located within a shared drive:\n\n- `hasAugmentedPermissions`: Whether any users are granted file access directly on this file.\n- `capabilities/canAddFolderFromAnotherDrive`: Whether the current user can add a folder from another drive (a different shared drive or My Drive) to this folder.\n- `capabilities/canDeleteChildren`: Whether the current user can delete children of this folder.\n- `capabilities/canMoveChildrenOutOfDrive`: Whether the current user can move children of this folder outside of the shared drive.\n- `capabilities/canMoveChildrenWithinDrive`: Whether the current user can move children of this folder within the shared drive.\n- `capabilities/canMoveItemWithinDrive`: Whether the current user can move this shared drive item within the shared drive.\n- `capabilities/canReadDrive`: Whether the current user has read access to the shared drive to which this file belongs.\n- `capabilities/canTrashChildren`: Whether the current user can trash children of this folder.\n- `driveId`: The ID of the shared drive where the file is located.\n- `trashingUser`: If the file has been explicitly trashed, the user who trashed it.\n- `trashedTime`: The time that the item was trashed. If you're using the older Drive API v2, this field is called `trashedDate`.\n\nThe following fields aren't populated for files located within a shared drive:\n\n- `permissions`: Due to the potential size of shared drive access control lists (ACLs), permissions aren't returned as part of files. Use the `permissions.list` method, which supports pagination, to list permissions for a file within a shared drive or the shared drive folder.\n- `owners`, `ownerNames`, `ownedByMe`: Files within a shared drive are owned by the shared drive, not individual users.\n- `folderColorRgb`: Folders cannot be colored individually.\n- `shared`: All items in a shared drive are shared.\n- `writersCanShare`: It's not possible to restrict sharing by role in shared drives.\n\nThe following fields are only set when the user has been granted file access\npermissions on an item:\n\n- `sharedWithMeDate`\n- `sharingUser`\n\nThe following fields require special consideration when you use them with shared\ndrives:\n\n- `parents.isRoot`: This field is only true for the My Drive root folder; it's false for the shared drive top-level folder.\n- `parents`: A parent doesn't appear in the parents list if the requesting\n user isn't a member of the shared drive and doesn't have access to the\n parent. In addition, with the exception of the top level folder, the parents\n list must contain exactly one item if the file is located within a shared\n drive.\n\n | **Note:** If you're using the older Drive API v2:\n | - `shareable`: Deprecated. Use `capabilities/canShare`.\n | - `editable`: Deprecated. Use `capabilities/canEdit`.\n | - `copyable`: Deprecated. Use `capabilities/canCopy`.\n | - `canComment`: Deprecated. Use `capabilities/canComment`.\n | - `canReadRevisions`: Deprecated. Use `capabilities/canReadRevisions`.\n- `capabilities/canRemoveChildren`: Use `capabilities/canDeleteChildren` or\n `capabilities/canTrashChildren`.\n\nChange resource\n---------------\n\nThe following new fields are available in the\n[`changes`](/workspace/drive/api/reference/rest/v3/changes) resource for a shared drive:\n\n- `changeType`: The change type. Possible values are `file` and `drive`.\n- `driveId`: The ID of the shared drive associated with this change.\n- `drive`: The updated state of the shared drive. Present if the `changeType` is `drive` and the user is still a member of the shared drive.\n\nAdditional changes might be required for applications that need to sync content\nwith shared drives or track activity. For details, see [Track changes for users\nand shared drives](/workspace/drive/api/guides/about-changes).\n\nRelated topics\n--------------\n\n- [Files and folders overview](/workspace/drive/api/guides/about-files)\n- [Changes and revisions overview](/workspace/drive/api/guides/change-overview)"]]