Method: parents.get
یک مرجع خاص والدین دریافت می کند.
درخواست HTTP
GET https://www.googleapis.com/drive/v2/files/{fileId}/parents/{parentId}
URL از دستور GRPC Transcoding استفاده می کند.
پارامترهای مسیر
مولفه های |
---|
fileId | string شناسه فایل |
parentId | string شناسه والدین. |
درخواست بدن
بدنه درخواست باید خالی باشد.
بدن پاسخگو
در صورت موفقیت آمیز بودن، بدنه پاسخ حاوی یک نمونه از ParentReference
است.
محدوده مجوز
به یکی از حوزه های OAuth زیر نیاز دارد:
-
https://www.googleapis.com/auth/docs
-
https://www.googleapis.com/auth/drive
-
https://www.googleapis.com/auth/drive.appdata
-
https://www.googleapis.com/auth/drive.file
-
https://www.googleapis.com/auth/drive.meet.readonly
-
https://www.googleapis.com/auth/drive.metadata
-
https://www.googleapis.com/auth/drive.metadata.readonly
-
https://www.googleapis.com/auth/drive.photos.readonly
-
https://www.googleapis.com/auth/drive.readonly
برخی از دامنه ها محدود هستند و برای استفاده از برنامه شما به ارزیابی امنیتی نیاز دارند. برای اطلاعات بیشتر، به راهنمای مجوز مراجعه کنید.
جز در مواردی که غیر از این ذکر شده باشد،محتوای این صفحه تحت مجوز Creative Commons Attribution 4.0 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2024-10-30 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2024-10-30 بهوقت ساعت هماهنگ جهانی."],[[["Retrieves a specific parent reference for a file using a `GET` request to the specified endpoint."],["Requires providing `fileId` and `parentId` as path parameters in the request URL."],["The response body will contain a `ParentReference` object if the request is successful."],["Requires authorization with one of the listed OAuth scopes, such as `https://www.googleapis.com/auth/drive` or `https://www.googleapis.com/auth/drive.file`."]]],["The core action is a `GET` request to retrieve a specific parent reference using the URL: `https://www.googleapis.com/drive/v2/files/{fileId}/parents/{parentId}`. This requires specifying `fileId` and `parentId` as path parameters. The request body must be empty. A successful response contains a `ParentReference` instance. Authorization requires one of several OAuth scopes, some of which are restricted and need security assessment.\n"]]