---
title: "Get Audit Logs"
url: "https://nov18-dev.movespot.fyi/apis/konnect-audit-log-settings-dev-3/versions/53c2c1ad-759f-4471-87e5-bbf9b44f4fd7/operations/get-audit-logs"
---

> Full API specification: https://nov18-dev.movespot.fyi/apis/konnect-audit-log-settings-dev-3/versions/53c2c1ad-759f-4471-87e5-bbf9b44f4fd7.md

# Get Audit Logs

`GET` `/audit-logs`

Operation ID: `get-audit-logs`

Returns a list of audit logs for an organization.

## Query parameters

- `page[size]` (integer, optional) - The maximum number of items to include per page. The last page of a collection may include fewer items.
- `page[before]` (string, optional) - Request the next page of data, starting with the item before this parameter.
- `page[after]` (string, optional) - Request the next page of data, starting with the item after this parameter.

## Responses

- `200` - Get response for audit logs
- `401` - Unauthorized
- `403` - Forbidden

## OpenAPI definition

```yaml
openapi: 3.0.2
info:
  title: Konnect Audit Log Settings
  version: 3.0.5
servers:
  - url: https://us.api.konghq.com/v3
    description: United-States Production region
  - url: https://eu.api.konghq.com/v3
    description: Europe Production region
  - url: https://au.api.konghq.com/v3
    description: Australia Production region
  - url: https://me.api.konghq.com/v3
    description: Middle-East Production region
  - url: https://in.api.konghq.com/v3
    description: India Production region
  - url: https://sg.api.konghq.com/v3
    description: Singapore Production region
paths:
  /audit-logs:
    get:
      operationId: get-audit-logs
      summary: Get Audit Logs
      description: Returns a list of audit logs for an organization.
      parameters:
        - $ref: "#/components/parameters/PageSize"
        - $ref: "#/components/parameters/PageBefore"
        - $ref: "#/components/parameters/PageAfter"
      responses:
        "200":
          $ref: "#/components/responses/GetAuditLogs"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
      tags:
        - Audit Logs
security:
  - personalAccessToken: []
  - systemAccountAccessToken: []
components:
  parameters:
    PageSize:
      name: page[size]
      description: The maximum number of items to include per page. The last page of a
        collection may include fewer items.
      required: false
      in: query
      allowEmptyValue: true
      schema:
        type: integer
        example: 10
    PageBefore:
      name: page[before]
      description: Request the next page of data, starting with the item before this
        parameter.
      required: false
      in: query
      allowEmptyValue: true
      schema:
        type: string
        example: ewogICJpZCI6ICJoZWxsbyB3b3JsZCIKfQ
    PageAfter:
      name: page[after]
      description: Request the next page of data, starting with the item after this
        parameter.
      required: false
      in: query
      allowEmptyValue: true
      schema:
        type: string
        example: ewogICJpZCI6ICJoZWxsbyB3b3JsZCIKfQ
  responses:
    GetAuditLogs:
      description: Get response for audit logs
      content:
        application/json:
          schema:
            type: object
            properties:
              data:
                type: array
                items:
                  $ref: "#/components/schemas/AuditLog"
              meta:
                $ref: "#/components/schemas/CursorMetaPage"
            additionalProperties: false
            required:
              - data
              - meta
          examples:
            AuditLogs:
              $ref: "#/components/examples/GetAuditLogs"
    Unauthorized:
      description: Unauthorized
      content:
        application/problem+json:
          schema:
            $ref: "#/components/schemas/UnauthorizedError"
          examples:
            UnauthorizedExample:
              $ref: "#/components/examples/UnauthorizedExample"
    Forbidden:
      description: Forbidden
      content:
        application/problem+json:
          schema:
            $ref: "#/components/schemas/ForbiddenError"
          examples:
            UnauthorizedExample:
              $ref: "#/components/examples/ForbiddenExample"
  schemas:
    AuditLog:
      description: An individual audit log entry.
      discriminator:
        propertyName: type
        mapping:
          authorization: "#/components/schemas/AuthorizationLog"
          gateway_access: "#/components/schemas/GatewayAccessLog"
          authentication: "#/components/schemas/AuthenticationLog"
      oneOf:
        - $ref: "#/components/schemas/AuthorizationLog"
        - $ref: "#/components/schemas/GatewayAccessLog"
        - $ref: "#/components/schemas/AuthenticationLog"
      title: Audit Log
    CursorMetaPage:
      type: object
      properties:
        first:
          description: URI to the first page
          type: string
          format: path
        last:
          description: URI to the last page
          type: string
          format: path
        next:
          description: URI to the next page
          type: string
          format: path
          nullable: true
        previous:
          description: URI to the previous page
          type: string
          format: path
          nullable: true
        size:
          description: Requested page size
          type: number
          example: 10
      required:
        - size
        - next
        - previous
    UnauthorizedError:
      allOf:
        - $ref: "#/components/schemas/BaseError"
        - type: object
          properties:
            status:
              example: 401
            title:
              example: Unauthorized
            type:
              example: https://httpstatuses.com/401
            instance:
              example: kong:trace:1234567890
            detail:
              example: Invalid credentials
    ForbiddenError:
      allOf:
        - $ref: "#/components/schemas/BaseError"
        - type: object
          properties:
            status:
              example: 403
            title:
              example: Forbidden
            type:
              example: https://httpstatuses.com/403
            instance:
              example: kong:trace:1234567890
            detail:
              example: Forbidden
    AuthorizationLog:
      description: An authorization audit log entry that captures authorization
        decisions for actions performed on Konnect resources.
      type: object
      properties:
        type:
          description: The type of audit log entry.
          type: string
          enum:
            - authorization
        signature:
          description: Base64 URL encoded signature of this entity.
          type: string
        service:
          description: The name of the API service performing the operation (for example,
            servicehub).
          type: string
        resource:
          description: KRN of the resource.
          type: string
        action:
          description: Action performed on the resource.
          type: string
        granted:
          description: Indicates whether the action was granted.
          type: boolean
        org_id:
          description: Organization ID.
          type: string
        ts:
          description: Timestamp when the authorization event occurred.
          type: string
          format: date-time
        principal_id:
          description: Principal that performed the action.
          type: string
        actor_id:
          description: If using an actor JWT, the ID of the person doing the acting.
          type: string
        client_ip:
          description: IP address of the client.
          type: string
        uri:
          description: URI the request was made on.
          type: string
        user_agent:
          description: User agent making the request.
          type: string
        trace_id:
          description: Trace ID of the request.
          type: string
        portal_id:
          description: Optional Dev Portal ID.
          type: string
      example:
        type: authorization
        signature: MEUCIQDfXoXr3s8qLh9w1n0ZtHjvXl7y3iYp2n5iQO4eVhL1gIgH0YcT2uKkJzjE9mNqz8G6pXlL5sZzjvN8YBqk7c0
        service: servicehub
        resource: krn:kong:gateway:us-west-2:a123456789012:12345678-90ab-cdef-1234-567890abcdef
        action: kong.gateway.request
        granted: true
        org_id: 6945c4c4-3e06-4c5c-87e0-726d0cda4e05
        ts: 2023-03-21T09:29:14.52Z
        principal_id: user_1234567890abcdef
        actor_id: user_abcdef1234567890
        client_ip: 127.0.0.1
        uri: /v2/api/endpoint
        user_agent: Mozilla/5.0
        trace_id: "12345678"
        portal_id: 6945c4c4-3e06-4c5c-87e0-726d0cda4e05
      required:
        - type
        - signature
        - service
        - resource
        - action
        - granted
        - org_id
        - ts
        - principal_id
      title: Authorization Audit Log
    GatewayAccessLog:
      description: A gateway access log entry that captures HTTP requests made to the
        Kong Gateway.
      type: object
      properties:
        type:
          description: The type of audit log entry.
          type: string
          enum:
            - gateway_access
        ts:
          description: Timestamp when the request occurred.
          type: string
          format: date-time
        org_id:
          description: Organization ID.
          type: string
        principal_id:
          description: Principal ID.
          type: string
        actor_id:
          description: Actor ID.
          type: string
        client_ip:
          description: IP address of the client.
          type: string
        trace_id:
          description: Trace ID of the request.
          type: string
        user_agent:
          description: User agent making the request.
          type: string
        method:
          description: HTTP request method.
          type: string
        uri:
          description: Request URI.
          type: string
        query:
          description: Request query string.
          type: string
        status_code:
          description: HTTP response status code.
          type: integer
          format: int32
        signature:
          description: Base64 URL encoded signature of this entity.
          type: string
        portal_id:
          description: Optional Dev Portal ID.
          type: string
      example:
        type: gateway_access
        ts: 2023-03-21T09:30:22.15Z
        org_id: 6945c4c4-3e06-4c5c-87e0-726d0cda4e05
        principal_id: user_1234567890abcdef
        actor_id: user_abcdef1234567890
        client_ip: 127.0.0.1
        trace_id: "87654321"
        user_agent: Mozilla/5.0
        method: POST
        uri: /v2/gateway/services
        query: filter=active
        status_code: 201
        signature: MEYCIQCxY8zN2p4tQRs5kJhE6fL9wO3mVbN8cU7dP2qK1sT4vAIhALmN9pR6sX3wE5fT2yU8vK1cO4zP7qS9bR1aM5nF6gL
        portal_id: 6945c4c4-3e06-4c5c-87e0-726d0cda4e05
      required:
        - type
        - ts
        - org_id
        - principal_id
        - actor_id
        - client_ip
        - trace_id
        - user_agent
        - method
        - uri
        - query
        - status_code
        - signature
      title: Gateway Access Log
    AuthenticationLog:
      description: An authentication audit log entry that captures authentication
        attempts and their outcomes.
      type: object
      properties:
        successful:
          description: Indicates whether authentication was successful.
          type: boolean
        principal_id:
          description: If successful, the principal ID.
          type: string
        signature:
          description: Base64 URL encoded signature of this entity.
          type: string
        org_id:
          description: If it can be determined, the organization ID.
          type: string
        outcome:
          $ref: "#/components/schemas/AuthenticationOutcome"
        authentication_type:
          $ref: "#/components/schemas/AuthenticationType"
        ts:
          description: Timestamp when the authentication event occurred.
          type: string
          format: date-time
        client_ip:
          description: IP address of the client.
          type: string
        uri:
          description: URI the request was made on.
          type: string
        user_agent:
          description: User agent making the request.
          type: string
        trace_id:
          description: Trace ID of the request.
          type: string
        portal_id:
          description: Optional Dev Portal ID.
          type: string
      example:
        type: authentication
        successful: true
        principal_id: user_1234567890abcdef
        signature: MEQCIFpL3mN8sR2vT5wO1kJ7fE9xY4cU6bV3dP8qM2nK9sA1AiB5cR7eT3pW9sN1fK4mO2vL8xY6qU5bP3zR1aM4nF7gJ
        org_id: 6945c4c4-3e06-4c5c-87e0-726d0cda4e05
        outcome: success
        authentication_type: sso
        ts: 2023-03-21T09:28:45.78Z
        client_ip: 127.0.0.1
        uri: /v2/auth/login
        user_agent: Mozilla/5.0
        trace_id: "11223344"
      required:
        - successful
        - signature
        - outcome
        - authentication_type
        - ts
        - client_ip
        - uri
        - user_agent
        - trace_id
      title: Authentication Audit Log
    BaseError:
      description: standard error
      type: object
      properties:
        status:
          description: >
            The HTTP status code of the error. Useful when passing the response

            body to child properties in a frontend UI. Must be returned as an
            integer.
          type: integer
          readOnly: true
        title:
          description: |
            A short, human-readable summary of the problem. It should not
            change between occurences of a problem, except for localization.
            Should be provided as "Sentence case" for direct use in the UI.
          type: string
          readOnly: true
        type:
          description: The error type.
          type: string
          readOnly: true
        instance:
          description: |
            Used to return the correlation ID back to the user, in the format
            kong:trace:<correlation_id>. This helps us find the relevant logs
            when a customer reports an issue.
          type: string
          readOnly: true
        detail:
          description: >
            A human readable explanation specific to this occurence of the
            problem.

            This field may contain request/entity data to help the user
            understand

            what went wrong. Enclose variable values in square brackets. Should
            be

            provided as "Sentence case" for direct use in the UI.
          type: string
          readOnly: true
      required:
        - status
        - title
        - instance
        - detail
      title: Error
    AuthenticationOutcome:
      description: The outcome of an authentication attempt.
      type: string
      enum:
        - invalid
        - success
        - not_found
        - invalid_password
        - locked
        - disabled
        - token_expired
      title: Authentication Outcome
    AuthenticationType:
      description: The type of authentication used.
      type: string
      enum:
        - invalid
        - basic
        - sso
        - pat
        - spat
        - google
        - github
        - windowslive
        - federated
      title: Authentication Type
  examples:
    GetAuditLogs:
      value:
        data:
          - type: authorization
            signature: MEUCIQDfXoXr3s8qLh9w1n0ZtHjvXl7y3iYp2n5iQO4eVhL1gIgH0YcT2uKkJzjE9mNqz8G6pXlL5sZzjvN8YBqk7c0
            service: servicehub
            resource: krn:kong:gateway:us-west-2:a123456789012:12345678-90ab-cdef-1234-567890abcdef
            action: kong.gateway.request
            granted: true
            org_id: 6945c4c4-3e06-4c5c-87e0-726d0cda4e05
            ts: 2023-03-21T09:29:14.52Z
            principal_id: user_1234567890abcdef
            actor_id: user_abcdef1234567890
            client_ip: 127.0.0.1
            uri: /v2/api/endpoint
            user_agent: Mozilla/5.0
            trace_id: "12345678"
            portal_id: 6945c4c4-3e06-4c5c-87e0-726d0cda4e05
          - type: gateway_access
            ts: 2023-03-21T09:30:22.15Z
            org_id: 6945c4c4-3e06-4c5c-87e0-726d0cda4e05
            principal_id: user_1234567890abcdef
            actor_id: user_abcdef1234567890
            client_ip: 127.0.0.1
            trace_id: "87654321"
            user_agent: Mozilla/5.0
            method: POST
            uri: /v2/gateway/services
            query: filter=active
            status_code: 201
            signature: MEYCIQCxY8zN2p4tQRs5kJhE6fL9wO3mVbN8cU7dP2qK1sT4vAIhALmN9pR6sX3wE5fT2yU8vK1cO4zP7qS9bR1aM5nF6gL
            portal_id: 6945c4c4-3e06-4c5c-87e0-726d0cda4e05
          - type: authentication
            successful: true
            principal_id: user_1234567890abcdef
            signature: MEQCIFpL3mN8sR2vT5wO1kJ7fE9xY4cU6bV3dP8qM2nK9sA1AiB5cR7eT3pW9sN1fK4mO2vL8xY6qU5bP3zR1aM4nF7gJ
            org_id: 6945c4c4-3e06-4c5c-87e0-726d0cda4e05
            outcome: success
            authentication_type: sso
            ts: 2023-03-21T09:28:45.78Z
            client_ip: 127.0.0.1
            uri: /v2/auth/login
            user_agent: Mozilla/5.0
            trace_id: "11223344"
        meta:
          next: /audit-logs?page[after]=ewogICJpZCI6ICJoZWysbyB3b3JsZCIKgZ
          previous: /audit-logs?page[before]=efogICJpZCI6ICJoZWysbyB3b3JsZCIKgR
          size: 10
    UnauthorizedExample:
      value:
        status: 401
        title: Unauthorized
        instance: kong:trace:8347343766220159418
        detail: Unauthorized
    ForbiddenExample:
      value:
        status: 403
        title: Forbidden
        instance: kong:trace:2723154947768991354
        detail: You do not have permission to perform this action
  securitySchemes:
    personalAccessToken:
      type: http
      scheme: bearer
      bearerFormat: Token
      description: >
        The personal access token is meant to be used as an alternative to
        basic-auth when accessing Konnect via APIs.

        You can generate a Personal Access Token (PAT) from the [personal access
        token page](https://cloud.konghq.com/global/account/tokens/) in the
        Konnect dashboard.

        The PAT token must be passed in the header of a request, for example:

        `curl -X GET 'https://global.api.konghq.com/v2/users/' --header
        'Authorization: Bearer kpat_xgfT...'`
    systemAccountAccessToken:
      type: http
      scheme: bearer
      bearerFormat: Token
      description: >
        The system account access token is meant for automations and
        integrations that are not directly associated with a human identity.

        You can generate a system account Access Token by creating a system
        account and then obtaining a system account access token for that
        account.

        The access token must be passed in the header of a request, for example:

        `curl -X GET 'https://global.api.konghq.com/v2/users/' --header
        'Authorization: Bearer spat_i2Ej...'`
```
