=encoding utf8

=head1 NAME

OpenAPI::Client::OpenAI::Path::organization-audit_logs - Documentation for the /organization/audit_logs path.

=head1 OPERATIONS

=head2 GET /organization/audit_logs

=head3 list-audit-logs

  $client->list_audit_logs({
      body => { ... },
  });

List user actions and configuration changes within this organization.

=head4 Path/query parameters

=over

=item * C<effective_at> (in query, optional, object) - Return only events whose C<effective_at> (Unix seconds) is in this range.

=item * C<project_ids[]> (in query, optional, array) - Return only events for these projects.

=item * C<event_types[]> (in query, optional, array) - Return only events with a C<type> in one of these values. For example,
C<project.created> . For all options, see the documentation for the
L<audit log object|https://platform.openai.com/docs/api-reference/audit-logs/object>
.

=item * C<actor_ids[]> (in query, optional, array) - Return only events performed by these actors. Can be a user ID, a service
account ID, or an api key tracking ID.

=item * C<actor_emails[]> (in query, optional, array) - Return only events performed by users with these emails.

=item * C<resource_ids[]> (in query, optional, array) - Return only events performed on these targets. For example, a project ID
updated.

=item * C<limit> (in query, optional, integer) - A limit on the number of objects to be returned. Limit can range between 1 and
100, and the default is 20.

Default: 20

=item * C<after> (in query, optional, string) - A cursor for use in pagination. C<after> is an object ID that defines your
place in the list. For instance, if you make a list request and receive 100
objects, ending with obj_foo, your subsequent call can include after=obj_foo
in order to fetch the next page of the list.

=item * C<before> (in query, optional, string) - A cursor for use in pagination. C<before> is an object ID that defines your
place in the list. For instance, if you make a list request and receive 100
objects, starting with obj_foo, your subsequent call can include
before=obj_foo in order to fetch the previous page of the list.

=back

=head4 Responses

B<200 - Audit logs listed successfully.>

Content-Type: application/json

Example:

    {
       "data" : [
          "{\n    \"id\": \"req_xxx_20240101\",\n    \"type\": \"api_key.created\",\n    \"effective_at\": 1720804090,\n    \"actor\": {\n        \"type\": \"session\",\n        \"session\": {\n            \"user\": {\n                \"id\": \"user-xxx\",\n                \"email\": \"user@example.com\"\n            },\n            \"ip_address\": \"127.0.0.1\",\n            \"user_agent\": \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36\"\n        }\n    },\n    \"api_key.created\": {\n        \"id\": \"key_xxxx\",\n        \"data\": {\n            \"scopes\": [\"resource.operation\"]\n        }\n    }\n}\n"
       ],
       "first_id" : "audit_log-defb456h8dks",
       "has_more" : false,
       "last_id" : "audit_log-hnbkd8s93s",
       "object" : "list"
    }

=head1 SCHEMAS

=head2 AuditLog

Properties:

=over

=item * C<actor> (anyOf)

=item * C<api_key.created> (object) - The details for events with this C<type> .

=item * C<api_key.deleted> (object) - The details for events with this C<type> .

=item * C<api_key.updated> (object) - The details for events with this C<type> .

=item * C<certificate.created> (object) - The details for events with this C<type> .

=item * C<certificate.deleted> (object) - The details for events with this C<type> .

=item * C<certificate.updated> (object) - The details for events with this C<type> .

=item * C<certificates.activated> (object) - The details for events with this C<type> .

=item * C<certificates.deactivated> (object) - The details for events with this C<type> .

=item * C<checkpoint.permission.created> (object) - The project and fine-tuned model checkpoint that the checkpoint permission was
created for.

=item * C<checkpoint.permission.deleted> (object) - The details for events with this C<type> .

=item * C<effective_at> (integer, required) - The Unix timestamp (in seconds) of the event.

=item * C<external_key.registered> (object) - The details for events with this C<type> .

=item * C<external_key.removed> (object) - The details for events with this C<type> .

=item * C<group.created> (object) - The details for events with this C<type> .

=item * C<group.deleted> (object) - The details for events with this C<type> .

=item * C<group.updated> (object) - The details for events with this C<type> .

=item * C<id> (string, required) - The ID of this log.

=item * C<invite.accepted> (object) - The details for events with this C<type> .

=item * C<invite.deleted> (object) - The details for events with this C<type> .

=item * C<invite.sent> (object) - The details for events with this C<type> .

=item * C<ip_allowlist.config.activated> (object) - The details for events with this C<type> .

=item * C<ip_allowlist.config.deactivated> (object) - The details for events with this C<type> .

=item * C<ip_allowlist.created> (object) - The details for events with this C<type> .

=item * C<ip_allowlist.deleted> (object) - The details for events with this C<type> .

=item * C<ip_allowlist.updated> (object) - The details for events with this C<type> .

=item * C<login.failed> (object) - The details for events with this C<type> .

=item * C<login.succeeded> (object) - This event has no additional fields beyond the standard audit log attributes.

=item * C<logout.failed> (object) - The details for events with this C<type> .

=item * C<logout.succeeded> (object) - This event has no additional fields beyond the standard audit log attributes.

=item * C<organization.updated> (object) - The details for events with this C<type> .

=item * C<project> (object) - The project that the action was scoped to. Absent for actions not scoped to
projects. Note that any admin actions taken via Admin API keys are associated
with the default project.

=item * C<project.archived> (object) - The details for events with this C<type> .

=item * C<project.created> (object) - The details for events with this C<type> .

=item * C<project.deleted> (object) - The details for events with this C<type> .

=item * C<project.updated> (object) - The details for events with this C<type> .

=item * C<rate_limit.deleted> (object) - The details for events with this C<type> .

=item * C<rate_limit.updated> (object) - The details for events with this C<type> .

=item * C<role.assignment.created> (object) - The details for events with this C<type> .

=item * C<role.assignment.deleted> (object) - The details for events with this C<type> .

=item * C<role.created> (object) - The details for events with this C<type> .

=item * C<role.deleted> (object) - The details for events with this C<type> .

=item * C<role.updated> (object) - The details for events with this C<type> .

=item * C<scim.disabled> (object) - The details for events with this C<type> .

=item * C<scim.enabled> (object) - The details for events with this C<type> .

=item * C<service_account.created> (object) - The details for events with this C<type> .

=item * C<service_account.deleted> (object) - The details for events with this C<type> .

=item * C<service_account.updated> (object) - The details for events with this C<type> .

=item * C<type> (AuditLogEventType, required)

See L</AuditLogEventType> below for shape.

=item * C<user.added> (object) - The details for events with this C<type> .

=item * C<user.deleted> (object) - The details for events with this C<type> .

=item * C<user.updated> (object) - The details for events with this C<type> .

=back

=head2 AuditLogEventType

The event type.

=head2 ListAuditLogsResponse

Properties:

=over

=item * C<data> (array of AuditLog, required)

=item * C<first_id> (anyOf)

=item * C<has_more> (boolean, required)

=item * C<last_id> (anyOf)

=item * C<object> (string, required)

Allowed values: list

=back

=head1 SEE ALSO

L<OpenAPI::Client::OpenAI::Path>

=head1 COPYRIGHT AND LICENSE

Copyright (C) 2023-2026 by Nelson Ferraz

This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself, either Perl version 5.14.0 or,
at your option, any later version of Perl 5 you may have available.

=cut
