mirror of
https://github.com/Unleash/unleash.git
synced 2025-04-24 01:18:01 +02:00
docs(chore): improve syntax highlighting and formatting of code bits
Use `bash` instead of `sh` for nicer highlighting by prism. I've also broken large json blobs over multiple lines.
This commit is contained in:
parent
d264f30fa0
commit
f92d86061a
@ -24,7 +24,10 @@ This endpoint will give you an general overview of a project. It will return ess
|
|||||||
|
|
||||||
**Example Query**
|
**Example Query**
|
||||||
|
|
||||||
`http GET http://localhost:4242/api/admin/projects/default Authorization:$KEY`
|
```bash
|
||||||
|
http GET http://localhost:4242/api/admin/projects/default Authorization:$KEY
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
**Example response:**
|
**Example response:**
|
||||||
@ -90,7 +93,11 @@ This endpoint will return all feature toggles and high level environment details
|
|||||||
|
|
||||||
**Example Query**
|
**Example Query**
|
||||||
|
|
||||||
`http GET http://localhost:4242/api/admin/projects/default/features Authorization:$KEY`
|
``` bash
|
||||||
|
http GET http://localhost:4242/api/admin/projects/default/features \
|
||||||
|
Authorization:$KEY
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
**Example response:**
|
**Example response:**
|
||||||
@ -162,7 +169,8 @@ This endpoint accepts the following toggle options:
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
echo '{"name": "demo2", "description": "A new feature toggle"}' | \
|
echo '{"name": "demo2", "description": "A new feature toggle"}' | \
|
||||||
http POST http://localhost:4242/api/admin/projects/default/features Authorization:$KEY`
|
http POST http://localhost:4242/api/admin/projects/default/features \
|
||||||
|
Authorization:$KEY`
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
@ -205,8 +213,9 @@ This endpoint will return the feature toggles with the defined name and _project
|
|||||||
|
|
||||||
**Example Query**
|
**Example Query**
|
||||||
|
|
||||||
```sh
|
```bash
|
||||||
http GET http://localhost:4242/api/admin/projects/default/features/demo Authorization:$KEY`
|
http GET http://localhost:4242/api/admin/projects/default/features/demo \
|
||||||
|
Authorization:$KEY`
|
||||||
```
|
```
|
||||||
|
|
||||||
**Example response:**
|
**Example response:**
|
||||||
@ -256,8 +265,10 @@ This endpoint will accept HTTP PUT request to update the feature toggle metadata
|
|||||||
|
|
||||||
**Example Query**
|
**Example Query**
|
||||||
|
|
||||||
```sh
|
```bash
|
||||||
echo '{"name": "demo", "description": "An update feature toggle", "type": "kill-switch"}' | http PUT http://localhost:4242/api/admin/projects/default/features/demo Authorization:$KEY`
|
echo '{"name": "demo", "description": "An update feature toggle", "type": "kill-switch"}' | \
|
||||||
|
http PUT http://localhost:4242/api/admin/projects/default/features/demo \
|
||||||
|
Authorization:$KEY`
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
@ -291,8 +302,10 @@ This endpoint will accept HTTP PATCH request to update the feature toggle metada
|
|||||||
|
|
||||||
**Example Query**
|
**Example Query**
|
||||||
|
|
||||||
```sh
|
```bash
|
||||||
echo '[{"op": "replace", "path": "/description", "value": "patched desc"}]' | http PATCH http://localhost:4242/api/admin/projects/default/features/demo Authorization:$KEY`
|
echo '[{"op": "replace", "path": "/description", "value": "patched desc"}]' | \
|
||||||
|
http PATCH http://localhost:4242/api/admin/projects/default/features/demo \
|
||||||
|
Authorization:$KEY`
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
@ -327,8 +340,10 @@ This endpoint will accept HTTP POST request to clone an existing feature toggle
|
|||||||
|
|
||||||
**Example Query**
|
**Example Query**
|
||||||
|
|
||||||
```sh
|
```bash
|
||||||
echo '{ "name": "newName" }' | http POST http://localhost:4242/api/admin/projects/default/features/Demo/clone Authorization:$KEY`
|
echo '{ "name": "newName" }' | \
|
||||||
|
http POST http://localhost:4242/api/admin/projects/default/features/Demo/clone \
|
||||||
|
Authorization:$KEY`
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
@ -379,21 +394,21 @@ This endpoint will accept HTTP PUT request to update the feature toggle metadata
|
|||||||
|
|
||||||
**Example Query**
|
**Example Query**
|
||||||
|
|
||||||
```sh
|
```bash
|
||||||
http DELETE http://localhost:4242/api/admin/projects/default/features/demo Authorization:$KEY`
|
http DELETE http://localhost:4242/api/admin/projects/default/features/demo \
|
||||||
|
Authorization:$KEY`
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
**Example response:**
|
**Example response:**
|
||||||
|
|
||||||
```sh
|
```
|
||||||
HTTP/1.1 202 Accepted
|
HTTP/1.1 202 Accepted
|
||||||
Access-Control-Allow-Origin: *
|
Access-Control-Allow-Origin: *
|
||||||
Connection: keep-alive
|
Connection: keep-alive
|
||||||
Date: Wed, 08 Sep 2021 20:09:21 GMT
|
Date: Wed, 08 Sep 2021 20:09:21 GMT
|
||||||
Keep-Alive: timeout=60
|
Keep-Alive: timeout=60
|
||||||
Transfer-Encoding: chunked
|
Transfer-Encoding: chunked
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
@ -405,9 +420,17 @@ This endpoint will allow you to add a new strategy to a feature toggle in a give
|
|||||||
|
|
||||||
**Example Query**
|
**Example Query**
|
||||||
|
|
||||||
```sh
|
```bash
|
||||||
echo '{"name": "flexibleRollout", "parameters": { "rollout": 20, "groupId": "demo", "stickiness": "default" }}' | \
|
echo '{"name": "flexibleRollout",
|
||||||
http POST http://localhost:4242/api/admin/projects/default/features/demo/environments/production/strategies Authorization:$KEY
|
"parameters": {
|
||||||
|
"rollout": 20,
|
||||||
|
"groupId": "demo",
|
||||||
|
"stickiness": "default"
|
||||||
|
}
|
||||||
|
}' | \
|
||||||
|
http POST \
|
||||||
|
http://localhost:4242/api/admin/projects/default/features/demo/environments/production/strategies \
|
||||||
|
Authorization:$KEY
|
||||||
```
|
```
|
||||||
|
|
||||||
**Example response:**
|
**Example response:**
|
||||||
@ -429,9 +452,17 @@ This endpoint will allow you to add a new strategy to a feature toggle in a give
|
|||||||
|
|
||||||
**Example Query**
|
**Example Query**
|
||||||
|
|
||||||
```sh
|
```bash
|
||||||
echo '{"name": "flexibleRollout", "parameters": { "rollout": 25, "groupId": "demo","stickiness": "default" }}' | \
|
echo '{"name": "flexibleRollout",
|
||||||
http PUT http://localhost:4242/api/admin/projects/default/features/demo/environments/production/strategies/77bbe972-ffce-49b2-94d9-326593e2228e Authorization:$KEY
|
"parameters": {
|
||||||
|
"rollout": 25,
|
||||||
|
"groupId": "demo",
|
||||||
|
"stickiness": "default"
|
||||||
|
}
|
||||||
|
}' | \
|
||||||
|
http PUT \
|
||||||
|
http://localhost:4242/api/admin/projects/default/features/demo/environments/production/strategies/77bbe972-ffce-49b2-94d9-326593e2228e \
|
||||||
|
Authorization:$KEY
|
||||||
```
|
```
|
||||||
|
|
||||||
**Example response:**
|
**Example response:**
|
||||||
@ -453,9 +484,11 @@ http PUT http://localhost:4242/api/admin/projects/default/features/demo/environm
|
|||||||
|
|
||||||
**Example Query**
|
**Example Query**
|
||||||
|
|
||||||
```sh
|
```bash
|
||||||
echo '[{"op": "replace", "path": "/parameters/rollout", "value": 50}]' | \
|
echo '[{"op": "replace", "path": "/parameters/rollout", "value": 50}]' | \
|
||||||
http PATCH http://localhost:4242/api/admin/projects/default/features/demo/environments/production/strategies/ea5404e5-0c0d-488c-93b2-0a2200534827 Authorization:$KEY
|
http PATCH \
|
||||||
|
http://localhost:4242/api/admin/projects/default/features/demo/environments/production/strategies/ea5404e5-0c0d-488c-93b2-0a2200534827 \
|
||||||
|
Authorization:$KEY
|
||||||
```
|
```
|
||||||
|
|
||||||
**Example response:**
|
**Example response:**
|
||||||
@ -478,13 +511,13 @@ http PATCH http://localhost:4242/api/admin/projects/default/features/demo/enviro
|
|||||||
|
|
||||||
**Example Query**
|
**Example Query**
|
||||||
|
|
||||||
```sh
|
```bash
|
||||||
http DELETE http://localhost:4242/api/admin/projects/default/features/demo/environments/production/strategies/77bbe972-ffce-49b2-94d9-326593e2228e Authorization:$KEY
|
http DELETE http://localhost:4242/api/admin/projects/default/features/demo/environments/production/strategies/77bbe972-ffce-49b2-94d9-326593e2228e Authorization:$KEY
|
||||||
```
|
```
|
||||||
|
|
||||||
**Example response:**
|
**Example response:**
|
||||||
|
|
||||||
```sh
|
```
|
||||||
HTTP/1.1 200 OK
|
HTTP/1.1 200 OK
|
||||||
Access-Control-Allow-Origin: *
|
Access-Control-Allow-Origin: *
|
||||||
Connection: keep-alive
|
Connection: keep-alive
|
||||||
@ -499,13 +532,13 @@ Vary: Accept-Encoding
|
|||||||
|
|
||||||
**Example Query**
|
**Example Query**
|
||||||
|
|
||||||
```sh
|
```bash
|
||||||
http POST http://localhost:4242/api/admin/projects/default/features/demo/environments/development/on Authorization:$KEY --json
|
http POST http://localhost:4242/api/admin/projects/default/features/demo/environments/development/on Authorization:$KEY --json
|
||||||
```
|
```
|
||||||
|
|
||||||
**Example response:**
|
**Example response:**
|
||||||
|
|
||||||
```sh
|
```
|
||||||
HTTP/1.1 200 OK
|
HTTP/1.1 200 OK
|
||||||
Access-Control-Allow-Origin: *
|
Access-Control-Allow-Origin: *
|
||||||
Connection: keep-alive
|
Connection: keep-alive
|
||||||
@ -549,7 +582,7 @@ http PUT http://localhost:4242/api/admin/projects/default/features/demo/variants
|
|||||||
|
|
||||||
**Example response:**
|
**Example response:**
|
||||||
|
|
||||||
```sh
|
```bash
|
||||||
HTTP/1.1 200 OK
|
HTTP/1.1 200 OK
|
||||||
Access-Control-Allow-Origin: *
|
Access-Control-Allow-Origin: *
|
||||||
Connection: keep-alive
|
Connection: keep-alive
|
||||||
@ -579,13 +612,15 @@ Content-Type: application/json; charset=utf-8
|
|||||||
|
|
||||||
**Example Query**
|
**Example Query**
|
||||||
|
|
||||||
```sh
|
```bash
|
||||||
echo '[{"op": "add", "path": "/1", "value": {
|
echo '[{"op": "add", "path": "/1", "value": {
|
||||||
"name": "new-variant",
|
"name": "new-variant",
|
||||||
"weightType": "fix",
|
"weightType": "fix",
|
||||||
"weight": 200
|
"weight": 200
|
||||||
}}]' | \
|
}}]' | \
|
||||||
http PATCH http://localhost:4242/api/admin/projects/default/features/demo/variants Authorization:$KEY
|
http PATCH \
|
||||||
|
http://localhost:4242/api/admin/projects/default/features/demo/variants \
|
||||||
|
Authorization:$KEY
|
||||||
```
|
```
|
||||||
|
|
||||||
** Example Response **
|
** Example Response **
|
||||||
|
Loading…
Reference in New Issue
Block a user