DorkOS
ApiRead cursorsKindId

Read the caller's own position in one thread

GET
/api/read-cursors/{kind}/{id}

Preview. This operation may change in any release.

Where this person left off in one thread — the read half of the PUT, and the way a screen that has just opened knows where to draw the unread rule before any event arrives. A thread the caller has never read answers { "cursor": null } with a 200, because never-read is the state every thread starts in rather than a missing resource; null is also distinct from a stored 0, which is a thread read up to its own beginning. As with the write, the cursor is always the caller's own — there is no way to name a user — and an agent caller is refused with 403 person_only, or with 401 when its token does not verify.

Authorization

__Secure-better-auth.session_token<token>

The sign-in cookie a browser gets when a person signs in to DorkOS. An installed DorkOS on port 4242 names it __Secure-better-auth.session_token. On any other port the prefix carries a suffix for its data folder (better-auth-<hash>), and a development server leaves off __Secure-. From this computer, an operation that takes the sign-in cookie or a personal API key needs neither while "Ask for a password on this computer too" is off, which is how DorkOS installs (dorkos auth enable turns it on). A request from another device needs one, with one exception for now: a browser reaching a Docker container through its published port, while the container runs with DORKOS_ALLOW_INSECURE_BIND and has no owner account yet.

In: cookie

Path Parameters

kind*string

Value in

  • "room"
  • "session"
  • "inbox"
  • "room-thread"
id*string
Length1 <= length

Response Body

application/json

application/problem+json

application/problem+json

application/problem+json

curl -X GET "https://example.com/api/read-cursors/room/string"
{  "cursor": {    "userId": "string",    "threadKind": "room",    "threadId": "string",    "lastReadSeq": 0,    "updatedAt": "string"  }}