Method: projects.deployments.list
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ê các lần triển khai một dự án Apps Script.
Yêu cầu HTTP
GET https://script.googleapis.com/v1/projects/{scriptId}/deployments
URL sử dụng cú pháp Chuyển mã gRPC.
Tham số đường dẫn
Tham số |
scriptId |
string
Mã Drive của dự án tập lệnh.
|
Tham số truy vấn
Tham số |
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 đó.
|
pageSize |
integer
Số lượt triển khai tối đa trên mỗi trang được trả về. Giá trị mặc định là 50.
|
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 kèm theo danh sách các phiên bản triển khai cho dự án Apps Script đã chỉ định.
Biểu diễn dưới dạng JSON |
{
"deployments": [
{
object (Deployment )
}
],
"nextPageToken": string
} |
Trường |
deployments[] |
object (Deployment )
Danh sách các đợt triển khai.
|
nextPageToken |
string
Mã thông báo có thể được dùng trong lệnh gọi tiếp theo để nhận trang kết quả tiếp theo.
|
Phạm vi cấp phép
Yêu cầu một trong các phạm vi OAuth sau:
https://www.googleapis.com/auth/script.deployments
https://www.googleapis.com/auth/script.deployments.readonly
Để biết thêm thông tin, hãy xem bài viết Tổng quan về OAuth 2.0.
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\u003eThis endpoint lists the deployments of an Apps Script project using an HTTP GET request.\u003c/p\u003e\n"],["\u003cp\u003eYou need to provide the \u003ccode\u003escriptId\u003c/code\u003e as a path parameter to identify the project.\u003c/p\u003e\n"],["\u003cp\u003eThe response includes a list of deployments and a token for pagination if there are more results.\u003c/p\u003e\n"],["\u003cp\u003eAuthorization is required using specific OAuth scopes related to script deployments.\u003c/p\u003e\n"]]],[],null,["# Method: projects.deployments.list\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Query parameters](#body.QUERY_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n - [JSON representation](#body.ListDeploymentsResponse.SCHEMA_REPRESENTATION)\n- [Authorization Scopes](#body.aspect)\n- [Try it!](#try-it)\n\nLists the deployments of an Apps Script project.\n\n### HTTP request\n\n`GET https://script.googleapis.com/v1/projects/{scriptId}/deployments`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|------------|-----------------------------------------|\n| `scriptId` | `string` The script project's Drive ID. |\n\n### Query parameters\n\n| Parameters ||\n|-------------|----------------------------------------------------------------------------------------------------------------------------------------------------------|\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| `pageSize` | `integer` The maximum number of deployments on each returned page. Defaults to 50. |\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 deployments for the specified Apps Script project.\n\n| JSON representation |\n|-----------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"deployments\": [ { object (/apps-script/api/reference/rest/v1/projects.deployments#Deployment) } ], \"nextPageToken\": string } ``` |\n\n| Fields ||\n|-----------------|------------------------------------------------------------------------------------------------------------------------|\n| `deployments[]` | `object (`[Deployment](/apps-script/api/reference/rest/v1/projects.deployments#Deployment)`)` The list of deployments. |\n| `nextPageToken` | `string` The token that can be used in the next call to get the next page of results. |\n\n### Authorization Scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/script.deployments`\n- `https://www.googleapis.com/auth/script.deployments.readonly`\n\nFor more information, see the [OAuth 2.0 Overview](https://developers.google.com/identity/protocols/OAuth2)."]]