Method: parents.get
ได้รับข้อมูลอ้างอิงระดับบนสุดที่ระบุ
คำขอ HTTP
GET https://www.googleapis.com/drive/v2/files/{fileId}/parents/{parentId}
URL ใช้ไวยากรณ์การแปลง gRPC
พารามิเตอร์เส้นทาง
พารามิเตอร์ |
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
ขอบเขตบางอย่างถูกจำกัดและต้องมีการประเมินความปลอดภัยเพื่อให้แอปใช้งานได้ สำหรับข้อมูลเพิ่มเติม โปรดดูที่คู่มือการให้สิทธิ์
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2024-09-04 UTC
[null,null,["อัปเดตล่าสุด 2024-09-04 UTC"],[[["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"]]