Method: parents.delete
والد را از یک فایل حذف می کند.
درخواست HTTP
DELETE https://www.googleapis.com/drive/v2/files/{fileId}/parents/{parentId}
URL از دستور GRPC Transcoding استفاده می کند.
پارامترهای مسیر
مولفه های |
---|
fileId | string شناسه فایل |
parentId | string شناسه والدین. |
پارامترهای پرس و جو
مولفه های |
---|
enforceSingleParent (deprecated) | boolean منسوخ شده: اگر موردی در درایو مشترک نباشد و آخرین والد آن حذف شود، مورد در ریشه مالک آن قرار میگیرد. |
درخواست بدن
بدنه درخواست باید خالی باشد.
بدن پاسخگو
در صورت موفقیت آمیز بودن، بدنه پاسخ خالی است.
محدوده مجوز
به یکی از حوزه های OAuth زیر نیاز دارد:
-
https://www.googleapis.com/auth/docs
-
https://www.googleapis.com/auth/drive
-
https://www.googleapis.com/auth/drive.file
برخی از دامنه ها محدود هستند و برای استفاده از برنامه شما به ارزیابی امنیتی نیاز دارند. برای اطلاعات بیشتر، به راهنمای مجوز مراجعه کنید.
جز در مواردی که غیر از این ذکر شده باشد،محتوای این صفحه تحت مجوز Creative Commons Attribution 4.0 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2024-10-30 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2024-10-30 بهوقت ساعت هماهنگ جهانی."],[[["This document outlines the process for removing a parent from a Google Drive file using the `DELETE` HTTP request method and specific path parameters."],["Required path parameters are `fileId` for the target file and `parentId` to specify the parent being removed."],["The request body should be empty, and a successful operation results in an empty response body."],["Authorization is necessary using one of the listed OAuth scopes, including `https://www.googleapis.com/auth/docs`, `https://www.googleapis.com/auth/drive`, or `https://www.googleapis.com/auth/drive.file`."]]],["This document outlines the process to remove a parent from a file using a `DELETE` HTTP request. The request requires two path parameters: `fileId` (the file's ID) and `parentId` (the parent's ID). It may include a deprecated query parameter `enforceSingleParent`. The request body must be empty and the successful response body is also empty. Authorization requires specific OAuth scopes: `docs`, `drive`, or `drive.file`.\n"]]