CorefinityCorefinityDocs
Open the Control PanelControl Panel
Terminal · 1 of 2

List a site's terminal sessions

Answers the newest 50 browser terminal sessions of a site, whoever opened them, and your own session when one is open now. A terminal is opened in the Control Panel, never through the API.

GET/api/corestack/sites/{site}/terminal/sessions

Path parameters

siteintegerRequired

The id of a site row. A website's production site and each of its environments has its own id. Digits only. At least 1.

Returns

200 The sessions, newest first.

Fields of the 200 answer
activeobject or any or nullRequired

Your own session on this site while one is open, else null.

sessionsarray of objectsRequired

The newest 50 sessions of the site, newest first.

Fields of each item
duration_secondsinteger or nullRequired

Null while the session is active.

end_reasonstring or nullRequired

Why the session ended, such as closed (the person closed it), idle or max_duration (it timed out: status is then timed_out), site_stopped, access_revoked (the person may no longer see the site), or socket_closed, connect_failed, exec_failed, error or lost when the connection or the shell failed. Null while the session is active.

ended_atstring or nullRequired

Null while the session is active. Format: date-time.

idintegerRequired

At least 1.

siteobjectRequired

A site by its id and domain.

Fields
domainstringRequired
idintegerRequired
started_atstring or nullRequired

Format: date-time.

statusstringRequired
activeendedtimed_outfailed
status_labelstringRequired
transcriptobjectRequired

The session's recording.

Fields
availablebooleanRequired

True when the session has ended and its recording is kept.

expires_atstring or nullRequired

When the recording is deleted. Null when there is none. Format: date-time.

urlstring or nullRequired

The recording's address on the API (the transcript endpoint, with the session's id), when you may download it; null otherwise. It needs the exec scope.

userobjectRequired

Who opened the session, by their own id and name.

Fields
idintegerRequired

At least 1.

namestringRequired

The person's name. Empty when the account no longer exists.

If it is refused

StatusReasonWhat to do
401noneSend a valid token as Authorization: Bearer <token>.
403company_unavailableYour company is unavailable.
403scope_requiredUse a token with the scope named in scope.
403two_factor_requiredTurn on two-factor on your account, then send again.
404feature_offThis feature is not on for your organisation yet.
429rate_limitedWait for the seconds in Retry-After.

Reasons are listed by name in Errors and refusals.

The same task elsewhere

curl https://manage.corefinity.com/api/corestack/sites/1042/terminal/sessions \
  -H "Authorization: Bearer $COREFINITY_TOKEN" \
  -H "Accept: application/json"
{
  "active": null,
  "sessions": [
    {
      "duration_seconds": 600,
      "end_reason": "closed",
      "ended_at": "2026-11-03T09:26:40Z",
      "id": 6318,
      "site": {
        "domain": "harbourandfinch.example.com",
        "id": 1042
      },
      "started_at": "2026-11-03T09:16:40Z",
      "status": "ended",
      "status_label": "Ended",
      "transcript": {
        "available": true,
        "expires_at": "2027-02-01T09:26:40Z",
        "url": "/api/corestack/terminal/sessions/6318/transcript"
      },
      "user": {
        "id": 2041,
        "name": "Eleanor Finch"
      }
    },
    {
      "duration_seconds": 1800,
      "end_reason": "idle",
      "ended_at": "2026-11-02T14:32:11Z",
      "id": 6317,
      "site": {
        "domain": "harbourandfinch.example.com",
        "id": 1042
      },
      "started_at": "2026-11-02T14:02:11Z",
      "status": "timed_out",
      "status_label": "Timed out",
      "transcript": {
        "available": false,
        "expires_at": null,
        "url": null
      },
      "user": {
        "id": 2041,
        "name": "Eleanor Finch"
      }
    }
  ]
}
Try it
Held in this tab's memory only. Never stored or sent to us.

Use a token with only the read scope. How to make one

Was this helpful?
Open in ClaudeOpen in ChatGPT