{"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"},{"name":"Runs","description":"Retrieve script runs"}],"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},"base_uuid":{"name":"base_uuid","description":"The unique identifier of a base. Sometimes also called dtable_uuid.","in":"query","schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{12}$"},"example":"5c264e76-0e5a-448a-9f34-580b551364ca","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},"month":{"name":"month","in":"query","schema":{"type":"string","pattern":"^[0-9]{4}(0[1-9]|1[0-2])$"},"description":"For which month you'd like to list the statistics in the format of YYYYMM. If you leave this value empty, the current month is used.","example":"202306","required":false},"order_by":{"name":"order_by","in":"query","schema":{"type":"string","enum":["total_run_count","total_run_time"],"default":""},"required":false,"description":"Select the parameter to order the results.","example":"total_run_count"},"direction":{"name":"direction","in":"query","schema":{"type":"string","enum":["","asc","desc"],"default":""},"required":false,"description":"The direction of the sort, ascending `asc` or descending `desc`. asc by default. Direction requires that `order_by` is set.","example":"desc"},"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/scripts-running/by-user/":{"get":{"tags":["Statistics"],"summary":"Script Runs per User","operationId":"scriptRunsPerUser","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/month"},{"$ref":"#/components/parameters/order_by"},{"$ref":"#/components/parameters/direction"},{"$ref":"#/components/parameters/page"},{"$ref":"#/components/parameters/per_page"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"month":{"type":"string"},"results":{"type":"array","items":{"type":"object"}},"total_count":{"type":"integer"}}},"example":{"month":"2023-02","results":[{"total_run_count":37,"total_run_time":153,"username":"a5adebe277e256e9e04415a28b2c9e8d@auth.local"},{"total_run_count":12,"total_run_time":23,"username":"56e9e04415a28b2ca5adebe277e29e8d@auth.local"}],"total_count":2}}}}}}},"/admin/statistics/scripts-running/by-org/":{"get":{"tags":["Statistics"],"summary":"Script Runs per Team","operationId":"scriptRunsPerTeam","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/month"},{"$ref":"#/components/parameters/order_by"},{"$ref":"#/components/parameters/direction"},{"$ref":"#/components/parameters/page"},{"$ref":"#/components/parameters/per_page"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"month":{"type":"string"},"results":{"type":"array","items":{"type":"object"}},"total_count":{"type":"integer"}}},"example":{"month":"2023-02","results":[{"total_run_count":37,"total_run_time":153,"org_id":1},{"total_run_count":12,"total_run_time":23,"org_id":2}],"total_count":2}}}}}}},"/admin/statistics/scripts-running/by-base/":{"get":{"tags":["Statistics"],"summary":"Script Runs per Base","operationId":"scriptRunsPerBase","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/month"},{"$ref":"#/components/parameters/order_by"},{"$ref":"#/components/parameters/direction"},{"$ref":"#/components/parameters/page"},{"$ref":"#/components/parameters/per_page"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"month":{"type":"string"},"results":{"type":"array","items":{"type":"object"}},"total_count":{"type":"integer"}}},"example":{"month":"2023-02","results":[{"total_run_count":37,"total_run_time":153,"base_uuid":"1a9707b4-68c9-4e3f-909a-6289ccb47ad7"}],"total_count":1}}}}}}},"/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}}}}}}},"/admin/statistics/by-day/":{"get":{"tags":["Statistics"],"summary":"Grouped by Day","operationId":"getStatisticsGroupedByDay","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/base_uuid"},{"$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":[{"date":"2025-11-01","number_of_runs":1,"total_run_time":5,"triggered_manually":1,"triggered_by_automation_rule":0,"successful_runs":0,"unsuccessful_runs":1},{"date":"2025-11-02","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}}}}}}},"/admin/runs/":{"get":{"tags":["Runs"],"summary":"List Runs","operationId":"listRuns","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"},{"$ref":"#/components/parameters/base_uuid"},{"$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":{"runs":[{"id":1,"dtable_uuid":"a82d3e40-e63a-4b6a-aa5d-2488012d6af5","owner":"397250457b2d4b689b27895309cc0f70@auth.local","script_name":"S9pJ.py","operate_from":"manualy","return_code":0,"success":true,"started_at":"2025-10-31T17:56:50+01:00","finished_at":"2025-10-31T17:56:51+01:00"},{"id":2,"dtable_uuid":"a82d3e40-e63a-4b6a-aa5d-2488012d6af5","owner":"397250457b2d4b689b27895309cc0f70@auth.local","script_name":"S9pJ.py","operate_from":"automation-rule","return_code":0,"success":true,"started_at":"2025-10-31T17:57:32+01:00","finished_at":"2025-10-31T17:57:33+01:00"}],"total_count":1}}}}}}}}}