diff options
author | 2018-03-28 11:04:06 -0700 | |
---|---|---|
committer | 2018-03-28 11:13:55 -0700 | |
commit | 9434f17d531a418a4314436e315c074fc8573135 (patch) | |
tree | 4d5e2d2c4c0876f533076d1643029713952f0c6c /docs/commandsamples.rst | |
parent | 749870b8ce9dddd09e98a65fc4c57b295880c8bd (diff) |
Add documentation for Read the docs
This patch adds basic documentation for Read the Docs generaiton.
Change-Id: Iceea0034de1488ed07c8623adab520dd149468a3
Issue-ID: MUSIC-62
Signed-off-by: Shashank Kumar Shankar <shashank.kumar.shankar@intel.com>
Diffstat (limited to 'docs/commandsamples.rst')
-rw-r--r-- | docs/commandsamples.rst | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/docs/commandsamples.rst b/docs/commandsamples.rst new file mode 100644 index 0000000..5ac5a0d --- /dev/null +++ b/docs/commandsamples.rst @@ -0,0 +1,46 @@ +.. This work is licensed under a Creative Commons Attribution 4.0 International License. +.. http://creativecommons.org/licenses/by/4.0 + +Sample Commands +=============== + +.. code-block:: console + + ## Load default configuration + curl -X GET localhost:8080/v1/config/load-default + + ## Check if Keys were loaded into Consul + curl -X GET localhost:8080/v1/getconfigs + + ## Check value for a single key + curl -X GET localhost:8080/v1/getconfig/<key> + + ## Register new domain + curl -X POST -d '{"domain":"new_project"}' localhost:8080/v1/register + export TOKEN= + ## Register new sub domain + curl -X POST -d '{"subdomain":"sub_project"}' localhost:8080/v1/register/$TOKEN/subdomain + + ## Check if a domain is already registered. + curl -X GET localhost:8080/v1/register/$TOKEN + + ## Upload properties file to domain or subdomain. + curl -X POST -F 'token=$TOKEN' -F 'configFile=@./example.properties' localhost:8080/v1/config + curl -X POST -F 'token=$TOKEN' -F 'subdomain=sub_domain' -F 'configFile=@./example.properties' localhost:8080/v1/config + + ## Load properties file into Consul + curl -X POST -d '{"token":"$TOKEN", "filename": "example.properties"}' localhost:8080/v1/config/load + + ## Fetch properties file + curl -X GET localhost:8080/v1/config/$TOKEN/example.properties + curl -X GET localhost:8080/v1/config/$TOKEN/sub_domain/example.properties + + ## Delete properties file + curl -X DELETE localhost:8080/v1/config/$TOKEN/example.properties + curl -X DELETE localhost:8080/v1/config/$TOKEN/sub_domain/example.properties + + ## Delete project/sub project + curl -X DELETE localhost:8080/v1/register/$TOKEN/sub_domain/sub-domain + curl -X DELETE localhost:8080/v1/register/$TOKEN + +.. end |