From 37fd2731afcdbbed1fa14c94d1756a905de6423c Mon Sep 17 00:00:00 2001 From: Igor Lukanin Date: Wed, 19 Feb 2025 17:34:13 +0100 Subject: [PATCH] docs: Clarify base_path in the REST API --- .../apis-integrations/rest-api/reference.mdx | 36 ++++++++++--------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/docs/pages/product/apis-integrations/rest-api/reference.mdx b/docs/pages/product/apis-integrations/rest-api/reference.mdx index dc5ac9ac5e7ac..9cf58e8ac7405 100644 --- a/docs/pages/product/apis-integrations/rest-api/reference.mdx +++ b/docs/pages/product/apis-integrations/rest-api/reference.mdx @@ -5,9 +5,16 @@ redirect_from: # REST API reference -[REST API][ref-rest-api] provides the following endpoints. +The [REST API][ref-rest-api] provides the following endpoints. -## `/v1/load` + + +The `{base_path}` part of the endpoint URLs can be [configured][ref-basepath]. +By default, it's `/cubejs-api`. + + + +## `{base_path}/v1/load` Get the data for a query. @@ -90,7 +97,7 @@ values. -## `/v1/sql` +## `{base_path}/v1/sql` Get the SQL Code generated by Cube to be executed in the database. @@ -152,7 +159,7 @@ that Cube passes to an underlying data source driver later when executing the qu -## `/v1/meta` +## `{base_path}/v1/meta` Get meta-information for cubes and views defined in the data model. Information about cubes and views with `public: false` will not be returned. @@ -222,7 +229,7 @@ Example response: } ``` -## `/v1/pre-aggregations/jobs` +## `{base_path}/v1/pre-aggregations/jobs` Trigger pre-aggregation build jobs or retrieve statuses of such jobs. @@ -378,13 +385,8 @@ Example response: ## `/readyz` -Returns the ready state of the deployment. - -**Single-tenant:** Ensures the orchestration layer is operational and tests the -connection to the default `dataSource`. - -**Multi-tenant:** Tests connections per-tenant. If no connections exist, it will -report as successful. +Reports if the deployment has successfully started. To do so, it will try to test +the connection to the _default_ [data source][ref-datasources]. Example of a successful request: @@ -422,9 +424,8 @@ Keep-Alive: timeout=5 ## `/livez` -Returns the liveness state of the deployment. This is confirmed by testing any -existing connections to `dataSource`. If no connections exist, it will report as -successful. +Reports if the deployment is still healthy. This is confirmed by testing any +existing connections to data sources. Example of a successful response: @@ -460,6 +461,7 @@ Keep-Alive: timeout=5 {"health":"DOWN"} ``` -[ref-recipes-data-blending]: - /product/data-modeling/concepts/data-blending#data-blending +[ref-recipes-data-blending]: /product/data-modeling/concepts/data-blending#data-blending [ref-rest-api]: /product/apis-integrations/rest-api +[ref-basepath]: /product/apis-integrations/rest-api#base-path +[ref-datasources]: /product/configuration/advanced/multiple-data-sources \ No newline at end of file