Method: parents.list

แสดงรายการไฟล์หลักของไฟล์

คำขอ HTTP

GET https://www.googleapis.com/drive/v2/files/{fileId}/parents

URL ใช้ไวยากรณ์การแปลง gRPC

พารามิเตอร์เส้นทาง

พารามิเตอร์
fileId

string

รหัสของไฟล์

เนื้อหาของคำขอ

เนื้อหาของคำขอต้องว่างเปล่า

เนื้อหาการตอบกลับ

รายการไฟล์หลักของไฟล์

หากทำสำเร็จ เนื้อหาการตอบกลับจะมีข้อมูลซึ่งมีโครงสร้างดังต่อไปนี้

การแสดง JSON
{
  "kind": string,
  "etag": string,
  "selfLink": string,
  "items": [
    {
      object (ParentReference)
    }
  ]
}
ช่อง
kind

string

ค่านี้จะมีค่าเป็น drive#parentList เสมอ

etag

string

ETag ของรายการ

items[]

object (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

ขอบเขตบางอย่างถูกจํากัดและต้องมีการประเมินความปลอดภัยเพื่อให้แอปของคุณใช้งานได้ ดูข้อมูลเพิ่มเติมได้ที่คู่มือการให้สิทธิ์