Apps Script API
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
מנהל ומבצע פרויקטים של סקריפט של Google Apps.
שירות: Script.googleapis.com
כדי לקרוא לשירות הזה, מומלץ להשתמש בספריות הלקוח ש-Google מספקת. אם האפליקציה שלכם צריכה להשתמש בספריות משלכם כדי לקרוא לשירות הזה, תוכלו להשתמש בפרטים הבאים כשתשלחו את בקשות ה-API.
מסמך Discovery
מסמך Discovery הוא מפרט קריא למחשבים שמיועד לתיאור ולשימוש בממשקי API ל-REST. הוא משמש לבניית ספריות לקוח, יישומי פלאגין ל-IDE וכלים אחרים שיוצרים אינטראקציה עם Google APIs. שירות אחד יכול לספק כמה מסמכי גילוי. השירות הזה מספק את מסמך הגילוי הבא:
נקודת הקצה של השירות
נקודת קצה של שירות היא כתובת URL בסיסית שמציינת את כתובת הרשת של שירות ה-API. לשירות אחד יכולות להיות כמה נקודות קצה של שירות. לשירות הזה יש את נקודת הקצה הבאה של השירות, וכל מזהי ה-URI הבאים הם יחסיים לנקודת הקצה של השירות:
https://script.googleapis.com
שיטות |
list |
GET /v1/processes
רשימת מידע על תהליכים שבוצעו על ידי משתמש או בשמו, כמו סוג התהליך והסטטוס הנוכחי. |
listScriptProcesses |
GET /v1/processes:listScriptProcesses
הצגת רשימה של תהליכים שבוצעו על ידי סקריפט, כמו סוג התהליך והסטטוס הנוכחי. |
שיטות |
create |
POST /v1/projects
יצירת פרויקט סקריפט חדש וריק, ללא קובצי סקריפט וקובץ מניפסט בסיסי. |
get |
GET /v1/projects/{scriptId}
הפונקציה מקבלת את המטא-נתונים של פרויקט סקריפט. |
getContent |
GET /v1/projects/{scriptId}/content
קבלת התוכן של פרויקט הסקריפט, כולל מקור הקוד והמטא-נתונים של כל קובץ סקריפט. |
getMetrics |
GET /v1/projects/{scriptId}/metrics
קבלת נתוני מדדים של סקריפטים, כמו מספר הפעלות ומשתמשים פעילים. |
updateContent |
PUT /v1/projects/{scriptId}/content
עדכון התוכן של פרויקט הסקריפט שצוין. |
שיטות |
create |
POST /v1/projects/{scriptId}/deployments
נוצרת פריסה של פרויקט Apps Script. |
delete |
DELETE /v1/projects/{scriptId}/deployments/{deploymentId}
מחיקת הפריסה של פרויקט Apps Script. |
get |
GET /v1/projects/{scriptId}/deployments/{deploymentId}
מתקבלת פריסה של פרויקט Apps Script. |
list |
GET /v1/projects/{scriptId}/deployments
פירוט הפריסות של פרויקט Apps Script. |
update |
PUT /v1/projects/{deploymentConfig.scriptId}/deployments/{deploymentId}
עדכון הפריסה של פרויקט Apps Script. |
שיטות |
create |
POST /v1/projects/{scriptId}/versions
יצירת גרסה חדשה שלא ניתנת לשינוי באמצעות הקוד הנוכחי, עם מספר גרסה ייחודי. |
get |
GET /v1/projects/{scriptId}/versions/{versionNumber}
מקבלת גרסה של פרויקט סקריפט. |
list |
GET /v1/projects/{scriptId}/versions
רשימת הגרסאות של פרויקט סקריפט. |
שיטות |
run |
POST /v1/scripts/{scriptId}:run
מפעיל פונקציה בפרויקט Apps Script. |
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-07-26 (שעון UTC).
[null,null,["עדכון אחרון: 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. |"]]