NAME

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

OPERATIONS

GET /organization/audit_logs

list-audit-logs

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

List user actions and configuration changes within this organization.

Path/query parameters

  • effective_at (in query, optional, object) - Return only events whose effective_at (Unix seconds) is in this range.

  • project_ids[] (in query, optional, array) - Return only events for these projects.

  • event_types[] (in query, optional, array) - Return only events with a type in one of these values. For example, project.created . For all options, see the documentation for the audit log object .

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

  • actor_emails[] (in query, optional, array) - Return only events performed by users with these emails.

  • resource_ids[] (in query, optional, array) - Return only events performed on these targets. For example, a project ID updated.

  • 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

  • after (in query, optional, string) - A cursor for use in pagination. 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.

  • before (in query, optional, string) - A cursor for use in pagination. 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.

Responses

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"
}

SCHEMAS

AuditLog

Properties:

  • actor (anyOf)

  • api_key.created (object) - The details for events with this type .

  • api_key.deleted (object) - The details for events with this type .

  • api_key.updated (object) - The details for events with this type .

  • certificate.created (object) - The details for events with this type .

  • certificate.deleted (object) - The details for events with this type .

  • certificate.updated (object) - The details for events with this type .

  • certificates.activated (object) - The details for events with this type .

  • certificates.deactivated (object) - The details for events with this type .

  • checkpoint.permission.created (object) - The project and fine-tuned model checkpoint that the checkpoint permission was created for.

  • checkpoint.permission.deleted (object) - The details for events with this type .

  • effective_at (integer, required) - The Unix timestamp (in seconds) of the event.

  • external_key.registered (object) - The details for events with this type .

  • external_key.removed (object) - The details for events with this type .

  • group.created (object) - The details for events with this type .

  • group.deleted (object) - The details for events with this type .

  • group.updated (object) - The details for events with this type .

  • id (string, required) - The ID of this log.

  • invite.accepted (object) - The details for events with this type .

  • invite.deleted (object) - The details for events with this type .

  • invite.sent (object) - The details for events with this type .

  • ip_allowlist.config.activated (object) - The details for events with this type .

  • ip_allowlist.config.deactivated (object) - The details for events with this type .

  • ip_allowlist.created (object) - The details for events with this type .

  • ip_allowlist.deleted (object) - The details for events with this type .

  • ip_allowlist.updated (object) - The details for events with this type .

  • login.failed (object) - The details for events with this type .

  • login.succeeded (object) - This event has no additional fields beyond the standard audit log attributes.

  • logout.failed (object) - The details for events with this type .

  • logout.succeeded (object) - This event has no additional fields beyond the standard audit log attributes.

  • organization.updated (object) - The details for events with this type .

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

  • project.archived (object) - The details for events with this type .

  • project.created (object) - The details for events with this type .

  • project.deleted (object) - The details for events with this type .

  • project.updated (object) - The details for events with this type .

  • rate_limit.deleted (object) - The details for events with this type .

  • rate_limit.updated (object) - The details for events with this type .

  • role.assignment.created (object) - The details for events with this type .

  • role.assignment.deleted (object) - The details for events with this type .

  • role.created (object) - The details for events with this type .

  • role.deleted (object) - The details for events with this type .

  • role.updated (object) - The details for events with this type .

  • scim.disabled (object) - The details for events with this type .

  • scim.enabled (object) - The details for events with this type .

  • service_account.created (object) - The details for events with this type .

  • service_account.deleted (object) - The details for events with this type .

  • service_account.updated (object) - The details for events with this type .

  • type (AuditLogEventType, required)

    See "AuditLogEventType" below for shape.

  • user.added (object) - The details for events with this type .

  • user.deleted (object) - The details for events with this type .

  • user.updated (object) - The details for events with this type .

AuditLogEventType

The event type.

ListAuditLogsResponse

Properties:

  • data (array of AuditLog, required)

  • first_id (anyOf)

  • has_more (boolean, required)

  • last_id (anyOf)

  • object (string, required)

    Allowed values: list

SEE ALSO

OpenAPI::Client::OpenAI::Path

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.