對話動作已於 2023 年 6 月 13 日淘汰。詳情請參閱「
對話動作已淘汰」。
Method: sampleProjects.list
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
列出 gactions CLI 支援的所有範例專案。
HTTP 要求
GET https://actions.googleapis.com/v2/sampleProjects
這個網址使用 gRPC 轉碼語法。
查詢參數
參數 |
pageSize |
integer
選用設定。要傳回的範例專案數量上限。服務傳回的產品數量可能會少於這個值。如未指定,最多會傳回 1000 個範例專案。系統會將超過 1,000 個值強制轉換為 1000。
|
pageToken |
string
選用設定。從先前的「sampleProjects.list」接收到的網頁權杖呼叫。提供此項目即可擷取後續網頁。
|
回應主體
如果成功,回應主體會含有以下結構的資料:
sampleProjects.list 的遠端程序呼叫 (RPC) 回應。
JSON 表示法 |
{
"sampleProjects": [
{
object (SampleProject )
}
],
"nextPageToken": string
} |
欄位 |
sampleProjects[] |
object (SampleProject )
支援的範例專案清單。
|
nextPageToken |
string
可做為 pageToken 傳送的權杖,用於擷取後續網頁。如果省略這個欄位,就不會有後續頁面。
|
SampleProject
JSON 表示法 |
{
"name": string,
"hostedUrl": string,
"description": string
} |
欄位 |
name |
string
範例專案名稱。格式:sampleProjects/{sample_project}
|
hostedUrl |
string
代管樣本的 ZIP 檔案網址。
|
description |
string
範例專案的說明。
|
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-07-26 (世界標準時間)。
[null,null,["上次更新時間:2025-07-26 (世界標準時間)。"],[[["\u003cp\u003eThis document outlines the API for listing sample projects supported by the gactions CLI, using a GET request to the specified endpoint.\u003c/p\u003e\n"],["\u003cp\u003eUsers can paginate results by specifying \u003ccode\u003epageSize\u003c/code\u003e and \u003ccode\u003epageToken\u003c/code\u003e query parameters for managing result sets.\u003c/p\u003e\n"],["\u003cp\u003eThe response includes a list of \u003ccode\u003esampleProjects\u003c/code\u003e, each containing a name, hosted URL for the project zip file, and a description.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eSampleProjects\u003c/code\u003e are identified by a unique name in the format \u003ccode\u003esampleProjects/{sample_project}\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["# Method: sampleProjects.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.ListSampleProjectsResponse.SCHEMA_REPRESENTATION)\n- [SampleProject](#SampleProject)\n - [JSON representation](#SampleProject.SCHEMA_REPRESENTATION)\n\nLists all the sample projects supported by the gactions CLI.\n\n### HTTP request\n\n`GET https://actions.googleapis.com/v2/sampleProjects`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Query parameters\n\n| Parameters ||\n|-------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `pageSize` | `integer` Optional. The maximum number of sample projects to return. The service may return fewer than this value. If unspecified, at most 1000 sample projects will be returned. Values above 1000 will be coerced to 1000. |\n| `pageToken` | `string` Optional. A page token, received from a previous 'sampleProjects.list' call. Provide this to retrieve the subsequent page. |\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 sampleProjects.list.\n\n| JSON representation ||\n|----------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| ``` { \"sampleProjects\": [ { object (/assistant/actions/api/reference/rest/v2/sampleProjects/list#SampleProject) } ], \"nextPageToken\": string } ``` |\n\n| Fields ||\n|--------------------|-------------------------------------------------------------------------------------------------------------------------------------------------|\n| `sampleProjects[]` | `object (`[SampleProject](/assistant/actions/api/reference/rest/v2/sampleProjects/list#SampleProject)`)` The list of sample projects supported. |\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. |\n\nSampleProject\n-------------\n\nDefinition of sample project resource.\n\n| JSON representation ||\n|------------------------------------------------------------------------|---|\n| ``` { \"name\": string, \"hostedUrl\": string, \"description\": string } ``` |\n\n| Fields ||\n|---------------|------------------------------------------------------------------------------------|\n| `name` | `string` The name of the sample project. Format: `sampleProjects/{sample_project}` |\n| `hostedUrl` | `string` The URL to the zip file where the sample is hosted. |\n| `description` | `string` The description of the sample project. |"]]