Zadbaj o dobrą organizację dzięki kolekcji
Zapisuj i kategoryzuj treści zgodnie ze swoimi preferencjami.
Interfejs Google Drive API umożliwia tworzenie aplikacji korzystających z przechowywania danych w chmurze na Dysku Google.
Możesz tworzyć aplikacje, które integrują się z Dyskiem, i dodawać do nich zaawansowane funkcje za pomocą interfejsu Drive API.
Ten diagram przedstawia relacje między aplikacją na Dysku, interfejsem Drive API i Dyskiem:
Rysunek 1. Diagram relacji Dysku Google.
Te terminy definiują kluczowe komponenty przedstawione na rysunku 1:
Dysk Google
Usługa Google do przechowywania plików w chmurze zapewnia użytkownikom osobistą przestrzeń dyskową, czyli Mój dysk, oraz możliwość dostępu do folderów współdzielonych, czyli dysków współdzielonych.
Google Drive API
Interfejs API REST, który umożliwia korzystanie z miejsca na Dysku w aplikacji.
Aplikacja Dysk Google
Aplikacja, która używa Dysku jako rozwiązania do przechowywania danych.
UI Dysku Google
Interfejs użytkownika Google do zarządzania plikami przechowywanymi na Dysku. Jeśli Twoja aplikacja jest edytorem, np. arkuszem kalkulacyjnym lub edytorem tekstu, możesz zintegrować ją z interfejsem Dysku, aby tworzyć i otwierać pliki w aplikacji.
Mój dysk
Miejsce na Dysku, które należy do konkretnego użytkownika. Pliki przechowywane na Moim dysku można udostępniać innym użytkownikom, ale własność treści pozostaje przypisana do konkretnego użytkownika.
OAuth 2.0
Protokół autoryzacji, którego interfejs Drive API wymaga do uwierzytelniania użytkowników aplikacji. Jeśli aplikacja używa funkcji Zaloguj się przez Google, obsługuje ona przepływ OAuth 2.0 i tokeny dostępu aplikacji.
Dysk współdzielony
Lokalizacja na Dysku, w której znajdują się pliki, nad którymi współpracuje wielu użytkowników. Każdy użytkownik, który ma dostęp do dysku współdzielonego, ma dostęp do wszystkich plików na nim zapisanych. Użytkownicy mogą też uzyskać dostęp do poszczególnych plików na dysku współdzielonym.
Połącz go z Google Picker API, aby wyszukać wszystkie pliki na Dysku, a następnie zwrócić nazwę pliku, adres URL, datę ostatniej modyfikacji i użytkownika.
Tworzenie skrótów do aplikacji innych firm, które są linkami zewnętrznymi do danych przechowywanych poza Dyskiem, w innym magazynie danych lub systemie pamięci w chmurze.
Utwórz specjalny folder na Dysku, w którym będziesz przechowywać dane aplikacji, aby nie miała ona dostępu do wszystkich treści użytkownika przechowywanych na Dysku.
Monitorowanie aktywności związanej z plikami i reagowanie na nią za pomocą zdarzeń na Dysku Google.
Zintegruj aplikację obsługującą Dysk z interfejsem Dysku za pomocą interfejsu Dysku Google. Jest to standardowy interfejs internetowy Google, którego możesz używać do tworzenia, porządkowania, wyszukiwania i udostępniania plików na Dysku.
Stosować etykiety do plików na Dysku, ustawiać wartości pól etykiet, odczytywać wartości pól etykiet w plikach i wyszukiwać pliki za pomocą terminów metadanych etykiet zdefiniowanych przez taksonomię etykiet niestandardowych.
Chcesz zobaczyć interfejs Google Drive API w działaniu?
Na kanale Google Workspace Developers znajdziesz filmy z poradami, wskazówkami i informacjami o najnowszych funkcjach.
Więcej informacji o tworzeniu aplikacji za pomocą interfejsów Google Workspace API, w tym o obsłudze uwierzytelniania i autoryzacji, znajdziesz w artykule Tworzenie aplikacji w Google Workspace.
Aby dowiedzieć się, jak skonfigurować i uruchomić aplikację interfejsu Drive API, przeczytaj szybki przewodnik.
[null,null,["Ostatnia aktualizacja: 2025-08-04 UTC."],[],[],null,["# Google Drive API overview\n\nThe Google Drive API lets you create apps that use Google Drive cloud storage.\nYou can develop applications that integrate with Drive, and\ncreate robust functionality in your application using the Drive API.\n\nThis diagram shows the relationship between your Drive app, the\nDrive API, and Drive:\n**Figure 1.** Google Drive relationship diagram.\n\nThese terms define the key components shown in Figure 1:\n\n*Google Drive*\n: Google's cloud file storage service provides users with a\n personal storage space, called *My Drive* , and the option to\n access collaborative shared folders, called *shared drives*.\n\n*Google Drive API*\n: The REST API that lets you use Drive storage\n from within your app.\n\n*Google Drive app*\n: An app that uses Drive as its storage solution.\n\n*Google Drive UI*\n: Google's user interface that manages files stored on\n Drive. If your app is an editor-type app, such as a\n spreadsheet or word processor, you can integrate with the\n Drive UI to create and open files within your app.\n\n*My Drive*\n: A Drive storage location that a\n specific user owns. Files stored on My Drive can be shared\n with other users, but ownership of the content remains specific to an\n individual user.\n\n*OAuth 2.0*\n: The authorization protocol that Drive API requires to\n authenticate your app users. If your application uses [Sign In With\n Google](/identity/gsi/web/guides/overview), it handles the OAuth 2.0 flow\n and application access tokens.\n\n*Shared drive*\n: A Drive storage location that owns files that multiple users\n collaborate on. Any user with access to a shared drive has access to all\n files it contains. Users can also be granted access to individual\n files inside the shared drive.\n\nWhat can you do with the Drive API?\n-----------------------------------\n\nYou can use the Drive API to:\n\n- [Download files](/workspace/drive/api/guides/manage-downloads) from Drive and [upload files](/workspace/drive/api/guides/manage-uploads) to Drive.\n- [Search for files and folders](/workspace/drive/api/guides/search-files) stored in Drive. Create complex search queries that return any of the file metadata fields in the [`files`](/workspace/drive/api/reference/rest/v3/files) resource.\n- Let users [share files, folders, and drives](/workspace/drive/api/guides/manage-sharing) to collaborate on content.\n- Combine with the [Google Picker API](https://developers.google.com/picker/docs/) to search all files in Drive, then return the filename, URL, last modified date, and user.\n- [Create *third-party shortcuts*](/workspace/drive/api/guides/third-party-shortcuts) that are external links to data stored outside of Drive, in a different datastore or cloud storage system.\n- Create a dedicated Drive folder to [store\n application-specific data](/workspace/drive/api/guides/appdata) so the app cannot access all the user's content stored in Drive.\n- Monitor or respond to file activity using [Google Drive\n events](/workspace/events/guides/events-drive).\n- Integrate your Drive-enabled app with the [Drive UI](/workspace/drive/api/guides/about-apps) using the *Google Drive UI*. It's Google's standard web UI that you can use to create, organize, discover, and share Drive files.\n- Apply [labels](/workspace/drive/api/guides/about-labels) to Drive files, set label field values, read label field values on files, and search for files using label metadata terms defined by the custom label taxonomy.\n\n|---|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| | Want to see the Google Drive API in action? The Google Workspace Developers channel offers videos about tips, tricks, and the latest features. [Subscribe now](https://www.youtube.com/channel/UCUcg6az6etU_gRtZVAhBXaw) |\n\nRelated topics\n--------------\n\n- To learn about developing with Google Workspace APIs, including handling\n authentication and authorization, see [Develop on\n Google Workspace](/workspace/guides/getstarted-overview).\n\n- To learn how to configure and run a Drive API app, read the\n [Quickstarts](/workspace/drive/api/quickstart/js)."]]