Skip to Content
kosemdocs
ReferenceAPIAudit log

List log entries in organization

Lists the entries of an organization's audit logs, about it and its projects, newest first. Data Access entries are listed only to those who hold auditlog.privateLogEntries.list too, and left out for others, whatever the filter asks. Every call is recorded in the Data Access log, whatever the settings say. Reading audit logs takes a plan that includes them (auditlog.auditLogs), Team or Enterprise: on Hobby or Pro, a call fails with failed_precondition and the reason PLAN_REQUIRED, though kosem still records the organization's changes, which upgrading shows.

GET
/v1/organizations/{organization}/logEntries

Lists the entries of an organization's audit logs, about it and its projects, newest first.

Data Access entries are listed only to those who hold auditlog.privateLogEntries.list too, and left out for others, whatever the filter asks. Every call is recorded in the Data Access log, whatever the settings say. Reading audit logs takes a plan that includes them (auditlog.auditLogs), Team or Enterprise: on Hobby or Pro, a call fails with failed_precondition and the reason PLAN_REQUIRED, though kosem still records the organization's changes, which upgrading shows.

Authorization

bearer
headerAuthorizationBearer <token>

An access token, or an API key.

Path Parameters

organization*string

The organization's ID.

Match^org_[0-7][0-9a-hjkmnp-tv-z]{25}$

Query Parameters

filter?string

Restricts the entries, as a conjunction (AND) of comparisons (AIP-160): id, cause, principal, service_name, method_name and resource_name with =, such as principal = "user:usr_…" or cause = "log_…" for what a change led to; log_type with = or !=, such as log_type != DATA_ACCESS for changes; status.code with =, or with != as often as needed, such as status.code != 0 for calls that failed, and AND status.code != 1 for those not cancelled; and time with >=, >, <= or < and an RFC 3339 timestamp, such as time >= "2026-10-01T00:00:00Z". Without one, entries of every log the caller may read are listed, reads of the log among them.

Lengthlength <= 2048
pageSize?integer

Maximum number of entries to return. Defaults to 50; values above 500 are treated as 500.

Formatint32
Range0 <= value
pageToken?string

Page token from a previous response.

Response Body

OK

application/json
  1. response
logEntries*array<>

Entries, newest first.

nextPageToken*string

Token for the next page; empty on the last page.

Example Request
curl -X GET 'https://api.kosem.ai/v1/organizations/string/logEntries'
Example Response
{
  "logEntries": [
    {
      "authenticationInfo": {
        "principal": "string",
        "principalEmail": "string",
        "serviceAccountKeyId": "string",
        "sessionId": "string"
      },
      "authorizationInfo": [
        {
          "granted": true,
          "permission": "string",
          "permissionType": "ADMIN_READ",
          "resource": "string"
        }
      ],
      "cause": "string",
      "id": "string",
      "logType": "ADMIN_ACTIVITY",
      "metadata": {
        "property1": null,
        "property2": null
      },
      "methodName": "string",
      "organization": "string",
      "people": {
        "property1": {
          "displayName": "string",
          "email": "string"
        },
        "property2": {
          "displayName": "string",
          "email": "string"
        }
      },
      "project": "string",
      "request": {
        "property1": null,
        "property2": null
      },
      "requestMetadata": {
        "callerIp": "string",
        "callerSuppliedUserAgent": "string"
      },
      "resourceDisplayNames": {
        "property1": "string",
        "property2": "string"
      },
      "resourceName": "string",
      "serviceName": "string",
      "status": {
        "code": 0,
        "message": "string"
      },
      "time": "2019-08-24T14:15:22Z",
      "traceId": "string"
    }
  ],
  "nextPageToken": "string"
}