Skip to main content
POST
Get session detail

Restrictions

Usage

  • A personal session is readable only by its creator, or by anyone holding a valid share_token (view only). A team session is readable by any member of the same account. A missing, deleted, or unreadable session returns ResourceNotFound.
  • events holds the newest page in ascending order. To read older history, pass the returned search_after_ctx back; a malformed cursor returns InvalidParameter.
  • Page size is limit, else num_recent_events, else 100 (max 1000). Internal control events are left out, so a page can hold fewer events than requested.
  • The current_turn_* fields are filled only while is_running is true. has_unread is always false and pinned_at always 0 here; use POST /safari/session/list for those.
  • pending_messages lists messages queued behind the running turn; it is an empty array when nothing is queued.

Authorizations

app_key
string
query
required

APP Key created in the Flashduty console under My → APP Key. Send it as the app_key query parameter or in the Fd-App-Key request header. Its effective access is the intersection of the key's permission scope and the creator's current role permissions. Keep it secret.

Body

application/json

Fetch one session plus a backward-paged window of its most recent events.

session_id
string
required

Target session ID, from the list returned by POST /safari/session/list.

Minimum string length: 1
include_credits_usage
boolean

Set true to fill credits_usage_nano on the returned session. Omitted or false skips the credit aggregation and leaves the field out of the response.

share_token
string

Share token for accessing a session through its share link. Omit it for normal account-authorized access.

Maximum string length: 512
num_recent_events
integer

Legacy page size: number of most-recent events to return. Superseded by limit when both are set; 0 uses the server default (100).

Required range: 0 <= x <= 1000
limit
integer

Page size for events; takes precedence over num_recent_events. 0 uses the server default (100).

Required range: 0 <= x <= 1000
search_after_ctx
string

Opaque keyset cursor from a previous response; pass it back to fetch the next older page.

Maximum string length: 4096

Response

Success

Standard response envelope used by every Flashduty public API. On success data contains the endpoint-specific payload and error is absent. On failure error is present and data is absent. request_id is always present and is also mirrored in the Flashcat-Request-Id response header.

request_id
string
required

Unique ID for this request. Mirrored in the Flashcat-Request-Id header. Include it when reporting issues.

Example:

"01HK8XQE3Z7JM2NTFQ5YJ8P9R4"

error
object

Error payload inside the response envelope. Present only on non-2xx responses.

data
object

A session plus a backward-paged window of its events.