Google Tasks
Lightweight, dependency-free in-process fake of the Google Tasks API v1 for testing googleapis clients with zero external calls.
Default port: 4626
Implemented Operations
Task lists:
GET /tasks/v1/users/@me/lists- list task lists, withmaxResultsandpageTokenPOST /tasks/v1/users/@me/lists- insert a task listGET /tasks/v1/users/@me/lists/{tasklist}- get a task listPATCH /tasks/v1/users/@me/lists/{tasklist}- patch a task listPUT /tasks/v1/users/@me/lists/{tasklist}- update a task listDELETE /tasks/v1/users/@me/lists/{tasklist}- delete a task list
Tasks:
GET /tasks/v1/lists/{tasklist}/tasks- list tasks, withcompletedMin,completedMax,dueMin,dueMax,maxResults,pageToken,showCompleted,showDeleted,showHidden, andupdatedMinPOST /tasks/v1/lists/{tasklist}/tasks- insert a task, with optionalparentandpreviousGET /tasks/v1/lists/{tasklist}/tasks/{task}- get a taskPATCH /tasks/v1/lists/{tasklist}/tasks/{task}- patch a taskPUT /tasks/v1/lists/{tasklist}/tasks/{task}- update a taskDELETE /tasks/v1/lists/{tasklist}/tasks/{task}- delete a taskPOST /tasks/v1/lists/{tasklist}/tasks/{task}/move- move a task, with optionalparentandpreviousPOST /tasks/v1/lists/{tasklist}/tasks/clear- hide completed tasks in a list
Parlel control endpoints:
GET /_parlel/health- health and in-memory object countsPOST /_parlel/reset- reset all ephemeral stateGET /tasks/v1andGET /v1- lightweight discovery marker
The server also accepts /v1/... as an alias for /tasks/v1/... for simple googleapis rootUrl overrides.
Quick Start
import { google } from "googleapis";
import { GoogleTasksServer } from "./services/google-tasks/src/server.js";
const server = new GoogleTasksServer(4626);
await server.start();
const tasks = google.tasks({
version: "v1",
rootUrl: "http://127.0.0.1:4626/",
});
const list = await tasks.tasklists.insert({
requestBody: { title: "Agent test list" },
});
await tasks.tasks.insert({
tasklist: list.data.id,
requestBody: { title: "Verify integration" },
});
const allTasks = await tasks.tasks.list({ tasklist: list.data.id });
console.log(allTasks.data.items);
await server.stop();
Support Matrix
| Feature | Status | Notes |
|---|---|---|
| Task list CRUD | Supported | In-memory tasks#taskList resources. |
| Task CRUD | Supported | In-memory tasks#task resources. |
| Task hierarchy | Supported | parent and previous are honored for insert and move. |
| Pagination | Supported | maxResults and numeric pageToken. |
| Task filters | Supported | Completion, due date, updated, deleted, hidden, and completed visibility filters. |
| Completed clear | Supported | Completed tasks are marked hidden: true and omitted unless showHidden=true. |
| OAuth and IAM | Intentionally unsupported | Requests are accepted without auth for local tests. |
| Persistence | Intentionally unsupported | State is ephemeral and resettable. |
| Push notifications | Intentionally unsupported | Google Tasks v1 does not expose watch methods through googleapis. |
| Sync tokens | Intentionally unsupported | Google Tasks v1 googleapis surface does not require them for common CRUD tests. |
Error Shape
Errors use Google-style JSON bodies:
{
"error": {
"code": 404,
"message": "Task not found",
"errors": [
{
"message": "Task not found",
"domain": "global",
"reason": "notFound"
}
],
"status": "NOT_FOUND"
}
}
Returned statuses and reasons:
400 INVALID_ARGUMENTwithparseErrorfor invalid JSON400 INVALID_ARGUMENTwithinvalidArgumentfor invalid dates, page tokens, or task move placement404 NOT_FOUNDwithnotFoundfor missing task lists, tasks, or routes405 METHOD_NOT_ALLOWEDwithmethodNotAllowedfor known routes with unsupported methods409 ALREADY_EXISTSwithalreadyExistsfor duplicate explicit task list or task IDs500 INTERNALwithbackendErrorfor unexpected server failures
Configuration — test.env
Copy these into your test.env (used by the bridge sidecar flow). Tokens are Parlel's seeded test credentials — any non-empty value is accepted by the emulator, so you rarely need to change them. Swap in real credentials only when pointing at the live service in prod.env.
GOOGLE_TASKS_EMULATOR_HOST=http://parlel-bridge:4626
GOOGLE_CLOUD_PROJECT=parlel
GCLOUD_PROJECT=parlel
<!-- parlel:testenv:end -->