summaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
authorShashank Kumar Shankar <shashank.kumar.shankar@intel.com>2018-02-28 17:54:59 -0800
committerShashank Kumar Shankar <shashank.kumar.shankar@intel.com>2018-03-02 16:52:39 -0800
commit67dd59385cf983ef1307e3b3e410a8f773d8a5c3 (patch)
treee53c1997f643a0826fb9cd5a8b44ccc6466dc392 /README.md
parentff8cba5a49e85fbb1d2e14f0fa0bcb5bf92caf34 (diff)
Add feature to hold configs in filesystem
This patch adds feature to hold config files on filesystem and adds all unit tests to have enough coverage for milestones. Change-Id: Icd6f3dc93e0f419500f82f0a6ccd62e500dfc918 Issue-ID: MUSIC-42 Signed-off-by: Shashank Kumar Shankar <shashank.kumar.shankar@intel.com>
Diffstat (limited to 'README.md')
-rw-r--r--README.md39
1 files changed, 37 insertions, 2 deletions
diff --git a/README.md b/README.md
index 0273978..ac3b1f9 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,39 @@
Distributed Key Value Store using Consul to store application configuration data.
-# TODO
-# Add documentation on how to run.
+# TODO (Add documentation on how to run)
+
+# Sample Curl examples:
+
+## Load default configuration
+`curl -X GET localhost:8080/v1/config/load-default`
+
+## Register new domain
+`curl -X POST -d '{"domain":"<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`
+
+## List all sub domains in a domain.
+`TODO`
+
+## 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/subdomain/<sub-domain>`
+`curl -X DELETE localhost:8080/v1/register/$TOKEN`