---
title: /audit-log
slug: amberflo-api/audit-log
docTags: 
createdAt: 2024-11-07T15:10:16.980Z
---

{
  "id": "XiAN5j9lqQqm-3DOkFZ0Z",
  "type": "api-oas-v2",
  "data": {
    "method": "GET",
    "url": "https://app.amberflo.io/audit-log",
    "servers": [
      {
        "url": "https://app.amberflo.io/audit-log"
      }
    ],
    "name": "",
    "description": "",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [],
      "queryParameters": [],
      "bodyDataParameters": [],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "apiKey",
          "name": "X-API-KEY",
          "kind": "optional",
          "type": "apiKey",
          "in": "header"
        }
      ]
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "Successful request",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "metadata.audit_log.AuditLogQueryResponse.out",
            "schema": [
              {
                "name": "query",
                "kind": "optional",
                "type": "object",
                "description": "The processed query.",
                "modelRef": "#/components/schemas/metadata.audit_log.AuditLogQuery.out",
                "customType": "metadata.audit_log.AuditLogQuery.out",
                "schema": [
                  {
                    "name": "limit",
                    "kind": "optional",
                    "type": "integer<int32>",
                    "example": 0
                  },
                  {
                    "name": "after",
                    "kind": "optional",
                    "type": "string",
                    "example": ""
                  },
                  {
                    "name": "isAscending",
                    "kind": "optional",
                    "type": "boolean",
                    "example": ""
                  },
                  {
                    "name": "startTimeInMillis",
                    "kind": "optional",
                    "type": "integer<int64>",
                    "example": 0
                  },
                  {
                    "name": "endTimeInMillis",
                    "kind": "optional",
                    "type": "integer<int64>",
                    "example": 0
                  },
                  {
                    "name": "mainType",
                    "kind": "optional",
                    "type": "string",
                    "description": "",
                    "modelRef": "#/components/schemas/metadata.audit_log.MainEntityType.out",
                    "customType": "metadata.audit_log.MainEntityType.out",
                    "schema": []
                  },
                  {
                    "name": "mainId",
                    "kind": "optional",
                    "type": "string",
                    "example": ""
                  },
                  {
                    "name": "subType",
                    "kind": "optional",
                    "type": "object",
                    "description": "",
                    "modelRef": "#/components/schemas/metadata.audit_log.SubEntityType.out",
                    "customType": "metadata.audit_log.SubEntityType.out",
                    "schema": [
                      {
                        "name": "name",
                        "kind": "optional",
                        "type": "string",
                        "example": ""
                      },
                      {
                        "name": "ordinal",
                        "kind": "optional",
                        "type": "integer<int32>",
                        "example": 0
                      }
                    ]
                  },
                  {
                    "name": "subId",
                    "kind": "optional",
                    "type": "string",
                    "example": ""
                  },
                  {
                    "name": "actorType",
                    "kind": "optional",
                    "type": "string",
                    "description": "",
                    "modelRef": "#/components/schemas/metadata.audit_log.entry.ActorType.out",
                    "customType": "metadata.audit_log.entry.ActorType.out",
                    "schema": []
                  },
                  {
                    "name": "actorId",
                    "kind": "optional",
                    "type": "string",
                    "example": ""
                  }
                ]
              },
              {
                "name": "metadata",
                "kind": "optional",
                "type": "object",
                "description": "Metadata for pagination.",
                "modelRef": "#/components/schemas/metadata.audit_log.AuditLogQueryMetadata.out",
                "customType": "metadata.audit_log.AuditLogQueryMetadata.out",
                "schema": [
                  {
                    "name": "after",
                    "kind": "optional",
                    "type": "string",
                    "example": ""
                  }
                ]
              },
              {
                "name": "entries",
                "kind": "optional",
                "type": "array",
                "description": "List of audit log entries matching the query.",
                "modelRef": "#/components/schemas/metadata.audit_log.entry.PartialEntry.out",
                "customType": "metadata.audit_log.entry.PartialEntry.out[]",
                "schema": [
                  {
                    "name": "id",
                    "kind": "optional",
                    "type": "integer<int64>",
                    "description": "Unique id of this audit log entry.",
                    "example": 0
                  },
                  {
                    "name": "changeTimeInMillis",
                    "kind": "optional",
                    "type": "integer<int64>",
                    "description": "Time in [Unix time](https://en.wikipedia.org/wiki/Unix_time) (milliseconds) when the change happened.",
                    "example": 0
                  },
                  {
                    "name": "mainType",
                    "kind": "optional",
                    "type": "string",
                    "description": "",
                    "modelRef": "#/components/schemas/metadata.audit_log.MainEntityType.out",
                    "customType": "metadata.audit_log.MainEntityType.out",
                    "schema": []
                  },
                  {
                    "name": "mainId",
                    "kind": "optional",
                    "type": "string",
                    "example": ""
                  },
                  {
                    "name": "subType",
                    "kind": "optional",
                    "type": "object",
                    "description": "",
                    "modelRef": "#/components/schemas/metadata.audit_log.SubEntityType.out",
                    "customType": "metadata.audit_log.SubEntityType.out",
                    "schema": [
                      {
                        "name": "name",
                        "kind": "optional",
                        "type": "string",
                        "example": ""
                      },
                      {
                        "name": "ordinal",
                        "kind": "optional",
                        "type": "integer<int32>",
                        "example": 0
                      }
                    ]
                  },
                  {
                    "name": "subId",
                    "kind": "optional",
                    "type": "string",
                    "example": ""
                  },
                  {
                    "name": "summary",
                    "kind": "optional",
                    "type": "array",
                    "description": "Summary of the changes.",
                    "modelRef": "#/components/schemas/metadata.audit_log.ChangeSummary.out",
                    "customType": "metadata.audit_log.ChangeSummary.out[]",
                    "schema": [
                      {
                        "name": "field",
                        "kind": "optional",
                        "type": "string",
                        "example": ""
                      },
                      {
                        "name": "action",
                        "kind": "optional",
                        "type": "string",
                        "description": "",
                        "modelRef": "#/components/schemas/metadata.audit_log.ChangeSummary.Action.out",
                        "customType": "metadata.audit_log.ChangeSummary.Action.out",
                        "schema": []
                      }
                    ]
                  },
                  {
                    "name": "actor",
                    "kind": "optional",
                    "type": "object",
                    "description": "Information about who performed the change.",
                    "modelRef": "#/components/schemas/metadata.audit_log.entry.Actor.out",
                    "customType": "metadata.audit_log.entry.Actor.out",
                    "schema": [
                      {
                        "name": "type",
                        "kind": "optional",
                        "type": "string",
                        "description": "Type of the actor",
                        "modelRef": "#/components/schemas/metadata.audit_log.entry.ActorType.out",
                        "customType": "metadata.audit_log.entry.ActorType.out",
                        "schema": []
                      },
                      {
                        "name": "id",
                        "kind": "optional",
                        "type": "string",
                        "description": "Id of the actor",
                        "example": ""
                      }
                    ]
                  }
                ]
              }
            ],
            "modelRef": "#/components/schemas/metadata.audit_log.AuditLogQueryResponse.out",
            "isExpanded": true
          }
        ]
      }
    ],
    "examples": {
      "languages": [
        {
          "id": "4mNuysGfkmfw7h-0sFcEG",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request GET \\\n     --url https://app.amberflo.io/audit-log \\\n     --header 'accept: application/json'"
        },
        {
          "id": "9XEeq4zPdDZBtZWgy723F",
          "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://app.amberflo.io/audit-log\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "_U0MiYVMjvh1ZA4H2DaT4",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://app.amberflo.io/audit-log\")\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": "W-oleT8mlVl5SPfqIh9Gm",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://app.amberflo.io/audit-log\"\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": "4mNuysGfkmfw7h-0sFcEG"
    },
    "results": {
      "languages": [
        {
          "id": "D_9aWJqBEOLyiIsn4Zl0C",
          "language": "200",
          "code": "// Successful request\n{\n  \"query\": {\n    \"limit\": \"\",\n    \"after\": \"\",\n    \"isAscending\": false,\n    \"startTimeInMillis\": \"\",\n    \"endTimeInMillis\": \"\",\n    \"mainType\": \"\",\n    \"mainId\": \"\",\n    \"subType\": {\n      \"name\": \"\",\n      \"ordinal\": \"\"\n    },\n    \"subId\": \"\",\n    \"actorType\": \"\",\n    \"actorId\": \"\"\n  },\n  \"metadata\": {\n    \"after\": \"\"\n  },\n  \"entries\": [\n    {\n      \"id\": \"\",\n      \"changeTimeInMillis\": \"\",\n      \"mainType\": \"\",\n      \"mainId\": \"\",\n      \"subType\": {\n        \"name\": \"\",\n        \"ordinal\": \"\"\n      },\n      \"subId\": \"\",\n      \"summary\": [\n        {\n          \"field\": \"\",\n          \"action\": \"\"\n        }\n      ],\n      \"actor\": {\n        \"type\": \"\",\n        \"id\": \"\"\n      }\n    }\n  ]\n}"
        }
      ],
      "selectedLanguageId": "D_9aWJqBEOLyiIsn4Zl0C"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}