summaryrefslogtreecommitdiffstats
path: root/docs/sections/apis/configbinding.rst
diff options
context:
space:
mode:
authorLusheng Ji <lji@research.att.com>2018-03-27 23:24:33 -0400
committerLusheng Ji <lji@research.att.com>2018-03-27 23:25:41 -0400
commitb2a561b84b926ef109809539b9e283e95032c083 (patch)
treecf15dc96d20ba09b5a80419cd5f29201230499fb /docs/sections/apis/configbinding.rst
parent13de8870c542c1cd87d24f1bdde5878c82276c8b (diff)
Add documentation
Issue-ID: DCAEGEN2-206 Change-Id: I73de95e98e4cd545dcc29b0fcecf84530c23e2aa Signed-off-by: Lusheng Ji <lji@research.att.com>
Diffstat (limited to 'docs/sections/apis/configbinding.rst')
-rw-r--r--docs/sections/apis/configbinding.rst238
1 files changed, 238 insertions, 0 deletions
diff --git a/docs/sections/apis/configbinding.rst b/docs/sections/apis/configbinding.rst
new file mode 100644
index 00000000..0515d301
--- /dev/null
+++ b/docs/sections/apis/configbinding.rst
@@ -0,0 +1,238 @@
+Config Binding Service 2.1.0
+============================
+
+.. toctree::
+ :maxdepth: 3
+
+
+
+
+
+DEFAULT
+~~~~~~~
+
+
+
+
+GET ``/service_component_all/{service_component_name}``
+-------------------------------------------------------
+
+
+
+Description
++++++++++++
+
+.. raw:: html
+
+ Binds the configuration for service_component_name and returns the bound configuration, policies, and any other keys that are in Consul
+
+Parameters
+++++++++++
+
+.. csv-table::
+ :delim: |
+ :header: "Name", "Located in", "Required", "Type", "Format", "Properties", "Description"
+ :widths: 20, 15, 10, 10, 10, 20, 30
+
+ service_component_name | path | Yes | string | | | Service Component Name. service_component_name must be a key in consul.
+
+
+Request
++++++++
+
+
+Responses
++++++++++
+
+**200**
+^^^^^^^
+
+OK; returns {config : ..., policies : ....., k : ...} for all other k in Consul
+
+
+.. _i_4d863967ef9a9d9efdadd1b250c76bd6:
+
+**Response Schema:**
+
+
+
+
+**Example:**
+
+.. code-block:: javascript
+
+ {}
+
+**404**
+^^^^^^^
+
+there is no configuration in Consul for this component
+
+
+
+
+
+
+GET ``/service_component/{service_component_name}``
+---------------------------------------------------
+
+
+
+Description
++++++++++++
+
+.. raw:: html
+
+ Binds the configuration for service_component_name and returns the bound configuration as a JSON
+
+Parameters
+++++++++++
+
+.. csv-table::
+ :delim: |
+ :header: "Name", "Located in", "Required", "Type", "Format", "Properties", "Description"
+ :widths: 20, 15, 10, 10, 10, 20, 30
+
+ service_component_name | path | Yes | string | | | Service Component Name. service_component_name must be a key in consul.
+
+
+Request
++++++++
+
+
+Responses
++++++++++
+
+**200**
+^^^^^^^
+
+OK; the bound config is returned as an object
+
+
+.. _i_4d863967ef9a9d9efdadd1b250c76bd6:
+
+**Response Schema:**
+
+
+
+
+**Example:**
+
+.. code-block:: javascript
+
+ {}
+
+**404**
+^^^^^^^
+
+there is no configuration in Consul for this component
+
+
+
+
+
+
+GET ``/{key}/{service_component_name}``
+---------------------------------------
+
+
+
+Description
++++++++++++
+
+.. raw:: html
+
+ this is an endpoint that fetches a generic service_component_name:key out of Consul. The idea is that we don't want to tie components to Consul directly in case we swap out the backend some day, so the CBS abstracts Consul from clients. The structuring and weird collision of this new API with the above is unfortunate but due to legacy concerns.
+
+Parameters
+++++++++++
+
+.. csv-table::
+ :delim: |
+ :header: "Name", "Located in", "Required", "Type", "Format", "Properties", "Description"
+ :widths: 20, 15, 10, 10, 10, 20, 30
+
+ key | path | Yes | string | | | this endpoint tries to pull service_component_name:key; key is the key after the colon
+ service_component_name | path | Yes | string | | | Service Component Name.
+
+
+Request
++++++++
+
+
+Responses
++++++++++
+
+**200**
+^^^^^^^
+
+OK; returns service_component_name:key
+
+
+.. _i_4d863967ef9a9d9efdadd1b250c76bd6:
+
+**Response Schema:**
+
+
+
+
+**Example:**
+
+.. code-block:: javascript
+
+ {}
+
+**400**
+^^^^^^^
+
+bad request. Currently this is only returned on :policies, which is a complex object, and should be gotten through service_component_all
+
+
+**404**
+^^^^^^^
+
+key does not exist
+
+
+
+
+
+
+GET ``/healthcheck``
+--------------------
+
+
+
+Description
++++++++++++
+
+.. raw:: html
+
+ This is the health check endpoint. If this returns a 200, the server is alive and consul can be reached. If not a 200, either dead, or no connection to consul
+
+
+Request
++++++++
+
+
+Responses
++++++++++
+
+**200**
+^^^^^^^
+
+Successful response
+
+
+**503**
+^^^^^^^
+
+the config binding service cannot reach Consul
+
+
+
+
+
+Data Structures
+~~~~~~~~~~~~~~~
+