{
  "/audit": {
    "get": {
      "tags": [
        "Audit Logging"
      ],
      "summary": "Get Audit Logs",
      "description": "Get all audit logs with filtering and pagination.\n\nReturns a paginated response of audit logs matching the specified filters.\n\nNote: object_team_id and object_key_hash use Prisma JSON path filtering,\nwhich requires PostgreSQL.",
      "operationId": "get_audit_logs_audit_get",
      "security": [
        {
          "APIKeyHeader": []
        }
      ],
      "parameters": [
        {
          "name": "page",
          "in": "query",
          "required": false,
          "schema": {
            "type": "integer",
            "minimum": 1,
            "default": 1,
            "title": "Page"
          }
        },
        {
          "name": "page_size",
          "in": "query",
          "required": false,
          "schema": {
            "type": "integer",
            "maximum": 100,
            "minimum": 1,
            "default": 10,
            "title": "Page Size"
          }
        },
        {
          "name": "changed_by",
          "in": "query",
          "required": false,
          "schema": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Filter by user or system that performed the action",
            "title": "Changed By"
          },
          "description": "Filter by user or system that performed the action"
        },
        {
          "name": "changed_by_api_key",
          "in": "query",
          "required": false,
          "schema": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Filter by API key hash that performed the action",
            "title": "Changed By Api Key"
          },
          "description": "Filter by API key hash that performed the action"
        },
        {
          "name": "action",
          "in": "query",
          "required": false,
          "schema": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Filter by action type (create, update, delete)",
            "title": "Action"
          },
          "description": "Filter by action type (create, update, delete)"
        },
        {
          "name": "table_name",
          "in": "query",
          "required": false,
          "schema": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Filter by table name that was modified",
            "title": "Table Name"
          },
          "description": "Filter by table name that was modified"
        },
        {
          "name": "object_id",
          "in": "query",
          "required": false,
          "schema": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Filter by ID of the object that was modified",
            "title": "Object Id"
          },
          "description": "Filter by ID of the object that was modified"
        },
        {
          "name": "start_date",
          "in": "query",
          "required": false,
          "schema": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Filter logs after this date",
            "title": "Start Date"
          },
          "description": "Filter logs after this date"
        },
        {
          "name": "end_date",
          "in": "query",
          "required": false,
          "schema": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Filter logs before this date",
            "title": "End Date"
          },
          "description": "Filter logs before this date"
        },
        {
          "name": "object_team_id",
          "in": "query",
          "required": false,
          "schema": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Filter by team_id present in before_value or updated_values JSON (PostgreSQL only)",
            "title": "Object Team Id"
          },
          "description": "Filter by team_id present in before_value or updated_values JSON (PostgreSQL only)"
        },
        {
          "name": "object_key_hash",
          "in": "query",
          "required": false,
          "schema": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Filter by token (key hash) present in before_value or updated_values JSON (PostgreSQL only)",
            "title": "Object Key Hash"
          },
          "description": "Filter by token (key hash) present in before_value or updated_values JSON (PostgreSQL only)"
        },
        {
          "name": "sort_by",
          "in": "query",
          "required": false,
          "schema": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Column to sort by (e.g. 'updated_at', 'action', 'table_name')",
            "title": "Sort By"
          },
          "description": "Column to sort by (e.g. 'updated_at', 'action', 'table_name')"
        },
        {
          "name": "sort_order",
          "in": "query",
          "required": false,
          "schema": {
            "type": "string",
            "description": "Sort order ('asc' or 'desc')",
            "default": "desc",
            "title": "Sort Order"
          },
          "description": "Sort order ('asc' or 'desc')"
        }
      ],
      "responses": {
        "200": {
          "description": "Successful Response",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PaginatedAuditLogResponse"
              }
            }
          }
        },
        "422": {
          "description": "Validation Error",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/HTTPValidationError"
              }
            }
          }
        }
      }
    }
  },
  "/audit/{id}": {
    "get": {
      "tags": [
        "Audit Logging"
      ],
      "summary": "Get Audit Log By Id",
      "description": "Get detailed information about a specific audit log entry by its ID.\n\nArgs:\n    id (str): The unique identifier of the audit log entry\n\nReturns:\n    AuditLogResponse: Detailed information about the audit log entry\n\nRaises:\n    HTTPException: If the audit log is not found or if there's a database connection error",
      "operationId": "get_audit_log_by_id_audit__id__get",
      "security": [
        {
          "APIKeyHeader": []
        }
      ],
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "title": "Id"
          }
        }
      ],
      "responses": {
        "200": {
          "description": "Successful Response",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AuditLogResponse"
              }
            }
          }
        },
        "404": {
          "description": "Audit log not found"
        },
        "500": {
          "description": "Database connection error"
        },
        "422": {
          "description": "Validation Error",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/HTTPValidationError"
              }
            }
          }
        }
      }
    }
  }
}