對話動作已於 2023 年 6 月 13 日淘汰。詳情請參閱「
對話動作已淘汰」。
Method: projects.versions.list
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
HTTP 要求
GET https://actions.googleapis.com/v2/{parent=projects/*}/versions
這個網址使用 gRPC 轉碼語法。
路徑參數
參數 |
parent |
string
必要欄位。資源名稱,格式為 projects/{project} 。{project} 是與專案相關聯的雲端專案 ID。
|
查詢參數
參數 |
pageSize |
integer
要傳回的版本數量上限。服務傳回的產品數量可能會少於這個值。如未指定,最多將傳回 50 個版本。
|
pageToken |
string
屬於接收自前一個 versions.list 呼叫的網頁權杖。提供此項目即可擷取後續網頁。進行分頁時,提供至 versions.list 的所有其他參數須與提供網頁權杖的呼叫相符。
|
回應主體
如果成功,回應主體會含有以下結構的資料:
JSON 表示法 |
{
"versions": [
{
object (Version )
}
],
"nextPageToken": string
} |
欄位 |
versions[] |
object (Version )
指定專案 ID 的版本清單。
|
nextPageToken |
string
可做為 pageToken 傳送的權杖,用於擷取後續網頁。如果省略這個欄位,就不會有後續頁面。
|
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-07-26 (世界標準時間)。
[null,null,["上次更新時間:2025-07-26 (世界標準時間)。"],[[["\u003cp\u003eLists all versions and their current states for a given project.\u003c/p\u003e\n"],["\u003cp\u003eAllows for pagination to retrieve large lists of versions.\u003c/p\u003e\n"],["\u003cp\u003eRequires an empty request body and provides a structured JSON response containing version details and a potential next-page token.\u003c/p\u003e\n"],["\u003cp\u003eUses gRPC Transcoding for URL structure and expects the project ID as a path parameter.\u003c/p\u003e\n"]]],["This document details how to list versions for a project using an HTTP GET request. The request URL uses gRPC Transcoding syntax and requires a `parent` path parameter in the format `projects/{project}`. Optional query parameters `pageSize` and `pageToken` control pagination. The request body must be empty. The response body, if successful, contains an array of `versions` and a `nextPageToken` for pagination. The `nextPageToken` if omitted indicates there are no more pages.\n"],null,["# Method: projects.versions.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.ListVersionsResponse.SCHEMA_REPRESENTATION)\n\nLists all versions and their current states.\n\n### HTTP request\n\n`GET https://actions.googleapis.com/v2/{parent=projects/*}/versions`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|----------|------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `parent` | `string` Required. The name of the resource in the format `projects/{project}`. The `{project}` is the cloud project ID associated with the project. |\n\n### Query parameters\n\n| Parameters ||\n|-------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `pageSize` | `integer` The maximum number of versions to return. The service may return fewer than this value. If unspecified, at most 50 versions will be returned. |\n| `pageToken` | `string` A page token, received from a previous `versions.list` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `versions.list` must match the call that provided the page token. |\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:\nRPC response for listing versions\n\n| JSON representation ||\n|--------------------------------------------------------------------------------------------------------------------|---|\n| ``` { \"versions\": [ { object (/assistant/actions/api/reference/rest/v2/Version) } ], \"nextPageToken\": string } ``` |\n\n| Fields ||\n|-----------------|----------------------------------------------------------------------------------------------------------------------------------------|\n| `versions[]` | `object (`[Version](/assistant/actions/api/reference/rest/v2/Version)`)` List of the versions for the given project id. |\n| `nextPageToken` | `string` A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted, there are no subsequent pages. |"]]