Get Session
Get a session by id. This endpoint returns a conditional response
- When the query string
extension
is present it will return a payload containing a link to download the session
{
"download_url": "http://127.0.0.1:8009/api/sessions/<id>/download?token=<token>&extension=csv&newline=1&event-time=0&events=o,e",
"expire_at": "2024-07-25T15:56:35.317601Z",
}
- Fetching the endpoint without any query string returns the payload documented for this endpoint
- The attribute
event_stream
will be rendered differently if the request contains the query stringevent_stream=utf8
{
(...)
"event_stream": ["hello world"]
(...)
}
The attribute metrics
contains the following structure:
{
"data_masking": {
"err_count": 0,
"info_types": {
"EMAIL_ADDRESS": 1
},
"total_redact_count": 1,
"transformed_bytes": 31
},
"event_size": 356
}
Path Parameters
The id of the resource
Query Parameters
Construct the file content adding the event time as prefix when parsing each event
0
, 1
This option will parse the session output (o) and error (e) events as an utf-8 content in the session payload
utf8
Choose the type of events to include
i
- Input (stdin)o
- Output (stdout)e
- Error (stderr)
The file extension to donwload the session as a file content.
csv
- it will parse the content to format in csv formatjson
- it will parse the content as a json stream.<any-format>
- No special parsing is applied
Construct the file content adding a break line when parsing each event
0
, 1
Response
The connection name of this resource
When the execution ended. A null value indicates the session is still running
The stored resource size in bytes
The stream containing the output of the execution in the following format
[[0.268589438, "i", "ZW52"], ...]
<event-time>
- relative time in miliseconds to start_date<event-type>
- the event type as string (i: input, o: output e: output-error)<base64-content>
- the content of the session encoded as base64 string
The resource unique identifier
Metadata attributes related to integrations with third party services
DEPRECATED in flavor of metrics and metadata
Refactor to use a struct
The organization unique identifier
Review of this session. In case the review doesn't exist this field will be null
The input of the session. This value is only set for the verb exec
When the execution started
Status of the resource
- ready - the resource is ready to be executed, after being approved by a user
- open - the session started and it's running
- done - the session has finished
open
, ready
, done
The connection type of this resource
The user email of the resource
The user subject identifier of the resource
The user display name of this resource
Verb is how the client has interacted with this resource
- exec - Is an ad-hoc shell execution
- connect - Interactive execution, protocol port forwarding or interactive shell session
connect
, exec