บทนำ
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
Google Apps Script API ช่วยให้คุณสร้าง แก้ไข และ
ทำให้โปรเจ็กต์ Apps Script ใช้งานได้โดยอัตโนมัติ ซึ่งเป็น
การดำเนินการที่ต้องใช้โปรแกรมแก้ไข Apps Script แอปของคุณสามารถใช้ API เพื่อจัดการโปรเจ็กต์สคริปต์ สร้างและติดตั้งใช้งานสคริปต์เวอร์ชันใหม่ รวมถึงตรวจสอบการเรียกใช้สคริปต์ได้
นอกจากนี้ Apps Script API ยังแทนที่และขยาย Apps Script Execution API ด้วย
คุณใช้ Apps Script API เพื่อเรียกใช้ฟังก์ชัน Apps Script จากระยะไกลได้
เช่นเดียวกับที่ใช้ Execution API
ภาพรวมของ API
Apps Script API แบ่งออกเป็นหลายทรัพยากร โดยแต่ละทรัพยากรมี
วัตถุประสงค์และชุดคำขอที่คุณส่งได้ แหล่งข้อมูลเหล่านี้ ได้แก่
projects
— การแสดงโปรเจ็กต์สคริปต์ API มีเมธอดสำหรับสร้าง
อ่าน ตรวจสอบ และแก้ไขโปรเจ็กต์
projects.deployments
— การแสดงการติดตั้งใช้งานสคริปต์ API มีเมธอดสำหรับ
สร้าง แสดงรายการ อัปเดต และลบการทำให้โปรเจ็กต์สคริปต์ใช้งานได้
projects.versions
- การแสดงเวอร์ชันโปรเจ็กต์สคริปต์ API มี
เมธอดสำหรับสร้างและอ่านเวอร์ชันของโปรเจ็กต์
processes
— การแสดงการดำเนินการฟังก์ชันสคริปต์ API มีเมธอดสำหรับ
แสดงรายการกระบวนการที่มีอยู่และรวบรวมข้อมูลเกี่ยวกับกระบวนการเหล่านั้น เช่น ประเภท
และสถานะปัจจุบัน
scripts
— ปลายทาง
ที่มีเมธอดสำหรับเรียกใช้ฟังก์ชัน Apps Script จากระยะไกล
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-08-31 UTC
[null,null,["อัปเดตล่าสุด 2025-08-31 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,["# Introduction\n\nThe 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-------------------\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."]]