> ## Documentation Index
> Fetch the complete documentation index at: https://docs.enkryptify.com/llms.txt
> Use this file to discover all available pages before exploring further.

# List audit logs

> Returns audit log entries for a workspace, filterable by actor, action, date range and resource. Results are paginated and ordered newest-first.



## OpenAPI

````yaml /api-reference/openapi.json get /v1/workspace/{ws}/audit-logs
openapi: 3.0.3
info:
  title: Enkryptify API
  version: 1.0.0
  description: >-
    REST API for Enkryptify. Manage secrets, projects, teams and workspaces.
    Authenticate with an `ek_live_` API token via the `Authorization: Bearer`
    header. See https://docs.enkryptify.com/api-reference/introduction.
servers:
  - url: http://localhost:8080
    description: Production
security: []
tags:
  - name: auth
    description: Token exchange and authentication for API access.
  - name: workspace
    description: Workspaces group your projects, teams and members.
  - name: project
    description: Projects organize secrets per application or service.
  - name: team
    description: Teams scope which members can access which projects.
  - name: secret
    description: Read, create, update and delete secret values.
  - name: secret-share
    description: Create and consume time-bound encrypted secret shares.
  - name: tokens
    description: Manage API tokens for programmatic access.
  - name: sync
    description: Manage integrations that sync secrets to external systems.
  - name: me
    description: Inspect the authenticated user, sessions and preferences.
  - name: oidc
    description: Workspace-scoped OpenID Connect identity federation.
paths:
  /v1/workspace/{ws}/audit-logs:
    get:
      tags:
        - workspace
      summary: List audit logs
      description: >-
        Returns audit log entries for a workspace, filterable by actor, action,
        date range and resource. Results are paginated and ordered newest-first.
      operationId: listAuditLogs
      parameters:
        - schema:
            anyOf:
              - type: string
              - type: number
          in: query
          name: start
          required: false
        - schema:
            anyOf:
              - type: string
              - type: number
          in: query
          name: end
          required: false
        - schema:
            anyOf:
              - type: string
              - type: number
          in: query
          name: limit
          required: false
        - schema:
            type: string
          in: query
          name: cursor
          required: false
        - schema:
            type: string
            format: uuid
            pattern: >-
              ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
          in: query
          name: userId
          required: false
        - schema:
            type: string
            format: uuid
            pattern: >-
              ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
          in: query
          name: projectId
          required: false
        - schema:
            type: string
            format: uuid
            pattern: >-
              ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
          in: query
          name: secretId
          required: false
        - schema:
            type: string
          in: query
          name: action
          required: false
        - schema:
            anyOf:
              - type: string
                minLength: 2
                maxLength: 48
                pattern: ^[a-z0-9-]+$
              - type: string
                format: uuid
                pattern: >-
                  ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
          in: path
          name: ws
          required: true
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  items:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        createdAt:
                          type: string
                        workspaceId:
                          type: string
                        user:
                          type: object
                          properties:
                            id:
                              type: string
                            name:
                              type: string
                            email:
                              type: string
                          required:
                            - id
                            - name
                          additionalProperties: false
                        action:
                          type: string
                          enum:
                            - CREATE
                            - UPDATE
                            - DELETE
                            - VIEW
                        entity:
                          type: object
                          properties:
                            type:
                              type: string
                              enum:
                                - workspace
                                - team
                                - project
                                - environment
                                - secret
                                - workspace-member
                                - sync
                                - api-token
                                - oidc-identity
                                - secret-share
                            id:
                              type: string
                            name:
                              type: string
                          required:
                            - type
                            - id
                            - name
                          additionalProperties: false
                        dataBefore: {}
                        dataAfter: {}
                        scope:
                          type: object
                          properties:
                            type:
                              type: string
                              enum:
                                - project
                                - environment
                            id:
                              type: string
                            name:
                              type: string
                          required:
                            - type
                            - id
                            - name
                          additionalProperties: false
                        secrets:
                          type: array
                          items:
                            type: object
                            properties:
                              id:
                                type: string
                              name:
                                type: string
                            required:
                              - id
                              - name
                            additionalProperties: false
                      required:
                        - id
                        - createdAt
                        - workspaceId
                        - user
                        - action
                        - entity
                      additionalProperties: false
                  nextCursor:
                    nullable: true
                    type: string
                required:
                  - items
                  - nextCursor
                additionalProperties: false
      security:
        - apiKeyAuth: []
      x-codeSamples:
        - lang: bash
          label: cURL
          source: >-
            curl -X GET
            'http://localhost:8080/v1/workspace/ws_example/audit-logs' \
              -H 'Authorization: Bearer ek_live_xxxxx'
        - lang: javascript
          label: TypeScript
          source: >-
            const response = await
            fetch('http://localhost:8080/v1/workspace/ws_example/audit-logs', {
              method: 'GET',
              headers: {
                Authorization: 'Bearer ek_live_xxxxx',
              },
            });


            const data = await response.json();
        - lang: python
          label: Python
          source: |-
            import requests

            response = requests.get(
                'http://localhost:8080/v1/workspace/ws_example/audit-logs',
                headers={
                    'Authorization': 'Bearer ek_live_xxxxx',
                },
            )

            data = response.json()
components:
  securitySchemes:
    apiKeyAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: >-
        API key authentication. Pass `Authorization: Bearer ek_live_xxxxx` on
        every request.

````