Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
API Google Apps Script cho phép bạn tạo, sửa đổi và triển khai các dự án Apps Script theo cách lập trình – những thao tác mà nếu không thì bạn phải sử dụng trình chỉnh sửa Apps Script. Các ứng dụng của bạn có thể dùng API này để quản lý dự án tập lệnh, tạo và triển khai phiên bản tập lệnh mới, cũng như theo dõi quá trình thực thi tập lệnh.
API Apps Script cũng thay thế và mở rộng API Thực thi Apps Script. Bạn có thể sử dụng Apps Script API để thực thi các hàm Apps Script từ xa, giống như khi bạn sử dụng Execution API.
Tổng quan về API
Apps Script API được chia thành nhiều tài nguyên, mỗi tài nguyên có một mục đích cụ thể và một tập hợp các yêu cầu mà bạn có thể đưa ra. Các tài nguyên này bao gồm:
projects – Biểu thị một dự án tập lệnh. API này cung cấp các phương thức để tạo, đọc, giám sát và sửa đổi dự án.
projects.deployments – Biểu thị việc triển khai tập lệnh. API này cung cấp các phương thức để tạo, liệt kê, cập nhật và xoá các bản triển khai dự án tập lệnh.
projects.versions – Biểu thị một phiên bản dự án tập lệnh. API này cung cấp các phương thức để tạo và đọc các phiên bản dự án.
processes – Biểu thị quá trình thực thi một hàm tập lệnh. API này cung cấp các phương thức để liệt kê các quy trình hiện có và thu thập thông tin về các quy trình đó, chẳng hạn như loại và trạng thái hiện tại.
scripts – Điểm cuối cung cấp các phương thức để thực thi từ xa các hàm Apps Script.
[[["Dễ hiểu","easyToUnderstand","thumb-up"],["Giúp tôi giải quyết được vấn đề","solvedMyProblem","thumb-up"],["Khác","otherUp","thumb-up"]],[["Thiếu thông tin tôi cần","missingTheInformationINeed","thumb-down"],["Quá phức tạp/quá nhiều bước","tooComplicatedTooManySteps","thumb-down"],["Đã lỗi thời","outOfDate","thumb-down"],["Vấn đề về bản dịch","translationIssue","thumb-down"],["Vấn đề về mẫu/mã","samplesCodeIssue","thumb-down"],["Khác","otherDown","thumb-down"]],["Cập nhật lần gần đây nhất: 2025-08-04 UTC."],[[["\u003cp\u003eThe Google Apps Script API allows programmatic management of Apps Script projects, including creation, modification, and deployment.\u003c/p\u003e\n"],["\u003cp\u003eThis API enables remote execution of Apps Script functions and extends the capabilities of the Apps Script Execution API.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can utilize the API to manage script projects, deploy versions, and monitor script executions.\u003c/p\u003e\n"],["\u003cp\u003eKey resources within the API include projects, deployments, versions, processes, and scripts for comprehensive control.\u003c/p\u003e\n"],["\u003cp\u003eIt's crucial to enable the API and grant access for third-party app management of your scripts.\u003c/p\u003e\n"]]],[],null,["The Google Apps Script API lets you programmatically create, modify, and\ndeploy Apps Script projects---actions that otherwise require you to\nuse the Apps Script editor. Your apps can use the API to manage your\nscript projects, create and deploy new script versions, and monitor script\nexecutions.\n| **Warning:** The Apps Script API does not work with [service accounts](https://developers.google.com/identity/protocols/OAuth2ServiceAccount).\n\nThe Apps Script API also replaces and extends the Apps Script Execution API.\nYou can use the Apps Script API to execute Apps Script functions remotely,\njust as you could with the Execution API.\n| **Note:** In order to use this API in your apps, you must [enable it for use](/apps-script/api/how-tos/enable#using_the_apps_script_api_in_your_app). To allow other apps to manage your scripts, you must [grant them access](/apps-script/api/how-tos/enable#granting_third-party_applications_access_to_your_script_projects%22).\n\nOverview of the API\n\nThe Apps Script API is divided into several resources, each with a specific\npurpose and set of requests you can make. These resources are the following:\n\n- [`projects`](/apps-script/api/reference/rest/v1/projects) --- A representation of a script project. The API provides methods to create, read, monitor, and modify projects.\n- [`projects.deployments`](/apps-script/api/reference/rest/v1/projects.deployments) --- A representation of a script deployment. The API provides methods to create, list, update, and delete script project deployments.\n- [`projects.versions`](/apps-script/api/reference/rest/v1/projects.versions) --- A representation of a script project version. The API provides methods to create and read project versions.\n- [`processes`](/apps-script/api/reference/rest/v1/processes) --- A representation of a script function execution. The API provides methods to list existing processes and gather information about them, such as type and current status.\n- [`scripts`](/apps-script/api/reference/rest/v1/scripts) --- The endpoint that provides methods to remotely execute Apps Script functions."]]