---
title: Get audit log
slug: get-audit-log
docTags: 
createdAt: 2026-04-17T07:48:39.600Z
---

{
  "id": "PZ1U2L-0x5mxPJ3nWq4tg",
  "type": "api-oas-v2",
  "data": {
    "method": "GET",
    "url": "https://api.archbee.com/v2/admin/audit-log",
    "servers": [
      {
        "url": "https://api.archbee.com/v2/admin/audit-log",
        "description": "Production server"
      },
      {
        "url": "https://staging-api.archbee.com/v2/admin/audit-log",
        "description": "Staging server"
      },
      {
        "url": "https://{region}.api.archbee.com/{version}/admin/audit-log",
        "description": "Regional server with variables"
      }
    ],
    "name": "Get audit log",
    "description": "<p>Returns audit log entries with conditional fields marked via <code>x-conditional</code>.</p>",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [],
      "queryParameters": [
        {
          "kind": "optional",
          "name": "page",
          "type": "integer<int32>",
          "example": 1,
          "description": "<p>Page number for pagination (1-indexed)</p>",
          "default": 1,
          "format": "int32",
          "minimum": 1
        },
        {
          "kind": "optional",
          "name": "limit",
          "type": "integer<int32>",
          "example": 20,
          "description": "Number of items per page",
          "default": 20,
          "format": "int32",
          "minimum": 1,
          "maximum": 100
        },
        {
          "kind": "optional",
          "name": "action",
          "type": "string",
          "description": "Filter by action type",
          "enum": [
            "create",
            "read",
            "update",
            "delete",
            "login",
            "logout"
          ]
        }
      ],
      "bodyDataParameters": [],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "bearerAuth",
          "name": "bearerAuth",
          "kind": "optional",
          "type": "http",
          "description": "<p>HTTP Bearer token authentication (JWT)</p>",
          "scheme": "bearer"
        }
      ]
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "Audit log entries",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "schema": [
              {
                "name": "data",
                "kind": "optional",
                "type": "array",
                "description": "",
                "modelRef": "#/components/schemas/AuditLogEntry",
                "customType": "AuditLogEntry[]",
                "schema": [
                  {
                    "name": "id",
                    "kind": "optional",
                    "type": "string<uuid>",
                    "readOnly": true,
                    "description": "",
                    "example": "",
                    "format": "uuid"
                  },
                  {
                    "name": "timestamp",
                    "kind": "optional",
                    "type": "string<date-time>",
                    "readOnly": true,
                    "description": "",
                    "example": "",
                    "format": "date-time"
                  },
                  {
                    "name": "userId",
                    "kind": "optional",
                    "type": "string<uuid>",
                    "conditional": true,
                    "description": "Conditional.\nUser who performed the action (conditional — may be null for system events)",
                    "example": "",
                    "format": "uuid"
                  },
                  {
                    "name": "action",
                    "kind": "optional",
                    "type": "string<create | read | update | delete | login | logout>",
                    "description": "",
                    "example": "",
                    "enum": [
                      "create",
                      "read",
                      "update",
                      "delete",
                      "login",
                      "logout"
                    ]
                  },
                  {
                    "name": "resource",
                    "kind": "optional",
                    "type": "string",
                    "conditional": true,
                    "description": "Conditional.\nThe resource type affected",
                    "example": "user"
                  },
                  {
                    "name": "resourceId",
                    "kind": "optional",
                    "type": "string",
                    "conditional": true,
                    "description": "Conditional.\nID of the affected resource (conditional — may be null for some actions)",
                    "example": ""
                  },
                  {
                    "name": "ipAddress",
                    "kind": "optional",
                    "type": "string",
                    "description": "",
                    "example": "192.168.1.100"
                  },
                  {
                    "name": "userAgent",
                    "kind": "optional",
                    "type": "string",
                    "description": "",
                    "example": "Mozilla/5.0"
                  },
                  {
                    "name": "changes",
                    "kind": "optional",
                    "type": "map",
                    "conditional": true,
                    "description": "Conditional.\nObject describing what changed (conditional — only present for update actions)",
                    "example": "",
                    "customType": "map<string, object>",
                    "schema": []
                  }
                ]
              },
              {
                "name": "meta",
                "kind": "optional",
                "type": "object",
                "description": "Pagination metadata included in list responses",
                "modelRef": "#/components/schemas/PaginationMeta",
                "customType": "PaginationMeta",
                "schema": [
                  {
                    "name": "page",
                    "kind": "optional",
                    "type": "integer<int32>",
                    "description": "",
                    "example": 1,
                    "format": "int32",
                    "minimum": 1
                  },
                  {
                    "name": "limit",
                    "kind": "optional",
                    "type": "integer<int32>",
                    "description": "",
                    "example": 20,
                    "format": "int32",
                    "minimum": 1,
                    "maximum": 100
                  },
                  {
                    "name": "total",
                    "kind": "optional",
                    "type": "integer<int64>",
                    "description": "",
                    "example": 142,
                    "format": "int64",
                    "minimum": 0
                  },
                  {
                    "name": "totalPages",
                    "kind": "optional",
                    "type": "integer<int32>",
                    "description": "",
                    "example": 8,
                    "format": "int32",
                    "minimum": 0
                  }
                ]
              }
            ],
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "401",
        "description": "Unauthorized — missing or invalid authentication credentials",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "example": "{\"code\":\"UNAUTHORIZED\",\"message\":\"Authentication credentials are missing or invalid\"}",
            "description": "Standard error response",
            "customType": "Error",
            "schema": [
              {
                "name": "code",
                "kind": "required",
                "type": "string",
                "description": "Machine-readable error code",
                "example": "VALIDATION_ERROR"
              },
              {
                "name": "message",
                "kind": "required",
                "type": "string",
                "description": "Human-readable error message",
                "example": "The request body contains invalid fields"
              },
              {
                "name": "details",
                "kind": "optional",
                "type": "array",
                "description": "Detailed validation errors (when applicable)",
                "example": "",
                "itemType": "object",
                "customType": "object[]",
                "schema": [
                  {
                    "name": "field",
                    "kind": "optional",
                    "type": "string",
                    "description": "",
                    "example": "email"
                  },
                  {
                    "name": "message",
                    "kind": "optional",
                    "type": "string",
                    "description": "",
                    "example": "must be a valid email address"
                  },
                  {
                    "name": "code",
                    "kind": "optional",
                    "type": "string",
                    "description": "",
                    "example": "INVALID_FORMAT"
                  }
                ]
              },
              {
                "name": "requestId",
                "kind": "optional",
                "type": "string<uuid>",
                "description": "Correlation ID for support inquiries",
                "example": "",
                "format": "uuid"
              }
            ],
            "modelRef": "#/components/schemas/Error",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "403",
        "description": "Forbidden — insufficient permissions",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "example": "{\"code\":\"FORBIDDEN\",\"message\":\"You do not have permission to access this resource\"}",
            "description": "Standard error response",
            "customType": "Error",
            "schema": [
              {
                "name": "code",
                "kind": "required",
                "type": "string",
                "description": "Machine-readable error code",
                "example": "VALIDATION_ERROR"
              },
              {
                "name": "message",
                "kind": "required",
                "type": "string",
                "description": "Human-readable error message",
                "example": "The request body contains invalid fields"
              },
              {
                "name": "details",
                "kind": "optional",
                "type": "array",
                "description": "Detailed validation errors (when applicable)",
                "example": "",
                "itemType": "object",
                "customType": "object[]",
                "schema": [
                  {
                    "name": "field",
                    "kind": "optional",
                    "type": "string",
                    "description": "",
                    "example": "email"
                  },
                  {
                    "name": "message",
                    "kind": "optional",
                    "type": "string",
                    "description": "",
                    "example": "must be a valid email address"
                  },
                  {
                    "name": "code",
                    "kind": "optional",
                    "type": "string",
                    "description": "",
                    "example": "INVALID_FORMAT"
                  }
                ]
              },
              {
                "name": "requestId",
                "kind": "optional",
                "type": "string<uuid>",
                "description": "Correlation ID for support inquiries",
                "example": "",
                "format": "uuid"
              }
            ],
            "modelRef": "#/components/schemas/Error",
            "isExpanded": true
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "_0xkjLVW8Fm3uV21Dw2p4",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request GET \\\n     --url 'https://api.archbee.com/v2/admin/audit-log?page=1&limit=20' \\\n     --header 'accept: application/json'"
        },
        {
          "id": "poojBJBhdjVMHxwdPwDIF",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar requestOptions = {\n   method: 'GET',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"https://api.archbee.com/v2/admin/audit-log?page=1&limit=20\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "E-krWeMT8XsiZGSPWxdmw",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.archbee.com/v2/admin/audit-log?page=1&limit=20\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "nliqjwniqbZ0ZUrT6f6V7",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.archbee.com/v2/admin/audit-log?page=1&limit=20\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"GET\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "_0xkjLVW8Fm3uV21Dw2p4"
    },
    "results": {
      "languages": [
        {
          "id": "7ZufT9kWt6Rmp2j_4Yja7",
          "language": "200",
          "code": "// Audit log entries\n{\n  \"data\": [\n    {\n      \"id\": \"\",\n      \"timestamp\": \"\",\n      \"userId\": \"\",\n      \"action\": \"\",\n      \"resource\": \"user\",\n      \"resourceId\": \"\",\n      \"ipAddress\": \"192.168.1.100\",\n      \"userAgent\": \"Mozilla/5.0\",\n      \"changes\": \"\"\n    }\n  ],\n  \"meta\": {\n    \"page\": 1,\n    \"limit\": 20,\n    \"total\": 142,\n    \"totalPages\": 8\n  }\n}"
        },
        {
          "id": "vs-4qG5Xo73rxEpmmgNu6",
          "language": "401",
          "code": "// Unauthorized — missing or invalid authentication credentials\n{\n  \"code\": \"VALIDATION_ERROR\",\n  \"message\": \"The request body contains invalid fields\",\n  \"details\": [\n    {\n      \"field\": \"email\",\n      \"message\": \"must be a valid email address\",\n      \"code\": \"INVALID_FORMAT\"\n    }\n  ],\n  \"requestId\": \"\"\n}"
        },
        {
          "id": "YfQyBUMzqYZINys7H7OTX",
          "language": "403",
          "code": "// Forbidden — insufficient permissions\n{\n  \"code\": \"VALIDATION_ERROR\",\n  \"message\": \"The request body contains invalid fields\",\n  \"details\": [\n    {\n      \"field\": \"email\",\n      \"message\": \"must be a valid email address\",\n      \"code\": \"INVALID_FORMAT\"\n    }\n  ],\n  \"requestId\": \"\"\n}"
        }
      ],
      "selectedLanguageId": "7ZufT9kWt6Rmp2j_4Yja7"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}