REST Resource: processes
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
แหล่งข้อมูล: กระบวนการ
การนำเสนอการดำเนินการตามกระบวนการของสคริปต์รายการเดียวที่เริ่มต้นจากเครื่องมือแก้ไขสคริปต์ ทริกเกอร์ แอปพลิเคชัน หรือโดยใช้ Apps Script API สิ่งนี้แตกต่างจากทรัพยากร Operation
ซึ่งจะแสดงเฉพาะการดำเนินการที่เริ่มต้นผ่าน Apps Script API เท่านั้น
การแสดง JSON |
{
"projectName": string,
"functionName": string,
"processType": enum (ProcessType ),
"processStatus": enum (ProcessStatus ),
"userAccessLevel": enum (UserAccessLevel ),
"startTime": string,
"duration": string
} |
ช่อง |
projectName |
string
ชื่อสคริปต์ที่เรียกใช้
|
functionName |
string
ชื่อฟังก์ชันที่เริ่มการดำเนินการ
|
processType |
enum (ProcessType )
ประเภทการดำเนินการ
|
processStatus |
enum (ProcessStatus )
สถานะการดำเนินการ
|
userAccessLevel |
enum (UserAccessLevel )
ระดับการเข้าถึงสคริปต์ของผู้ใช้ที่ดำเนินการอยู่
|
startTime |
string (Timestamp format)
เวลาที่การดำเนินการเริ่มต้น การประทับเวลาเป็น RFC3339 UTC "Zulu" โดยมีความละเอียดระดับนาโนวินาทีและมีเลขเศษส่วนสูงสุด 9 หลัก ตัวอย่าง: "2014-10-02T15:01:23Z" และ "2014-10-02T15:01:23.045123456Z"
|
duration |
string (Duration format)
ระยะเวลาของการดำเนินการที่ใช้ในการดำเนินการ ระยะเวลาเป็นวินาทีโดยมีเลขเศษส่วนไม่เกิน 9 หลัก ลงท้ายด้วย "s " ตัวอย่างเช่น "3.5s"
|
ProcessType
ประเภทของกระบวนการ ซึ่งเป็นตัวกำหนดการเริ่มต้นกระบวนการ
Enum |
PROCESS_TYPE_UNSPECIFIED |
ไม่ได้ระบุประเภท |
ADD_ON |
กระบวนการเริ่มต้นจากจุดแรกเข้าของส่วนเสริม |
EXECUTION_API |
กระบวนการนี้เริ่มต้นโดยใช้ Apps Script API |
TIME_DRIVEN |
โดยเริ่มกระบวนการจากทริกเกอร์ตามเวลา |
TRIGGER |
กระบวนการเริ่มต้นจากทริกเกอร์ที่ขึ้นอยู่กับเหตุการณ์ |
WEBAPP |
กระบวนการเริ่มต้นจากจุดแรกเข้าของเว็บแอป |
EDITOR |
กระบวนการเริ่มต้นขึ้นโดยใช้ IDE ของ Apps Script |
SIMPLE_TRIGGER |
กระบวนการนี้เริ่มต้นจากทริกเกอร์แบบง่ายของ G Suite |
BATCH_TASK |
กระบวนการเริ่มต้นเป็นงานในงานแบบกลุ่ม |
ProcessStatus
Enum |
PROCESS_STATUS_UNSPECIFIED |
สถานะที่ไม่ได้ระบุ |
RUNNING |
กระบวนการกำลังทำงานอยู่ |
PAUSED |
กระบวนการนี้หยุดชั่วคราว |
COMPLETED |
กระบวนการนี้เสร็จสมบูรณ์แล้ว |
CANCELED |
กระบวนการถูกยกเลิก |
FAILED |
ดำเนินการไม่สำเร็จ |
TIMED_OUT |
หมดเวลาการดำเนินการ |
UNKNOWN |
ไม่ทราบสถานะกระบวนการ |
DELAYED |
การดำเนินการล่าช้าเพราะรอโควต้า |
UserAccessLevel
ระดับการเข้าถึงต่างๆ ของผู้ใช้
Enum |
USER_ACCESS_LEVEL_UNSPECIFIED |
ไม่ได้ระบุระดับการเข้าถึงของผู้ใช้ |
NONE |
ผู้ใช้ไม่มีสิทธิ์เข้าถึง |
READ |
ผู้ใช้มีสิทธิ์เข้าถึงแบบอ่านอย่างเดียว |
WRITE |
ผู้ใช้มีสิทธิ์เขียน |
OWNER |
ผู้ใช้เป็นเจ้าของ |
เมธอด |
|
แสดงรายการข้อมูลเกี่ยวกับกระบวนการที่ดำเนินการโดยหรือในนามของผู้ใช้ เช่น ประเภทกระบวนการและสถานะปัจจุบัน |
|
แสดงรายการข้อมูลเกี่ยวกับกระบวนการดำเนินการของสคริปต์ เช่น ประเภทกระบวนการและสถานะปัจจุบันของสคริปต์ |
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-26 UTC
[null,null,["อัปเดตล่าสุด 2025-07-26 UTC"],[[["\u003cp\u003eThe \u003ccode\u003eProcess\u003c/code\u003e resource represents a single script execution initiated from various sources like the script editor, triggers, applications, or the Apps Script API.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eProcess\u003c/code\u003e details include project and function names, execution type, status, user access level, start time, and duration.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eProcessType\u003c/code\u003e identifies how the process was started (e.g., add-on, API, trigger, web app).\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eProcessStatus\u003c/code\u003e indicates the current state of the execution (e.g., running, paused, completed, failed).\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can programmatically list processes using methods like \u003ccode\u003elist\u003c/code\u003e and \u003ccode\u003elistScriptProcesses\u003c/code\u003e to gain insights into executions.\u003c/p\u003e\n"]]],[],null,["# REST Resource: processes\n\n- [Resource: Process](#Process)\n - [JSON representation](#Process.SCHEMA_REPRESENTATION)\n- [ProcessType](#ProcessType)\n- [ProcessStatus](#ProcessStatus)\n- [UserAccessLevel](#UserAccessLevel)\n- [Methods](#METHODS_SUMMARY)\n\nResource: Process\n-----------------\n\nRepresentation of a single script process execution that was started from the script editor, a trigger, an application, or using the Apps Script API. This is distinct from the [`Operation`](/apps-script/api/reference/rest/v1/scripts/run#body.Operation) resource, which only represents executions started via the Apps Script API.\n\n| JSON representation |\n|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"projectName\": string, \"functionName\": string, \"processType\": enum (/apps-script/api/reference/rest/v1/processes#ProcessType), \"processStatus\": enum (/apps-script/api/reference/rest/v1/processes#ProcessStatus), \"userAccessLevel\": enum (/apps-script/api/reference/rest/v1/processes#UserAccessLevel), \"startTime\": string, \"duration\": string } ``` |\n\n| Fields ||\n|-------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `projectName` | `string` Name of the script being executed. |\n| `functionName` | `string` Name of the function the started the execution. |\n| `processType` | `enum (`[ProcessType](/apps-script/api/reference/rest/v1/processes#ProcessType)`)` The executions type. |\n| `processStatus` | `enum (`[ProcessStatus](/apps-script/api/reference/rest/v1/processes#ProcessStatus)`)` The executions status. |\n| `userAccessLevel` | `enum (`[UserAccessLevel](/apps-script/api/reference/rest/v1/processes#UserAccessLevel)`)` The executing users access level to the script. |\n| `startTime` | `string (`[Timestamp](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.Timestamp)` format)` Time the execution started. A timestamp in RFC3339 UTC \"Zulu\" format, with nanosecond resolution and up to nine fractional digits. Examples: `\"2014-10-02T15:01:23Z\"` and `\"2014-10-02T15:01:23.045123456Z\"`. |\n| `duration` | `string (`[Duration](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.Duration)` format)` Duration the execution spent executing. A duration in seconds with up to nine fractional digits, ending with '`s`'. Example: `\"3.5s\"`. |\n\nProcessType\n-----------\n\nThe type of process, which defines how the process was started.\n\n| Enums ||\n|----------------------------|--------------------------------------------------------|\n| `PROCESS_TYPE_UNSPECIFIED` | Unspecified type. |\n| `ADD_ON` | The process was started from an add-on entry point. |\n| `EXECUTION_API` | The process was started using the Apps Script API. |\n| `TIME_DRIVEN` | The process was started from a time-based trigger. |\n| `TRIGGER` | The process was started from an event-based trigger. |\n| `WEBAPP` | The process was started from a web app entry point. |\n| `EDITOR` | The process was started using the Apps Script IDE. |\n| `SIMPLE_TRIGGER` | The process was started from a G Suite simple trigger. |\n| `MENU` | The process was started from a G Suite menu item. |\n| `BATCH_TASK` | The process was started as a task in a batch job. |\n\nProcessStatus\n-------------\n\nThe process status.\n\n| Enums ||\n|------------------------------|--------------------------------------------|\n| `PROCESS_STATUS_UNSPECIFIED` | Unspecified status. |\n| `RUNNING` | The process is currently running. |\n| `PAUSED` | The process has paused. |\n| `COMPLETED` | The process has completed. |\n| `CANCELED` | The process was cancelled. |\n| `FAILED` | The process failed. |\n| `TIMED_OUT` | The process timed out. |\n| `UNKNOWN` | Process status unknown. |\n| `DELAYED` | The process is delayed, waiting for quota. |\n\nUserAccessLevel\n---------------\n\nThe various user access levels.\n\n| Enums ||\n|---------------------------------|--------------------------------|\n| `USER_ACCESS_LEVEL_UNSPECIFIED` | User access level unspecified |\n| `NONE` | The user has no access. |\n| `READ` | The user has read-only access. |\n| `WRITE` | The user has write access. |\n| `OWNER` | The user is an owner. |\n\n| Methods ------- ||\n|---------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------|\n| ### [list](/apps-script/api/reference/rest/v1/processes/list) | 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) | List information about a script's executed processes, such as process type and current status. |"]]