Method: providers.tasks.list
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
HTTP 请求
GET https://fleetengine.googleapis.com/v1/{parent=providers/*}/tasks
网址采用 gRPC 转码语法。
路径参数
参数 |
parent |
string
必需。必须采用 providers/{provider} 格式。provider 必须是 Google Cloud 项目 ID。例如 sample-cloud-project 。
|
查询参数
参数 |
header |
object (DeliveryRequestHeader )
可选。标准 Delivery API 请求标头。
|
pageSize |
integer
可选。要返回的最大任务数。服务返回的值可能小于此值。如果您未指定此值,则服务器会确定要返回的结果数。
|
pageToken |
string
可选。从上一次 tasks.list 调用收到的页面令牌。您可以提供此令牌以检索后续页面。 进行分页时,提供给 tasks.list 的所有其他参数必须与提供页面令牌的调用匹配。
|
filter |
string
可选。列出任务时要应用的过滤条件查询。如需查看过滤器语法的示例,请参阅 http://aip.dev/160。如果未指定值,或过滤空字符串,则会返回所有任务。如需了解可过滤的任务属性,请参阅列出任务。
|
响应正文
tasks.list
响应,包含符合 ListTasksRequest
中的过滤条件的一组任务。
如果成功,响应正文将包含结构如下的数据:
JSON 表示法 |
{
"tasks": [
{
object (Task )
}
],
"nextPageToken": string,
"totalSize": string
} |
字段 |
tasks[] |
object (Task )
满足所请求过滤条件的一组任务。如果未指定过滤条件,请求会返回所有任务。成功的响应也可以为空。空响应表示未找到符合请求的过滤条件的任务。
|
nextPageToken |
string
在 ListTasksRequest 中传递此令牌以继续列出结果。如果返回所有结果,则此字段可能为空字符串,或者它不会出现在响应中。
|
totalSize |
string (int64 format)
所有页面中符合请求条件的任务总数。
|
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-08-31。
[null,null,["最后更新时间 (UTC):2025-08-31。"],[[["\u003cp\u003eRetrieves all \u003ccode\u003eTask\u003c/code\u003es that meet specified filtering criteria using a \u003ccode\u003eGET\u003c/code\u003e request.\u003c/p\u003e\n"],["\u003cp\u003eAllows filtering by various parameters such as \u003ccode\u003eheader\u003c/code\u003e, \u003ccode\u003epageSize\u003c/code\u003e, \u003ccode\u003epageToken\u003c/code\u003e, and \u003ccode\u003efilter\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eRequest body should be empty, with response containing a list of \u003ccode\u003eTask\u003c/code\u003e objects, \u003ccode\u003enextPageToken\u003c/code\u003e, and \u003ccode\u003etotalSize\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eUses gRPC Transcoding syntax for the request URL, with \u003ccode\u003eparent\u003c/code\u003e path parameter specifying the provider.\u003c/p\u003e\n"],["\u003cp\u003eIf successful, response includes an array of \u003ccode\u003eTask\u003c/code\u003e objects matching the filter, potentially empty if no tasks match.\u003c/p\u003e\n"]]],["This document details how to retrieve a list of `Task` resources using a `GET` request to the Fleet Engine API. The request URL requires a `parent` path parameter specifying the provider. Optional query parameters include `header`, `pageSize`, `pageToken`, and `filter` to refine the results. The request body must be empty. A successful response contains an array of `Task` objects, a `nextPageToken` for pagination, and `totalSize` indicating the total number of tasks.\n"],null,["# Method: providers.tasks.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.ListTasksResponse.SCHEMA_REPRESENTATION)\n\nGets all `Task`s that meet the specified filtering criteria.\n\n### HTTP request\n\n`GET https://fleetengine.googleapis.com/v1/{parent=providers/*}/tasks`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|----------|-----------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `parent` | `string` Required. Must be in the format `providers/{provider}`. The `provider` must be the Google Cloud Project ID. For example, `sample-cloud-project`. |\n\n### Query parameters\n\n| Parameters ||\n|-------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `header` | `object (`[DeliveryRequestHeader](/maps/documentation/mobility/fleet-engine/reference/tasks/rest/v1/DeliveryRequestHeader)`)` Optional. The standard Delivery API request header. |\n| `pageSize` | `integer` Optional. The maximum number of Tasks to return. The service may return fewer than this value. If you don't specify this value, then the server determines the number of results to return. |\n| `pageToken` | `string` Optional. A page token received from a previous `tasks.list` call. You can provide this to retrieve the subsequent page. When paginating, all other parameters provided to `tasks.list` must match the call that provided the page token. |\n| `filter` | `string` Optional. A filter query to apply when listing Tasks. See \u003chttp://aip.dev/160\u003e for examples of filter syntax. If you don't specify a value, or if you filter on an empty string, then all Tasks are returned. For information about the Task properties that you can filter on, see [List tasks](https://developers.google.com/maps/documentation/mobility/fleet-engine/journeys/tasks/find-tasks#filter_listed_tasks). |\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nThe `tasks.list` response that contains the set of Tasks that meet the filter criteria in the `ListTasksRequest`.\n\nIf successful, the response body contains data with the following structure:\n\n| JSON representation |\n|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"tasks\": [ { object (/maps/documentation/mobility/fleet-engine/reference/tasks/rest/v1/providers.tasks#Task) } ], \"nextPageToken\": string, \"totalSize\": string } ``` |\n\n| Fields ||\n|-----------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `tasks[]` | `object (`[Task](/maps/documentation/mobility/fleet-engine/reference/tasks/rest/v1/providers.tasks#Task)`)` The set of Tasks that meet the requested filtering criteria. When no filter is specified, the request returns all tasks. A successful response can also be empty. An empty response indicates that no Tasks were found meeting the requested filter criteria. |\n| `nextPageToken` | `string` Pass this token in the `ListTasksRequest` to continue to list results. If all results have been returned, then this field is either an empty string, or it doesn't appear in the response. |\n| `totalSize` | `string (`[int64](https://developers.google.com/discovery/v1/type-format)` format)` The total number of Tasks that match the request criteria, across all pages. |"]]