GET
/
sessions
/
{session_id}
curl --request GET \
  --url https://use.hoop.dev/api/sessions/{session_id}
{
  "connection": "pgdemo",
  "connection_subtype": "postgres",
  "connection_tags": {
    "team": "banking;environment:prod"
  },
  "end_date": "2024-07-25T15:56:35.361101Z",
  "event_size": 569,
  "event_stream": [
    123
  ],
  "exit_code": 123,
  "id": "1CBC8DB5-FBF8-4293-8E35-59A6EEA40207",
  "integrations_metadata": {},
  "labels": {},
  "metadata": {},
  "metrics": {},
  "org_id": "0CD7F941-2BB8-4F9F-93B0-11620D4652AB",
  "review": {
    "access_duration": 0,
    "created_at": "2024-07-25T15:56:35.317601Z",
    "id": "9F9745B4-C77B-4D52-84D3-E24F67E3623C",
    "review_groups_data": [
      {
        "group": "sre",
        "id": "20A5AABE-C35D-4F04-A5A7-C856EE6C7703",
        "review_date": "2024-07-25T19:36:41Z",
        "reviewed_by": {
          "email": "john.wick@bad.org",
          "id": "D5BFA2DD-7A09-40AE-AFEB-C95787BA9E90",
          "name": "John Wick",
          "slack_id": "U053ELZHB53"
        },
        "status": "APPROVED"
      }
    ],
    "revoke_at": "",
    "status": "PENDING",
    "type": "onetime"
  },
  "script": {
    "data": "SELECT NOW()"
  },
  "start_date": "2024-07-25T15:56:35.317601Z",
  "status": "open",
  "type": "database",
  "user": "<string>",
  "user_id": "nJ1xV3ASWGTi7L8Y6zvnKqxNlnZM2TxV1bRdc0706vZ",
  "user_name": "John Wick",
  "verb": "connect"
}

Path Parameters

session_id
string
required

The id of the resource

Query Parameters

event-time
enum<string>
default:0

Construct the file content adding the event time as prefix when parsing each event

Available options:
0,
1
event_stream
enum<string>

This option will parse the session output (o) and error (e) events as an utf-8 content in the session payload

Available options:
utf8,
base64
events
string[]

Choose the type of events to include

  • i - Input (stdin)
  • o - Output (stdout)
  • e - Error (stderr)
expand
enum<string>

Expand the given attributes

Available options:
event_stream
extension
string

The file extension to donwload the session as a file content.

  • csv - it will parse the content to format in csv format
  • json - it will parse the content as a json stream.
  • <any-format> - No special parsing is applied
new_line
enum<string>
default:0

Construct the file content adding a break line when parsing each event

Available options:
0,
1

Response

200
application/json
OK

The response is of type object.