You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* test for getRemoteFeaturesInfos
* changeFeatureValue with clearSubScopes
* better setup for changeFeatureValue with option clearSubScopes test
* changeFeatureValue with option remoteOnly
* test changeFeatureValue with option remoteOnly for failing case
* feature key consistency fix
* better test for remoteOnly cleanup
* disable special markup markup for .http calls
* wip service docs 1
* wip service docs 2
* make redisRead a read-privilege endpoint
* add an example for redisUpdate with remoteOnly option
* docs: add changeFeatureValue option remoteOnly
* more wording on remoteOnly option
* update webrick
* more wording on remoteOnly option 2
* more information for read /state
* more information for read /redis
* more polish
@@ -44,7 +44,7 @@ It will usually be sufficient to set the `serviceAccessRoles` configuration, whi
44
44
endpoints, but not the admin endpoints. If more discriminating access control is required, the `readAccessRoles` and
45
45
`writeAccessRoles` can be set separately. For debugging purposes, you can also set the `adminAccessRoles`.
46
46
47
-
{: .warn}
47
+
{: .warn}
48
48
As the name suggests, the `adminAccessRoles` should be considered sensitive. It allows direct root access to the
49
49
underlying redis.
50
50
@@ -97,7 +97,7 @@ automatically detect it and configure it as follows:
97
97
fallbackValue:false
98
98
```
99
99
100
-
{: .info}
100
+
{: .info}
101
101
This automatic configuration can be _overwritten_, by using a configuration file and adding a dedicated configuration
102
102
with the same key `/fts/my-feature`.
103
103
@@ -109,14 +109,17 @@ for the related requests. For an example check out the [Example CAP Server](http
109
109
This service endpoint will enable operations teams to understand toggle states. For practical requests, check the
110
110
[http file](https://github.com/cap-js-community/feature-toggle-library/blob/main/example-cap-server/http/feature-service.http) in our example CAP Server.
111
111
112
-
### Read Feature Toggles State
112
+
### Read Server State
113
113
114
-
Get all information about the current in-memory state of all toggles.
114
+
Get information about the current in-memory state of all configured toggles. The response will give you transparency
115
+
about maintained values and the underlying configuration of the toggles. In the following example, the
116
+
`/check/priority` toggle has a maintained root value, and two scoped values. All other toggles have no maintained
117
+
values, so they will use their fallback values.
115
118
116
119
<b>Example Request/Response</b>
117
120
118
121
- Request
119
-
```http
122
+
```
120
123
GET/rest/feature/state
121
124
Authorization:...
122
125
```
@@ -129,6 +132,11 @@ Get all information about the current in-memory state of all toggles.
Similar to the read privilege endpoints, these endpoints are meant to modify toggle state. For practical requests,
174
245
check the [http file](https://github.com/cap-js-community/feature-toggle-library/blob/main/example-cap-server/http/feature-service.http) in our example CAP Server.
175
246
176
247
### Update Feature Toggle
177
248
178
-
Update the toggle state on Redis, which in turn is published to all server instances.
249
+
Maintain a particular toggle value on Redis, which is automatically propagated to all server instances.
179
250
180
251
<b>Example Request/Responses</b>
181
252
182
253
- Valid Request
183
-
```http
254
+
```
184
255
POST/rest/feature/redisUpdate
185
256
Authorization:...
186
257
Content-Type: application/json
@@ -200,7 +271,7 @@ Update the toggle state on Redis, which in turn is published to all server insta
200
271
```
201
272
202
273
- Valid Request with [clearSubScopes]({{ site.baseurl }}/usage/#updating-feature-value)
203
-
```http
274
+
```
204
275
POST/rest/feature/redisUpdate
205
276
Authorization:...
206
277
Content-Type: application/json
@@ -221,8 +292,31 @@ Update the toggle state on Redis, which in turn is published to all server insta
221
292
...
222
293
```
223
294
295
+
- Valid Request with [remoteOnly]({{ site.baseurl }}/usage/#updating-feature-value)
296
+
```
297
+
POST/rest/feature/redisUpdate
298
+
Authorization:...
299
+
Content-Type: application/json
300
+
```
301
+
```json
302
+
{
303
+
"key":"/legacy-key",
304
+
"value":null,
305
+
"options": {
306
+
"clearSubScopes":true,
307
+
"remoteOnly":true
308
+
}
309
+
}
310
+
```
311
+
- Response
312
+
313
+
```
314
+
HTTP/1.1204 No Content
315
+
...
316
+
```
317
+
224
318
- Invalid Request
225
-
```http
319
+
```
226
320
POST/rest/feature/redisUpdate
227
321
Authorization:...
228
322
Content-Type: application/json
@@ -248,21 +342,6 @@ Update the toggle state on Redis, which in turn is published to all server insta
248
342
}
249
343
```
250
344
251
-
### Re-Sync Server with Redis
252
-
253
-
Force server to re-sync with Redis, this should never be necessary. It returns the same JSON structure as
254
-
`/state`, after re-syncing.
255
-
256
-
<b>Example Request/Response</b>
257
-
258
-
- Request
259
-
```http
260
-
POST/rest/feature/redisRead
261
-
Authorization:...
262
-
```
263
-
- Response<br>
264
-
Same as [Read Feature Toggles State](#read-feature-toggles-state).
265
-
266
345
## Service Endpoints for Admin Privilege
267
346
268
347
The service also offers an additional endpoint for deep problem analysis.
@@ -274,7 +353,7 @@ Send an arbitrary command to Redis. [https://redis.io/commands/](https://redis.i
274
353
<b>Example Request/Responses</b>
275
354
276
355
- Request INFO
277
-
```http
356
+
```
278
357
POST/rest/feature/redisSendCommand
279
358
Authorization:...
280
359
Content-Type: application/json
@@ -298,7 +377,7 @@ Send an arbitrary command to Redis. [https://redis.io/commands/](https://redis.i
0 commit comments