Method: parents.get
Lấy một tệp tham chiếu cụ thể gốc.
Yêu cầu HTTP
GET https://www.googleapis.com/drive/v2/files/{fileId}/parents/{parentId}
URL sử dụng cú pháp Chuyển mã gRPC.
Tham số đường dẫn
Thông số |
fileId |
string
Mã nhận dạng của tệp.
|
parentId |
string
Mã nhận dạng của nhà xuất bản mẹ.
|
Nội dung yêu cầu
Nội dung yêu cầu phải trống.
Nội dung phản hồi
Nếu thành công, nội dung phản hồi sẽ chứa một phiên bản của ParentReference
.
Phạm vi uỷ quyền
Yêu cầu một trong các phạm vi OAuth sau:
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
Một số phạm vi bị hạn chế và yêu cầu đánh giá bảo mật để ứng dụng của bạn có thể sử dụng các phạm vi đó. Để biết thêm thông tin, hãy xem Hướng dẫn uỷ quyền.
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2024-09-04 UTC.
[null,null,["Cập nhật lần gần đây nhất: 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"]]