iliax 1 year ago
parent
commit
35910fc2a2

+ 24 - 0
kafka-ui-contract/src/main/resources/swagger/prometheus-query-api.yaml

@@ -301,6 +301,15 @@ components:
       properties:
         result:
           type: array
+          description: |
+            Format:
+            [
+              {
+                "metric": { "<label_name>": "<label_value>", ... },
+                "values": [ [ <unix_time>, "<sample_value>" ], ... ],
+                "histograms": [ [ <unix_time>, <histogram> ], ... ]
+              }, ...
+            ]
           items: { }
 
     InstantVectorQueryResponse:
@@ -310,6 +319,15 @@ components:
       properties:
         result:
           type: array
+          description: |
+            Format:
+            [
+              {
+                "metric": { "<label_name>": "<label_value>", ... },
+                "value": [ <unix_time>, "<sample_value>" ],
+                "histogram": [ <unix_time>, <histogram> ]
+             }, ...
+            ]
           items: { }
 
     ScalarQueryResponse:
@@ -319,6 +337,9 @@ components:
       properties:
         result:
           type: array
+          description: |
+            Format:
+            [ <unix_time>, "<scalar_value>" ]
           items: { }
 
     StringQueryResponse:
@@ -328,6 +349,9 @@ components:
       properties:
         result:
           type: array
+          description: |
+            Format:
+            [ <unix_time>, "<string_value>" ]
           items: { }
 
     SeriesResponse: