Class: Infrawrench::AuditLogsNamespace

Inherits:
Object
  • Object
show all
Defined in:
lib/infrawrench/client.rb,
sig/infrawrench/sdk.rbs

Overview

client.audit_logs

Instance Method Summary collapse

Constructor Details

#initialize(transport) ⇒ AuditLogsNamespace

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 AuditLogsNamespace.

Parameters:



722
723
724
# File 'lib/infrawrench/client.rb', line 722

def initialize(transport)
  @transport = transport
end

Instance Method Details

#get(org_id: nil, page: nil, page_size: nil, action: nil, entity_type: nil, user_id: nil, from: nil, to: nil, request_options: nil) ⇒ Hash

List audit log entries (paginated, filterable)

Requires permission: audit:read.

GET /api/org/orgId/audit-logs

Parameters:

  • org_id (String, nil) (defaults to: nil)

    Organization id. Defaults to the org_id the client was constructed with.

  • page (Integer, nil) (defaults to: nil)
  • page_size (Integer, nil) (defaults to: nil)
  • action (String, nil) (defaults to: nil)
  • entity_type (String, nil) (defaults to: nil)
  • user_id (String, nil) (defaults to: nil)
  • from (String, nil) (defaults to: nil)
  • to (String, nil) (defaults to: nil)
  • request_options (Hash, nil) (defaults to: nil)

    Per-call :headers, :timeout and :open_timeout.

  • org_id: (String, nil) (defaults to: nil)
  • page: (Integer, nil) (defaults to: nil)
  • page_size: (Integer, nil) (defaults to: nil)
  • action: (String, nil) (defaults to: nil)
  • entity_type: (String, nil) (defaults to: nil)
  • user_id: (String, nil) (defaults to: nil)
  • from: (String, nil) (defaults to: nil)
  • to: (String, nil) (defaults to: nil)
  • request_options: (Hash[Symbol, untyped], nil) (defaults to: nil)

Returns:

  • (Hash)

    Parsed JSON, shaped as AuditResponse — see sig/infrawrench/sdk.rbs.

Raises:



744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
# File 'lib/infrawrench/client.rb', line 744

def get(
  org_id: nil,
  page: nil,
  page_size: nil,
  action: nil,
  entity_type: nil,
  user_id: nil,
  from: nil,
  to: nil,
  request_options: nil
)
  @transport.request(
    http_method: "GET",
    path: "/api/org/{orgId}/audit-logs",
    path_params: { "orgId" => org_id },
    query: {
      "page" => page,
      "pageSize" => page_size,
      "action" => action,
      "entityType" => entity_type,
      "userId" => user_id,
      "from" => from,
      "to" => to
    },
    request_options: request_options
  )
end