diff --git a/contracts/cloud.yml b/contracts/cloud.yml index bb4104a0..b4b17d93 100644 --- a/contracts/cloud.yml +++ b/contracts/cloud.yml @@ -55,6 +55,39 @@ paths: application/json: schema: $ref: '#/components/schemas/Error' + /ping: + servers: + - url: '' + get: + operationId: GetPing + summary: Checks the status of InfluxDB instance and version of InfluxDB. + responses: + '204': + description: OK + headers: + X-Influxdb-Build: + schema: + type: string + description: The type of InfluxDB build. + X-Influxdb-Version: + schema: + type: integer + description: The version of InfluxDB. + head: + operationId: HeadPing + summary: Checks the status of InfluxDB instance and version of InfluxDB. + responses: + '204': + description: OK + headers: + X-Influxdb-Build: + schema: + type: string + description: The type of InfluxDB build. + X-Influxdb-Version: + schema: + type: integer + description: The version of InfluxDB. /: get: operationId: GetRoutes diff --git a/contracts/common.yml b/contracts/common.yml index f979ee36..e58adc24 100644 --- a/contracts/common.yml +++ b/contracts/common.yml @@ -55,6 +55,39 @@ paths: application/json: schema: $ref: '#/components/schemas/Error' + /ping: + servers: + - url: '' + get: + operationId: GetPing + summary: Checks the status of InfluxDB instance and version of InfluxDB. + responses: + '204': + description: OK + headers: + X-Influxdb-Build: + schema: + type: string + description: The type of InfluxDB build. + X-Influxdb-Version: + schema: + type: integer + description: The version of InfluxDB. + head: + operationId: HeadPing + summary: Checks the status of InfluxDB instance and version of InfluxDB. + responses: + '204': + description: OK + headers: + X-Influxdb-Build: + schema: + type: string + description: The type of InfluxDB build. + X-Influxdb-Version: + schema: + type: integer + description: The version of InfluxDB. /: get: operationId: GetRoutes diff --git a/contracts/oss.yml b/contracts/oss.yml index 173542d7..91c592eb 100644 --- a/contracts/oss.yml +++ b/contracts/oss.yml @@ -55,6 +55,39 @@ paths: application/json: schema: $ref: '#/components/schemas/Error' + /ping: + servers: + - url: '' + get: + operationId: GetPing + summary: Checks the status of InfluxDB instance and version of InfluxDB. + responses: + '204': + description: OK + headers: + X-Influxdb-Build: + schema: + type: string + description: The type of InfluxDB build. + X-Influxdb-Version: + schema: + type: integer + description: The version of InfluxDB. + head: + operationId: HeadPing + summary: Checks the status of InfluxDB instance and version of InfluxDB. + responses: + '204': + description: OK + headers: + X-Influxdb-Build: + schema: + type: string + description: The type of InfluxDB build. + X-Influxdb-Version: + schema: + type: integer + description: The version of InfluxDB. /: get: operationId: GetRoutes diff --git a/contracts/ref/cloud.yml b/contracts/ref/cloud.yml index 052d4d95..f427f9f7 100644 --- a/contracts/ref/cloud.yml +++ b/contracts/ref/cloud.yml @@ -3756,6 +3756,39 @@ paths: summary: Retrieve usage for an organization tags: - Usage + /ping: + get: + operationId: GetPing + responses: + "204": + description: OK + headers: + X-Influxdb-Build: + description: The type of InfluxDB build. + schema: + type: string + X-Influxdb-Version: + description: The version of InfluxDB. + schema: + type: integer + summary: Checks the status of InfluxDB instance and version of InfluxDB. + head: + operationId: HeadPing + responses: + "204": + description: OK + headers: + X-Influxdb-Build: + description: The type of InfluxDB build. + schema: + type: string + X-Influxdb-Version: + description: The version of InfluxDB. + schema: + type: integer + summary: Checks the status of InfluxDB instance and version of InfluxDB. + servers: + - url: "" /api/v2/poc-functions: get: operationId: GetFunctions diff --git a/contracts/ref/oss.yml b/contracts/ref/oss.yml index a0d32dd1..4a94ef25 100644 --- a/contracts/ref/oss.yml +++ b/contracts/ref/oss.yml @@ -3574,6 +3574,39 @@ paths: summary: Delete secrets from an organization tags: - Secrets + /ping: + get: + operationId: GetPing + responses: + "204": + description: OK + headers: + X-Influxdb-Build: + description: The type of InfluxDB build. + schema: + type: string + X-Influxdb-Version: + description: The version of InfluxDB. + schema: + type: integer + summary: Checks the status of InfluxDB instance and version of InfluxDB. + head: + operationId: HeadPing + responses: + "204": + description: OK + headers: + X-Influxdb-Build: + description: The type of InfluxDB build. + schema: + type: string + X-Influxdb-Version: + description: The version of InfluxDB. + schema: + type: integer + summary: Checks the status of InfluxDB instance and version of InfluxDB. + servers: + - url: "" /api/v2/query: post: operationId: PostQuery diff --git a/scripts/reference.sh b/scripts/reference.sh index 922e4ee7..ea9f39f3 100755 --- a/scripts/reference.sh +++ b/scripts/reference.sh @@ -23,4 +23,8 @@ swagrag \ -api-title "Complete InfluxDB OSS API" \ > ${TCONTRACTS}/ref/oss.yml +echo "Fixing /ping path" +sed -i '' -e "s|^ /api/v2/ping| /ping|" ${TCONTRACTS}/ref/cloud.yml +sed -i '' -e "s|^ /api/v2/ping| /ping|" ${TCONTRACTS}/ref/oss.yml + diff -r ${CONTRACTS}/ref ${TCONTRACTS}/ref/ diff --git a/src/common/_paths.yml b/src/common/_paths.yml index 426b280d..b5751dd0 100644 --- a/src/common/_paths.yml +++ b/src/common/_paths.yml @@ -2,6 +2,10 @@ $ref: "./common/paths/signin.yml" /signout: $ref: "./common/paths/signout.yml" + /ping: + servers: + - url: '' + $ref: "./common/paths/ping.yml" /: $ref: "./common/paths/0slash.yml" /documents/templates: diff --git a/src/common/paths/ping.yml b/src/common/paths/ping.yml new file mode 100644 index 00000000..2dd21fd1 --- /dev/null +++ b/src/common/paths/ping.yml @@ -0,0 +1,30 @@ +get: + operationId: GetPing + summary: Checks the status of InfluxDB instance and version of InfluxDB. + responses: + '204': + description: OK + headers: + X-Influxdb-Build: + schema: + type: string + description: The type of InfluxDB build. + X-Influxdb-Version: + schema: + type: integer + description: The version of InfluxDB. +head: + operationId: HeadPing + summary: Checks the status of InfluxDB instance and version of InfluxDB. + responses: + '204': + description: OK + headers: + X-Influxdb-Build: + schema: + type: string + description: The type of InfluxDB build. + X-Influxdb-Version: + schema: + type: integer + description: The version of InfluxDB.