Method: providers.tasks.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.
Lấy tất cả Task
đáp ứng tiêu chí lọc đã chỉ định.
Yêu cầu HTTP
GET https://fleetengine.googleapis.com/v1/{parent=providers/*}/tasks
URL sử dụng cú pháp Chuyển mã gRPC.
Tham số đường dẫn
Tham số |
parent |
string
Bắt buộc. Phải ở định dạng providers/{provider} . provider phải là mã dự án trên Google Cloud. Ví dụ: sample-cloud-project .
|
Tham số truy vấn
Tham số |
header |
object (DeliveryRequestHeader )
Không bắt buộc. Tiêu đề của yêu cầu API phân phối chuẩn.
|
pageSize |
integer
Không bắt buộc. Số lượng Tác vụ tối đa cần trả về. Dịch vụ có thể trả về ít hơn giá trị này. Nếu bạn không chỉ định giá trị này thì máy chủ sẽ xác định số lượng kết quả cần trả về.
|
pageToken |
string
Không bắt buộc. Đã nhận được mã thông báo trang từ lệnh gọi tasks.list trước đó. Bạn có thể cung cấp URL này để truy xuất trang tiếp theo. Khi phân trang, tất cả các tham số khác được cung cấp cho tasks.list phải khớp với lệnh gọi đã cung cấp mã thông báo trang.
|
filter |
string
Không bắt buộc. Một truy vấn lọc để áp dụng khi liệt kê Tasks. Hãy xem http://aip.dev/160 để biết ví dụ về cú pháp bộ lọc. Nếu bạn không chỉ định giá trị hoặc nếu bạn lọc trên một chuỗi trống, thì tất cả Tác vụ đều được trả về. Để biết thông tin về các thuộc tính Việc cần làm mà bạn có thể lọc, hãy xem bài viết Liệt kê việc cần làm.
|
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
Phản hồi tasks.list
chứa nhóm Việc cần làm đáp ứng các tiêu chí lọc trong ListTasksRequest
.
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:
Biểu diễn dưới dạng JSON |
{
"tasks": [
{
object (Task )
}
],
"nextPageToken": string,
"totalSize": string
} |
Trường |
tasks[] |
object (Task )
Nhóm Tasks đáp ứng các tiêu chí lọc được yêu cầu. Khi không có bộ lọc nào được chỉ định, yêu cầu sẽ trả về tất cả tác vụ. Bạn cũng có thể để trống một phản hồi thành công. Phản hồi trống cho biết không tìm thấy Tasks nào đáp ứng tiêu chí lọc được yêu cầu.
|
nextPageToken |
string
Truyền mã thông báo này vào ListTasksRequest để tiếp tục liệt kê kết quả. Nếu tất cả kết quả đều đã được trả về, thì trường này hoặc là một chuỗi trống hoặc không xuất hiện trong phản hồi.
|
totalSize |
string (int64 format)
Tổng số việc cần làm phù hợp với tiêu chí của yêu cầu trên tất cả các trang.
|
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-08-31 UTC.
[null,null,["Cập nhật lần gần đây nhất: 2025-08-31 UTC."],[[["\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. |"]]