Koleksiyonlar ile düzeninizi koruyun
İçeriği tercihlerinize göre kaydedin ve kategorilere ayırın.
Google Drive API'nin en son sürümü v3'tür. Yalnızca alanların bir alt kümesi döndürüldüğünden v3'teki performans daha iyidir. v2 koleksiyonuna ihtiyacınız yoksa mevcut sürümü kullanın. 2. sürümü kullanıyorsanız 3. sürüme geçmeyi düşünebilirsiniz. Taşımayla ilgili bilgiler için Drive API v3'e taşıma başlıklı makaleyi inceleyin. Sürüm farklılıklarının tam listesi için Drive API v2 ve v3 karşılaştırma referansına bakın.
2. sürümü kullanmaya devam etmek istiyorsanız 3. sürüm kılavuzlarındaki bazı talimatların 2. sürüm geliştiricileri için nasıl değiştirilmesi gerektiğini öğrenmek üzere Drive API v2 Kılavuzu ekine bakın.
Drive API v3'teki iyileştirmeler hakkında daha fazla bilgi edinmek için Google mühendislerinin yeni API tasarımını tartıştığı aşağıdaki videoyu izleyebilirsiniz.
V3 iyileştirmeleri
Performansı optimize etmek ve API davranışının karmaşıklığını azaltmak için v3, önceki API sürümüne kıyasla şu iyileştirmeleri sunar:
Dosya ve ortak Drive aramaları varsayılan olarak tam kaynakları döndürmez. Yalnızca sık kullanılan alanların bir alt kümesi döndürülür. fields hakkında daha fazla bilgi için files.list yöntemine ve drives.list yöntemine bakın.
Yanıt döndüren yöntemlerin neredeyse tamamı artık fields
parametresini gerektiriyor. fields gerektiren tüm yöntemlerin listesi için
Drive API referansı'na bakın.
Yinelenen özelliklere sahip kaynaklar kaldırıldı. Bazı örnekler:
files.list yöntemi, Children ve Parents koleksiyonlarıyla aynı işlevi yerine getirdiğinden v3'ten kaldırıldı.
Realtime.* yöntemleri kaldırıldı.
Uygulama verileri, aramalarda varsayılan olarak döndürülmez. v2'de drive.appdata kapsamını ayarlayabilirsiniz. Bu kapsam, files.list yöntemi ve changes.list yöntemiyle uygulama verilerini döndürür ancak performansı yavaşlatır. v3'te drive.appdata kapsamını ayarladınız ve ayrıca uygulama verilerini istemek için spaces=appDataFolder sorgu parametresini ayarladınız.
Tüm güncelleme işlemlerinde PUT yerine PATCH kullanılır.
Google Dokümanları'nı dışa aktarmak için files.export yöntemini kullanın.
changes.list yöntemi farklı şekilde çalışır. Değişiklik kimlikleri yerine opak sayfa jetonları kullanın. Değişiklik koleksiyonunu yoklamak için önce ilk değer için changes.getStartPageToken yöntemini çağırın. Sonraki sorgularda changes.list yöntemi newStartPageToken değerini döndürür.
Güncelleme yöntemleri artık yazılabilir olmayan alanları belirten istekleri reddediyor.
about kaynağındaki v2 exportFormats ve importFormats alanları, izin verilen içe veya dışa aktarma biçimlerinin listeleridir. v3'te, desteklenen tüm içe veya dışa aktarma işlemleri için olası hedeflerin MIME türü haritalarıdır.
v2 appdata ve appfolder takma adları artık v3'te appDataFolder.
properties kaynağı v3'ten kaldırılır. files kaynağında, gerçek anahtar/değer çiftlerini içeren properties alanı var. properties alanı herkese açık mülkler, appProperties alanı ise özel mülkler içerdiğinden görünürlük alanına gerek yoktur.
files kaynağındaki modifiedTime alanı, dosyanın son değiştirilme zamanını günceller. v2'de modifiedDate alanı yalnızca setModifiedDate alanını ayarladıysanız güncelleme sırasında değiştirilebiliyordu.
files kaynağındaki viewedByMeTime alanı otomatik olarak güncellenmez.
Google Dokümanlar biçimlerini içe aktarmak için kaynak gövdesinde uygun hedefi mimeType ayarlarsınız. v2'de ?convert=true değerini ayarlarsınız.
[[["Anlaması kolay","easyToUnderstand","thumb-up"],["Sorunumu çözdü","solvedMyProblem","thumb-up"],["Diğer","otherUp","thumb-up"]],[["İhtiyacım olan bilgiler yok","missingTheInformationINeed","thumb-down"],["Çok karmaşık / çok fazla adım var","tooComplicatedTooManySteps","thumb-down"],["Güncel değil","outOfDate","thumb-down"],["Çeviri sorunu","translationIssue","thumb-down"],["Örnek veya kod sorunu","samplesCodeIssue","thumb-down"],["Diğer","otherDown","thumb-down"]],["Son güncelleme tarihi: 2025-08-29 UTC."],[],[],null,["# Drive API v2 and v3 comparison guide\n\nThe latest Google Drive API version is v3. The performance in v3 is better because\nsearches only return a subset of fields. Use the current version unless you need\nthe [v2](/workspace/drive/api/v2/reference) collection. If you're using v2, consider\nmigrating to v3. To migrate, see [Migrate to Drive API v3](/workspace/drive/api/guides/migrate-to-v3). For a complete list of version differences, see\nthe [Drive API v2 and v3 comparison\nreference](/workspace/drive/api/guides/v2-to-v3-reference).\n\nIf you want to continue to use v2, see the [Guide to Drive API v2](/workspace/drive/api/guides/v2-guide) amendment to learn how some instructions in the v3\nguides must be amended for v2 developers.\n\nTo learn more about Drive API v3 improvements, you can watch the\nfollowing video by Google engineers discussing the new API design. \n\nV3 improvements\n---------------\n\nTo optimize performance and reduce API behavior complexity, v3 provides these\nimprovements over the previous API version:\n\n- Searches for files and shared drives don't return full resources by default, only a subset of commonly used fields gets returned. For more details on `fields`, see the [`files.list`](/workspace/drive/api/v3/reference/files/list) method and the [`drives.list`](/workspace/drive/api/v3/reference/drives/list) method.\n- Almost all methods that return a response now require the `fields` parameter. For a list of all methods requiring `fields`, see the [Drive API reference](/workspace/drive/api/v3/reference).\n- Resources that have duplicate capabilities were removed. Some examples:\n - The `files.list` method accomplishes the same functionality as the `Children` and `Parents` collections, so they're removed from v3.\n - The `Realtime.*` methods have been removed.\n- App Data isn't returned by default in searches. In v2, you can set the `drive.appdata` scope, and it returns application data from the `files.list` method and the [`changes.list`](/workspace/drive/api/v2/reference/changes/list) method, but it slows performance. In v3, you set the `drive.appdata` scope, and also set the query parameter `spaces=appDataFolder` to request application data.\n- All update operations use PATCH instead of PUT.\n- To export Google Documents, use the [`files.export`](/workspace/drive/api/v2/reference/files/export) method.\n- The `changes.list` method behavior is different. Instead of change IDs, use opaque page tokens. To poll the change collection, first call the [`changes.getStartPageToken`](/workspace/drive/api/v2/reference/changes/getStartPageToken) method for the initial value. For subsequent queries, the `changes.list` method returns the `newStartPageToken` value.\n- Update methods now reject requests that specify non-writable fields.\n- The v2 `exportFormats` and `importFormats` fields in the [`about`](/workspace/drive/api/reference/rest/v3/about) resource are lists of allowable import or export formats. In v3, they're MIME type maps of possible targets to all supported imports or exports.\n- The v2 `appdata` and `appfolder` aliases are now `appDataFolder` in v3.\n- The `properties` resource is removed from v3. The [`files`](/workspace/drive/api/v3/reference/files) resource has the `properties` field that contains true key-value pairs. The `properties` field contains public properties, and the `appProperties` field contains private properties, so the visibility field isn't needed.\n- The `modifiedTime` field in the `files` resource updates the last time anyone modified the file. In v2, the `modifiedDate` field was only mutable on update if you set the `setModifiedDate` field.\n- The `viewedByMeTime` field in the `files` resource doesn't automatically update.\n- To import Google Docs formats, you set the appropriate target `mimeType` in the resource body. In v2, you set `?convert=true`.\n- Import operations return a 400 error if the format isn't supported.\n- Readers and commenters can't view permissions.\n- The `me` alias for permissions is removed.\n- Some functionality was available as part of the request resource but is instead available as a request parameter. For example:\n - In v2, you can use `children.delete` to remove a child file from a parent folder.\n - In v3, you use`files.update` on the child with `?removeParents=parent_id` in the URL.\n\nOther differences\n-----------------\n\nFields and parameter names are different in v3. Some examples include:\n\n- The `name` property replaces `title` in the `files` resource.\n- `Time` is the suffix for all date and time fields instead of `Date`.\n- List operations don't use the `items` field to contain the result set. The resource type provides a field for the results (such as `files` or `changes`)."]]