Class: OpenAI::Resources::Admin::Organization::AuditLogs

Inherits:
Object
  • Object
show all
Defined in:
lib/openai/resources/admin/organization/audit_logs.rb

Overview

List user actions and configuration changes within this organization.

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:



56
57
58
# File 'lib/openai/resources/admin/organization/audit_logs.rb', line 56

def initialize(client:)
  @client = client
end

Instance Method Details

#list(actor_emails: nil, actor_ids: nil, after: nil, before: nil, effective_at: nil, event_types: nil, limit: nil, project_ids: nil, resource_ids: nil, request_options: {}) ⇒ OpenAI::Internal::ConversationCursorPage<OpenAI::Models::Admin::Organization::AuditLogListResponse>

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

List user actions and configuration changes within this organization.

Parameters:

  • actor_emails (Array<String>)

    Return only events performed by users with these emails.

  • actor_ids (Array<String>)

    Return only events performed by these actors. Can be a user ID, a service accoun

  • after (String)

    A cursor for use in pagination. ‘after` is an object ID that defines your place

  • before (String)

    A cursor for use in pagination. ‘before` is an object ID that defines your place

  • effective_at (OpenAI::Models::Admin::Organization::AuditLogListParams::EffectiveAt)

    Return only events whose ‘effective_at` (Unix seconds) is in this range.

  • event_types (Array<Symbol, OpenAI::Models::Admin::Organization::AuditLogListParams::EventType>)

    Return only events with a ‘type` in one of these values. For example, `project.c

  • limit (Integer)

    A limit on the number of objects to be returned. Limit can range between 1 and 1

  • project_ids (Array<String>)

    Return only events for these projects.

  • resource_ids (Array<String>)

    Return only events performed on these targets. For example, a project ID updated

  • request_options (OpenAI::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



39
40
41
42
43
44
45
46
47
48
49
50
51
# File 'lib/openai/resources/admin/organization/audit_logs.rb', line 39

def list(params = {})
  parsed, options = OpenAI::Admin::Organization::AuditLogListParams.dump_request(params)
  query = OpenAI::Internal::Util.encode_query_params(parsed)
  @client.request(
    method: :get,
    path: "organization/audit_logs",
    query: query,
    page: OpenAI::Internal::ConversationCursorPage,
    model: OpenAI::Models::Admin::Organization::AuditLogListResponse,
    security: {admin_api_key_auth: true},
    options: options
  )
end