@shipeasy/openapi 1.5.0 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +37 -0
- package/dist/chunk-EPLLHLZN.js +1616 -0
- package/dist/chunk-EPLLHLZN.js.map +1 -0
- package/dist/chunk-SPH5HWCD.js +3326 -0
- package/dist/chunk-SPH5HWCD.js.map +1 -0
- package/dist/client-pVkoo3Bf.d.ts +11186 -0
- package/dist/client.d.ts +1 -0
- package/dist/client.js +215 -0
- package/dist/client.js.map +1 -0
- package/dist/custom.d.ts +64 -0
- package/dist/custom.js +292 -0
- package/dist/custom.js.map +1 -0
- package/dist/index.d.ts +29 -17
- package/dist/index.js +253 -2458
- package/dist/index.js.map +1 -0
- package/dist/node-context.d.ts +85 -0
- package/dist/node-context.js +110 -0
- package/dist/node-context.js.map +1 -0
- package/dist/schemas.d.ts +7920 -0
- package/dist/schemas.js +1083 -0
- package/dist/schemas.js.map +1 -0
- package/openapi.json +15297 -3044
- package/openapi.yaml +13979 -0
- package/package.json +37 -21
- package/spec/components/errors.yaml +53 -0
- package/spec/components/parameters.yaml +24 -0
- package/spec/components/responses.yaml +107 -0
- package/spec/components/schemas/alert-rules.yaml +175 -0
- package/spec/components/schemas/attributes.yaml +157 -0
- package/spec/components/schemas/common.yaml +87 -0
- package/spec/components/schemas/configs.yaml +371 -0
- package/spec/components/schemas/connectors.yaml +593 -0
- package/spec/components/schemas/errors-api.yaml +209 -0
- package/spec/components/schemas/events.yaml +321 -0
- package/spec/components/schemas/experiments.yaml +865 -0
- package/spec/components/schemas/gate-templates.yaml +198 -0
- package/spec/components/schemas/gates.yaml +890 -0
- package/spec/components/schemas/i18n.yaml +478 -0
- package/spec/components/schemas/keys.yaml +186 -0
- package/spec/components/schemas/killswitches.yaml +309 -0
- package/spec/components/schemas/metrics.yaml +547 -0
- package/spec/components/schemas/ops.yaml +1011 -0
- package/spec/components/schemas/projects.yaml +222 -0
- package/spec/components/schemas/search.yaml +46 -0
- package/spec/components/schemas/universes.yaml +127 -0
- package/spec/openapi.yaml +348 -0
- package/spec/paths/alert-rules.yaml +250 -0
- package/spec/paths/attributes.yaml +261 -0
- package/spec/paths/configs.yaml +744 -0
- package/spec/paths/connectors.yaml +748 -0
- package/spec/paths/errors.yaml +382 -0
- package/spec/paths/events.yaml +366 -0
- package/spec/paths/experiments.yaml +777 -0
- package/spec/paths/gate-templates.yaml +263 -0
- package/spec/paths/gates.yaml +451 -0
- package/spec/paths/i18n.yaml +544 -0
- package/spec/paths/keys.yaml +181 -0
- package/spec/paths/killswitches.yaml +557 -0
- package/spec/paths/metrics.yaml +302 -0
- package/spec/paths/ops.yaml +446 -0
- package/spec/paths/projects.yaml +210 -0
- package/spec/paths/search.yaml +62 -0
- package/spec/paths/universes.yaml +247 -0
- package/dist/resources/alert-rules.d.ts +0 -50
- package/dist/resources/alert-rules.js +0 -75
- package/dist/resources/configs.d.ts +0 -681
- package/dist/resources/configs.js +0 -509
- package/dist/resources/experiments.d.ts +0 -849
- package/dist/resources/experiments.js +0 -707
- package/dist/resources/gates.d.ts +0 -808
- package/dist/resources/gates.js +0 -522
- package/dist/resources/index.d.ts +0 -2749
- package/dist/resources/index.js +0 -2391
- package/dist/resources/killswitches.d.ts +0 -436
- package/dist/resources/killswitches.js +0 -514
- package/dist/resources/universes.d.ts +0 -185
- package/dist/resources/universes.js +0 -234
- package/dist/schemas/alert-rules.d.ts +0 -65
- package/dist/schemas/alert-rules.js +0 -37
- package/dist/schemas/configs.d.ts +0 -154
- package/dist/schemas/configs.js +0 -134
- package/dist/schemas/constants.d.ts +0 -6
- package/dist/schemas/constants.js +0 -7
- package/dist/schemas/experiments.d.ts +0 -229
- package/dist/schemas/experiments.js +0 -221
- package/dist/schemas/folder.d.ts +0 -10
- package/dist/schemas/folder.js +0 -8
- package/dist/schemas/gates.d.ts +0 -386
- package/dist/schemas/gates.js +0 -190
- package/dist/schemas/index.d.ts +0 -11
- package/dist/schemas/index.js +0 -762
- package/dist/schemas/killswitches.d.ts +0 -110
- package/dist/schemas/killswitches.js +0 -226
- package/dist/schemas/metric-name.d.ts +0 -5
- package/dist/schemas/metric-name.js +0 -6
- package/dist/schemas/pagination.d.ts +0 -37
- package/dist/schemas/pagination.js +0 -44
- package/dist/schemas/universes.d.ts +0 -35
- package/dist/schemas/universes.js +0 -55
- package/dist/transport.d.ts +0 -30
- package/dist/transport.js +0 -44
|
@@ -0,0 +1,557 @@
|
|
|
1
|
+
/api/admin/killswitches:
|
|
2
|
+
get:
|
|
3
|
+
operationId: listKillswitches
|
|
4
|
+
summary: List killswitches
|
|
5
|
+
description: |-
|
|
6
|
+
Returns a single page of killswitches ordered by `updated_at desc, id desc`. Each row includes the latest published `value`/`switches`/`version` per env.
|
|
7
|
+
|
|
8
|
+
**Use case:** Snapshot every killswitch in the project — e.g. to render an incident-response runbook listing every kill and its current trip state.
|
|
9
|
+
tags:
|
|
10
|
+
- Killswitch
|
|
11
|
+
parameters:
|
|
12
|
+
- $ref: ../components/parameters.yaml#/ProjectId
|
|
13
|
+
- $ref: ../components/parameters.yaml#/PaginationLimit
|
|
14
|
+
- $ref: ../components/parameters.yaml#/PaginationCursor
|
|
15
|
+
responses:
|
|
16
|
+
"200":
|
|
17
|
+
description: List killswitches
|
|
18
|
+
content:
|
|
19
|
+
application/json:
|
|
20
|
+
schema:
|
|
21
|
+
$ref: ../components/schemas/killswitches.yaml#/ListKillswitchesResponse
|
|
22
|
+
example:
|
|
23
|
+
data:
|
|
24
|
+
- id: ksw_01j7w9d8h2k4m6n8p0q2r4s6t8
|
|
25
|
+
name: payments.checkout
|
|
26
|
+
description: Master kill for the checkout flow. Trip to fall back to the legacy provider.
|
|
27
|
+
updatedAt: 2026-05-09T18:22:11.000Z
|
|
28
|
+
envs:
|
|
29
|
+
dev:
|
|
30
|
+
value: false
|
|
31
|
+
version: 3
|
|
32
|
+
publishedAt: 2026-05-09T18:22:11.000Z
|
|
33
|
+
stage:
|
|
34
|
+
value: false
|
|
35
|
+
version: 3
|
|
36
|
+
publishedAt: 2026-05-09T18:22:11.000Z
|
|
37
|
+
prod:
|
|
38
|
+
value: false
|
|
39
|
+
switches:
|
|
40
|
+
eu_region: true
|
|
41
|
+
version: 5
|
|
42
|
+
publishedAt: 2026-05-09T18:22:11.000Z
|
|
43
|
+
next_cursor: null
|
|
44
|
+
"400":
|
|
45
|
+
$ref: ../components/responses.yaml#/BadRequest
|
|
46
|
+
"401":
|
|
47
|
+
$ref: ../components/responses.yaml#/Unauthorized
|
|
48
|
+
"403":
|
|
49
|
+
$ref: ../components/responses.yaml#/Forbidden
|
|
50
|
+
"404":
|
|
51
|
+
$ref: ../components/responses.yaml#/NotFound
|
|
52
|
+
"409":
|
|
53
|
+
$ref: ../components/responses.yaml#/Conflict
|
|
54
|
+
"422":
|
|
55
|
+
$ref: ../components/responses.yaml#/UnprocessableEntity
|
|
56
|
+
x-error-codes:
|
|
57
|
+
- BAD_REQUEST
|
|
58
|
+
- UNAUTHORIZED
|
|
59
|
+
- FORBIDDEN
|
|
60
|
+
x-cli:
|
|
61
|
+
name: list
|
|
62
|
+
post:
|
|
63
|
+
operationId: createKillswitch
|
|
64
|
+
summary: Create a killswitch
|
|
65
|
+
description: |-
|
|
66
|
+
Creates a new killswitch with `value` (default `false`) applied to **every** env at version 1.
|
|
67
|
+
|
|
68
|
+
Returns `409` if `name` already exists in the project.
|
|
69
|
+
|
|
70
|
+
**Use cases**
|
|
71
|
+
|
|
72
|
+
- **Untripped create** — `{ "name": "payments.checkout" }`. Provision the kill ahead of an incident.
|
|
73
|
+
- **Pre-tripped** — `{ "value": true }` to ship the killswitch already engaged.
|
|
74
|
+
- **With switches** — seed `switches` to carve out per-region/per-tenant kills from day one.
|
|
75
|
+
tags:
|
|
76
|
+
- Killswitch
|
|
77
|
+
parameters:
|
|
78
|
+
- $ref: ../components/parameters.yaml#/ProjectId
|
|
79
|
+
requestBody:
|
|
80
|
+
required: true
|
|
81
|
+
content:
|
|
82
|
+
application/json:
|
|
83
|
+
schema:
|
|
84
|
+
$ref: ../components/schemas/killswitches.yaml#/CreateKillswitchRequest
|
|
85
|
+
examples:
|
|
86
|
+
minimal:
|
|
87
|
+
summary: Minimal — name only, untripped
|
|
88
|
+
description: "Smallest valid body. Creates a killswitch with `value: false` on every env."
|
|
89
|
+
value:
|
|
90
|
+
name: payments.checkout
|
|
91
|
+
preTripped:
|
|
92
|
+
summary: Pre-tripped on create
|
|
93
|
+
description: "Ship the killswitch already tripped (`value: true`) — useful when provisioning a kill ahead of a deploy you want to ship with the feature off."
|
|
94
|
+
value:
|
|
95
|
+
name: payments.checkout
|
|
96
|
+
description: Master kill for the new checkout flow.
|
|
97
|
+
value: true
|
|
98
|
+
withSwitches:
|
|
99
|
+
summary: With per-region switches
|
|
100
|
+
description: Seed a `switches` map so specific named call sites can be tripped independently of the flat `value`.
|
|
101
|
+
value:
|
|
102
|
+
name: payments.checkout
|
|
103
|
+
value: false
|
|
104
|
+
switches:
|
|
105
|
+
eu_region: true
|
|
106
|
+
apac_region: false
|
|
107
|
+
responses:
|
|
108
|
+
"201":
|
|
109
|
+
description: Create a killswitch
|
|
110
|
+
content:
|
|
111
|
+
application/json:
|
|
112
|
+
schema:
|
|
113
|
+
$ref: ../components/schemas/killswitches.yaml#/CreateKillswitchResponse
|
|
114
|
+
example:
|
|
115
|
+
id: ksw_01j7w9d8h2k4m6n8p0q2r4s6t8
|
|
116
|
+
name: payments.checkout
|
|
117
|
+
"400":
|
|
118
|
+
$ref: ../components/responses.yaml#/BadRequest
|
|
119
|
+
"401":
|
|
120
|
+
$ref: ../components/responses.yaml#/Unauthorized
|
|
121
|
+
"403":
|
|
122
|
+
$ref: ../components/responses.yaml#/Forbidden
|
|
123
|
+
"404":
|
|
124
|
+
$ref: ../components/responses.yaml#/NotFound
|
|
125
|
+
"409":
|
|
126
|
+
$ref: ../components/responses.yaml#/Conflict
|
|
127
|
+
"422":
|
|
128
|
+
$ref: ../components/responses.yaml#/UnprocessableEntity
|
|
129
|
+
x-error-codes:
|
|
130
|
+
- BAD_REQUEST
|
|
131
|
+
- UNAUTHORIZED
|
|
132
|
+
- FORBIDDEN
|
|
133
|
+
- ALREADY_EXISTS
|
|
134
|
+
- VALIDATION
|
|
135
|
+
x-cli:
|
|
136
|
+
name: create
|
|
137
|
+
positional:
|
|
138
|
+
- name
|
|
139
|
+
/api/admin/killswitches/{id}:
|
|
140
|
+
get:
|
|
141
|
+
operationId: getKillswitch
|
|
142
|
+
summary: Get one killswitch
|
|
143
|
+
description: |-
|
|
144
|
+
Returns the killswitch metadata plus the latest published `value`/`switches`/`version` per env.
|
|
145
|
+
|
|
146
|
+
**Use case:** Fetch the current state of one killswitch — e.g. to verify a trip propagated before declaring an incident mitigated.
|
|
147
|
+
tags:
|
|
148
|
+
- Killswitch
|
|
149
|
+
parameters:
|
|
150
|
+
- $ref: ../components/parameters.yaml#/ProjectId
|
|
151
|
+
- name: id
|
|
152
|
+
in: path
|
|
153
|
+
required: true
|
|
154
|
+
description: Stable opaque killswitch id (`ksw_…`) or the killswitch's `name`.
|
|
155
|
+
schema:
|
|
156
|
+
type: string
|
|
157
|
+
responses:
|
|
158
|
+
"200":
|
|
159
|
+
description: Get one killswitch
|
|
160
|
+
content:
|
|
161
|
+
application/json:
|
|
162
|
+
schema:
|
|
163
|
+
$ref: ../components/schemas/killswitches.yaml#/GetKillswitchResponse
|
|
164
|
+
example:
|
|
165
|
+
id: ksw_01j7w9d8h2k4m6n8p0q2r4s6t8
|
|
166
|
+
name: payments.checkout
|
|
167
|
+
description: Master kill for the checkout flow. Trip to fall back to the legacy provider.
|
|
168
|
+
updatedAt: 2026-05-09T18:22:11.000Z
|
|
169
|
+
envs:
|
|
170
|
+
dev:
|
|
171
|
+
value: false
|
|
172
|
+
version: 3
|
|
173
|
+
publishedAt: 2026-05-09T18:22:11.000Z
|
|
174
|
+
stage:
|
|
175
|
+
value: false
|
|
176
|
+
version: 3
|
|
177
|
+
publishedAt: 2026-05-09T18:22:11.000Z
|
|
178
|
+
prod:
|
|
179
|
+
value: false
|
|
180
|
+
switches:
|
|
181
|
+
eu_region: true
|
|
182
|
+
version: 5
|
|
183
|
+
publishedAt: 2026-05-09T18:22:11.000Z
|
|
184
|
+
"400":
|
|
185
|
+
$ref: ../components/responses.yaml#/BadRequest
|
|
186
|
+
"401":
|
|
187
|
+
$ref: ../components/responses.yaml#/Unauthorized
|
|
188
|
+
"403":
|
|
189
|
+
$ref: ../components/responses.yaml#/Forbidden
|
|
190
|
+
"404":
|
|
191
|
+
$ref: ../components/responses.yaml#/NotFound
|
|
192
|
+
"409":
|
|
193
|
+
$ref: ../components/responses.yaml#/Conflict
|
|
194
|
+
"422":
|
|
195
|
+
$ref: ../components/responses.yaml#/UnprocessableEntity
|
|
196
|
+
x-error-codes:
|
|
197
|
+
- BAD_REQUEST
|
|
198
|
+
- UNAUTHORIZED
|
|
199
|
+
- FORBIDDEN
|
|
200
|
+
- NOT_FOUND
|
|
201
|
+
x-cli:
|
|
202
|
+
name: get
|
|
203
|
+
positional:
|
|
204
|
+
- id
|
|
205
|
+
patch:
|
|
206
|
+
operationId: updateKillswitch
|
|
207
|
+
summary: Update a killswitch
|
|
208
|
+
description: |-
|
|
209
|
+
Partial update applied to **every** env. Setting `value`/`switches` publishes a new version per env. Description-only patches don't bump versions.
|
|
210
|
+
|
|
211
|
+
To change a single switch on a single env, use `PUT /{id}/switch` instead.
|
|
212
|
+
|
|
213
|
+
**Use cases**
|
|
214
|
+
|
|
215
|
+
- **Trip everywhere** — `{ "value": true }`. Kills the feature across dev/stage/prod in one call.
|
|
216
|
+
- **Untrip everywhere** — `{ "value": false }`.
|
|
217
|
+
- **Replace switches** — send the full new map; per-key edits use `PUT /{id}/switch`.
|
|
218
|
+
- **Update description** — metadata-only patches don't bump versions.
|
|
219
|
+
tags:
|
|
220
|
+
- Killswitch
|
|
221
|
+
parameters:
|
|
222
|
+
- $ref: ../components/parameters.yaml#/ProjectId
|
|
223
|
+
- name: id
|
|
224
|
+
in: path
|
|
225
|
+
required: true
|
|
226
|
+
description: Stable opaque killswitch id (`ksw_…`) or the killswitch's `name`.
|
|
227
|
+
schema:
|
|
228
|
+
type: string
|
|
229
|
+
requestBody:
|
|
230
|
+
required: true
|
|
231
|
+
content:
|
|
232
|
+
application/json:
|
|
233
|
+
schema:
|
|
234
|
+
$ref: ../components/schemas/killswitches.yaml#/UpdateKillswitchRequest
|
|
235
|
+
examples:
|
|
236
|
+
trip:
|
|
237
|
+
summary: Trip the killswitch on every env
|
|
238
|
+
description: "Sets `value: true` on dev/stage/prod, bumping each env's version by one."
|
|
239
|
+
value:
|
|
240
|
+
value: true
|
|
241
|
+
untrip:
|
|
242
|
+
summary: Untrip on every env
|
|
243
|
+
description: "Sets `value: false` on every env."
|
|
244
|
+
value:
|
|
245
|
+
value: false
|
|
246
|
+
replaceSwitches:
|
|
247
|
+
summary: Replace switches map
|
|
248
|
+
description: Replaces the per-key overrides wholesale on every env. Pass `{}` to clear.
|
|
249
|
+
value:
|
|
250
|
+
switches:
|
|
251
|
+
eu_region: true
|
|
252
|
+
apac_region: true
|
|
253
|
+
updateDescription:
|
|
254
|
+
summary: Description-only update
|
|
255
|
+
description: Doesn't bump versions or trigger a republish — only metadata changes.
|
|
256
|
+
value:
|
|
257
|
+
description: "Master kill — owner: payments-platform"
|
|
258
|
+
responses:
|
|
259
|
+
"200":
|
|
260
|
+
description: Update a killswitch
|
|
261
|
+
content:
|
|
262
|
+
application/json:
|
|
263
|
+
schema:
|
|
264
|
+
$ref: ../components/schemas/killswitches.yaml#/UpdateKillswitchResponse
|
|
265
|
+
example:
|
|
266
|
+
id: ksw_01j7w9d8h2k4m6n8p0q2r4s6t8
|
|
267
|
+
"400":
|
|
268
|
+
$ref: ../components/responses.yaml#/BadRequest
|
|
269
|
+
"401":
|
|
270
|
+
$ref: ../components/responses.yaml#/Unauthorized
|
|
271
|
+
"403":
|
|
272
|
+
$ref: ../components/responses.yaml#/Forbidden
|
|
273
|
+
"404":
|
|
274
|
+
$ref: ../components/responses.yaml#/NotFound
|
|
275
|
+
"409":
|
|
276
|
+
$ref: ../components/responses.yaml#/Conflict
|
|
277
|
+
"422":
|
|
278
|
+
$ref: ../components/responses.yaml#/UnprocessableEntity
|
|
279
|
+
x-error-codes:
|
|
280
|
+
- BAD_REQUEST
|
|
281
|
+
- UNAUTHORIZED
|
|
282
|
+
- FORBIDDEN
|
|
283
|
+
- NOT_FOUND
|
|
284
|
+
- VALIDATION
|
|
285
|
+
x-cli:
|
|
286
|
+
name: update
|
|
287
|
+
positional:
|
|
288
|
+
- id
|
|
289
|
+
delete:
|
|
290
|
+
operationId: deleteKillswitch
|
|
291
|
+
summary: Delete a killswitch
|
|
292
|
+
description: |-
|
|
293
|
+
Soft-deletes the killswitch and rebuilds the project's flags KV blob so SDKs stop seeing it.
|
|
294
|
+
|
|
295
|
+
**Use case:** Tear down a killswitch after the feature it protected has been removed.
|
|
296
|
+
tags:
|
|
297
|
+
- Killswitch
|
|
298
|
+
parameters:
|
|
299
|
+
- $ref: ../components/parameters.yaml#/ProjectId
|
|
300
|
+
- name: id
|
|
301
|
+
in: path
|
|
302
|
+
required: true
|
|
303
|
+
description: Stable opaque killswitch id (`ksw_…`) or the killswitch's `name`.
|
|
304
|
+
schema:
|
|
305
|
+
type: string
|
|
306
|
+
responses:
|
|
307
|
+
"200":
|
|
308
|
+
description: Delete a killswitch
|
|
309
|
+
content:
|
|
310
|
+
application/json:
|
|
311
|
+
schema:
|
|
312
|
+
$ref: ../components/schemas/killswitches.yaml#/DeleteKillswitchResponse
|
|
313
|
+
example:
|
|
314
|
+
ok: true
|
|
315
|
+
"400":
|
|
316
|
+
$ref: ../components/responses.yaml#/BadRequest
|
|
317
|
+
"401":
|
|
318
|
+
$ref: ../components/responses.yaml#/Unauthorized
|
|
319
|
+
"403":
|
|
320
|
+
$ref: ../components/responses.yaml#/Forbidden
|
|
321
|
+
"404":
|
|
322
|
+
$ref: ../components/responses.yaml#/NotFound
|
|
323
|
+
"409":
|
|
324
|
+
$ref: ../components/responses.yaml#/Conflict
|
|
325
|
+
"422":
|
|
326
|
+
$ref: ../components/responses.yaml#/UnprocessableEntity
|
|
327
|
+
x-error-codes:
|
|
328
|
+
- BAD_REQUEST
|
|
329
|
+
- UNAUTHORIZED
|
|
330
|
+
- FORBIDDEN
|
|
331
|
+
- NOT_FOUND
|
|
332
|
+
x-cli:
|
|
333
|
+
name: archive
|
|
334
|
+
positional:
|
|
335
|
+
- id
|
|
336
|
+
/api/admin/killswitches/{id}/switch:
|
|
337
|
+
put:
|
|
338
|
+
operationId: setKillswitchSwitch
|
|
339
|
+
summary: Set one switch entry
|
|
340
|
+
description: |-
|
|
341
|
+
Sets or updates a single `switchKey` on a single `env`. Publishes one new version on that env only — other envs untouched.
|
|
342
|
+
|
|
343
|
+
Use this for surgical per-env, per-key flips during incident response (e.g. trip `eu_region` on prod without touching the flat `value` or other envs).
|
|
344
|
+
|
|
345
|
+
**Use cases**
|
|
346
|
+
|
|
347
|
+
- **Trip a region** — `{ "env": "prod", "switchKey": "eu_region", "value": true }`.
|
|
348
|
+
- **Untrip without removing** — same payload with `value: false`. To remove the entry entirely use `DELETE /{id}/switch`.
|
|
349
|
+
tags:
|
|
350
|
+
- Killswitch
|
|
351
|
+
parameters:
|
|
352
|
+
- $ref: ../components/parameters.yaml#/ProjectId
|
|
353
|
+
- name: id
|
|
354
|
+
in: path
|
|
355
|
+
required: true
|
|
356
|
+
description: Stable opaque killswitch id (`ksw_…`) or the killswitch's `name`.
|
|
357
|
+
schema:
|
|
358
|
+
type: string
|
|
359
|
+
requestBody:
|
|
360
|
+
required: true
|
|
361
|
+
content:
|
|
362
|
+
application/json:
|
|
363
|
+
schema:
|
|
364
|
+
$ref: ../components/schemas/killswitches.yaml#/SetKillswitchSwitchRequest
|
|
365
|
+
examples:
|
|
366
|
+
tripRegion:
|
|
367
|
+
summary: Trip eu_region on prod
|
|
368
|
+
description: Sets `switches.eu_region = true` on prod only. Other envs and the flat `value` are unchanged.
|
|
369
|
+
value:
|
|
370
|
+
env: prod
|
|
371
|
+
switchKey: eu_region
|
|
372
|
+
value: true
|
|
373
|
+
untripRegion:
|
|
374
|
+
summary: Untrip eu_region on prod
|
|
375
|
+
description: Flip the same entry back off without removing it from the map.
|
|
376
|
+
value:
|
|
377
|
+
env: prod
|
|
378
|
+
switchKey: eu_region
|
|
379
|
+
value: false
|
|
380
|
+
responses:
|
|
381
|
+
"200":
|
|
382
|
+
description: Set one switch entry
|
|
383
|
+
content:
|
|
384
|
+
application/json:
|
|
385
|
+
schema:
|
|
386
|
+
$ref: ../components/schemas/killswitches.yaml#/SetKillswitchSwitchResponse
|
|
387
|
+
example:
|
|
388
|
+
id: ksw_01j7w9d8h2k4m6n8p0q2r4s6t8
|
|
389
|
+
env: prod
|
|
390
|
+
switchKey: eu_region
|
|
391
|
+
value: true
|
|
392
|
+
"400":
|
|
393
|
+
$ref: ../components/responses.yaml#/BadRequest
|
|
394
|
+
"401":
|
|
395
|
+
$ref: ../components/responses.yaml#/Unauthorized
|
|
396
|
+
"403":
|
|
397
|
+
$ref: ../components/responses.yaml#/Forbidden
|
|
398
|
+
"404":
|
|
399
|
+
$ref: ../components/responses.yaml#/NotFound
|
|
400
|
+
"409":
|
|
401
|
+
$ref: ../components/responses.yaml#/Conflict
|
|
402
|
+
"422":
|
|
403
|
+
$ref: ../components/responses.yaml#/UnprocessableEntity
|
|
404
|
+
x-error-codes:
|
|
405
|
+
- BAD_REQUEST
|
|
406
|
+
- UNAUTHORIZED
|
|
407
|
+
- FORBIDDEN
|
|
408
|
+
- NOT_FOUND
|
|
409
|
+
- VALIDATION
|
|
410
|
+
x-cli:
|
|
411
|
+
name: set
|
|
412
|
+
positional:
|
|
413
|
+
- id
|
|
414
|
+
delete:
|
|
415
|
+
operationId: unsetKillswitchSwitch
|
|
416
|
+
summary: Remove one switch entry
|
|
417
|
+
description: |-
|
|
418
|
+
Removes a single `switchKey` from the `switches` map on a single `env`. Publishes a new version on that env.
|
|
419
|
+
|
|
420
|
+
Returns `{ removed: false }` if the entry didn't exist (idempotent no-op).
|
|
421
|
+
|
|
422
|
+
**Use case:** Clean up a per-region override after the incident is resolved so the flat `value` governs again.
|
|
423
|
+
tags:
|
|
424
|
+
- Killswitch
|
|
425
|
+
parameters:
|
|
426
|
+
- $ref: ../components/parameters.yaml#/ProjectId
|
|
427
|
+
- name: id
|
|
428
|
+
in: path
|
|
429
|
+
required: true
|
|
430
|
+
description: Stable opaque killswitch id (`ksw_…`) or the killswitch's `name`.
|
|
431
|
+
schema:
|
|
432
|
+
type: string
|
|
433
|
+
requestBody:
|
|
434
|
+
required: true
|
|
435
|
+
content:
|
|
436
|
+
application/json:
|
|
437
|
+
schema:
|
|
438
|
+
$ref: ../components/schemas/killswitches.yaml#/UnsetKillswitchSwitchRequest
|
|
439
|
+
examples:
|
|
440
|
+
removeRegion:
|
|
441
|
+
summary: Remove eu_region from prod
|
|
442
|
+
description: Drops the `eu_region` override on prod so the flat `value` applies again.
|
|
443
|
+
value:
|
|
444
|
+
env: prod
|
|
445
|
+
switchKey: eu_region
|
|
446
|
+
responses:
|
|
447
|
+
"200":
|
|
448
|
+
description: Remove one switch entry
|
|
449
|
+
content:
|
|
450
|
+
application/json:
|
|
451
|
+
schema:
|
|
452
|
+
$ref: ../components/schemas/killswitches.yaml#/UnsetKillswitchSwitchResponse
|
|
453
|
+
example:
|
|
454
|
+
id: ksw_01j7w9d8h2k4m6n8p0q2r4s6t8
|
|
455
|
+
env: prod
|
|
456
|
+
switchKey: eu_region
|
|
457
|
+
removed: true
|
|
458
|
+
"400":
|
|
459
|
+
$ref: ../components/responses.yaml#/BadRequest
|
|
460
|
+
"401":
|
|
461
|
+
$ref: ../components/responses.yaml#/Unauthorized
|
|
462
|
+
"403":
|
|
463
|
+
$ref: ../components/responses.yaml#/Forbidden
|
|
464
|
+
"404":
|
|
465
|
+
$ref: ../components/responses.yaml#/NotFound
|
|
466
|
+
"409":
|
|
467
|
+
$ref: ../components/responses.yaml#/Conflict
|
|
468
|
+
"422":
|
|
469
|
+
$ref: ../components/responses.yaml#/UnprocessableEntity
|
|
470
|
+
x-error-codes:
|
|
471
|
+
- BAD_REQUEST
|
|
472
|
+
- UNAUTHORIZED
|
|
473
|
+
- FORBIDDEN
|
|
474
|
+
- NOT_FOUND
|
|
475
|
+
x-cli:
|
|
476
|
+
name: unset
|
|
477
|
+
positional:
|
|
478
|
+
- id
|
|
479
|
+
/api/admin/killswitches/{id}/value:
|
|
480
|
+
put:
|
|
481
|
+
operationId: setKillswitchValue
|
|
482
|
+
summary: Set the flat value on one env
|
|
483
|
+
description: |-
|
|
484
|
+
Sets the flat `value` on a single `env`, publishing one new version on that env only. `switches` and other envs are untouched.
|
|
485
|
+
|
|
486
|
+
Use this to trip (or untrip) a killswitch on one environment without replacing its per-key overrides.
|
|
487
|
+
|
|
488
|
+
**Use cases**
|
|
489
|
+
|
|
490
|
+
- **Trip on prod** — `{ "env": "prod", "value": true }`.
|
|
491
|
+
- **Untrip on prod** — `{ "env": "prod", "value": false }`.
|
|
492
|
+
tags:
|
|
493
|
+
- Killswitch
|
|
494
|
+
parameters:
|
|
495
|
+
- $ref: ../components/parameters.yaml#/ProjectId
|
|
496
|
+
- name: id
|
|
497
|
+
in: path
|
|
498
|
+
required: true
|
|
499
|
+
description: Stable opaque killswitch id (`ksw_…`) or the killswitch's `name`.
|
|
500
|
+
schema:
|
|
501
|
+
type: string
|
|
502
|
+
requestBody:
|
|
503
|
+
required: true
|
|
504
|
+
content:
|
|
505
|
+
application/json:
|
|
506
|
+
schema:
|
|
507
|
+
$ref: ../components/schemas/killswitches.yaml#/SetKillswitchValueRequest
|
|
508
|
+
examples:
|
|
509
|
+
tripProd:
|
|
510
|
+
summary: Trip on prod
|
|
511
|
+
description: "Publishes `value: true` on prod only, bumping that env's version."
|
|
512
|
+
value:
|
|
513
|
+
env: prod
|
|
514
|
+
value: true
|
|
515
|
+
untripProd:
|
|
516
|
+
summary: Untrip on prod
|
|
517
|
+
description: "Publishes `value: false` on prod only."
|
|
518
|
+
value:
|
|
519
|
+
env: prod
|
|
520
|
+
value: false
|
|
521
|
+
responses:
|
|
522
|
+
"200":
|
|
523
|
+
description: Set the flat value on one env
|
|
524
|
+
content:
|
|
525
|
+
application/json:
|
|
526
|
+
schema:
|
|
527
|
+
$ref: ../components/schemas/killswitches.yaml#/SetKillswitchValueResponse
|
|
528
|
+
example:
|
|
529
|
+
id: ksw_01j7w9d8h2k4m6n8p0q2r4s6t8
|
|
530
|
+
env: prod
|
|
531
|
+
version: 6
|
|
532
|
+
published:
|
|
533
|
+
value: true
|
|
534
|
+
switches:
|
|
535
|
+
eu_region: true
|
|
536
|
+
"400":
|
|
537
|
+
$ref: ../components/responses.yaml#/BadRequest
|
|
538
|
+
"401":
|
|
539
|
+
$ref: ../components/responses.yaml#/Unauthorized
|
|
540
|
+
"403":
|
|
541
|
+
$ref: ../components/responses.yaml#/Forbidden
|
|
542
|
+
"404":
|
|
543
|
+
$ref: ../components/responses.yaml#/NotFound
|
|
544
|
+
"409":
|
|
545
|
+
$ref: ../components/responses.yaml#/Conflict
|
|
546
|
+
"422":
|
|
547
|
+
$ref: ../components/responses.yaml#/UnprocessableEntity
|
|
548
|
+
x-error-codes:
|
|
549
|
+
- BAD_REQUEST
|
|
550
|
+
- UNAUTHORIZED
|
|
551
|
+
- FORBIDDEN
|
|
552
|
+
- NOT_FOUND
|
|
553
|
+
- VALIDATION
|
|
554
|
+
x-cli:
|
|
555
|
+
name: set-value
|
|
556
|
+
positional:
|
|
557
|
+
- id
|