Skip to content

Playground sessions and messages are addressed and published by UUID

The rule

Normative: this is the rule
  1. Every playground route parameter naming a session or a message MUST be a UUID.
  2. Every id published (a session row's, a message row's, and a message row's sessionId) MUST be that UUID.
  3. It MUST NOT be an internal record identifier.
  4. The session list's ids filter is the single exception: it MUST take a comma-separated list of internal identifiers, and it MUST drop values that are not positive integers.
  5. It is a narrowing of what the caller can already see, not a client-facing identifier.
  6. So that one endpoint accepts internal identifiers inbound and answers UUIDs outbound, deliberately.

What it means

Every identifier a caller sends back to an endpoint, and every identifier an endpoint publishes, is a UUID — with one deliberate exception. The session list's ids filter takes internal identifiers inbound, not UUIDs, because it exists to narrow a list the caller can already see, never to address a record from the outside. Filtering on it is forgiving rather than strict: a value that is not a positive integer is dropped rather than rejected, so junk in the filter narrows toward nothing instead of raising an error.

A caller who assumes every identifier on this surface is interchangeable would expect ids to take the same UUIDs the rows themselves publish. It does not — this is the one endpoint that reads inward in a different currency than it answers outward.

Example

Filtering the session list with nothing but junk — a zero, a negative number, a non-numeric string:

Filtering the session list by internal id200 — counted
GET /api/flowdrop/workflows/{workflow_id}/playground/sessions?ids=0,-4,abc

{"success": true, "data": [], "pagination": {"total": 0, … }}

None of the three values is a positive integer, so none narrows the list to anything — the caller is left with an empty page, not the unfiltered list and not a refusal.

Why

Recorded under OPEN-25.

Rule identifiers are permanent and are never renumbered. Each implementation publishes its own standing against these rules; this specification does not.spec 1.0 · PLAY-1 · changed in spec 1.0