Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/ActivityWatch/activitywatch/llms.txt

Use this file to discover all available pages before exploring further.

Buckets are named containers that hold events from a single watcher on a single host. Before a watcher can send events, it must create a bucket.

List all buckets

GET /api/0/buckets/
Returns a JSON object where keys are bucket IDs and values are bucket metadata.
curl http://localhost:5600/api/0/buckets/
Response:
{
  "aw-watcher-window_my-laptop": {
    "id": "aw-watcher-window_my-laptop",
    "type": "currentwindow",
    "client": "aw-watcher-window",
    "hostname": "my-laptop",
    "created": "2024-01-01T00:00:00.000000+00:00",
    "last_updated": "2024-01-15T09:30:00.000000+00:00"
  }
}

Get a single bucket

GET /api/0/buckets/{bucket_id}
curl http://localhost:5600/api/0/buckets/aw-watcher-window_my-laptop

Create a bucket

POST /api/0/buckets/{bucket_id}
bucket_id
string
required
Unique bucket identifier. Convention: {watcher-name}_{hostname}
Request body:
client
string
required
Name of the client/watcher creating this bucket
type
string
required
Event schema type (e.g. currentwindow, afkstatus, web.tab.current)
hostname
string
required
Hostname of the machine
curl -X POST http://localhost:5600/api/0/buckets/my-watcher_my-laptop \
  -H "Content-Type: application/json" \
  -d '{"client": "my-watcher", "type": "my-event-type", "hostname": "my-laptop"}'
Response: 200 OK (bucket created or already exists)

Delete a bucket

DELETE /api/0/buckets/{bucket_id}
Deleting a bucket permanently removes all events stored in it. This cannot be undone.
curl -X DELETE "http://localhost:5600/api/0/buckets/my-watcher_my-laptop?force=1"
The force=1 query parameter is required to confirm deletion.

Events API

Read, insert, and delete events within a bucket

API Overview

Full endpoint reference and response format details

Build docs developers (and LLMs) love