mirror of
https://github.com/Unleash/unleash.git
synced 2025-07-31 13:47:02 +02:00
chore: Update Open API specification (#686)
This commit is contained in:
parent
7c5b914513
commit
9e31800bf4
@ -90,11 +90,13 @@ paths:
|
|||||||
'400':
|
'400':
|
||||||
description: 'Bad body request (for example, appName is not correct)'
|
description: 'Bad body request (for example, appName is not correct)'
|
||||||
'401':
|
'401':
|
||||||
description: Not authorized
|
$ref: '#/components/responses/notAuthorizedResponse'
|
||||||
content:
|
x-code-samples:
|
||||||
application/json:
|
- lang: 'cURL'
|
||||||
schema:
|
source: |
|
||||||
$ref: '#/components/schemas/401'
|
curl --request POST \
|
||||||
|
--url http://localhost:4242/api/client/register \
|
||||||
|
--data '{"appName":"my-application","instanceId":"generated-732038-17080","sdkVersion":"unleash-client-node:3.4.0","strategies":[{"strategy":"default"}],"started":"2016-11-03T07:16:43.572Z","interval":10000}'
|
||||||
/client/metrics:
|
/client/metrics:
|
||||||
post:
|
post:
|
||||||
summary: Register a metrics *bucket*.
|
summary: Register a metrics *bucket*.
|
||||||
@ -115,11 +117,13 @@ paths:
|
|||||||
'400':
|
'400':
|
||||||
description: 'Bad body request (for example, appName is not correct)'
|
description: 'Bad body request (for example, appName is not correct)'
|
||||||
'401':
|
'401':
|
||||||
description: Not authorized
|
$ref: '#/components/responses/notAuthorizedResponse'
|
||||||
content:
|
x-code-samples:
|
||||||
application/json:
|
- lang: 'cURL'
|
||||||
schema:
|
source: |
|
||||||
$ref: '#/components/schemas/401'
|
curl --request POST \
|
||||||
|
--url http://localhost:4242/api/client/metrics \
|
||||||
|
--data '{"appName":"my-application","instanceId":"generated-732038-17080","bucket":{"start":"2020-12-08T13:50:00.000Z","stop":"2020-12-08T13:55:00.000Z","toggles":{"yesno":{"yesorno":"yes"},"metricsCount":{"count":1}}}}'
|
||||||
/client/features:
|
/client/features:
|
||||||
# Would normally $ref here but it tangles with an OAS bug - which affects both Redoc and Swagger UI - https://github.com/swagger-api/swagger-ui/issues/6249 (closed issue but still broken in latest release)
|
# Would normally $ref here but it tangles with an OAS bug - which affects both Redoc and Swagger UI - https://github.com/swagger-api/swagger-ui/issues/6249 (closed issue but still broken in latest release)
|
||||||
get:
|
get:
|
||||||
@ -137,17 +141,14 @@ paths:
|
|||||||
- Feature toggles
|
- Feature toggles
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
description: Successful response
|
$ref: '#/components/responses/clientResponse'
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
$ref: '#/components/schemas/200client'
|
|
||||||
'401':
|
'401':
|
||||||
description: Not authorized
|
$ref: '#/components/responses/notAuthorizedResponse'
|
||||||
content:
|
x-code-samples:
|
||||||
application/json:
|
- lang: 'cURL'
|
||||||
schema:
|
source: |
|
||||||
$ref: '#/components/schemas/401'
|
curl --request GET \
|
||||||
|
--url http://localhost:4242/api/client/features
|
||||||
'/client/features/{featureName}':
|
'/client/features/{featureName}':
|
||||||
get:
|
get:
|
||||||
summary: Fetches a specific Feature Toggle from the Unleash server.
|
summary: Fetches a specific Feature Toggle from the Unleash server.
|
||||||
@ -167,17 +168,14 @@ paths:
|
|||||||
- Feature toggles
|
- Feature toggles
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
description: Successful response
|
$ref: '#/components/responses/successResponse'
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
$ref: '#/components/schemas/200'
|
|
||||||
'401':
|
'401':
|
||||||
description: Not authorized
|
$ref: '#/components/responses/notAuthorizedResponse'
|
||||||
content:
|
x-code-samples:
|
||||||
application/json:
|
- lang: 'cURL'
|
||||||
schema:
|
source: |
|
||||||
$ref: '#/components/schemas/401'
|
curl --request GET \
|
||||||
|
--url http://localhost:4242/api/client/features/featureName
|
||||||
/admin/features:
|
/admin/features:
|
||||||
get:
|
get:
|
||||||
summary: Fetches all feature toggles from the Unleash server.
|
summary: Fetches all feature toggles from the Unleash server.
|
||||||
@ -193,17 +191,14 @@ paths:
|
|||||||
- Feature toggles
|
- Feature toggles
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
description: Successful response
|
$ref: '#/components/responses/successResponse'
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
$ref: '#/components/schemas/200'
|
|
||||||
'401':
|
'401':
|
||||||
description: Not authorized
|
$ref: '#/components/responses/notAuthorizedResponse'
|
||||||
content:
|
x-code-samples:
|
||||||
application/json:
|
- lang: 'cURL'
|
||||||
schema:
|
source: |
|
||||||
$ref: '#/components/schemas/401'
|
curl --request GET \
|
||||||
|
--url http://localhost:4242/api/admin/features
|
||||||
post:
|
post:
|
||||||
summary: Create a Feature Toggle
|
summary: Create a Feature Toggle
|
||||||
description: Create a new Feature Toggle
|
description: Create a new Feature Toggle
|
||||||
@ -222,11 +217,13 @@ paths:
|
|||||||
'400':
|
'400':
|
||||||
description: 'Bad body request (for example, Feature Toggle name is not unique)'
|
description: 'Bad body request (for example, Feature Toggle name is not unique)'
|
||||||
'401':
|
'401':
|
||||||
description: Not authorized
|
$ref: '#/components/responses/notAuthorizedResponse'
|
||||||
content:
|
x-code-samples:
|
||||||
application/json:
|
- lang: 'cURL'
|
||||||
schema:
|
source: |
|
||||||
$ref: '#/components/schemas/401'
|
curl --request POST \
|
||||||
|
--url http://localhost:4242/api/admin/features \
|
||||||
|
--data '[{"name":"featureX","description":"Toggles featureX on and off","type":"release","enabled":true,"stale":false,"strategies":[{"name":"default","editable":true,"description":"Default on/off strategy.","parameters":{"parameter":{"name":"groupId","type":"string","description":"Define activation groups to allow you to correlate across feature toggles.","required":false}}}],"variants":[{"name":"yellow","weight":20}],"createdAt":"string"}]'
|
||||||
'/admin/features/{featureName}':
|
'/admin/features/{featureName}':
|
||||||
get:
|
get:
|
||||||
summary: Fetches a specific Feature Toggle from the Unleash server.
|
summary: Fetches a specific Feature Toggle from the Unleash server.
|
||||||
@ -244,17 +241,14 @@ paths:
|
|||||||
- Feature toggles
|
- Feature toggles
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
description: Successful response
|
$ref: '#/components/responses/successResponse'
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
$ref: '#/components/schemas/200'
|
|
||||||
'401':
|
'401':
|
||||||
description: Not authorized
|
$ref: '#/components/responses/notAuthorizedResponse'
|
||||||
content:
|
x-code-samples:
|
||||||
application/json:
|
- lang: 'cURL'
|
||||||
schema:
|
source: |
|
||||||
$ref: '#/components/schemas/401'
|
curl --request GET \
|
||||||
|
--url http://localhost:4242/api/admin/features/featureName
|
||||||
put:
|
put:
|
||||||
summary: Update a Feature Toggle
|
summary: Update a Feature Toggle
|
||||||
description: Update a Feature Toggle.
|
description: Update a Feature Toggle.
|
||||||
@ -271,22 +265,19 @@ paths:
|
|||||||
$ref: '#/components/schemas/featureToggleSchema'
|
$ref: '#/components/schemas/featureToggleSchema'
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
description: Feature Toggle successfully updated
|
$ref: '#/components/responses/successResponse'
|
||||||
content:
|
'401':
|
||||||
application/json:
|
$ref: '#/components/responses/notAuthorizedResponse'
|
||||||
schema:
|
|
||||||
$ref: '#/components/schemas/200'
|
|
||||||
'400':
|
'400':
|
||||||
description: Bad body request (for example 'strategies' is not an array)
|
description: Bad body request (for example 'strategies' is not an array)
|
||||||
'401':
|
|
||||||
description: Not authorized
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
$ref: '#/components/schemas/401'
|
|
||||||
'404':
|
'404':
|
||||||
description: Feature Toggle not found
|
description: Feature Toggle not found
|
||||||
x-code-samples:
|
x-code-samples:
|
||||||
|
- lang: 'cURL'
|
||||||
|
source: |
|
||||||
|
curl --request PUT \
|
||||||
|
--url http://localhost:4242/api/admin/features/featureName \
|
||||||
|
--data '[{"name":"featureX","description":"Toggles featureX on and off","type":"release","enabled":true,"stale":false,"strategies":[{"name":"default","editable":true,"description":"Default on/off strategy.","parameters":{"parameter":{"name":"groupId","type":"string","description":"Define activation groups to allow you to correlate across feature toggles.","required":false}}}],"variants":[{"name":"yellow","weight":20}],"createdAt":"string"}]'
|
||||||
- lang: 'Go'
|
- lang: 'Go'
|
||||||
source: |
|
source: |
|
||||||
package main
|
package main
|
||||||
@ -362,13 +353,14 @@ paths:
|
|||||||
'200':
|
'200':
|
||||||
description: Feature Toggle successfully archived
|
description: Feature Toggle successfully archived
|
||||||
'401':
|
'401':
|
||||||
description: Not authorized
|
$ref: '#/components/responses/notAuthorizedResponse'
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
$ref: '#/components/schemas/401'
|
|
||||||
'404':
|
'404':
|
||||||
description: Feature Toggle not found
|
description: Feature Toggle not found
|
||||||
|
x-code-samples:
|
||||||
|
- lang: 'cURL'
|
||||||
|
source: |
|
||||||
|
curl --request DELETE \
|
||||||
|
--url http://localhost:4242/api/admin/features/featureName
|
||||||
'/admin/features/{featureName}/toggle/on':
|
'/admin/features/{featureName}/toggle/on':
|
||||||
post:
|
post:
|
||||||
summary: Enable a Feature Toggle.
|
summary: Enable a Feature Toggle.
|
||||||
@ -380,19 +372,16 @@ paths:
|
|||||||
- $ref: '#/components/parameters/featureNamePath'
|
- $ref: '#/components/parameters/featureNamePath'
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
description: Successful response
|
$ref: '#/components/responses/successResponse'
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
$ref: '#/components/schemas/200'
|
|
||||||
'401':
|
'401':
|
||||||
description: Not authorized
|
$ref: '#/components/responses/notAuthorizedResponse'
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
$ref: '#/components/schemas/401'
|
|
||||||
'404':
|
'404':
|
||||||
description: Feature Toggle not found
|
description: Feature Toggle not found
|
||||||
|
x-code-samples:
|
||||||
|
- lang: 'cURL'
|
||||||
|
source: |
|
||||||
|
curl --request POST \
|
||||||
|
--url http://localhost:4242/api/admin/features/featureName/toggle/on
|
||||||
'/admin/features/{featureName}/toggle/off':
|
'/admin/features/{featureName}/toggle/off':
|
||||||
post:
|
post:
|
||||||
summary: Disable a Feature Toggle.
|
summary: Disable a Feature Toggle.
|
||||||
@ -404,19 +393,16 @@ paths:
|
|||||||
- $ref: '#/components/parameters/featureNamePath'
|
- $ref: '#/components/parameters/featureNamePath'
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
description: Successful response
|
$ref: '#/components/responses/successResponse'
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
$ref: '#/components/schemas/200'
|
|
||||||
'401':
|
'401':
|
||||||
description: Not authorized
|
$ref: '#/components/responses/notAuthorizedResponse'
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
$ref: '#/components/schemas/401'
|
|
||||||
'404':
|
'404':
|
||||||
description: Feature Toggle not found
|
description: Feature Toggle not found
|
||||||
|
x-code-samples:
|
||||||
|
- lang: 'cURL'
|
||||||
|
source: |
|
||||||
|
curl --request POST \
|
||||||
|
--url http://localhost:4242/api/admin/features/featureName/toggle/off
|
||||||
'/admin/features/{featureName}/stale/on':
|
'/admin/features/{featureName}/stale/on':
|
||||||
post:
|
post:
|
||||||
summary: Mark a Feature Toggle as 'stale' (deprecated).
|
summary: Mark a Feature Toggle as 'stale' (deprecated).
|
||||||
@ -431,19 +417,16 @@ paths:
|
|||||||
- $ref: '#/components/parameters/featureNamePath'
|
- $ref: '#/components/parameters/featureNamePath'
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
description: Successful response
|
$ref: '#/components/responses/successResponse'
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
$ref: '#/components/schemas/200'
|
|
||||||
'401':
|
'401':
|
||||||
description: Not authorized
|
$ref: '#/components/responses/notAuthorizedResponse'
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
$ref: '#/components/schemas/401'
|
|
||||||
'404':
|
'404':
|
||||||
description: Feature Toggle not found
|
description: Feature Toggle not found
|
||||||
|
x-code-samples:
|
||||||
|
- lang: 'cURL'
|
||||||
|
source: |
|
||||||
|
curl --request POST \
|
||||||
|
--url http://localhost:4242/api/admin/features/featureName/stale/on
|
||||||
'/admin/features/{featureName}/stale/off':
|
'/admin/features/{featureName}/stale/off':
|
||||||
post:
|
post:
|
||||||
summary: Mark a Feature Toggle as active.
|
summary: Mark a Feature Toggle as active.
|
||||||
@ -458,19 +441,16 @@ paths:
|
|||||||
- $ref: '#/components/parameters/featureNamePath'
|
- $ref: '#/components/parameters/featureNamePath'
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
description: Successful response
|
$ref: '#/components/responses/successResponse'
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
$ref: '#/components/schemas/200'
|
|
||||||
'401':
|
'401':
|
||||||
description: Not authorized
|
$ref: '#/components/responses/notAuthorizedResponse'
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
$ref: '#/components/schemas/401'
|
|
||||||
'404':
|
'404':
|
||||||
description: Feature Toggle not found
|
description: Feature Toggle not found
|
||||||
|
x-code-samples:
|
||||||
|
- lang: 'cURL'
|
||||||
|
source: |
|
||||||
|
curl --request POST \
|
||||||
|
--url http://localhost:4242/api/admin/features/featureName/stale/off
|
||||||
/admin/archive/features:
|
/admin/archive/features:
|
||||||
get:
|
get:
|
||||||
summary: List all the archived feature toggles on the Unleash server
|
summary: List all the archived feature toggles on the Unleash server
|
||||||
@ -480,19 +460,16 @@ paths:
|
|||||||
- Archive
|
- Archive
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
description: Successful response
|
$ref: '#/components/responses/successResponse'
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
$ref: '#/components/schemas/200'
|
|
||||||
'401':
|
'401':
|
||||||
description: Not authorized
|
$ref: '#/components/responses/notAuthorizedResponse'
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
$ref: '#/components/schemas/401'
|
|
||||||
'404':
|
'404':
|
||||||
description: Feature Toggle not found
|
description: Feature Toggle not found
|
||||||
|
x-code-samples:
|
||||||
|
- lang: 'cURL'
|
||||||
|
source: |
|
||||||
|
curl --request GET \
|
||||||
|
--url http://localhost:4242/api/admin/archive/features
|
||||||
'/admin/archive/revive/{featureName}':
|
'/admin/archive/revive/{featureName}':
|
||||||
post:
|
post:
|
||||||
summary: Un-archive a Feature Toggle
|
summary: Un-archive a Feature Toggle
|
||||||
@ -507,6 +484,11 @@ paths:
|
|||||||
description: Feature Toggle successfully revived
|
description: Feature Toggle successfully revived
|
||||||
'404':
|
'404':
|
||||||
description: Feature Toggle not found
|
description: Feature Toggle not found
|
||||||
|
x-code-samples:
|
||||||
|
- lang: 'cURL'
|
||||||
|
source: |
|
||||||
|
curl --request POST \
|
||||||
|
--url http://localhost:4242/api/admin/archive/revive/featureName
|
||||||
/admin/strategies:
|
/admin/strategies:
|
||||||
get:
|
get:
|
||||||
summary: Fetch all strategies and their parameters.
|
summary: Fetch all strategies and their parameters.
|
||||||
@ -516,17 +498,14 @@ paths:
|
|||||||
- Strategies
|
- Strategies
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
description: Successful response
|
$ref: '#/components/responses/strategyExistsResponse'
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
$ref: '#/components/schemas/200strategy'
|
|
||||||
'401':
|
'401':
|
||||||
description: Not authorized
|
$ref: '#/components/responses/notAuthorizedResponse'
|
||||||
content:
|
x-code-samples:
|
||||||
application/json:
|
- lang: 'cURL'
|
||||||
schema:
|
source: |
|
||||||
$ref: '#/components/schemas/401'
|
curl --request GET \
|
||||||
|
--url http://localhost:4242/api/admin/strategies
|
||||||
post:
|
post:
|
||||||
summary: Create Strategy
|
summary: Create Strategy
|
||||||
description: Create Strategy
|
description: Create Strategy
|
||||||
@ -545,17 +524,15 @@ paths:
|
|||||||
'400':
|
'400':
|
||||||
description: Bad body request (for example 'strategies' is not an array)
|
description: Bad body request (for example 'strategies' is not an array)
|
||||||
'401':
|
'401':
|
||||||
description: Not authorized
|
$ref: '#/components/responses/notAuthorizedResponse'
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
$ref: '#/components/schemas/401'
|
|
||||||
'409':
|
'409':
|
||||||
description: Strategy already exists
|
$ref: '#/components/responses/strategyExistsResponse'
|
||||||
content:
|
x-code-samples:
|
||||||
application/json:
|
- lang: 'cURL'
|
||||||
schema:
|
source: |
|
||||||
$ref: '#/components/schemas/409'
|
curl --request POST \
|
||||||
|
--url http://localhost:4242/api/admin/strategies \
|
||||||
|
--data '{"name":"gradualRollout","description":"Gradual rollout to logged in users","parameters":[{"name":"percentage","type":"percentage","description":"What percent of users should the new Feature Toggle be active for?","required":true}]}'
|
||||||
'/admin/strategies/{strategyName}':
|
'/admin/strategies/{strategyName}':
|
||||||
put:
|
put:
|
||||||
summary: Update Strategy
|
summary: Update Strategy
|
||||||
@ -580,13 +557,15 @@ paths:
|
|||||||
'200':
|
'200':
|
||||||
description: Strategy successfully updated.
|
description: Strategy successfully updated.
|
||||||
'401':
|
'401':
|
||||||
description: Not authorized
|
$ref: '#/components/responses/notAuthorizedResponse'
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
$ref: '#/components/schemas/401'
|
|
||||||
'404':
|
'404':
|
||||||
description: Strategy not updated due to errors in query and/or request body (such as **name** and **strategyName** not matching).
|
description: Strategy not updated due to errors in query and/or request body (such as **name** and **strategyName** not matching).
|
||||||
|
x-code-samples:
|
||||||
|
- lang: 'cURL'
|
||||||
|
source: |
|
||||||
|
curl --request PUT \
|
||||||
|
--url http://localhost:4242/api/admin/strategies/strategyName \
|
||||||
|
--data '{"name":"gradualRollout","description":"Gradual rollout to logged in users","parameters":[{"name":"percentage","type":"percentage","description":"What percent of users should the new Feature Toggle be active for?","required":true}]}'
|
||||||
/admin/metrics/seen-toggles:
|
/admin/metrics/seen-toggles:
|
||||||
get:
|
get:
|
||||||
summary: Returns a list of applications and the feature toggles that Unleash has 'seen' for each application.
|
summary: Returns a list of applications and the feature toggles that Unleash has 'seen' for each application.
|
||||||
@ -596,11 +575,12 @@ paths:
|
|||||||
- Metrics
|
- Metrics
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
description: Successful response
|
$ref: '#/components/responses/seenTogglesResponse'
|
||||||
content:
|
x-code-samples:
|
||||||
application/json:
|
- lang: 'cURL'
|
||||||
schema:
|
source: |
|
||||||
$ref: '#/components/schemas/200seen'
|
curl --request GET \
|
||||||
|
--url http://localhost:4242/api/admin/metrics/seen-toggles
|
||||||
/admin/metrics/feature-toggles:
|
/admin/metrics/feature-toggles:
|
||||||
get:
|
get:
|
||||||
summary: Gives 'last minute' and 'last hour' metrics for all active feature toggles (based on what was reported by the client applications).
|
summary: Gives 'last minute' and 'last hour' metrics for all active feature toggles (based on what was reported by the client applications).
|
||||||
@ -612,17 +592,14 @@ paths:
|
|||||||
- Metrics
|
- Metrics
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
description: Successful response
|
$ref: '#/components/responses/featureAccessResponse'
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
$ref: '#/components/schemas/200feature'
|
|
||||||
'401':
|
'401':
|
||||||
description: Not authorized
|
$ref: '#/components/responses/notAuthorizedResponse'
|
||||||
content:
|
x-code-samples:
|
||||||
application/json:
|
- lang: 'cURL'
|
||||||
schema:
|
source: |
|
||||||
$ref: '#/components/schemas/401'
|
curl --request GET \
|
||||||
|
--url http://localhost:4242/api/admin/metrics/feature-toggles
|
||||||
/admin/metrics/applications:
|
/admin/metrics/applications:
|
||||||
get:
|
get:
|
||||||
summary: A list of known applications ('seen' by Unleash in the last two days)
|
summary: A list of known applications ('seen' by Unleash in the last two days)
|
||||||
@ -632,17 +609,14 @@ paths:
|
|||||||
- Metrics
|
- Metrics
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
description: Successful response
|
$ref: '#/components/responses/applicationsResponse'
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
$ref: '#/components/schemas/applicationArray'
|
|
||||||
'401':
|
'401':
|
||||||
description: Not authorized
|
$ref: '#/components/responses/notAuthorizedResponse'
|
||||||
content:
|
x-code-samples:
|
||||||
application/json:
|
- lang: 'cURL'
|
||||||
schema:
|
source: |
|
||||||
$ref: '#/components/schemas/401'
|
curl --request GET \
|
||||||
|
--url http://localhost:4242/api/admin/metrics/applications
|
||||||
'/admin/metrics/applications/{appName}':
|
'/admin/metrics/applications/{appName}':
|
||||||
get:
|
get:
|
||||||
summary: Details about a client application.
|
summary: Details about a client application.
|
||||||
@ -654,19 +628,16 @@ paths:
|
|||||||
- $ref: '#/components/parameters/appNamePath'
|
- $ref: '#/components/parameters/appNamePath'
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
description: Successful response
|
$ref: '#/components/responses/appDetailsResponse'
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
$ref: '#/components/schemas/200appdetails'
|
|
||||||
'401':
|
'401':
|
||||||
description: Not authorized
|
$ref: '#/components/responses/notAuthorizedResponse'
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
$ref: '#/components/schemas/401'
|
|
||||||
'500':
|
'500':
|
||||||
description: Application name not found
|
description: Application name not found
|
||||||
|
x-code-samples:
|
||||||
|
- lang: 'cURL'
|
||||||
|
source: |
|
||||||
|
curl --request GET \
|
||||||
|
--url http://localhost:4242/api/admin/metrics/applications/appName
|
||||||
/admin/metrics/seen-apps:
|
/admin/metrics/seen-apps:
|
||||||
get:
|
get:
|
||||||
summary: Details about seen applications
|
summary: Details about seen applications
|
||||||
@ -676,17 +647,14 @@ paths:
|
|||||||
- Metrics
|
- Metrics
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
description: Successful response
|
$ref: '#/components/responses/applicationsResponse'
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
$ref: '#/components/schemas/applicationArray'
|
|
||||||
'401':
|
'401':
|
||||||
description: Not authorized
|
$ref: '#/components/responses/notAuthorizedResponse'
|
||||||
content:
|
x-code-samples:
|
||||||
application/json:
|
- lang: 'cURL'
|
||||||
schema:
|
source: |
|
||||||
$ref: '#/components/schemas/401'
|
curl --request GET \
|
||||||
|
--url http://localhost:4242/api/admin/metrics/seen-apps
|
||||||
/admin/events:
|
/admin/events:
|
||||||
get:
|
get:
|
||||||
operationId: get-admin-events
|
operationId: get-admin-events
|
||||||
@ -703,17 +671,14 @@ paths:
|
|||||||
- Events
|
- Events
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
description: OK
|
$ref: '#/components/responses/eventsResponse'
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
$ref: '#/components/schemas/200-events'
|
|
||||||
'401':
|
'401':
|
||||||
description: Not authorized
|
$ref: '#/components/responses/notAuthorizedResponse'
|
||||||
content:
|
x-code-samples:
|
||||||
application/json:
|
- lang: 'cURL'
|
||||||
schema:
|
source: |
|
||||||
$ref: '#/components/schemas/401'
|
curl --request GET \
|
||||||
|
--url http://localhost:4242/api/admin/events
|
||||||
/admin/state/export:
|
/admin/state/export:
|
||||||
get:
|
get:
|
||||||
operationId: get-admin-state-export
|
operationId: get-admin-state-export
|
||||||
@ -755,17 +720,14 @@ paths:
|
|||||||
example: true
|
example: true
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
description: OK
|
$ref: '#/components/responses/exportResponse'
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
$ref: '#/components/schemas/200export'
|
|
||||||
'401':
|
'401':
|
||||||
description: Not authorized
|
$ref: '#/components/responses/notAuthorizedResponse'
|
||||||
content:
|
x-code-samples:
|
||||||
application/json:
|
- lang: 'cURL'
|
||||||
schema:
|
source: |
|
||||||
$ref: '#/components/schemas/401'
|
curl --request GET \
|
||||||
|
--url http://localhost:4242/api/admin/state/export
|
||||||
/admin/state/import:
|
/admin/state/import:
|
||||||
post:
|
post:
|
||||||
summary: Import feature toggles and strategies
|
summary: Import feature toggles and strategies
|
||||||
@ -812,13 +774,15 @@ paths:
|
|||||||
'200':
|
'200':
|
||||||
description: Successful import.
|
description: Successful import.
|
||||||
'401':
|
'401':
|
||||||
description: Not authorized
|
$ref: '#/components/responses/notAuthorizedResponse'
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
$ref: '#/components/schemas/401'
|
|
||||||
'404':
|
'404':
|
||||||
description: No import data provided.
|
description: No import data provided.
|
||||||
|
x-code-samples:
|
||||||
|
- lang: 'cURL'
|
||||||
|
source: |
|
||||||
|
curl --request POST \
|
||||||
|
--url 'http://localhost:4242/api/admin/state/import?drop=false&keep=false' \
|
||||||
|
--data '{"fileName":"string"}'
|
||||||
/admin/feature-types:
|
/admin/feature-types:
|
||||||
get:
|
get:
|
||||||
summary: Fetch the list of Unleash feature types
|
summary: Fetch the list of Unleash feature types
|
||||||
@ -833,17 +797,14 @@ paths:
|
|||||||
- Feature types
|
- Feature types
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
description: OK
|
$ref: '#/components/responses/featureTypeResponse'
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
$ref: '#/components/schemas/200featuretype'
|
|
||||||
'401':
|
'401':
|
||||||
description: Not authorized
|
$ref: '#/components/responses/notAuthorizedResponse'
|
||||||
content:
|
x-code-samples:
|
||||||
application/json:
|
- lang: 'cURL'
|
||||||
schema:
|
source: |
|
||||||
$ref: '#/components/schemas/401'
|
curl --request GET \
|
||||||
|
--url http://localhost:4242/api/admin/feature-types
|
||||||
components:
|
components:
|
||||||
parameters:
|
parameters:
|
||||||
featureNamePath:
|
featureNamePath:
|
||||||
@ -870,9 +831,81 @@ components:
|
|||||||
example: my-application
|
example: my-application
|
||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
|
responses:
|
||||||
|
successResponse:
|
||||||
|
description: "Successful response"
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/200'
|
||||||
|
notAuthorizedResponse:
|
||||||
|
description: "Not authorized"
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/401'
|
||||||
|
clientResponse:
|
||||||
|
description: "Successful response"
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/200Client'
|
||||||
|
strategyExistsResponse:
|
||||||
|
description: "Strategy already exists"
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/409'
|
||||||
|
strategyResponse:
|
||||||
|
description: "Successful response"
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/200strategy'
|
||||||
|
seenTogglesResponse:
|
||||||
|
description: "Successful response"
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/200seen'
|
||||||
|
featureAccessResponse:
|
||||||
|
description: "Successful response"
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/200feature'
|
||||||
|
appDetailsResponse:
|
||||||
|
description: "Successful response"
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/200appdetails'
|
||||||
|
applicationsResponse:
|
||||||
|
description: "Successful response"
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/applicationArray'
|
||||||
|
eventsResponse:
|
||||||
|
description: "Successful response"
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/200-events'
|
||||||
|
exportResponse:
|
||||||
|
description: "Successful response"
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/200export'
|
||||||
|
featureTypeResponse:
|
||||||
|
description: "Successful response"
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/200featuretype'
|
||||||
schemas:
|
schemas:
|
||||||
'200':
|
'200':
|
||||||
title: Successful response
|
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
version:
|
version:
|
||||||
@ -882,7 +915,6 @@ components:
|
|||||||
x-tags:
|
x-tags:
|
||||||
- Responses
|
- Responses
|
||||||
'401':
|
'401':
|
||||||
description: Not authorized
|
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
type:
|
type:
|
||||||
@ -1382,7 +1414,7 @@ components:
|
|||||||
x-tags:
|
x-tags:
|
||||||
- Schemas
|
- Schemas
|
||||||
|
|
||||||
200client:
|
200Client:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
version:
|
version:
|
||||||
|
Loading…
Reference in New Issue
Block a user