-
Notifications
You must be signed in to change notification settings - Fork 3
/
python-scheduler.yaml
167 lines (161 loc) · 4.76 KB
/
python-scheduler.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
openapi: 3.0.0
info:
title: Python Scheduler
description: >-
The official SeaTable API Reference (OpenAPI 3.0).
version: "5.1"
servers:
- url: "https://{server}"
variables:
server:
default: cloud.seatable.io
x-readme:
explorer-enabled: true
metrics-enabled: false
proxy-enabled: false
components:
securitySchemes:
PythonSchedulerAuth:
type: http
scheme: bearer
description: This is the [Python-Scheduler-Token](/reference/authentication).
parameters:
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 YYYY-MM. If you leave this value empty,
example: "2023-06"
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
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
example:
month: "2023-02"
results:
- total_run_count: 37
total_run_time: 153
username: [email protected]
- total_run_count: 12
total_run_time: 23
username: [email protected]
total_count: 2
/admin/statistics/scripts-running/by-org/:
get:
tags:
- Statistics
summary: Script runs per team
operationId: scriptRunsPerTeam
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
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
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
example:
month: "2023-02"
results:
- total_run_count: 37
total_run_time: 153
base_uuid: 1a9707b4-68c9-4e3f-909a-6289ccb47ad7
total_count: 1