@@ -13,6 +13,9 @@ servers:
1313 description : CfClient description
1414tags :
1515 - name : client
16+ - name : metrics
17+ - name : Proxy
18+ description : APIs used by the ff-proxy
1619paths :
1720 ' /client/env/{environmentUUID}/feature-configs ' :
1821 get :
8487 schema :
8588 type : string
8689 - $ref : ' #/components/parameters/clusterQueryOptionalParam'
90+ - $ref : ' #/components/parameters/segmentRulesV2QueryParam'
8791 security :
8892 - BearerAuth : []
8993 responses :
@@ -124,6 +128,7 @@ paths:
124128 schema :
125129 type : string
126130 - $ref : ' #/components/parameters/clusterQueryOptionalParam'
131+ - $ref : ' #/components/parameters/segmentRulesV2QueryParam'
127132 security :
128133 - BearerAuth : []
129134 responses :
@@ -198,10 +203,7 @@ paths:
198203 schema :
199204 allOf :
200205 - $ref : ' #/components/schemas/Pagination'
201- - type : object
202- properties :
203- evaluations :
204- $ref : ' #/components/schemas/Evaluations'
206+ - $ref : ' #/components/schemas/Evaluations'
205207 ' /client/env/{environmentUUID}/target/{target}/evaluations/{feature} ' :
206208 get :
207209 summary : Get feature evaluations for target
@@ -237,6 +239,33 @@ paths:
237239 application/json :
238240 schema :
239241 $ref : ' #/components/schemas/Evaluation'
242+ ' /metrics/{environmentUUID} ' :
243+ post :
244+ tags :
245+ - metrics
246+ summary : Send metrics to the Analytics server.
247+ description : Send metrics to Analytics server
248+ operationId : postMetrics
249+ parameters :
250+ - $ref : ' #/components/parameters/environmentPathParam'
251+ - $ref : ' #/components/parameters/clusterQueryOptionalParam'
252+ requestBody :
253+ content :
254+ application/json :
255+ schema :
256+ $ref : ' #/components/schemas/Metrics'
257+ security :
258+ - ApiKeyAuth : []
259+ - BearerAuth : []
260+ responses :
261+ ' 200 ' :
262+ description : OK
263+ ' 401 ' :
264+ $ref : ' #/components/responses/Unauthenticated'
265+ ' 403 ' :
266+ $ref : ' #/components/responses/Unauthorized'
267+ ' 500 ' :
268+ $ref : ' #/components/responses/InternalServerError'
240269 /stream :
241270 get :
242271 summary : Stream endpoint.
@@ -274,6 +303,84 @@ paths:
274303 default : ' *'
275304 ' 503 ' :
276305 description : Service Unavailable
306+ /proxy/config :
307+ get :
308+ summary : Gets Proxy config for multiple environments
309+ description : >-
310+ Gets Proxy config for multiple environments if the Key query param is
311+ provided or gets config for a single environment if an environment query
312+ param is provided
313+ operationId : GetProxyConfig
314+ tags :
315+ - Proxy
316+ parameters :
317+ - $ref : ' #/components/parameters/pageNumber'
318+ - $ref : ' #/components/parameters/pageSize'
319+ - $ref : ' #/components/parameters/clusterQueryOptionalParam'
320+ - in : query
321+ name : environment
322+ description : >-
323+ Accepts an EnvironmentID. If this is provided then the endpoint will
324+ only return config for this environment. If this is left empty then
325+ the Proxy will return config for all environments associated with
326+ the Proxy Key.
327+ required : false
328+ schema :
329+ type : string
330+ - in : query
331+ name : key
332+ description : Accpets a Proxy Key.
333+ required : true
334+ schema :
335+ type : string
336+ security :
337+ - BearerAuth : []
338+ responses :
339+ ' 200 ' :
340+ $ref : ' #/components/responses/ProxyConfigResponse'
341+ ' 400 ' :
342+ $ref : ' #/components/responses/BadRequest'
343+ ' 401 ' :
344+ $ref : ' #/components/responses/Unauthenticated'
345+ ' 403 ' :
346+ $ref : ' #/components/responses/Unauthorized'
347+ ' 404 ' :
348+ $ref : ' #/components/responses/NotFound'
349+ ' 500 ' :
350+ $ref : ' #/components/responses/InternalServerError'
351+ /proxy/auth :
352+ post :
353+ summary : Endpoint that the Proxy can use to authenticate with the client server
354+ description : Endpoint that the Proxy can use to authenticate with the client server
355+ operationId : AuthenticateProxyKey
356+ tags :
357+ - Proxy
358+ requestBody :
359+ content :
360+ application/json :
361+ schema :
362+ type : object
363+ properties :
364+ proxyKey :
365+ type : string
366+ example : 896045f3-42ee-4e73-9154-086644768b96
367+ required :
368+ - proxyKey
369+ responses :
370+ ' 200 ' :
371+ description : OK
372+ content :
373+ application/json :
374+ schema :
375+ $ref : ' #/components/schemas/AuthenticationResponse'
376+ ' 401 ' :
377+ $ref : ' #/components/responses/Unauthenticated'
378+ ' 403 ' :
379+ $ref : ' #/components/responses/Unauthorized'
380+ ' 404 ' :
381+ $ref : ' #/components/responses/NotFound'
382+ ' 500 ' :
383+ $ref : ' #/components/responses/InternalServerError'
277384components :
278385 schemas :
279386 FeatureState :
@@ -770,6 +877,66 @@ components:
770877 - name
771878 - identifier
772879 - attributes
880+ MetricsData :
881+ type : object
882+ properties :
883+ timestamp :
884+ type : integer
885+ format : int64
886+ example : 1608175465
887+ description : time at when this data was recorded
888+ count :
889+ type : integer
890+ metricsType :
891+ type : string
892+ enum :
893+ - FFMETRICS
894+ description : This can be of type FeatureMetrics
895+ attributes :
896+ type : array
897+ items :
898+ $ref : ' #/components/schemas/KeyValue'
899+ required :
900+ - attributes
901+ - count
902+ - timestamp
903+ - metricsType
904+ Metrics :
905+ type : object
906+ properties :
907+ targetData :
908+ type : array
909+ items :
910+ $ref : ' #/components/schemas/TargetData'
911+ metricsData :
912+ type : array
913+ items :
914+ $ref : ' #/components/schemas/MetricsData'
915+ ProxyConfig :
916+ type : object
917+ description : TBD
918+ allOf :
919+ - $ref : ' #/components/schemas/Pagination'
920+ - properties :
921+ environments :
922+ type : array
923+ items :
924+ type : object
925+ properties :
926+ id :
927+ type : string
928+ apiKeys :
929+ type : array
930+ items :
931+ type : string
932+ featureConfigs :
933+ type : array
934+ items :
935+ $ref : ' #/components/schemas/FeatureConfig'
936+ segments :
937+ type : array
938+ items :
939+ $ref : ' #/components/schemas/Segment'
773940 securitySchemes :
774941 ApiKeyAuth :
775942 type : apiKey
@@ -787,6 +954,17 @@ components:
787954 description : Unique identifier for the cluster for the account
788955 schema :
789956 type : string
957+ segmentRulesV2QueryParam :
958+ name : rules
959+ in : query
960+ required : false
961+ description : >-
962+ When set to rules=v2 will return AND rule compatible serving_rules
963+ field. When not set or set to any other value will return old rules
964+ field only compatible with OR rules.
965+ allowEmptyValue : true
966+ schema :
967+ type : string
790968 environmentPathParam :
791969 name : environmentUUID
792970 in : path
@@ -833,9 +1011,15 @@ components:
8331011 application/json :
8341012 schema :
8351013 $ref : ' #/components/schemas/Error'
1014+ ProxyConfigResponse :
1015+ description : OK
1016+ content :
1017+ application/json :
1018+ schema :
1019+ $ref : ' #/components/schemas/ProxyConfig'
8361020 BadRequest :
8371021 description : Bad request
8381022 content :
8391023 application/json :
8401024 schema :
841- $ref : ' #/components/schemas/Error'
1025+ $ref : ' #/components/schemas/Error'
0 commit comments