Apps Script API
Zadbaj o dobrą organizację dzięki kolekcji
Zapisuj i kategoryzuj treści zgodnie ze swoimi preferencjami.
Zarządza projektami Google Apps Script i wykonuje je.
Usługa: script.googleapis.com
Aby wywołać tę usługę, zalecamy użycie dostarczonych przez Google bibliotek klienta. Jeśli do wywoływania tej usługi aplikacja musi używać własnych bibliotek, podczas tworzenia żądań do interfejsu API użyj podanych niżej informacji.
Dokument opisujący
Dokument opisujący to czytelna dla komputera specyfikacja opisująca interfejsy API REST i korzystanie z nich. Służy do tworzenia bibliotek klienta, wtyczek IDE i innych narzędzi, które współdziałają z interfejsami API Google. Jedna usługa może udostępniać wiele dokumentów opisujących. Ta usługa dostarcza następujący dokument opisujący interfejs API:
Punkt końcowy usługi
Punkt końcowy usługi to podstawowy adres URL, który określa adres sieciowy usługi interfejsu API. Jedna usługa może mieć wiele punktów końcowych. Ta usługa ma następujący punkt końcowy i wszystkie poniższe identyfikatory URI odnoszą się do tego punktu końcowego:
https://script.googleapis.com
Metody |
list |
GET /v1/processes
Wymień informacje o procesach wykonanych przez użytkownika lub w jego imieniu, takie jak typ procesu i bieżący stan. |
listScriptProcesses |
GET /v1/processes:listScriptProcesses
Wyświetlenie informacji o uruchomionych procesach skryptu, takich jak typ procesu i bieżący stan. |
Metody |
create |
POST /v1/projects Tworzy nowy, pusty projekt skryptu bez plików skryptu i podstawowego pliku manifestu. |
get |
GET /v1/projects/{scriptId} Pobiera metadane projektu skryptu. |
getContent |
GET /v1/projects/{scriptId}/content Pobiera zawartość projektu skryptu, w tym źródło kodu i metadane każdego pliku skryptu. |
getMetrics |
GET /v1/projects/{scriptId}/metrics
Uzyskaj dane dotyczące skryptów, takie jak liczba uruchomień i aktywnych użytkowników. |
updateContent |
PUT /v1/projects/{scriptId}/content Aktualizuje zawartość określonego projektu skryptu. |
Metody |
create |
POST /v1/projects/{scriptId}/deployments Tworzy wdrożenie projektu Apps Script. |
delete |
DELETE /v1/projects/{scriptId}/deployments/{deploymentId} Usuwa wdrożenie projektu Apps Script. |
get |
GET /v1/projects/{scriptId}/deployments/{deploymentId} Pobiera wdrożenie projektu Apps Script. |
list |
GET /v1/projects/{scriptId}/deployments
Zawiera listę wdrożeń projektu Apps Script. |
update |
PUT /v1/projects/{deploymentConfig.scriptId}/deployments/{deploymentId} Aktualizuje wdrożenie projektu Apps Script. |
Metody |
create |
POST /v1/projects/{scriptId}/versions Tworzy nową wersję stałą z użyciem bieżącego kodu i o unikalnym numerze wersji. |
get |
GET /v1/projects/{scriptId}/versions/{versionNumber} Pobiera wersję projektu skryptu. |
list |
GET /v1/projects/{scriptId}/versions
Wyświetl listę wersji projektu skryptu. |
Metody |
run |
POST /v1/scripts/{scriptId}:run Uruchamia funkcję w projekcie Apps Script. |
O ile nie stwierdzono inaczej, treść tej strony jest objęta licencją Creative Commons – uznanie autorstwa 4.0, a fragmenty kodu są dostępne na licencji Apache 2.0. Szczegółowe informacje na ten temat zawierają zasady dotyczące witryny Google Developers. Java jest zastrzeżonym znakiem towarowym firmy Oracle i jej podmiotów stowarzyszonych.
Ostatnia aktualizacja: 2025-07-26 UTC.
[null,null,["Ostatnia aktualizacja: 2025-07-26 UTC."],[[["\u003cp\u003eThe Apps Script API manages and executes Google Apps Script projects, providing functionality for creating, deploying, and running scripts.\u003c/p\u003e\n"],["\u003cp\u003eIt offers REST resources for managing projects, deployments, versions, processes, and scripts themselves, allowing programmatic control over various aspects of Apps Script projects.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can leverage the API using Google-provided client libraries or their own libraries by adhering to the provided discovery document and service endpoint.\u003c/p\u003e\n"],["\u003cp\u003eThe API enables functionalities such as retrieving project metadata, updating script content, listing deployments, running script functions, and managing versions.\u003c/p\u003e\n"],["\u003cp\u003eUsers can manage and execute Google Apps Scripts projects.\u003c/p\u003e\n"]]],[],null,["# Apps Script API\n\nManages and executes Google Apps Script projects.\n\n- [REST Resource: v1.processes](#v1.processes)\n- [REST Resource: v1.projects](#v1.projects)\n- [REST Resource: v1.projects.deployments](#v1.projects.deployments)\n- [REST Resource: v1.projects.versions](#v1.projects.versions)\n- [REST Resource: v1.scripts](#v1.scripts)\n\nService: script.googleapis.com\n------------------------------\n\nTo call this service, we recommend that you use the Google-provided [client libraries](https://cloud.google.com/apis/docs/client-libraries-explained). If your application needs to use your own libraries to call this service, use the following information when you make the API requests.\n\n### Discovery document\n\nA [Discovery Document](https://developers.google.com/discovery/v1/reference/apis) is a machine-readable specification for describing and consuming REST APIs. It is used to build client libraries, IDE plugins, and other tools that interact with Google APIs. One service may provide multiple discovery documents. This service provides the following discovery document:\n\n- \u003chttps://script.googleapis.com/$discovery/rest?version=v1\u003e\n\n### Service endpoint\n\nA [service endpoint](https://cloud.google.com/apis/design/glossary#api_service_endpoint) is a base URL that specifies the network address of an API service. One service might have multiple service endpoints. This service has the following service endpoint and all URIs below are relative to this service endpoint:\n\n- `https://script.googleapis.com`\n\nREST Resource: [v1.processes](/apps-script/api/reference/rest/v1/processes)\n---------------------------------------------------------------------------\n\n| Methods ||\n|-----------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------|\n| [list](/apps-script/api/reference/rest/v1/processes/list) | `GET /v1/processes` List information about processes made by or on behalf of a user, such as process type and current status. |\n| [listScriptProcesses](/apps-script/api/reference/rest/v1/processes/listScriptProcesses) | `GET /v1/processes:listScriptProcesses` List information about a script's executed processes, such as process type and current status. |\n\nREST Resource: [v1.projects](/apps-script/api/reference/rest/v1/projects)\n-------------------------------------------------------------------------\n\n| Methods ||\n|----------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------|\n| [create](/apps-script/api/reference/rest/v1/projects/create) | `POST /v1/projects` Creates a new, empty script project with no script files and a base manifest file. |\n| [get](/apps-script/api/reference/rest/v1/projects/get) | `GET /v1/projects/{scriptId}` Gets a script project's metadata. |\n| [getContent](/apps-script/api/reference/rest/v1/projects/getContent) | `GET /v1/projects/{scriptId}/content` Gets the content of the script project, including the code source and metadata for each script file. |\n| [getMetrics](/apps-script/api/reference/rest/v1/projects/getMetrics) | `GET /v1/projects/{scriptId}/metrics` Get metrics data for scripts, such as number of executions and active users. |\n| [updateContent](/apps-script/api/reference/rest/v1/projects/updateContent) | `PUT /v1/projects/{scriptId}/content` Updates the content of the specified script project. |\n\nREST Resource: [v1.projects.deployments](/apps-script/api/reference/rest/v1/projects.deployments)\n-------------------------------------------------------------------------------------------------\n\n| Methods ||\n|--------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------|\n| [create](/apps-script/api/reference/rest/v1/projects.deployments/create) | `POST /v1/projects/{scriptId}/deployments` Creates a deployment of an Apps Script project. |\n| [delete](/apps-script/api/reference/rest/v1/projects.deployments/delete) | `DELETE /v1/projects/{scriptId}/deployments/{deploymentId}` Deletes a deployment of an Apps Script project. |\n| [get](/apps-script/api/reference/rest/v1/projects.deployments/get) | `GET /v1/projects/{scriptId}/deployments/{deploymentId}` Gets a deployment of an Apps Script project. |\n| [list](/apps-script/api/reference/rest/v1/projects.deployments/list) | `GET /v1/projects/{scriptId}/deployments` Lists the deployments of an Apps Script project. |\n| [update](/apps-script/api/reference/rest/v1/projects.deployments/update) | `PUT /v1/projects/{deploymentConfig.scriptId}/deployments/{deploymentId}` Updates a deployment of an Apps Script project. |\n\nREST Resource: [v1.projects.versions](/apps-script/api/reference/rest/v1/projects.versions)\n-------------------------------------------------------------------------------------------\n\n| Methods ||\n|-----------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------|\n| [create](/apps-script/api/reference/rest/v1/projects.versions/create) | `POST /v1/projects/{scriptId}/versions` Creates a new immutable version using the current code, with a unique version number. |\n| [get](/apps-script/api/reference/rest/v1/projects.versions/get) | `GET /v1/projects/{scriptId}/versions/{versionNumber}` Gets a version of a script project. |\n| [list](/apps-script/api/reference/rest/v1/projects.versions/list) | `GET /v1/projects/{scriptId}/versions` List the versions of a script project. |\n\nREST Resource: [v1.scripts](/apps-script/api/reference/rest/v1/scripts)\n-----------------------------------------------------------------------\n\n| Methods ||\n|-------------------------------------------------------|------------------------------------------------------------------------------|\n| [run](/apps-script/api/reference/rest/v1/scripts/run) | `POST /v1/scripts/{scriptId}:run` Runs a function in an Apps Script project. |"]]