-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcloudbees-fm-api.postman_collection.json
More file actions
567 lines (567 loc) · 18.5 KB
/
cloudbees-fm-api.postman_collection.json
File metadata and controls
567 lines (567 loc) · 18.5 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
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
{
"info": {
"_postman_id": "fm-api-collection",
"name": "CloudBees Feature Management API",
"description": "API collection for CloudBees Feature Management.\n\nBefore using this collection:\n1. Set up an environment with `baseUrl`, `applicationId`, and `apiToken` variables\n2. Configure Bearer token authentication at the collection level",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{apiToken}}",
"type": "string"
}
]
},
"variable": [
{
"key": "baseUrl",
"value": "https://api.cloudbees.io",
"type": "string"
},
{
"key": "applicationId",
"value": "",
"type": "string"
},
{
"key": "apiToken",
"value": "",
"type": "string"
}
],
"item": [
{
"name": "Flags",
"item": [
{
"name": "List flags",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{baseUrl}}/v2/applications/{{applicationId}}/flags",
"host": ["{{baseUrl}}"],
"path": ["v1", "applications", "{{applicationId}}", "flags"]
},
"description": "Retrieves all flags for an application."
}
},
{
"name": "Create flag",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"name\": \"default.newFeature\",\n \"description\": \"My new feature flag\",\n \"flagType\": \"Boolean\",\n \"labels\": [\"frontend\"]\n}"
},
"url": {
"raw": "{{baseUrl}}/v2/applications/{{applicationId}}/flags",
"host": ["{{baseUrl}}"],
"path": ["v1", "applications", "{{applicationId}}", "flags"]
},
"description": "Creates a new feature flag."
}
},
{
"name": "Get flag by ID",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{baseUrl}}/v2/applications/{{applicationId}}/flags/{{flagId}}",
"host": ["{{baseUrl}}"],
"path": ["v1", "applications", "{{applicationId}}", "flags", "{{flagId}}"]
},
"description": "Retrieves a specific flag by its ID."
}
},
{
"name": "Get flag by name",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{baseUrl}}/v2/applications/{{applicationId}}/flags/by-name/{{flagName}}",
"host": ["{{baseUrl}}"],
"path": ["v1", "applications", "{{applicationId}}", "flags", "by-name", "{{flagName}}"]
},
"description": "Retrieves a specific flag by its name."
}
},
{
"name": "Update flag",
"request": {
"method": "PUT",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"name\": \"default.newFeature\",\n \"description\": \"Updated description\",\n \"labels\": [\"frontend\", \"updated\"]\n}"
},
"url": {
"raw": "{{baseUrl}}/v2/applications/{{applicationId}}/flags/{{flagId}}",
"host": ["{{baseUrl}}"],
"path": ["v1", "applications", "{{applicationId}}", "flags", "{{flagId}}"]
},
"description": "Updates an existing flag's metadata."
}
},
{
"name": "Delete flag",
"request": {
"method": "DELETE",
"header": [],
"url": {
"raw": "{{baseUrl}}/v2/applications/{{applicationId}}/flags/{{flagId}}",
"host": ["{{baseUrl}}"],
"path": ["v1", "applications", "{{applicationId}}", "flags", "{{flagId}}"]
},
"description": "Deletes a feature flag. This action cannot be undone."
}
},
{
"name": "Restore deleted flag",
"request": {
"method": "POST",
"header": [],
"url": {
"raw": "{{baseUrl}}/v2/applications/{{applicationId}}/flags/{{flagName}}/restore",
"host": ["{{baseUrl}}"],
"path": ["v1", "applications", "{{applicationId}}", "flags", "{{flagName}}", "restore"]
},
"description": "Restores a previously deleted flag."
}
},
{
"name": "List labels",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{baseUrl}}/v2/applications/{{applicationId}}/flags/labels",
"host": ["{{baseUrl}}"],
"path": ["v1", "applications", "{{applicationId}}", "flags", "labels"]
},
"description": "Retrieves all unique labels used across flags."
}
},
{
"name": "Get flag configuration state",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{baseUrl}}/v2/applications/{{applicationId}}/flags/{{flagId}}/configuration-state",
"host": ["{{baseUrl}}"],
"path": ["v1", "applications", "{{applicationId}}", "flags", "{{flagId}}", "configuration-state"]
},
"description": "Retrieves the configuration state for a flag across environments."
}
},
{
"name": "Get flag usage per environment",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{baseUrl}}/v2/applications/{{applicationId}}/flags/{{flagId}}/flag-usage-per-environment",
"host": ["{{baseUrl}}"],
"path": ["v1", "applications", "{{applicationId}}", "flags", "{{flagId}}", "flag-usage-per-environment"]
},
"description": "Retrieves usage statistics for a flag across environments."
}
}
],
"description": "Endpoints for managing feature flags."
},
{
"name": "Flag Configurations",
"item": [
{
"name": "Get flag configuration",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{baseUrl}}/v2/applications/{{applicationId}}/flags/{{flagId}}/configuration/environments/{{environmentId}}",
"host": ["{{baseUrl}}"],
"path": ["v1", "applications", "{{applicationId}}", "flags", "{{flagId}}", "configuration", "environments", "{{environmentId}}"]
},
"description": "Retrieves the configuration for a flag in a specific environment."
}
},
{
"name": "Update flag configuration",
"request": {
"method": "PUT",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"enabled\": true,\n \"defaultValue\": false,\n \"conditions\": [\n {\n \"group\": {\n \"name\": \"BetaUsers\"\n },\n \"value\": true\n }\n ],\n \"stickinessProperty\": \"user_id\"\n}"
},
"url": {
"raw": "{{baseUrl}}/v2/applications/{{applicationId}}/flags/{{flagId}}/configuration/environments/{{environmentId}}",
"host": ["{{baseUrl}}"],
"path": ["v1", "applications", "{{applicationId}}", "flags", "{{flagId}}", "configuration", "environments", "{{environmentId}}"]
},
"description": "Updates the complete configuration for a flag in a specific environment."
}
},
{
"name": "Patch flag configuration",
"request": {
"method": "PATCH",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"enabled\": false\n}"
},
"url": {
"raw": "{{baseUrl}}/v2/applications/{{applicationId}}/flags/{{flagId}}/configuration/environments/{{environmentId}}",
"host": ["{{baseUrl}}"],
"path": ["v1", "applications", "{{applicationId}}", "flags", "{{flagId}}", "configuration", "environments", "{{environmentId}}"]
},
"description": "Partially updates a flag configuration. Only specified fields are updated."
}
},
{
"name": "Update configuration state",
"request": {
"method": "PUT",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"enabled\": true\n}"
},
"url": {
"raw": "{{baseUrl}}/v2/applications/{{applicationId}}/flags/{{flagId}}/configuration/environments/{{environmentId}}/configstate",
"host": ["{{baseUrl}}"],
"path": ["v1", "applications", "{{applicationId}}", "flags", "{{flagId}}", "configuration", "environments", "{{environmentId}}", "configstate"]
},
"description": "Enables or disables a flag in an environment without modifying other settings."
}
},
{
"name": "Clone flag configuration",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"targetEnvironmentId\": \"{{targetEnvironmentId}}\"\n}"
},
"url": {
"raw": "{{baseUrl}}/v2/applications/{{applicationId}}/flags/{{flagId}}/environment/{{environmentId}}/clone",
"host": ["{{baseUrl}}"],
"path": ["v1", "applications", "{{applicationId}}", "flags", "{{flagId}}", "environment", "{{environmentId}}", "clone"]
},
"description": "Copies a flag configuration from one environment to another."
}
},
{
"name": "List flag configurations",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{baseUrl}}/v2/applications/{{applicationId}}/environments/{{environmentId}}/flag-configurations",
"host": ["{{baseUrl}}"],
"path": ["v1", "applications", "{{applicationId}}", "environments", "{{environmentId}}", "flag-configurations"]
},
"description": "Retrieves configurations for all flags in an environment."
}
}
],
"description": "Endpoints for managing flag configurations per environment."
},
{
"name": "Target Groups",
"item": [
{
"name": "List target groups",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{baseUrl}}/v2/applications/{{applicationId}}/target-groups",
"host": ["{{baseUrl}}"],
"path": ["v1", "applications", "{{applicationId}}", "target-groups"]
},
"description": "Retrieves all target groups for an application."
}
},
{
"name": "Create target group",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"name\": \"PremiumUsers\",\n \"description\": \"Users with premium subscription\",\n \"conditions\": {\n \"operator\": \"and\",\n \"conditions\": [\n {\n \"property\": \"subscription_plan\",\n \"operator\": \"in-array\",\n \"operand\": [\"premium\", \"enterprise\"]\n }\n ]\n }\n}"
},
"url": {
"raw": "{{baseUrl}}/v2/applications/{{applicationId}}/target-groups",
"host": ["{{baseUrl}}"],
"path": ["v1", "applications", "{{applicationId}}", "target-groups"]
},
"description": "Creates a new target group."
}
},
{
"name": "Get target group by ID",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{baseUrl}}/v2/applications/{{applicationId}}/target-groups/{{targetGroupId}}",
"host": ["{{baseUrl}}"],
"path": ["v1", "applications", "{{applicationId}}", "target-groups", "{{targetGroupId}}"]
},
"description": "Retrieves a specific target group by its ID."
}
},
{
"name": "Get target group by name",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{baseUrl}}/v2/applications/{{applicationId}}/target-groups/by-name/{{targetGroupName}}",
"host": ["{{baseUrl}}"],
"path": ["v1", "applications", "{{applicationId}}", "target-groups", "by-name", "{{targetGroupName}}"]
},
"description": "Retrieves a specific target group by its name."
}
},
{
"name": "Update target group",
"request": {
"method": "PUT",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"name\": \"PremiumUsers\",\n \"description\": \"Updated description\",\n \"conditions\": {\n \"operator\": \"or\",\n \"conditions\": [\n {\n \"property\": \"subscription_plan\",\n \"operator\": \"eq\",\n \"operand\": \"premium\"\n },\n {\n \"property\": \"subscription_plan\",\n \"operator\": \"eq\",\n \"operand\": \"enterprise\"\n }\n ]\n }\n}"
},
"url": {
"raw": "{{baseUrl}}/v2/applications/{{applicationId}}/target-groups/{{targetGroupId}}",
"host": ["{{baseUrl}}"],
"path": ["v1", "applications", "{{applicationId}}", "target-groups", "{{targetGroupId}}"]
},
"description": "Updates an existing target group."
}
},
{
"name": "Delete target group",
"request": {
"method": "DELETE",
"header": [],
"url": {
"raw": "{{baseUrl}}/v2/applications/{{applicationId}}/target-groups/{{targetGroupId}}",
"host": ["{{baseUrl}}"],
"path": ["v1", "applications", "{{applicationId}}", "target-groups", "{{targetGroupId}}"]
},
"description": "Deletes a target group. This action cannot be undone."
}
},
{
"name": "List target groups with flag usage",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{baseUrl}}/v2/applications/{{applicationId}}/target-groups/with-flags-usage",
"host": ["{{baseUrl}}"],
"path": ["v1", "applications", "{{applicationId}}", "target-groups", "with-flags-usage"]
},
"description": "Retrieves all target groups along with the flags that use them."
}
},
{
"name": "Get target group flag usage per environment",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{baseUrl}}/v2/applications/{{applicationId}}/target-groups/{{targetGroupId}}/flag-usage-per-environment",
"host": ["{{baseUrl}}"],
"path": ["v1", "applications", "{{applicationId}}", "target-groups", "{{targetGroupId}}", "flag-usage-per-environment"]
},
"description": "Retrieves flag usage statistics for a target group across environments."
}
}
],
"description": "Endpoints for managing target groups."
},
{
"name": "Custom Properties",
"item": [
{
"name": "List custom properties",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{baseUrl}}/v2/applications/{{applicationId}}/custom-properties",
"host": ["{{baseUrl}}"],
"path": ["v1", "applications", "{{applicationId}}", "custom-properties"]
},
"description": "Retrieves all custom properties for an application."
}
},
{
"name": "Create custom property",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"name\": \"account_tier\",\n \"type\": \"String\",\n \"description\": \"User account tier (free, pro, enterprise)\"\n}"
},
"url": {
"raw": "{{baseUrl}}/v2/applications/{{applicationId}}/custom-properties",
"host": ["{{baseUrl}}"],
"path": ["v1", "applications", "{{applicationId}}", "custom-properties"]
},
"description": "Creates a new custom property."
}
},
{
"name": "Get custom property by ID",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{baseUrl}}/v2/applications/{{applicationId}}/custom-properties/{{propertyId}}",
"host": ["{{baseUrl}}"],
"path": ["v1", "applications", "{{applicationId}}", "custom-properties", "{{propertyId}}"]
},
"description": "Retrieves a specific custom property by its ID."
}
},
{
"name": "Get custom property by name",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{baseUrl}}/v2/applications/{{applicationId}}/custom-properties/by-name/{{propertyName}}",
"host": ["{{baseUrl}}"],
"path": ["v1", "applications", "{{applicationId}}", "custom-properties", "by-name", "{{propertyName}}"]
},
"description": "Retrieves a specific custom property by its name."
}
},
{
"name": "Update custom property",
"request": {
"method": "PUT",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"name\": \"account_tier\",\n \"type\": \"String\",\n \"description\": \"Updated description for account tier\"\n}"
},
"url": {
"raw": "{{baseUrl}}/v2/applications/{{applicationId}}/custom-properties/{{propertyId}}",
"host": ["{{baseUrl}}"],
"path": ["v1", "applications", "{{applicationId}}", "custom-properties", "{{propertyId}}"]
},
"description": "Updates an existing custom property."
}
},
{
"name": "Delete custom property",
"request": {
"method": "DELETE",
"header": [],
"url": {
"raw": "{{baseUrl}}/v2/applications/{{applicationId}}/custom-properties/{{propertyId}}",
"host": ["{{baseUrl}}"],
"path": ["v1", "applications", "{{applicationId}}", "custom-properties", "{{propertyId}}"]
},
"description": "Deletes a custom property. This action cannot be undone."
}
},
{
"name": "Get property flag usage per environment",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{baseUrl}}/v2/applications/{{applicationId}}/custom-properties/{{propertyId}}/flag-usage-per-environment",
"host": ["{{baseUrl}}"],
"path": ["v1", "applications", "{{applicationId}}", "custom-properties", "{{propertyId}}", "flag-usage-per-environment"]
},
"description": "Retrieves which flags use this property, organized by environment."
}
},
{
"name": "Get property target group usage",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{baseUrl}}/v2/applications/{{applicationId}}/custom-properties/{{propertyId}}/target-group-usage",
"host": ["{{baseUrl}}"],
"path": ["v1", "applications", "{{applicationId}}", "custom-properties", "{{propertyId}}", "target-group-usage"]
},
"description": "Retrieves which target groups use this property."
}
}
],
"description": "Endpoints for managing custom properties."
}
]
}