REST Resource: parents
با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
منبع: ParentReference
ارجاع به والد یک فایل.
یک فایل فقط می تواند یک پوشه والد داشته باشد. تعیین چند والدین پشتیبانی نمی شود.
برخی از روشهای منبع (مانند parents.get
) به یک parentId
نیاز دارند. برای بازیابی شناسه یک والدین از روش parents.list
استفاده کنید.
نمایندگی JSON |
---|
{
"selfLink": string,
"id": string,
"isRoot": boolean,
"kind": string,
"parentLink": string
} |
فیلدها |
---|
selfLink | string فقط خروجی پیوند بازگشت به این مرجع. |
id | string شناسه والدین. |
isRoot | boolean فقط خروجی اینکه والد پوشه ریشه باشد یا نباشد. |
kind | string فقط خروجی این همیشه drive#parentReference است. |
parentLink | string فقط خروجی پیوندی به والدین |
روش ها |
---|
| والد را از یک فایل حذف می کند. |
| یک مرجع خاص والدین دریافت می کند. |
| یک پوشه والد برای یک فایل اضافه می کند. |
| والدین یک فایل را فهرست می کند. |
جز در مواردی که غیر از این ذکر شده باشد،محتوای این صفحه تحت مجوز Creative Commons Attribution 4.0 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2025-07-25 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2025-07-25 بهوقت ساعت هماهنگ جهانی."],[],[],null,["# REST Resource: parents\n\n- [Resource: ParentReference](#ParentReference)\n - [JSON representation](#ParentReference.SCHEMA_REPRESENTATION)\n- [Methods](#METHODS_SUMMARY)\n\nResource: ParentReference\n-------------------------\n\nA reference to a file's parent.\n\nA file can only have one parent folder; specifying multiple parents isn't supported.\n\nSome resource methods (such as `parents.get`) require a `parentId`. Use the `parents.list` method to retrieve the ID for a parent.\n\n| JSON representation |\n|-------------------------------------------------------------------------------------------------------|\n| ``` { \"selfLink\": string, \"id\": string, \"isRoot\": boolean, \"kind\": string, \"parentLink\": string } ``` |\n\n| Fields ||\n|--------------|----------------------------------------------------------------------|\n| `selfLink` | `string` Output only. A link back to this reference. |\n| `id` | `string` The ID of the parent. |\n| `isRoot` | `boolean` Output only. Whether or not the parent is the root folder. |\n| `kind` | `string` Output only. This is always `drive#parentReference`. |\n| `parentLink` | `string` Output only. A link to the parent. |\n\n| Methods ------- ||\n|---------------------------------------------------------------------|-----------------------------------|\n| ### [delete](/workspace/drive/api/reference/rest/v2/parents/delete) | Removes a parent from a file. |\n| ### [get](/workspace/drive/api/reference/rest/v2/parents/get) | Gets a specific parent reference. |\n| ### [insert](/workspace/drive/api/reference/rest/v2/parents/insert) | Adds a parent folder for a file. |\n| ### [list](/workspace/drive/api/reference/rest/v2/parents/list) | Lists a file's parents. |"]]