Pagination
Walk long lists with opaque cursors.
List endpoints return a page of results and a cursor:
{ "results": [ … ], "next_cursor": "eyJwIjoxMiwiaSI6IjZGMUMifQ" }- Pass
next_cursorback ascursorwith the same filters to get the next page. next_cursorisnullon the last page.limitsets the page size, from 1 to 200 (default 50).- Cursors are opaque. Do not build or parse them.
Tasks are ordered by their manual position in the app. Projects, sections and saved filters are ordered by ID.
cursor=""
while :; do
page=$(curl -s "https://api.daylite.me/v1/tasks?status=all&limit=200${cursor:+&cursor=$cursor}" \
-H "Authorization: Bearer $DAYLITE_API_KEY")
echo "$page" | jq -r '.results[].title'
cursor=$(echo "$page" | jq -r '.next_cursor // empty')
[ -z "$cursor" ] && break
done