Sessions

Read a connect session (by token, or by id with a credential)

ONE path with TWO arms, discriminated by the SHAPE of the path segment — never by which credential you send.

Token arm — pass the dd_sess_... token and send no Authorization header. Public: the token is the capability. Returns PublicSession: the records exactly as you requested them, plus status, detected provider and expiry. Once the session's 24 hours are up this arm answers 410 expired forever, which is correct for a capability URL and useless for observability — hence the other arm.

Id arm — pass the session id and authenticate with a dd_sk_ secret key or an OAuth token carrying sessions:read. Returns IntegratorSession, and it can do two things the token arm cannot: it is addressable by the sessionId that every webhook payload carries (the token never appears in one), and it reads an EXPIRED session rather than refusing it — reporting expired: true instead of 410. That flag is DERIVED at read (expiresAt <= now), so it is already true in the window before the reaper persists status: "expired"; do not infer expiry from status alone. Its records are the COMPOSED names (type/host/fqdn) actually looked up on DNS, not the raw request echo the token arm returns.

tier and detectedProvider are null on both arms until detection runs — that pair is the 'detection has not run yet' signal, never a detection failure.

get/api/v1/sessions/{token}

Request

  • Base URL: https://app.dodomain.io
  • URL: https://app.dodomain.io/api/v1/sessions/{token}
  • Auth: one of:
    • none
    • HTTP bearer
    • OAuth 2 (authorization code, authorization URL https://app.dodomain.io/api/auth/oauth2/authorize, token URL https://app.dodomain.io/api/auth/oauth2/token, scopes: sessions:read)

Path parameters

tokenstring required

Either a session token (dd_sess_...) or a session id (the sessionId every webhook payload carries). The handler discriminates on the value's shape, not on your credential: a token makes this the PUBLIC arm (the token itself is the capability — treat it like a bearer token), an id makes it the integrator-authed arm.

Headers

DoDomain-Teamstring

The id of the team this call acts on, from GET /api/v1/teams. Needed only when the credential can use more than one team (an OAuth connection granted several); a secret key has exactly one. A team the credential cannot use is refused 404 TEAM_NOT_FOUND — the same answer whether the team exists or not.

Response

PublicSession when addressed by token, IntegratorSession when addressed by id. The two are told apart by their fields: only IntegratorSession carries appId, connectionId, createdAt and expired.

OR

Changes

No recorded changes to this operation across all 1 revision of this API.