Class: Infrawrench::SessionRecordingsNamespace
- Inherits:
-
Object
- Object
- Infrawrench::SessionRecordingsNamespace
- Defined in:
- lib/infrawrench/client.rb,
sig/infrawrench/sdk.rbs
Overview
client.session_recordings
Instance Attribute Summary collapse
-
#settings ⇒ SessionRecordingsSettingsNamespace
readonly
client.session_recordings.settings.
Instance Method Summary collapse
-
#cast(recording_id:, org_id: nil, download: nil, request_options: nil) ⇒ String
Download a recording as an asciicast.
-
#delete(recording_id:, org_id: nil, request_options: nil) ⇒ Hash
Delete a recording.
-
#get(recording_id:, org_id: nil, request_options: nil) ⇒ Hash
Get one recording's metadata.
-
#initialize(transport) ⇒ SessionRecordingsNamespace
constructor
private
A new instance of SessionRecordingsNamespace.
-
#list(org_id: nil, status: nil, user_id: nil, resource_id: nil, account_id: nil, since: nil, until_param: nil, limit: nil, request_options: nil) ⇒ Array<Hash>
List recorded SSH sessions.
Constructor Details
#initialize(transport) ⇒ SessionRecordingsNamespace
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of SessionRecordingsNamespace.
12934 12935 12936 12937 |
# File 'lib/infrawrench/client.rb', line 12934 def initialize(transport) @transport = transport @settings = SessionRecordingsSettingsNamespace.new(@transport) end |
Instance Attribute Details
#settings ⇒ SessionRecordingsSettingsNamespace (readonly)
Returns client.session_recordings.settings.
12930 12931 12932 |
# File 'lib/infrawrench/client.rb', line 12930 def settings @settings end |
Instance Method Details
#cast(recording_id:, org_id: nil, download: nil, request_options: nil) ⇒ String
Download a recording as an asciicast
The session as an asciicast
v2 document: a JSON
header line followed by one [time, code, data] event per line.
Deliberately somebody else's format — the same bytes play in asciinema play and in the reference web player, so a recording is useful to an
auditor who has never seen this product. ?download=1 returns it as an
attachment. Every fetch is audit-logged, including this one: an
investigator has to be able to answer who has watched a given tape.
Requires permission: session-recordings:read.
GET /api/org/orgId/session-recordings/recordingId/cast
Raises on 404: Not found
12963 12964 12965 12966 12967 12968 12969 12970 12971 12972 |
# File 'lib/infrawrench/client.rb', line 12963 def cast(recording_id:, org_id: nil, download: nil, request_options: nil) @transport.request( http_method: "GET", path: "/api/org/{orgId}/session-recordings/{recordingId}/cast", path_params: { "orgId" => org_id, "recordingId" => recording_id }, query: { "download" => download }, accept: :binary, request_options: ) end |
#delete(recording_id:, org_id: nil, request_options: nil) ⇒ Hash
Delete a recording
Removes the recording and its stored chunks. Audit-logged.
Requires permission: session-recordings:write.
DELETE /api/org/orgId/session-recordings/recordingId
Raises on 404: Not found
12990 12991 12992 12993 12994 12995 12996 12997 |
# File 'lib/infrawrench/client.rb', line 12990 def delete(recording_id:, org_id: nil, request_options: nil) @transport.request( http_method: "DELETE", path: "/api/org/{orgId}/session-recordings/{recordingId}", path_params: { "orgId" => org_id, "recordingId" => recording_id }, request_options: ) end |
#get(recording_id:, org_id: nil, request_options: nil) ⇒ Hash
Get one recording's metadata
Requires permission: session-recordings:read.
GET /api/org/orgId/session-recordings/recordingId
Raises on 404: Not found
13013 13014 13015 13016 13017 13018 13019 13020 |
# File 'lib/infrawrench/client.rb', line 13013 def get(recording_id:, org_id: nil, request_options: nil) @transport.request( http_method: "GET", path: "/api/org/{orgId}/session-recordings/{recordingId}", path_params: { "orgId" => org_id, "recordingId" => recording_id }, request_options: ) end |
#list(org_id: nil, status: nil, user_id: nil, resource_id: nil, account_id: nil, since: nil, until_param: nil, limit: nil, request_options: nil) ⇒ Array<Hash>
List recorded SSH sessions
Recorded sessions, newest first. Only SSH opened through the cloud is recorded — those sessions are already proxied by the server, so recording tees a stream it holds rather than requiring an agent on the host. A desktop session that dials a host directly never reaches the server and cannot appear here.
Requires permission: session-recordings:read.
GET /api/org/orgId/session-recordings
Raises on 400: Bad request
13051 13052 13053 13054 13055 13056 13057 13058 13059 13060 13061 13062 13063 13064 13065 13066 13067 13068 13069 13070 13071 13072 13073 13074 13075 13076 13077 |
# File 'lib/infrawrench/client.rb', line 13051 def list( org_id: nil, status: nil, user_id: nil, resource_id: nil, account_id: nil, since: nil, until_param: nil, limit: nil, request_options: nil ) @transport.request( http_method: "GET", path: "/api/org/{orgId}/session-recordings", path_params: { "orgId" => org_id }, query: { "status" => status, "userId" => user_id, "resourceId" => resource_id, "accountId" => account_id, "since" => since, "until" => until_param, "limit" => limit }, request_options: ) end |