Google Tasks API
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
借助 Google Tasks API,您可以管理任务和任务列表。
服务:tasks.googleapis.com
如要调用此服务,我们建议您使用 Google 提供的客户端库。如果您的应用需要使用您自己的库来调用此服务,则在发出 API 请求时应使用以下信息。
发现文档
发现文档是用于说明和使用 REST API 的机器可读规范。它用于构建客户端库、IDE 插件以及与 Google API 交互的其他工具。一项服务可能会提供多个发现文档。此服务提供了以下发现文档:
服务端点
服务端点是指定 API 服务的网络地址的基本网址。一项服务可能有多个服务端点。此服务具有以下服务端点,下面的所有 URI 都与此服务端点相关:
https://tasks.googleapis.com
方法 |
delete |
DELETE /tasks/v1/users/@me/lists/{tasklist}
删除已通过身份验证的用户的指定任务列表。 |
get |
GET /tasks/v1/users/@me/lists/{tasklist}
返回已通过身份验证的用户的指定任务列表。 |
insert |
POST /tasks/v1/users/@me/lists
创建新的任务列表,并将其添加到已验证用户的任务列表中。 |
list |
GET /tasks/v1/users/@me/lists
返回经过身份验证的用户的所有任务列表。 |
patch |
PATCH /tasks/v1/users/@me/lists/{tasklist}
更新经过身份验证的用户的指定任务列表。 |
update |
PUT /tasks/v1/users/@me/lists/{tasklist} 更新经过身份验证的用户的指定任务列表。 |
方法 |
clear |
POST /tasks/v1/lists/{tasklist}/clear cleared 会从指定任务列表中清除所有已完成的任务。 |
delete |
DELETE /tasks/v1/lists/{tasklist}/tasks/{task} 从任务列表中删除指定的任务。 |
get |
GET /tasks/v1/lists/{tasklist}/tasks/{task}
返回指定的任务。 |
insert |
POST /tasks/v1/lists/{tasklist}/tasks
在指定的任务列表中创建新任务。 |
list |
GET /tasks/v1/lists/{tasklist}/tasks 返回指定任务列表中的所有任务。 |
move |
POST /tasks/v1/lists/{tasklist}/tasks/{task}/move
将指定任务移至目标任务列表中的另一个位置。 |
patch |
PATCH /tasks/v1/lists/{tasklist}/tasks/{task} 更新指定的任务。 |
update |
PUT /tasks/v1/lists/{tasklist}/tasks/{task} 更新指定的任务。 |
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-25。
[null,null,["最后更新时间 (UTC):2025-07-25。"],[],[],null,["# Google Tasks API\n\nThe Google Tasks API lets you manage your tasks and task lists.\n\n- [REST Resource: tasklists](#tasklists)\n- [REST Resource: tasks](#tasks)\n\nService: tasks.googleapis.com\n-----------------------------\n\nTo call this service, we recommend that you use the Google-provided [client libraries](https://cloud.google.com/apis/docs/client-libraries-explained). If your application needs to use your own libraries to call this service, use the following information when you make the API requests.\n\n### Discovery document\n\nA [Discovery Document](https://developers.google.com/discovery/v1/reference/apis) is a machine-readable specification for describing and consuming REST APIs. It is used to build client libraries, IDE plugins, and other tools that interact with Google APIs. One service may provide multiple discovery documents. This service provides the following discovery document:\n\n- \u003chttps://www.googleapis.com/discovery/v1/apis/tasks/v1/rest\u003e\n\n### Service endpoint\n\nA [service endpoint](https://cloud.google.com/apis/design/glossary#api_service_endpoint) is a base URL that specifies the network address of an API service. One service might have multiple service endpoints. This service has the following service endpoint and all URIs below are relative to this service endpoint:\n\n- `https://tasks.googleapis.com`\n\nREST Resource: [tasklists](/workspace/tasks/reference/rest/v1/tasklists)\n------------------------------------------------------------------------\n\n| Methods ||\n|---------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------|\n| [delete](/workspace/tasks/reference/rest/v1/tasklists/delete) | `DELETE /tasks/v1/users/@me/lists/{tasklist}` Deletes the authenticated user's specified task list. |\n| [get](/workspace/tasks/reference/rest/v1/tasklists/get) | `GET /tasks/v1/users/@me/lists/{tasklist}` Returns the authenticated user's specified task list. |\n| [insert](/workspace/tasks/reference/rest/v1/tasklists/insert) | `POST /tasks/v1/users/@me/lists` Creates a new task list and adds it to the authenticated user's task lists. |\n| [list](/workspace/tasks/reference/rest/v1/tasklists/list) | `GET /tasks/v1/users/@me/lists` Returns all the authenticated user's task lists. |\n| [patch](/workspace/tasks/reference/rest/v1/tasklists/patch) | `PATCH /tasks/v1/users/@me/lists/{tasklist}` Updates the authenticated user's specified task list. |\n| [update](/workspace/tasks/reference/rest/v1/tasklists/update) | `PUT /tasks/v1/users/@me/lists/{tasklist}` Updates the authenticated user's specified task list. |\n\nREST Resource: [tasks](/workspace/tasks/reference/rest/v1/tasks)\n----------------------------------------------------------------\n\n| Methods ||\n|-----------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------|\n| [clear](/workspace/tasks/reference/rest/v1/tasks/clear) | `POST /tasks/v1/lists/{tasklist}/clear` Clears all completed tasks from the specified task list. |\n| [delete](/workspace/tasks/reference/rest/v1/tasks/delete) | `DELETE /tasks/v1/lists/{tasklist}/tasks/{task}` Deletes the specified task from the task list. |\n| [get](/workspace/tasks/reference/rest/v1/tasks/get) | `GET /tasks/v1/lists/{tasklist}/tasks/{task}` Returns the specified task. |\n| [insert](/workspace/tasks/reference/rest/v1/tasks/insert) | `POST /tasks/v1/lists/{tasklist}/tasks` Creates a new task on the specified task list. |\n| [list](/workspace/tasks/reference/rest/v1/tasks/list) | `GET /tasks/v1/lists/{tasklist}/tasks` Returns all tasks in the specified task list. |\n| [move](/workspace/tasks/reference/rest/v1/tasks/move) | `POST /tasks/v1/lists/{tasklist}/tasks/{task}/move` Moves the specified task to another position in the destination task list. |\n| [patch](/workspace/tasks/reference/rest/v1/tasks/patch) | `PATCH /tasks/v1/lists/{tasklist}/tasks/{task}` Updates the specified task. |\n| [update](/workspace/tasks/reference/rest/v1/tasks/update) | `PUT /tasks/v1/lists/{tasklist}/tasks/{task}` Updates the specified task. |"]]