Method: processes.list
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
列出由用户或代表用户执行的进程的相关信息,例如进程类型和当前状态。
HTTP 请求
GET https://script.googleapis.com/v1/processes
网址采用 gRPC 转码语法。
查询参数
参数 |
userProcessFilter |
object (ListUserProcessesFilter )
用于限制列表结果的过滤条件;仅返回与过滤条件匹配的进程。
|
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 概览。
ListUserProcessesFilter
用于进一步指定要列出的进程的过滤器。仅返回符合所有指定条件的进程。
JSON 表示法 |
{
"scriptId": string,
"deploymentId": string,
"projectName": string,
"functionName": string,
"startTime": string,
"endTime": string,
"types": [
enum (ProcessType )
],
"statuses": [
enum (ProcessStatus )
],
"userAccessLevels": [
enum (UserAccessLevel )
]
} |
字段 |
scriptId |
string
可选字段,用于将返回的进程限制为源自具有特定脚本 ID 的项目的进程。
|
deploymentId |
string
可选字段,用于将返回的进程限制为源自具有特定部署 ID 的项目的进程。
|
projectName |
string
可选字段,用于将返回的进程限制为源自项目名称包含特定字符串的项目的进程。
|
functionName |
string
可选字段,用于将返回的进程限制为源自具有指定函数名称的脚本函数的进程。
|
startTime |
string (Timestamp format)
可选字段,用于将返回的进程限制为在指定时间戳或之后启动的进程。 时间戳采用 RFC3339 世界协调时间(UTC,即“祖鲁时”)格式,精确到纳秒,最多九个小数位。示例:"2014-10-02T15:01:23Z" 和 "2014-10-02T15:01:23.045123456Z" 。
|
endTime |
string (Timestamp format)
可选字段,用于将返回的进程限制为在指定时间戳或之前完成的进程。 时间戳采用 RFC3339 世界协调时间(UTC,即“祖鲁时”)格式,精确到纳秒,最多九个小数位。示例:"2014-10-02T15:01:23Z" 和 "2014-10-02T15:01:23.045123456Z" 。
|
types[] |
enum (ProcessType )
可选字段,用于将返回的进程限制为具有指定进程类型之一的进程。
|
statuses[] |
enum (ProcessStatus )
可选字段,用于将返回的进程限制为具有指定进程状态之一的进程。
|
userAccessLevels[] |
enum (UserAccessLevel )
可选字段,用于将返回的进程限制为具有指定用户访问权限级别之一的进程。
|
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-26。
[null,null,["最后更新时间 (UTC):2025-07-26。"],[[["\u003cp\u003eLists processes created by or for a user, including details like process type and status.\u003c/p\u003e\n"],["\u003cp\u003eUses the \u003ccode\u003eGET https://script.googleapis.com/v1/processes\u003c/code\u003e HTTP request, allowing filtering by various criteria such as script ID, deployment ID, and time range.\u003c/p\u003e\n"],["\u003cp\u003eResponses include a list of processes and a token for retrieving further pages of results if available.\u003c/p\u003e\n"],["\u003cp\u003eRequires authorization with the \u003ccode\u003ehttps://www.googleapis.com/auth/script.processes\u003c/code\u003e OAuth scope.\u003c/p\u003e\n"]]],[],null,["# Method: processes.list\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.ListUserProcessesResponse.SCHEMA_REPRESENTATION)\n- [Authorization Scopes](#body.aspect)\n- [ListUserProcessesFilter](#ListUserProcessesFilter)\n - [JSON representation](#ListUserProcessesFilter.SCHEMA_REPRESENTATION)\n- [Try it!](#try-it)\n\nList information about processes made by or on behalf of a user, such as process type and current status.\n\n### HTTP request\n\n`GET https://script.googleapis.com/v1/processes`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Query parameters\n\n| Parameters ||\n|---------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `userProcessFilter` | `object (`[ListUserProcessesFilter](/apps-script/api/reference/rest/v1/processes/list#ListUserProcessesFilter)`)` 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\nListUserProcessesFilter\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| ``` { \"scriptId\": string, \"deploymentId\": string, \"projectName\": 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| `scriptId` | `string` Optional field used to limit returned processes to those originating from projects with a specific script ID. |\n| `deploymentId` | `string` Optional field used to limit returned processes to those originating from projects with a specific deployment ID. |\n| `projectName` | `string` Optional field used to limit returned processes to those originating from projects with project names containing a specific string. |\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. |"]]