# List Audit Logs

Fetches audit logs for the system administrator.

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "Account Operations: System admin",
    "description": "The official SeaTable API Reference (OpenAPI 3.0).",
    "version": "6.2"
  },
  "servers": [
    {
      "url": "https://{server}",
      "variables": {
        "server": {
          "default": "cloud.seatable.io"
        }
      }
    }
  ],
  "x-readme": {
    "explorer-enabled": true,
    "metrics-enabled": false,
    "proxy-enabled": false
  },
  "tags": [
    {
      "name": "Logs",
      "description": "Retrieve logs"
    }
  ],
  "components": {
    "securitySchemes": {
      "AccountTokenAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "This is the [Account-Token](/reference/authentication)."
      }
    },
    "parameters": {
      "page": {
        "name": "page",
        "description": "The page number you want to start showing the entries. If no value is provided, 1 will be used.",
        "in": "query",
        "schema": {
          "type": "integer",
          "minimum": 1
        },
        "example": 1,
        "required": false
      },
      "per_page": {
        "name": "per_page",
        "in": "query",
        "schema": {
          "type": "integer",
          "minimum": 1
        },
        "description": "The number of results that should be returned. If no value is provided, 25 results will be returned.",
        "example": 25,
        "required": false
      }
    }
  },
  "paths": {
    "/api/v2.1/admin/audit-logs/": {
      "get": {
        "tags": [
          "Logs"
        ],
        "summary": "List Audit Logs",
        "operationId": "listAuditLogs",
        "description": "Fetches audit logs for the system administrator.",
        "security": [
          {
            "AccountTokenAuth": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/page"
          },
          {
            "$ref": "#/components/parameters/per_page"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "audit_log_list": {
                      "type": "array",
                      "description": "A list of big data operation logs.",
                      "items": {
                        "type": "object",
                        "properties": {
                          "username": {
                            "type": "string",
                            "description": "The username associated with the operation.",
                            "example": "509fe338ed4f44099158d7143e4e4de3@auth.local"
                          },
                          "name": {
                            "type": "string",
                            "description": "The name of the user who performed the operation.",
                            "example": "admin"
                          },
                          "operation": {
                            "type": "string",
                            "description": "The type of operation performed.",
                            "example": "group_delete"
                          },
                          "org_id": {
                            "type": "integer",
                            "description": "The ID of the organization associated with the operation.",
                            "example": 0
                          },
                          "detail": {
                            "type": "object",
                            "description": "Additional details about the operation.",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "description": "The ID associated with the detail of the operation.",
                                "example": 17
                              },
                              "name": {
                                "type": "string",
                                "description": "The name associated with the detail of the operation.",
                                "example": "xxoooaaa"
                              }
                            }
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time",
                            "description": "The timestamp of when the operation occurred.",
                            "example": "2024-08-14T15:23:24+08:00"
                          },
                          "org_name": {
                            "type": "string",
                            "description": "The name of the organization associated with the operation.",
                            "example": ""
                          }
                        }
                      }
                    },
                    "total_count": {
                      "type": "integer",
                      "description": "The total number of logs available.",
                      "example": 15
                    }
                  }
                },
                "example": {
                  "audit_log_list": [
                    {
                      "username": "a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6@auth.local",
                      "name": "John Smith",
                      "operation": "group_delete",
                      "org_id": -1,
                      "detail": {
                        "id": 250,
                        "name": "My Group"
                      },
                      "created_at": "2024-03-19T01:25:25+00:00",
                      "org_name": ""
                    }
                  ]
                }
              }
            }
          }
        }
      }
    }
  },
  "_id": {
    "buffer": {
      "0": 105,
      "1": 212,
      "2": 220,
      "3": 12,
      "4": 20,
      "5": 34,
      "6": 131,
      "7": 31,
      "8": 141,
      "9": 111,
      "10": 187,
      "11": 146
    }
  }
}
```