Method: drives.list
تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
تعرض هذه السمة مساحات التخزين السحابي المشتركة الخاصة بالمستخدم.
تقبل هذه الطريقة المَعلمة q
، وهي طلب بحث يجمع بين عبارة بحث واحدة أو أكثر. لمزيد من المعلومات، يُرجى الاطّلاع على دليل البحث عن مساحات التخزين السحابي المشتركة.
طلب HTTP
GET https://www.googleapis.com/drive/v3/drives
يستخدِم عنوان URL بنية تحويل الترميز gRPC.
مَعلمات طلب البحث
المعلمات |
pageSize |
integer
الحدّ الأقصى لعدد مساحات Drive المشتركة التي سيتم عرضها في كل صفحة.
|
pageToken |
string
الرمز المميّز للصفحة لمساحات التخزين السحابي المشتركة.
|
q |
string
سلسلة طلب البحث للبحث في مساحات التخزين السحابي المشتركة.
|
useDomainAdminAccess |
boolean
إصدار الطلب بصفتك مشرف نطاق: إذا تم ضبط القيمة على "صحيح"، سيتم عرض جميع مساحات التخزين السحابي المشتركة في النطاق الذي يكون فيه مقدّم الطلب مشرفًا.
|
نص الطلب
يجب أن يكون نص الطلب فارغًا.
نص الاستجابة
قائمة بمساحات التخزين السحابي المشتركة
إذا كانت الاستجابة ناجحة، سيحتوي نص الاستجابة على بيانات بالبنية التالية:
تمثيل JSON |
{
"drives": [
{
object (Drive )
}
],
"nextPageToken": string,
"kind": string
} |
الحقول |
drives[] |
object (Drive )
قائمة مساحات التخزين السحابي المشتركة إذا تم ملء nextPageToken، قد تكون هذه القائمة غير مكتملة ويجب استرداد صفحة إضافية من النتائج.
|
nextPageToken |
string
الرمز المميّز للصفحة التالية من مساحات التخزين السحابي المشتركة. لن يظهر هذا الحقل إذا تم الوصول إلى نهاية القائمة. إذا تم رفض الرمز المميّز لأي سبب، يجب تجاهله وإعادة بدء التقسيم على صفحات من الصفحة الأولى من النتائج. يكون الرمز المميز للصفحة صالحًا عادةً لعدة ساعات. ومع ذلك، إذا تمت إضافة سلع جديدة أو إزالتها، قد تختلف النتائج المتوقّعة.
|
kind |
string
تحدّد نوع المورد. القيمة: السلسلة الثابتة "drive#driveList" .
|
نطاقات الأذونات
يجب توفير أحد نطاقات OAuth التالية:
https://www.googleapis.com/auth/drive
https://www.googleapis.com/auth/drive.readonly
بعض النطاقات محظورة وتتطلّب إجراء تقييم أمان لتتمكّن من استخدامها في تطبيقك. لمزيد من المعلومات، يمكنك الاطّلاع على دليل التفويض.
إنّ محتوى هذه الصفحة مرخّص بموجب ترخيص Creative Commons Attribution 4.0 ما لم يُنصّ على خلاف ذلك، ونماذج الرموز مرخّصة بموجب ترخيص Apache 2.0. للاطّلاع على التفاصيل، يُرجى مراجعة سياسات موقع Google Developers. إنّ Java هي علامة تجارية مسجَّلة لشركة Oracle و/أو شركائها التابعين.
تاريخ التعديل الأخير: 2025-07-25 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2025-07-25 (حسب التوقيت العالمي المتفَّق عليه)"],[],[],null,["# Method: drives.list\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Query parameters](#body.QUERY_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n - [JSON representation](#body.DriveList.SCHEMA_REPRESENTATION)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\n\u003cbr /\u003e\n\nLists the user's shared drives.\n\nThis method accepts the `q` parameter, which is a search query combining one or more search terms. For more information, see the [Search for shared drives](/workspace/drive/api/guides/search-shareddrives) guide.\n\n### HTTP request\n\n`GET https://www.googleapis.com/drive/v3/drives`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Query parameters\n\n| Parameters ||\n|------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `pageSize` | `integer` Maximum number of shared drives to return per page. |\n| `pageToken` | `string` Page token for shared drives. |\n| `q` | `string` Query string for searching shared drives. |\n| `useDomainAdminAccess` | `boolean` Issue the request as a domain administrator; if set to true, then all shared drives of the domain in which the requester is an administrator are returned. |\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nA list of shared drives.\n\nIf successful, the response body contains data with the following structure:\n\n| JSON representation |\n|-------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"drives\": [ { object (/workspace/drive/api/reference/rest/v3/drives#Drive) } ], \"nextPageToken\": string, \"kind\": string } ``` |\n\n| Fields ||\n|-----------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `drives[]` | `object (`[Drive](/workspace/drive/api/reference/rest/v3/drives#Drive)`)` The list of shared drives. If nextPageToken is populated, then this list may be incomplete and an additional page of results should be fetched. |\n| `nextPageToken` | `string` The page token for the next page of shared drives. This will be absent if the end of the list has been reached. If the token is rejected for any reason, it should be discarded, and pagination should be restarted from the first page of results. The page token is typically valid for several hours. However, if new items are added or removed, your expected results might differ. |\n| `kind` | `string` Identifies what kind of resource this is. Value: the fixed string `\"drive#driveList\"`. |\n\n### Authorization scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/drive`\n- `\n https://www.googleapis.com/auth/drive.readonly`\n\nSome scopes are restricted and require a security assessment for your app to use them. For more information, see the [Authorization guide](/workspace/guides/configure-oauth-consent)."]]