Repository navigation
Expand file tree
/
Copy pathadmin-http-api.yaml
More file actions
286 lines (278 loc) · 8.02 KB
/
Copy pathadmin-http-api.yaml
File metadata and controls
286 lines (278 loc) · 8.02 KB
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
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
openapi: 3.1.0
info:
title: admin-http-api
version: '1.0'
summary: The Precog admin HTTP REST API.
description: The Precog admin HTTP REST API.
contact:
url: 'https://precog.com'
email: support@precog.com
servers:
- url: 'http://localhost:30000'
security:
- BearerAuth: []
paths:
/admin/overrides:
post:
summary: Create a new job override.
description: |-
Create a new job override entry.
Allocates a fresh JobOverridesId and persists a new override with the given
domain, appliesTo predicate, and toOverride patch.
operationId: create-job-overrides
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/overrides-request'
responses:
'201':
description: Override created successfully. Returns the new JobOverridesId.
content:
application/json:
schema:
type: string
description: The newly created JobOverridesId.
'401':
description: Unauthorized
/admin/overrides/{id}:
parameters:
- schema:
type: string
name: id
in: path
required: true
description: The JobOverridesId.
get:
summary: Fetch a single job override by id.
description: Fetch a single job override entry by its JobOverridesId.
operationId: get-job-overrides
responses:
'200':
description: The job override entry.
content:
application/json:
schema:
$ref: '#/components/schemas/job-overrides'
'401':
description: Unauthorized
'404':
description: No override entry with the given id exists.
put:
summary: Replace an existing job override.
description: |-
Full replacement of the override entry identified by id.
The domain, appliesTo, and toOverride fields are all overwritten.
operationId: replace-job-overrides
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/overrides-request'
responses:
'200':
description: Override replaced successfully.
'401':
description: Unauthorized
'404':
description: No override entry with the given id exists.
delete:
summary: Delete a job override.
description: Delete the override entry identified by id.
operationId: delete-job-overrides
responses:
'204':
description: Override deleted successfully.
'401':
description: Unauthorized
'404':
description: No override entry with the given id exists.
/admin/overrides/{id}/applies-to:
parameters:
- schema:
type: string
name: id
in: path
required: true
description: The JobOverridesId.
post:
summary: Append applicability constraints to an existing override.
description: |-
The stored entry's appliesTo is updated by set-union of selectors (per-field),
i.e. values in appliesTo are added to the existing selector sets.
operationId: append-applies-to
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- appliesTo
properties:
appliesTo:
$ref: '#/components/schemas/applies-to'
responses:
'200':
description: AppliesTo appended successfully.
'401':
description: Unauthorized
'404':
description: No override entry with the given id exists.
/admin/overrides/domain/{domain}:
parameters:
- schema:
type: string
enum:
- reader
- schema
- transactor
- discovery
- writer
- statistic
- statistic-verifier
- theta-sketch-compute
- snowflake-semantic-model-publisher
name: domain
in: path
required: true
description: The job domain to list overrides for.
get:
summary: List all job overrides for a domain.
description: Stream all override entries for the given JobDomain.
operationId: list-job-overrides-for-domain
responses:
'200':
description: A JSON array of job override entries.
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/job-overrides'
'401':
description: Unauthorized
components:
schemas:
job-domain:
type: string
enum:
- reader
- schema
- transactor
- discovery
- writer
- statistic
- statistic-verifier
- theta-sketch-compute
- snowflake-semantic-model-publisher
description: |-
The domain a job override applies to.
applies-to:
type: object
description: |-
Defines whether an override is applicable to a certain k8s job.
Matches when any populated field matches.
Fields are checked in priority order: datasetIds (highest), pipelineIds,
sourceIds, destinationIds, datasetPaths, sourceKindNames,
destinationKindNames, and tenantIds (lowest).
properties:
datasetIds:
type: array
items:
type: string
pipelineIds:
type: array
items:
type: string
sourceIds:
type: array
items:
type: string
destinationIds:
type: array
items:
type: string
datasetPaths:
type: array
items:
type: string
sourceKindNames:
type: array
items:
type: string
destinationKindNames:
type: array
items:
type: string
tenantIds:
type: array
items:
type: string
job-args-to-override:
type: object
description: |-
Concrete job arguments to patch into k8s jobs.
Overrides are applied per entry: if a key is present it is set
(replacing or adding), missing keys leave the original untouched.
properties:
envVars:
type: object
additionalProperties:
type: string
limits:
type: object
additionalProperties:
type: string
requests:
type: object
additionalProperties:
type: string
nodeSelector:
type: object
additionalProperties:
type: string
podSpecFields:
type: object
description: Simple PodSpec string fields (currently only priorityClassName is supported).
additionalProperties:
type: string
job-overrides:
type: object
description: |-
A complete job override entry identified by id and constrained to a job domain.
required:
- id
- domain
- appliesTo
- toOverride
properties:
id:
type: string
description: The JobOverridesId.
domain:
$ref: '#/components/schemas/job-domain'
appliesTo:
$ref: '#/components/schemas/applies-to'
toOverride:
$ref: '#/components/schemas/job-args-to-override'
overrides-request:
type: object
description: Request body for creating or replacing a job override.
required:
- domain
- appliesTo
- toOverride
properties:
domain:
$ref: '#/components/schemas/job-domain'
appliesTo:
$ref: '#/components/schemas/applies-to'
toOverride:
$ref: '#/components/schemas/job-args-to-override'
securitySchemes:
BearerAuth:
type: http
scheme: bearer