mirror of
https://github.com/ClusterCockpit/cc-metric-store.git
synced 2024-11-13 22:47:25 +01:00
Update and extend REST API descriptions
This commit is contained in:
parent
53cb497e0c
commit
f301c759c3
@ -24,7 +24,7 @@
|
|||||||
"ApiKeyAuth": []
|
"ApiKeyAuth": []
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"description": "Write metrics to store",
|
"description": "This endpoint allows the users to print the content of",
|
||||||
"produces": [
|
"produces": [
|
||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
@ -81,6 +81,7 @@
|
|||||||
"ApiKeyAuth": []
|
"ApiKeyAuth": []
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"description": "This endpoint allows the users to free the Buffers from the",
|
||||||
"produces": [
|
"produces": [
|
||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
@ -136,7 +137,7 @@
|
|||||||
"ApiKeyAuth": []
|
"ApiKeyAuth": []
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"description": "Query metrics.",
|
"description": "This endpoint allows the users to retrieve data from the",
|
||||||
"consumes": [
|
"consumes": [
|
||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
|
@ -106,7 +106,7 @@ info:
|
|||||||
paths:
|
paths:
|
||||||
/debug/:
|
/debug/:
|
||||||
post:
|
post:
|
||||||
description: Write metrics to store
|
description: This endpoint allows the users to print the content of
|
||||||
parameters:
|
parameters:
|
||||||
- description: Selector
|
- description: Selector
|
||||||
in: query
|
in: query
|
||||||
@ -142,6 +142,7 @@ paths:
|
|||||||
- debug
|
- debug
|
||||||
/free/:
|
/free/:
|
||||||
post:
|
post:
|
||||||
|
description: This endpoint allows the users to free the Buffers from the
|
||||||
parameters:
|
parameters:
|
||||||
- description: up to timestamp
|
- description: up to timestamp
|
||||||
in: query
|
in: query
|
||||||
@ -178,7 +179,7 @@ paths:
|
|||||||
get:
|
get:
|
||||||
consumes:
|
consumes:
|
||||||
- application/json
|
- application/json
|
||||||
description: Query metrics.
|
description: This endpoint allows the users to retrieve data from the
|
||||||
parameters:
|
parameters:
|
||||||
- description: API query payload object
|
- description: API query payload object
|
||||||
in: body
|
in: body
|
||||||
|
@ -127,7 +127,10 @@ func (data *ApiMetricData) PadDataWithNull(ms *memorystore.MemoryStore, from, to
|
|||||||
// handleFree godoc
|
// handleFree godoc
|
||||||
// @summary
|
// @summary
|
||||||
// @tags free
|
// @tags free
|
||||||
// @description
|
// @description This endpoint allows the users to free the Buffers from the
|
||||||
|
// metric store. This endpoint offers the users to remove then systematically
|
||||||
|
// and also allows then to prune the data under node, if they do not want to
|
||||||
|
// remove the whole node.
|
||||||
// @produce json
|
// @produce json
|
||||||
// @param to query string false "up to timestamp"
|
// @param to query string false "up to timestamp"
|
||||||
// @success 200 {string} string "ok"
|
// @success 200 {string} string "ok"
|
||||||
@ -182,9 +185,9 @@ func handleFree(rw http.ResponseWriter, r *http.Request) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// handleWrite godoc
|
// handleWrite godoc
|
||||||
// @summary Receive metrics in line-protocol
|
// @summary Receive metrics in InfluxDB line-protocol
|
||||||
// @tags write
|
// @tags write
|
||||||
// @description Receives metrics in the influx line-protocol using [this format](https://github.com/ClusterCockpit/cc-specifications/blob/master/metrics/lineprotocol_alternative.md)
|
// @description Write data to the in-memory store in the InfluxDB line-protocol using [this format](https://github.com/ClusterCockpit/cc-specifications/blob/master/metrics/lineprotocol_alternative.md)
|
||||||
|
|
||||||
// @accept plain
|
// @accept plain
|
||||||
// @produce json
|
// @produce json
|
||||||
@ -245,7 +248,9 @@ type ApiQuery struct {
|
|||||||
// handleQuery godoc
|
// handleQuery godoc
|
||||||
// @summary Query metrics
|
// @summary Query metrics
|
||||||
// @tags query
|
// @tags query
|
||||||
// @description Query metrics.
|
// @description This endpoint allows the users to retrieve data from the
|
||||||
|
// in-memory database. The CCMS will return data in JSON format for the
|
||||||
|
// specified interval requested by the user
|
||||||
// @accept json
|
// @accept json
|
||||||
// @produce json
|
// @produce json
|
||||||
// @param request body api.ApiQueryRequest true "API query payload object"
|
// @param request body api.ApiQueryRequest true "API query payload object"
|
||||||
@ -383,7 +388,8 @@ func handleQuery(rw http.ResponseWriter, r *http.Request) {
|
|||||||
// handleDebug godoc
|
// handleDebug godoc
|
||||||
// @summary Debug endpoint
|
// @summary Debug endpoint
|
||||||
// @tags debug
|
// @tags debug
|
||||||
// @description Write metrics to store
|
// @description This endpoint allows the users to print the content of
|
||||||
|
// nodes/clusters/metrics to review the state of the data.
|
||||||
// @produce json
|
// @produce json
|
||||||
// @param selector query string false "Selector"
|
// @param selector query string false "Selector"
|
||||||
// @success 200 {string} string "Debug dump"
|
// @success 200 {string} string "Debug dump"
|
||||||
|
@ -30,7 +30,7 @@ const docTemplate = `{
|
|||||||
"ApiKeyAuth": []
|
"ApiKeyAuth": []
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"description": "Write metrics to store",
|
"description": "This endpoint allows the users to print the content of",
|
||||||
"produces": [
|
"produces": [
|
||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
@ -87,6 +87,7 @@ const docTemplate = `{
|
|||||||
"ApiKeyAuth": []
|
"ApiKeyAuth": []
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"description": "This endpoint allows the users to free the Buffers from the",
|
||||||
"produces": [
|
"produces": [
|
||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
@ -142,7 +143,7 @@ const docTemplate = `{
|
|||||||
"ApiKeyAuth": []
|
"ApiKeyAuth": []
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"description": "Query metrics.",
|
"description": "This endpoint allows the users to retrieve data from the",
|
||||||
"consumes": [
|
"consumes": [
|
||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
|
Loading…
Reference in New Issue
Block a user