Method: revisions.delete
מוחקת לצמיתות גרסת קובץ. ניתן למחוק ב-Google Drive גרסאות קודמות של קבצים עם תוכן בינארי בלבד, כמו תמונות או סרטונים. לא ניתן למחוק גרסאות של קבצים אחרים, כמו Google Docs או Sheets, ואת גרסת הקובץ האחרונה שנותרה.
בקשת HTTP
DELETE https://www.googleapis.com/drive/v3/files/{fileId}/revisions/{revisionId}
בכתובת ה-URL נעשה שימוש בתחביר המרת gRPC.
פרמטרים של נתיב
פרמטרים |
fileId |
string
מזהה הקובץ.
|
revisionId |
string
מזהה הגרסה הקודמת.
|
גוף הבקשה
גוף הבקשה חייב להיות ריק.
גוף התגובה
אם הביצוע יהיה תקין, גוף התגובה יהיה ריק.
היקפי הרשאות
כדי להשתמש בתכונה הזו יש צורך באחד מההיקפים הבאים של OAuth:
https://www.googleapis.com/auth/drive
https://www.googleapis.com/auth/drive.appdata
https://www.googleapis.com/auth/drive.file
חלק מההיקפים מוגבלים ומחייבים בדיקת אבטחה כדי שהאפליקציה תוכל להשתמש בהם. למידע נוסף, ניתן לעיין במדריך ההרשאות.
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2024-09-03 (שעון UTC).
[null,null,["עדכון אחרון: 2024-09-03 (שעון UTC)."],[[["Permanently deletes a specific version of a file in Google Drive, applicable only to files with binary content like images or videos."],["This action is not possible for revisions of Google Docs, Sheets, or the last remaining version of any file."],["Requires authorization with specific scopes such as `https://www.googleapis.com/auth/drive`, `https://www.googleapis.com/auth/drive.appdata`, or `https://www.googleapis.com/auth/drive.file`."],["The request body should be empty and a successful operation results in an empty response body."],["Uses a DELETE request to `https://www.googleapis.com/drive/v3/files/{fileId}/revisions/{revisionId}` specifying the file and revision IDs as path parameters."]]],[]]