# Grouped by Base

> 📘 Requires Self-Hosted Installation
>
> This endpoint requires a Python-Scheduler-Token, which can only be retrieved by the system administrator.
> Therefore this endpoint cannot be used with SeaTable Cloud.

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "Python Scheduler",
    "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": "Statistics",
      "description": "Retrieve statistics"
    }
  ],
  "components": {
    "securitySchemes": {
      "PythonSchedulerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "This is the [Python-Scheduler-Token](/reference/authentication)."
      }
    },
    "parameters": {
      "org_id": {
        "name": "org_id",
        "description": "The ID of the team/organization.",
        "in": "query",
        "schema": {
          "type": "integer",
          "minimum": 1
        },
        "example": 1,
        "required": false
      },
      "start": {
        "name": "start",
        "in": "query",
        "schema": {
          "type": "string",
          "format": "date-time"
        },
        "description": "Start date in ISO format.",
        "example": "2025-11-01T06:00:00+01:00",
        "required": false
      },
      "end": {
        "name": "end",
        "in": "query",
        "schema": {
          "type": "string",
          "format": "date-time"
        },
        "description": "End date in ISO format.",
        "example": "2025-11-30T18:00:00+01:00",
        "required": false
      },
      "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": {
    "/admin/statistics/by-base/": {
      "get": {
        "tags": [
          "Statistics"
        ],
        "summary": "Grouped by Base",
        "operationId": "getStatisticsGroupedByBase",
        "description": "> 📘 Requires Self-Hosted Installation\n>\n> This endpoint requires a Python-Scheduler-Token, which can only be retrieved by the system administrator.\n> Therefore this endpoint cannot be used with SeaTable Cloud.\n",
        "security": [
          {
            "PythonSchedulerAuth": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/org_id",
            "required": true
          },
          {
            "$ref": "#/components/parameters/start"
          },
          {
            "$ref": "#/components/parameters/end"
          },
          {
            "$ref": "#/components/parameters/page"
          },
          {
            "$ref": "#/components/parameters/per_page"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "results": [
                    {
                      "base_uuid": "80e1cca6-8cb5-4226-932b-077b16cdcf57",
                      "number_of_runs": 1,
                      "total_run_time": 5,
                      "triggered_manually": 1,
                      "triggered_by_automation_rule": 0,
                      "successful_runs": 0,
                      "unsuccessful_runs": 1
                    },
                    {
                      "base_uuid": "a82d3e40-e63a-4b6a-aa5d-2488012d6af5",
                      "number_of_runs": 14,
                      "successful_runs": 10,
                      "total_run_time": 2204,
                      "triggered_by_automation_rule": 7,
                      "triggered_manually": 7,
                      "unsuccessful_runs": 4
                    }
                  ],
                  "total_count": 2
                }
              }
            }
          }
        }
      }
    }
  },
  "_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": 148
    }
  }
}
```