Method: processes.listScriptProcesses
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Liệt kê thông tin về các quy trình đã thực thi của một tập lệnh, chẳng hạn như loại quy trình và trạng thái hiện tại.
Yêu cầu HTTP
GET https://script.googleapis.com/v1/processes:listScriptProcesses
URL sử dụng cú pháp Chuyển mã gRPC.
Tham số truy vấn
Tham số |
scriptId |
string
Mã tập lệnh của dự án có quy trình được liệt kê.
|
scriptProcessFilter |
object (ListScriptProcessesFilter )
Một bộ lọc dùng để giới hạn kết quả dạng danh sách; chỉ những quy trình phù hợp với tiêu chí lọc mới được trả về.
|
pageSize |
integer
Số quy trình tối đa được trả về trên mỗi trang kết quả. Giá trị mặc định là 50.
|
pageToken |
string
Mã thông báo để tiếp tục yêu cầu danh sách trước đó trên trang tiếp theo. Bạn phải đặt thuộc tính này thành giá trị nextPageToken trong câu trả lời trước đó.
|
Nội dung yêu cầu
Nội dung yêu cầu phải trống.
Nội dung phản hồi
Nếu thành công, phần nội dung phản hồi sẽ chứa dữ liệu có cấu trúc sau:
Phản hồi có danh sách các tài nguyên Process
.
Biểu diễn dưới dạng JSON |
{
"processes": [
{
object (Process )
}
],
"nextPageToken": string
} |
Trường |
processes[] |
object (Process )
Danh sách các quy trình khớp với tham số yêu cầu.
|
nextPageToken |
string
Mã thông báo cho trang kết quả tiếp theo. Nếu trống thì không còn trang nào nữa.
|
Phạm vi cấp phép
Yêu cầu phạm vi OAuth sau:
https://www.googleapis.com/auth/script.processes
Để biết thêm thông tin, hãy xem bài viết Tổng quan về OAuth 2.0.
ListScriptProcessesFilter
Bộ lọc được dùng để chỉ định thêm những quy trình cần liệt kê. Chỉ những quy trình phù hợp với tất cả các điều kiện được chỉ định mới được trả về.
Biểu diễn dưới dạng JSON |
{
"deploymentId": string,
"functionName": string,
"startTime": string,
"endTime": string,
"types": [
enum (ProcessType )
],
"statuses": [
enum (ProcessStatus )
],
"userAccessLevels": [
enum (UserAccessLevel )
]
} |
Trường |
deploymentId |
string
Trường không bắt buộc dùng để giới hạn các quy trình được trả về từ những dự án có mã triển khai cụ thể.
|
functionName |
string
Trường không bắt buộc dùng để giới hạn các quy trình được trả về từ những quy trình bắt nguồn từ một hàm tập lệnh có tên hàm đã cho.
|
startTime |
string (Timestamp format)
Trường không bắt buộc dùng để giới hạn các quy trình được trả về ở những quy trình bắt đầu vào hoặc sau dấu thời gian cụ thể. Dấu thời gian theo múi giờ "Zulu" RFC3339 (giờ UTC) với độ phân giải nano giây và lên đến 9 chữ số phân số. Ví dụ: "2014-10-02T15:01:23Z" và "2014-10-02T15:01:23.045123456Z" .
|
endTime |
string (Timestamp format)
Trường không bắt buộc dùng để giới hạn những quy trình được trả về thành những quy trình đã hoàn tất vào hoặc trước dấu thời gian đã cho. Dấu thời gian theo múi giờ "Zulu" RFC3339 (giờ UTC) với độ phân giải nano giây và lên đến 9 chữ số phân số. Ví dụ: "2014-10-02T15:01:23Z" và "2014-10-02T15:01:23.045123456Z" .
|
types[] |
enum (ProcessType )
Trường không bắt buộc dùng để giới hạn các quy trình được trả về ở những quy trình có một trong các loại quy trình được chỉ định.
|
statuses[] |
enum (ProcessStatus )
Trường không bắt buộc dùng để giới hạn các quy trình được trả về ở những quy trình có một trong các trạng thái quy trình được chỉ định.
|
userAccessLevels[] |
enum (UserAccessLevel )
Trường không bắt buộc dùng để giới hạn các quy trình được trả về ở những quy trình có một trong những cấp truy cập của người dùng được chỉ định.
|
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2025-07-26 UTC.
[null,null,["Cập nhật lần gần đây nhất: 2025-07-26 UTC."],[[["\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. |"]]