Class: HubSpotSDK::Resources::Cms::AuditLogs

Inherits:
Object
  • Object
show all
Defined in:
lib/hubspot_sdk/resources/cms/audit_logs.rb

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ AuditLogs

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

Parameters:



82
83
84
# File 'lib/hubspot_sdk/resources/cms/audit_logs.rb', line 82

def initialize(client:)
  @client = client
end

Instance Method Details

#export(email:, format_:, portal_id:, recipient_user_ids:, should_mark_export_file_as_sensitive:, type:, filters: nil, partition: nil, user_id: nil, user_time_zone: nil, request_options: {}) ⇒ nil

Parameters:

Returns:

  • (nil)

See Also:



68
69
70
71
72
73
74
75
76
77
# File 'lib/hubspot_sdk/resources/cms/audit_logs.rb', line 68

def export(params)
  parsed, options = HubSpotSDK::Cms::AuditLogExportParams.dump_request(params)
  @client.request(
    method: :post,
    path: "cms/audit-logs/2026-03/export",
    body: parsed,
    model: NilClass,
    options: options
  )
end

#list(after: nil, before: nil, event_type: nil, limit: nil, object_id_: nil, object_type: nil, sort: nil, user_id: nil, request_options: {}) ⇒ HubSpotSDK::Internal::Page<HubSpotSDK::Models::Cms::PublicAuditLog>

Some parameter documentations has been truncated, see Models::Cms::AuditLogListParams for more details.

Parameters:

  • after (String)

    The paging cursor token of the last successfully read resource will be returned

  • before (String)
  • event_type (Array<String>)
  • limit (Integer)

    The maximum number of results to display per page.

  • object_id_ (Array<String>)
  • object_type (Array<String>)
  • sort (Array<String>)
  • user_id (Array<String>)
  • request_options (HubSpotSDK::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# File 'lib/hubspot_sdk/resources/cms/audit_logs.rb', line 33

def list(params = {})
  parsed, options = HubSpotSDK::Cms::AuditLogListParams.dump_request(params)
  query = HubSpotSDK::Internal::Util.encode_query_params(parsed)
  @client.request(
    method: :get,
    path: "cms/audit-logs/2026-03",
    query: query.transform_keys(
      event_type: "eventType",
      object_id_: "objectId",
      object_type: "objectType",
      user_id: "userId"
    ),
    page: HubSpotSDK::Internal::Page,
    model: HubSpotSDK::Cms::PublicAuditLog,
    options: options
  )
end