Method: processes.listScriptProcesses
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
列出指令碼執行程序的相關資訊,例如程序類型和目前狀態。
HTTP 要求
GET https://script.googleapis.com/v1/processes:listScriptProcesses
這個網址使用 gRPC 轉碼語法。
查詢參數
參數 |
scriptId |
string
要列出程序所在專案的指令碼 ID。
|
scriptProcessFilter |
object (ListScriptProcessesFilter )
用於限制清單結果的篩選器;只會傳回符合篩選條件的程序。
|
pageSize |
integer
每個結果頁面的傳回程序數量上限。預設值為 50。
|
pageToken |
string
繼續先前在下一頁提出清單要求的權杖。此值應設為前一個回應的 nextPageToken 值。
|
回應主體
如果成功,回應主體會含有以下結構的資料:
JSON 表示法 |
{
"processes": [
{
object (Process )
}
],
"nextPageToken": string
} |
欄位 |
processes[] |
object (Process )
比對要求參數的程序清單。
|
nextPageToken |
string
下一頁的結果權杖。如果留空,表示已沒有剩餘頁面。
|
授權範圍
需要下列 OAuth 範圍:
https://www.googleapis.com/auth/script.processes
詳情請參閱 OAuth 2.0 總覽。
ListScriptProcessesFilter
用來進一步指定要列出的程序的篩選器。系統只會傳回符合所有指定條件的程序。
JSON 表示法 |
{
"deploymentId": string,
"functionName": string,
"startTime": string,
"endTime": string,
"types": [
enum (ProcessType )
],
"statuses": [
enum (ProcessStatus )
],
"userAccessLevels": [
enum (UserAccessLevel )
]
} |
欄位 |
deploymentId |
string
選用欄位,限制傳回的程序僅來自具有特定部署 ID 的專案。
|
functionName |
string
這是選填欄位,用來限制傳回的程序只包含來自具有指定函式名稱的指令碼函式。
|
startTime |
string (Timestamp format)
選用欄位,限制只傳回指定時間戳記當天或之後啟動的程序。 RFC3339 世界標準時間「Zulu」的時間戳記格式,解析度為奈秒,且最多 9 個小數位數。範例:"2014-10-02T15:01:23Z" 和 "2014-10-02T15:01:23.045123456Z" 。
|
endTime |
string (Timestamp format)
選用欄位,限制只傳回在指定時間戳記當天或之前完成的程序。 RFC3339 世界標準時間「Zulu」的時間戳記格式,解析度為奈秒,且最多 9 個小數位數。範例:"2014-10-02T15:01:23Z" 和 "2014-10-02T15:01:23.045123456Z" 。
|
types[] |
enum (ProcessType )
這個選填欄位是用來限制傳回的程序,只有具有其中一種指定程序類型的程序。
|
statuses[] |
enum (ProcessStatus )
此為選填欄位,用來限制傳回的程序只有具有任一指定程序狀態的使用者。
|
userAccessLevels[] |
enum (UserAccessLevel )
這是選填欄位,用途是限制系統只傳回具有指定使用者存取層級的程序。
|
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-07-26 (世界標準時間)。
[null,null,["上次更新時間:2025-07-26 (世界標準時間)。"],[[["\u003cp\u003eLists information on script-executed processes, including process type and status, using the \u003ccode\u003eprocesses:listScriptProcesses\u003c/code\u003e method.\u003c/p\u003e\n"],["\u003cp\u003eAllows filtering of listed processes based on criteria like deployment ID, function name, timestamps, process types, statuses, and user access levels.\u003c/p\u003e\n"],["\u003cp\u003eRequires authorization with the \u003ccode\u003ehttps://www.googleapis.com/auth/script.processes\u003c/code\u003e scope.\u003c/p\u003e\n"],["\u003cp\u003eReturns a paginated list of \u003ccode\u003eProcess\u003c/code\u003e resources with details of each process and a token for retrieving subsequent pages.\u003c/p\u003e\n"],["\u003cp\u003eEmploys a \u003ccode\u003eGET\u003c/code\u003e request to the \u003ccode\u003ehttps://script.googleapis.com/v1/processes:listScriptProcesses\u003c/code\u003e endpoint with optional query parameters for filtering and pagination.\u003c/p\u003e\n"]]],[],null,["# Method: processes.listScriptProcesses\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Query parameters](#body.QUERY_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n - [JSON representation](#body.ListScriptProcessesResponse.SCHEMA_REPRESENTATION)\n- [Authorization Scopes](#body.aspect)\n- [ListScriptProcessesFilter](#ListScriptProcessesFilter)\n - [JSON representation](#ListScriptProcessesFilter.SCHEMA_REPRESENTATION)\n- [Try it!](#try-it)\n\nList information about a script's executed processes, such as process type and current status.\n\n### HTTP request\n\n`GET https://script.googleapis.com/v1/processes:listScriptProcesses`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Query parameters\n\n| Parameters ||\n|-----------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `scriptId` | `string` The script ID of the project whose processes are listed. |\n| `scriptProcessFilter` | `object (`[ListScriptProcessesFilter](/apps-script/api/reference/rest/v1/processes/listScriptProcesses#ListScriptProcessesFilter)`)` A filter used to limit the list results; only processes matching the filter criteria are returned. |\n| `pageSize` | `integer` The maximum number of returned processes per page of results. Defaults to 50. |\n| `pageToken` | `string` The token for continuing a previous list request on the next page. This should be set to the value of `nextPageToken` from a previous response. |\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nIf successful, the response body contains data with the following structure:\nResponse with the list of [Process](/apps-script/api/reference/rest/v1/processes#Process) resources.\n\n| JSON representation |\n|-------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"processes\": [ { object (/apps-script/api/reference/rest/v1/processes#Process) } ], \"nextPageToken\": string } ``` |\n\n| Fields ||\n|-----------------|-----------------------------------------------------------------------------------------------------------------------------|\n| `processes[]` | `object (`[Process](/apps-script/api/reference/rest/v1/processes#Process)`)` List of processes matching request parameters. |\n| `nextPageToken` | `string` Token for the next page of results. If empty, there are no more pages remaining. |\n\n### Authorization Scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/script.processes`\n\nFor more information, see the [OAuth 2.0 Overview](https://developers.google.com/identity/protocols/OAuth2).\n\nListScriptProcessesFilter\n-------------------------\n\nFilter used to further specify which processes to list. Only processes that match all the specified conditions are returned.\n\n| JSON representation |\n|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"deploymentId\": string, \"functionName\": string, \"startTime\": string, \"endTime\": string, \"types\": [ enum (/apps-script/api/reference/rest/v1/processes#ProcessType) ], \"statuses\": [ enum (/apps-script/api/reference/rest/v1/processes#ProcessStatus) ], \"userAccessLevels\": [ enum (/apps-script/api/reference/rest/v1/processes#UserAccessLevel) ] } ``` |\n\n| Fields ||\n|----------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `deploymentId` | `string` Optional field used to limit returned processes to those originating from projects with a specific deployment ID. |\n| `functionName` | `string` Optional field used to limit returned processes to those originating from a script function with the given function name. |\n| `startTime` | `string (`[Timestamp](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.Timestamp)` format)` Optional field used to limit returned processes to those that were started on or after the given timestamp. 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| `endTime` | `string (`[Timestamp](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.Timestamp)` format)` Optional field used to limit returned processes to those that completed on or before the given timestamp. 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| `types[]` | `enum (`[ProcessType](/apps-script/api/reference/rest/v1/processes#ProcessType)`)` Optional field used to limit returned processes to those having one of the specified process types. |\n| `statuses[]` | `enum (`[ProcessStatus](/apps-script/api/reference/rest/v1/processes#ProcessStatus)`)` Optional field used to limit returned processes to those having one of the specified process statuses. |\n| `userAccessLevels[]` | `enum (`[UserAccessLevel](/apps-script/api/reference/rest/v1/processes#UserAccessLevel)`)` Optional field used to limit returned processes to those having one of the specified user access levels. |"]]