1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-28 00:06:53 +01:00
unleash.unleash/website/docs/api/admin
Christopher Kolstad 6c6001619c
Feat/variant api (#1119)
Add a new .../:feature/variants API

This adds
- `GET /api/admin/projects/:projectId/features/:featureName/variants` which returns 
```json
{ version: '1', variants: IVariant[] }
```
- `PATCH /api/admin/projects/:projectId/features/:featureName/variants` which accepts a json patch set and updates the feature's variants field and then returns 
```json
{ version: '1', variants: IVariant[] }
```
- `PUT /api/admin/projects/:projectId/features/:featureName/variants`
 which accepts a IVariant[] and overwrites the current variants list for the feature defined in :featureName and returns
```json
{ version: '1', variants: IVariant[] }

- This also makes sure the total weight of all variants is == 1000
- Validates that there is at least 1 'variable' variant if there are variants
- Validates that 'fix' variants total weight can't exceed 1000
- Adds tests for all these invariants.


Co-authored-by: Simon Hornby <simon@getunleash.ai>
2021-11-24 13:08:04 +01:00
..
addons.md
context.md
events-api.md feat: clean up events (#1089) 2021-11-12 13:15:51 +01:00
feature-toggles-api-v2.md Feat/variant api (#1119) 2021-11-24 13:08:04 +01:00
feature-toggles-api.md Docs: Update feature-toggles-api.md (#1105) 2021-11-15 22:36:25 +01:00
feature-toggles-archive-api.md
feature-types-api.md
metrics-api.md
project.md
state-api.md
strategies-api.md
tags-api.md
user-admin.md