diff --git a/CMakeLists.txt b/CMakeLists.txt
index 01f8da0..b17af09 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -100,7 +100,7 @@
 	-DMAJOR_VER=${major_version}
 	-DMINOR_VER=${minor_version}
 	-DPATCH_VER=${patch_level}
-	-DDEBUG=${debugging}
+	#-DDEBUG=${debugging}
 )
 
 # ---------------- suss out pkg gen tools so we don't fail generating packages that the system cannot support --------------
@@ -156,10 +156,13 @@
 # but Cmake insists on having these exist when we add them to include directories to
 # enable code to find them after we build them.
 #
-include_directories("${srcd}/src/messaging;${srcd}/src/json;${srcd}/src/alarm;${srcd}/src/metrics;${srcd}/src/config;${srcd}/src/rest/model;${srcd}/ext/jsmn")
+#include_directories( "${srcd}/src/messaging;${srcd}/src/json;${srcd}/src/alarm;${srcd}/src/metrics;${srcd}/src/config;${srcd}/ext/jsmn" )
+include_directories( "${srcd}/src/messaging;${srcd}/src/json;${srcd}/src/alarm;${srcd}/src/metrics;${srcd}/src/config;${srcd}/ext/jsmn;;${srcd}/src/model;${srcd}/src/rest-client;${srcd}/src/rest-server" )
 
 # Compiler flags
 #
+#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17")
+#set(CMAKE_CXX_STANDARD 17)
 set( CMAKE_POSITION_INDEPENDENT_CODE ON )
 set( CMAKE_C_FLAGS "-g " )
 set( CMAKE_CPP_FLAGS "-g " )
@@ -188,13 +191,16 @@
 add_subdirectory( src/alarm )
 add_subdirectory( src/metrics )
 add_subdirectory( src/config )
-add_subdirectory( src/rest )
+add_subdirectory( src/model )
+add_subdirectory( src/rest-client )
+add_subdirectory( src/rest-server )
+
 #add_subdirectory( doc )				# this will auto skip if {X}fm is not available
 
 # shared and static libraries are built from the same object files.
 #
 add_library( ricxfcpp_shared SHARED
-	"$<TARGET_OBJECTS:message_objects>;$<TARGET_OBJECTS:json_objects>;$<TARGET_OBJECTS:alarm_objects>;$<TARGET_OBJECTS:metrics_objects>;$<TARGET_OBJECTS:config_objects>;$<TARGET_OBJECTS:xapp_objects>"
+	"$<TARGET_OBJECTS:message_objects>;$<TARGET_OBJECTS:json_objects>;$<TARGET_OBJECTS:alarm_objects>;$<TARGET_OBJECTS:metrics_objects>;$<TARGET_OBJECTS:config_objects>;$<TARGET_OBJECTS:xapp_objects>;$<TARGET_OBJECTS:model_objects>;$<TARGET_OBJECTS:rest-client_objects>;$<TARGET_OBJECTS:rest-server_objects>"
 )
 set_target_properties( ricxfcpp_shared
 	PROPERTIES
@@ -207,7 +213,7 @@
 # we only build/export the static archive (.a) if generating a dev package
 if( DEV_PKG )
 	add_library( ricxfcpp_static STATIC
-		"$<TARGET_OBJECTS:message_objects>;$<TARGET_OBJECTS:json_objects>;$<TARGET_OBJECTS:alarm_objects>;$<TARGET_OBJECTS:config_objects>;$<TARGET_OBJECTS:metrics_objects>;$<TARGET_OBJECTS:xapp_objects>"
+		"$<TARGET_OBJECTS:message_objects>;$<TARGET_OBJECTS:json_objects>;$<TARGET_OBJECTS:alarm_objects>;$<TARGET_OBJECTS:config_objects>;$<TARGET_OBJECTS:metrics_objects>;$<TARGET_OBJECTS:xapp_objects>;$<TARGET_OBJECTS:model_objects>;$<TARGET_OBJECTS:rest-client_objects>;$<TARGET_OBJECTS:rest-server_objects>"
 	)
 	set_target_properties( ricxfcpp_static
 		PROPERTIES
@@ -282,3 +288,4 @@
 
 	INCLUDE( CPack )
 ENDIF()
+
diff --git a/Dockerfile b/Dockerfile
index b979228..e43a578 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -58,6 +58,56 @@
 COPY ${SRC}/build_rmr.sh /playpen/bin
 RUN bash /playpen/bin/build_rmr.sh -t ${RMR_VER}
 
+#building cpprestsdk
+RUN apt-get install -y libcpprest-dev
+
+RUN apt-get install -y  g++ git libboost-atomic-dev libboost-thread-dev libboost-system-dev libboost-date-time-dev libboost-regex-dev libboost-filesystem-dev libboost-random-dev libboost-chrono-dev libboost-serialization-dev libwebsocketpp-dev openssl libssl-dev ninja-build zlib1g-dev
+
+RUN git clone https://github.com/Microsoft/cpprestsdk.git casablanca && \
+    cd casablanca && \
+    mkdir build && \
+    cd build && \
+    cmake -G Ninja .. -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTS=OFF -DBUILD_SAMPLES=OFF -DCMAKE_INSTALL_PREFIX=/usr/local .. && \
+    ninja && \
+    ninja install && \
+    cmake -G Ninja .. -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=0 -DBUILD_TESTS=OFF -DBUILD_SAMPLES=OFF -DCMAKE_INSTALL_PREFIX=/usr/local .. && \
+    ninja && \
+    ninja install && \
+    rm -rf casablanca
+#installing all dependicies for pistache
+RUN apt-get update && apt-get install -y cmake gcc make \
+git g++ wget meson libcurl4-openssl-dev libssl-dev pkg-config ninja-build
+
+ RUN git clone https://github.com/Tencent/rapidjson && \
+      cd rapidjson && \
+     mkdir build && \
+     cd build && \
+    cmake -DCMAKE_INSTALL_PREFIX=/usr/local .. && \
+   make install && \
+    cd ../../
+        #rm -rf rapidjson
+
+#building and installing pistache
+RUN git clone https://github.com/pistacheio/pistache.git
+RUN cd pistache && \
+        meson setup build \
+    --buildtype=release \
+    -DPISTACHE_USE_SSL=true \
+    -DPISTACHE_BUILD_EXAMPLES=true \
+    -DPISTACHE_BUILD_TESTS=true \
+    -DPISTACHE_BUILD_DOCS=false \
+    --prefix="/usr/local"
+RUN cd pistache/build && \
+        ninja && \
+        ninja install
+RUN cp /usr/local/lib/x86_64-linux-gnu/libpistache* /usr/local/lib/
+RUN cp /usr/local/lib/x86_64-linux-gnu/pkgconfig/libpistache.pc /usr/local/lib/pkgconfig
+
+#install nlohmann json
+RUN git clone https://github.com/nlohmann/json.git && cd json && cmake . && make install
+
+#install json-schema-validator
+RUN git clone https://github.com/pboettch/json-schema-validator.git && cd json-schema-validator &&mkdir build &&cd build && cmake .. && make install
 
 #copy the content as git repo inside the container.
 #COPY ${SRC}/CMakeLists.txt /playpen/factory/
@@ -84,24 +134,28 @@
 
 
 # -----  final, smaller image ----------------------------------
-FROM ubuntu:20.04
-
+#FROM ubuntu:20.04
+FROM nexus3.o-ran-sc.org:10002/o-ran-sc/bldr-ubuntu20-c-go:1.0.0
 # must add compile tools to make it a builder environmnent. If a build environment isn't needed 
 # comment out the next line and reduce the image size by more than 180M.
 #
 RUN apt-get update && apt-get install -y --no-install-recommends make g++
 
 # if bash doesn't cut it for run_replay grab a real shell and clean up as much as we can
-RUN apt-get update; apt-get install -y ksh
+#RUN apt-get update; apt-get install -y ksh
 RUN rm -fr /var/lib/apt/lists 
 
 RUN mkdir -p /usr/local/include/ricxfcpp
 COPY --from=buildenv /usr/local/lib /usr/local/lib/
 COPY --from=buildenv /usr/local/include/ricxfcpp /usr/local/include/ricxfcpp/
 COPY --from=buildenv /usr/local/include/rmr /usr/local/include/rmr/
+COPY --from=buildenv /usr/local/include/cpprest /usr/local/include/cpprest/
+COPY --from=buildenv /usr/local/include/pplx /usr/local/include/pplx/
+COPY --from=buildenv /usr/local/include/pistache /usr/local/include/pistache/
 
 ENV LD_LIBRARY_PATH=/usr/local/lib64:/usr/local/lib
 ENV C_INCLUDE_PATH=/usr/local/include
 WORKDIR /factory
 
 CMD [ "make" ]
+
diff --git a/src/model/ActionToBeSetup.cpp b/src/model/ActionToBeSetup.cpp
new file mode 100644
index 0000000..6bf6903
--- /dev/null
+++ b/src/model/ActionToBeSetup.cpp
@@ -0,0 +1,105 @@
+/*
+# ==================================================================================
+# Copyright (c) 2020 HCL Technologies Limited.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ==================================================================================
+*/
+#include"ActionToBeSetup.h"
+namespace xapp {
+	namespace model {
+		void from_json(const nlohmann::json & j, ActionToBeSetup& ref) {
+
+			std::cout << __PRETTY_FUNCTION__ << std::endl;
+			ref.validate_json(j);
+			if (j.contains("ActionDefinition")) {
+				j.at("ActionDefinition").get_to(ref.ActionDefinition);
+			}
+			j.at("ActionID").get_to(ref.ActionID);
+			j.at("ActionType").get_to(ref.ActionType);
+			if (j.contains("SubsequentAction")) {
+				j.at("SubsequentAction").get_to(ref.m_SubsequentAction);
+			}
+			
+
+		}
+
+		void from_json(const nlohmann::json & j, std::vector<ActionToBeSetup>& ref) {
+
+			std::cout << __PRETTY_FUNCTION__ << std::endl;
+
+			for (auto& element : j) {
+				ActionToBeSetup tmp;
+				tmp.validate_json(element);
+				for (auto& val : element.items())
+				{
+					if (val.key() == "ActionDefinition") {
+
+						tmp.ActionDefinition.assign(val.value().begin(), val.value().end());
+
+					}
+					else if (val.key() == "ActionID") {
+						tmp.ActionID = val.value();
+					}
+					else if (val.key() == "ActionType") {
+						tmp.ActionType = val.value();
+					}
+					else if (val.key() == "SubsequentAction") {
+						tmp.m_SubsequentAction.SubsequentActionType = val.value()["SubsequentActionType"];
+						tmp.m_SubsequentAction.TimeToWait = val.value()["TimeToWait"];
+					}
+
+
+				}
+				ref.push_back(tmp);
+			}
+
+		}
+		void to_json(nlohmann::json& j, const ActionToBeSetup& ref) {
+
+			j = nlohmann::json{
+				//{"ActionDefinition", ref.ActionDefinition},
+				{"ActionID", ref.ActionID},
+				{"ActionType", ref.ActionType}//,
+				//{"SubsequentAction", {{"SubsequentActionType",ref.m_SubsequentAction.SubsequentActionType},{"TimeToWait", ref.m_SubsequentAction.TimeToWait } }}
+			};
+			if (ref.ActionDefinition.size() > 0) {
+				j["ActionDefinition"] = ref.ActionDefinition;
+			}
+			if (ref.m_SubsequentAction.SubsequentActionType.length() > 0 && ref.m_SubsequentAction.TimeToWait.length() > 0) {
+				j["SubsequentAction"] = ref.m_SubsequentAction;
+			}
+
+		}
+
+		void to_json(nlohmann::json& j, const std::vector<ActionToBeSetup>& ref) {
+			/*
+			for (int i = 0; i < ref.size(); i++) {
+				nlohmann::json tmp;
+				tmp = nlohmann::json{
+				{"ActionDefinition", ref[i].ActionDefinition},
+				{"ActionID", ref[i].ActionID},
+				{"ActionType", ref[i].ActionType},
+				{"SubsequentAction", {{"SubsequentActionType",ref[i].m_SubsequentAction.SubsequentActionType},{"TimeToWait", ref[i].m_SubsequentAction.TimeToWait } }}
+				};
+				j.push_back(tmp);
+			}
+			*/
+			for (int i = 0; i < ref.size(); i++) {
+				nlohmann::json tmp;
+				to_json(tmp, ref[i]);
+				j.push_back(tmp);
+			}
+		}
+	}
+}
diff --git a/src/model/ActionToBeSetup.h b/src/model/ActionToBeSetup.h
new file mode 100644
index 0000000..2dd8e9c
--- /dev/null
+++ b/src/model/ActionToBeSetup.h
@@ -0,0 +1,85 @@
+/*
+# ==================================================================================
+# Copyright (c) 2020 HCL Technologies Limited.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ==================================================================================
+*/
+#ifndef _ActionToBeSetupList_H
+#define _ActionToBeSetupList_H
+#include"SubsequentAction.h"
+
+namespace xapp
+{
+	namespace model
+	{
+		struct ActionToBeSetup: public ModelBase
+		{
+			int ActionID{0};
+			std::string ActionType{""};
+			//std::string SubsequentActionType{""};
+			//std::string TimeToWait{""};
+			SubsequentAction m_SubsequentAction; 
+			std::vector<int> ActionDefinition{};
+
+			nlohmann::json validator_schema = R"(
+			{
+			"$schema": "http://json-schema.org/draft-07/schema#",
+			"title": "ActionToBeSetup",
+			"properties": {
+			    "ActionDefinition": {
+			        "description": "Action Definition",
+			        "type": "array",
+			        "items": {
+			            "type": "integer"
+			        }
+			    },
+			    "ActionID": {
+			        "description": "Identification of Action",
+			        "type": "integer",
+			        "minimum": 0,
+			        "maximum": 255
+			    },
+			    "ActionType": {
+			        "description": "Type of Action",
+			        "type": "string",
+			        "enum": ["policy", "insert", "report"]
+			    },
+			    "SubsequentAction": {
+			        "description": "Subsequent Action",
+			        "type": "object"
+			    }
+			},
+			"required": [
+			             "ActionID",
+			             "ActionType"
+			            ],
+			"type": "object"
+			})"_json;
+
+			virtual nlohmann::json get_validator_schema() const { return validator_schema; }
+
+		};
+
+		void from_json(const nlohmann::json & j, ActionToBeSetup& ref);
+		void from_json(const nlohmann::json & j, std::vector<ActionToBeSetup>& ref);
+		void to_json(nlohmann::json& j, const ActionToBeSetup& ref);
+		void to_json(nlohmann::json& j, const std::vector<ActionToBeSetup>& ref);
+
+	}
+	
+}
+
+
+#endif
+
diff --git a/src/model/CMakeLists.txt b/src/model/CMakeLists.txt
new file mode 100644
index 0000000..1d61af0
--- /dev/null
+++ b/src/model/CMakeLists.txt
@@ -0,0 +1,47 @@
+# ==================================================================================
+# Copyright (c) 2020 HCL Technologies Limited.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ==================================================================================
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17")
+set(CMAKE_CXX_STANDARD 17)
+# BUILD TYPE
+message("A ${CMAKE_BUILD_TYPE} build configuration is detected")
+message("CPP flag is  ${CMAKE_CXX_FLAGS} ")
+message("CPP standard is  ${CMAKE_CXX_STANDARD} ")
+
+include_directories( "${srcd}/src/model")
+#SOURCE FILES
+file(GLOB SOURCE_FILES  "${srcd}/src/model/*.cpp" )
+
+
+add_library(model_objects OBJECT  ${SOURCE_FILES})
+
+target_include_directories (model_objects PUBLIC
+        $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
+        $<INSTALL_INTERFACE:include>
+        PRIVATE src)
+
+# header files should go into .../include/xfcpp/
+
+file(GLOB SOURCE_INSTALL_FILES  "${srcd}/src/model/*.h")
+#set( install_inc_client "include/ricxfcpp/rest-client" )
+
+if( DEV_PKG )
+        install( FILES
+                 ${SOURCE_INSTALL_FILES}
+                DESTINATION ${install_inc}
+        )
+endif()
+
+
diff --git a/src/model/ConfigMetadata.cpp b/src/model/ConfigMetadata.cpp
new file mode 100644
index 0000000..503e7d0
--- /dev/null
+++ b/src/model/ConfigMetadata.cpp
@@ -0,0 +1,37 @@
+/*
+# ==================================================================================
+# Copyright (c) 2020 HCL Technologies Limited.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ==================================================================================
+*/
+#include"ConfigMetadata.h"
+namespace xapp {
+	namespace model {
+
+		void from_json(const nlohmann::json& j, ConfigMetadata& ref) {
+
+			std::cout << __func__ << " ConfigMetadata " << std::endl;
+			ref.validate_json(j);
+			j.at("configType").get_to(ref.ConfigType);
+			j.at("xappName").get_to(ref.XappName);
+		}
+
+		void to_json(nlohmann::json& j, const ConfigMetadata& ref) {
+			j = nlohmann::json{
+				{"configType",ref.ConfigType},
+				{"xappName", ref.XappName}
+			};
+		}
+	}
+}
\ No newline at end of file
diff --git a/src/model/ConfigMetadata.h b/src/model/ConfigMetadata.h
new file mode 100644
index 0000000..465ac05
--- /dev/null
+++ b/src/model/ConfigMetadata.h
@@ -0,0 +1,58 @@
+/*
+# ==================================================================================
+# Copyright (c) 2020 HCL Technologies Limited.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ==================================================================================
+*/
+#ifndef XAPP_MODEL_ConfigMetadata_H
+#define XAPP_MODEL_ConfigMetadata_H
+
+#include "ModelBase.h"
+
+namespace xapp {
+	namespace model {
+
+		struct ConfigMetadata : public ModelBase {
+			std::string ConfigType;
+			std::string XappName;
+			nlohmann::json validator_schema = R"(
+				{
+				"$schema": "http://json-schema.org/draft-07/schema#",
+				"title": "ConfigMetadata",
+				"properties": {
+				    "configType": {
+				        "description": "Type of Config",
+				        "type": "string",
+				        "enum": ["json", "xml", "other"]
+				    },
+				    "xappName": {
+				        "description": "Name of xApp",
+				        "type": "string"
+				    }
+				},
+				"required": [
+				             "ConfigType",
+				             "XappName"
+				             ],
+				"type": "object"
+				})"_json;
+
+			virtual nlohmann::json get_validator_schema() const { return validator_schema; }
+		};
+		void from_json(const nlohmann::json& j, ConfigMetadata& ref);
+		void to_json(nlohmann::json& j, const ConfigMetadata& ref);
+
+	} /*namespace model*/
+} /*namespace xapp*/
+#endif /*XAPP_MODEL_ConfigMetadata_H*/
diff --git a/src/model/Dockerfile b/src/model/Dockerfile
new file mode 100644
index 0000000..9b275c4
--- /dev/null
+++ b/src/model/Dockerfile
@@ -0,0 +1,16 @@
+FROM nexus3.o-ran-sc.org:10001/ubuntu:18.04
+RUN apt-get update && apt-get install -y cmake
+
+RUN apt-get install -y libcpprest-dev
+
+RUN apt-get install -y  g++ git libboost-atomic-dev libboost-thread-dev libboost-system-dev libboost-date-time-dev libboost-regex-dev libboost-filesystem-dev libboost-random-dev libboost-chrono-dev libboost-serialization-dev libwebsocketpp-dev openssl libssl-dev ninja-build zlib1g-dev
+RUN git clone https://github.com/Microsoft/cpprestsdk.git casablanca && \
+    cd casablanca && \
+    mkdir build && \
+    cd build && \
+    cmake -G Ninja .. -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTS=OFF -DBUILD_SAMPLES=OFF -DCMAKE_INSTALL_PREFIX=/usr/local .. && \
+    ninja && \
+    ninja install
+RUN git clone https://github.com/nlohmann/json.git && cd json && cmake . && make install
+RUN git clone https://github.com/pboettch/json-schema-validator.git && cd json-schema-validator &&mkdir build &&cd build && cmake .. && make install
+COPY . ./
diff --git a/src/model/ModelBase.h b/src/model/ModelBase.h
new file mode 100644
index 0000000..2dfe3fc
--- /dev/null
+++ b/src/model/ModelBase.h
@@ -0,0 +1,63 @@
+/*
+# ==================================================================================
+# Copyright (c) 2020 HCL Technologies Limited.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ==================================================================================
+*/
+#ifndef _CleintModelBase_H
+#define _CleintModelBase_H
+#include<nlohmann/json.hpp>
+#include <nlohmann/json-schema.hpp>
+#include <type_traits>
+#include<vector>
+#include<string>
+#include<iostream>
+#include<limits.h>
+#include"temperory.h"
+namespace xapp
+{
+	namespace model
+	{
+		struct ModelBase {
+			nlohmann::json validator_schema = R"(
+			{
+			    "$schema": "http://json-schema.org/draft-07/schema#",
+			    "title": "ModelBase"
+			})"_json;
+
+
+
+			void validate_json(const nlohmann::json& _json) {
+				nlohmann::json_schema::json_validator validator;
+				validator.set_root_schema(get_validator_schema());
+				
+				try {
+					validator.validate(_json);
+				}
+				catch (const std::exception& e) {
+					throw;
+				}
+				
+				return;
+			}
+
+			virtual nlohmann::json get_validator_schema() const { return validator_schema; }
+		};
+
+	}
+
+}
+
+
+#endif
diff --git a/src/model/RestModel.h b/src/model/RestModel.h
new file mode 100644
index 0000000..9e18758
--- /dev/null
+++ b/src/model/RestModel.h
@@ -0,0 +1,34 @@
+/*
+# ==================================================================================
+# Copyright (c) 2020 HCL Technologies Limited.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ==================================================================================
+*/
+#ifndef XAPP_MODEL_H
+#define XAPP_MODEL_H
+#include "ModelBase.h"
+#include "SubsequentAction.h"
+#include "ActionToBeSetup.h"
+#include "SubscriptionResponse.h"
+#include "ConfigMetadata.h"
+#include "SubscriptionDetail.h"
+#include "SubscriptionParams_ClientEndpoint.h"
+#include "SubscriptionParams_E2SubscriptionDirectives.h"
+#include "SubscriptionParams.h"
+#include "SubscriptionInstance.h"
+#include "SubscriptionData.h"
+#include"SubscriptionDetail.h"
+#include"XAppConfig.h"
+//moved the implementation of model class into separate CPP file, in order to prevent ODR violation
+#endif
diff --git a/src/model/SubscriptionData.cpp b/src/model/SubscriptionData.cpp
new file mode 100644
index 0000000..b84c19c
--- /dev/null
+++ b/src/model/SubscriptionData.cpp
@@ -0,0 +1,121 @@
+/*
+# ==================================================================================
+# Copyright (c) 2020 HCL Technologies Limited.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ==================================================================================
+*/
+#include"SubscriptionData.h"
+namespace xapp {
+	namespace model {
+		void from_json(const nlohmann::json& j, SubscriptionData& ref) {
+
+			std::cout << __PRETTY_FUNCTION__ << std::endl;
+			ref.validate_json(j);
+			if (j.contains("SubscriptionId")) {
+				j.at("SubscriptionId").get_to(ref.SubscriptionID);
+			}
+			if (j.contains("SubscriptionInstances")) {
+				j.at("SubscriptionInstances").get_to(ref.m_SubscriptionInstances);
+			}
+			
+			if (j.contains("Meid")) {
+				j.at("Meid").get_to(ref.Meid);
+			}
+			
+			if (j.contains("ClientEndpoint")) {
+				j.at("ClientEndpoint").get_to(ref.ClientEndpoint);
+			}
+			
+		}
+
+		void from_json(const nlohmann::json& j, std::vector<SubscriptionData>& ref) {
+			for (auto& element : j) {
+				SubscriptionData tmp;
+				tmp.validate_json(element);
+				for (auto& val : element.items())
+				{
+					if (val.key() == "SubscriptionId") {
+						tmp.SubscriptionID = val.value();
+					}
+					else if (val.key() == "Meid") {
+						tmp.Meid = val.value();
+					}
+					else if (val.key() == "ClientEndpoint") {
+
+						tmp.ClientEndpoint.assign(val.value().begin(), val.value().end());
+					}
+					else if (val.key() == "SubscriptionInstances") {
+						from_json(val.value(), tmp.m_SubscriptionInstances);
+						/*
+						tmp.m_SubscriptionInstances.E2EventInstanceId= val.value()["E2EventInstanceId"];
+						tmp.m_SubscriptionInstances.XappEventInstanceId= val.value()["XappEventInstanceId"];
+						if (val.value().contains("ErrorCause"))
+						{
+							tmp.m_SubscriptionInstances.ErrorCause= val.value()["ErrorCause"];
+						}
+						if (val.value().contains("ErrorSource"))
+						{
+							tmp.m_SubscriptionInstances.ErrorCause = val.value()["ErrorSource"];
+						}
+						if (val.value().contains("TimeoutType"))
+						{
+							tmp.m_SubscriptionInstances.ErrorCause = val.value()["TimeoutType"];
+						}
+						*/
+
+					}
+				}
+				ref.push_back(tmp);
+			}
+
+		}
+
+		void to_json(nlohmann::json& j, const SubscriptionData& ref) {
+			/*
+			j = nlohmann::json{
+				{"SubscriptionId",ref.SubscriptionID},
+				{"Meid",ref.Meid},
+				{"ClientEndpoint", ref.ClientEndpoint}//,
+				//{"SubscriptionInstances", {{"XappEventInstanceId", ref.m_SubscriptionInstances.XappEventInstanceId},{"E2EventInstanceId", ref.m_SubscriptionInstances.E2EventInstanceId},{"ErrorCause", ref.m_SubscriptionInstances.ErrorCause},{"ErrorSource", ref.m_SubscriptionInstances.ErrorSource},{"TimeoutType", ref.m_SubscriptionInstances.TimeoutType}}}
+
+			};
+			nlohmann::json tmp_j;
+			to_json(tmp_j, ref.m_SubscriptionInstances);
+			j["SubscriptionInstances"] = tmp_j;
+			*/
+			if (ref.SubscriptionID != "") {
+				j["SubscriptionId"] = ref.SubscriptionID;
+			}
+			if (ref.Meid.length() > 0) {
+				j["Meid"] = ref.Meid;
+			}
+			if (ref.ClientEndpoint.size() > 0) {
+				j["ClientEndpoint"] = ref.ClientEndpoint;
+			}
+			if (ref.m_SubscriptionInstances.size() > 0) {
+				nlohmann::json tmp_j;
+				to_json(tmp_j, ref.m_SubscriptionInstances);
+				j["SubscriptionInstances"] = tmp_j;
+			}
+		}
+		void to_json(nlohmann::json& j, const std::vector<SubscriptionData>& ref) {
+			for (int i = 0; i < ref.size(); i++)
+			{
+				nlohmann::json tmp_j;
+				to_json(tmp_j, ref[i]);
+				j += tmp_j;
+			}
+		}
+	}
+}
diff --git a/src/model/SubscriptionData.h b/src/model/SubscriptionData.h
new file mode 100644
index 0000000..1848c97
--- /dev/null
+++ b/src/model/SubscriptionData.h
@@ -0,0 +1,66 @@
+/*
+# ==================================================================================
+# Copyright (c) 2020 HCL Technologies Limited.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ==================================================================================
+*/
+#ifndef XAPP_MODEL_SubscriptionData_H
+#define XAPP_MODEL_SubscriptionData_H
+#include "SubscriptionInstance.h"
+namespace xapp {
+	namespace model {
+
+		struct SubscriptionData : ModelBase {
+			std::vector<std::string> ClientEndpoint;
+			std::string Meid;
+			std::string SubscriptionID="";
+			std::vector<SubscriptionInstance> m_SubscriptionInstances;
+
+			nlohmann::json validator_schema = R"(
+				{
+				"$schema": "http://json-schema.org/draft-07/schema#",
+				"title": "SubscriptionData",
+				"properties": {
+				    "SubscriptionId": {
+				        "type": "string"
+				    },
+				    "Meid": {
+				        "type": "string"
+				    },
+				    "ClientEndpoint": {
+				        "type": "array",
+				        "items": {
+				            "type": "string"
+				        }
+				    },
+				    "SubscriptionInstances": {
+				        "type": "array"
+				    }
+				},
+				"type": "object"
+				})"_json;
+
+			virtual nlohmann::json get_validator_schema() const { return validator_schema; }
+		};
+		void from_json(const nlohmann::json& j, SubscriptionData& ref);
+		void from_json(const nlohmann::json& j, std::vector<SubscriptionData>& ref);
+		void to_json(nlohmann::json& j, const SubscriptionData& ref);
+		void to_json(nlohmann::json& j, const std::vector<SubscriptionData>& ref);
+
+
+	} /*namespace model*/
+} /*namespace xapp*/
+#endif /*XAPP_MODEL_SubscriptionData_H*/
+
+
diff --git a/src/model/SubscriptionDetail.cpp b/src/model/SubscriptionDetail.cpp
new file mode 100644
index 0000000..4e62f8a
--- /dev/null
+++ b/src/model/SubscriptionDetail.cpp
@@ -0,0 +1,98 @@
+/*
+# ==================================================================================
+# Copyright (c) 2020 HCL Technologies Limited.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ==================================================================================
+*/
+#include"SubscriptionDetail.h"
+namespace xapp {
+	namespace model {
+		void from_json(const nlohmann::json& j, SubscriptionDetail& ref) {
+
+			std::cout << __PRETTY_FUNCTION__ << std::endl;
+			ref.validate_json(j);
+
+			j.at("XappEventInstanceId").get_to(ref.XappEventInstanceId);
+			j.at("EventTriggers").get_to(ref.EventTriggers);
+			j.at("ActionToBeSetupList").get_to(ref.Data);
+		}
+
+		void from_json(const nlohmann::json& j, std::vector<SubscriptionDetail>& ref) {
+
+			std::cout << __PRETTY_FUNCTION__ << std::endl;
+
+
+			for (auto& element : j) {
+				SubscriptionDetail tmp;
+				tmp.validate_json(element);
+				for (auto& val : element.items()) {
+					if (val.key() == "XappEventInstanceId") {
+
+						//tmp.SetXappEventInstanceId(val.value());
+						tmp.XappEventInstanceId = val.value();
+
+					}
+					else if (val.key() == "EventTriggers") {
+						//tmp.setEventTriggers(val.value());
+						tmp.EventTriggers.assign(val.value().begin(), val.value().end());
+
+
+					}
+					else if (val.key() == "ActionToBeSetupList") {
+
+						nlohmann::json tmp_j(val.value());
+						from_json(tmp_j, tmp.Data);
+					}
+				}
+				ref.push_back(tmp);
+
+			}
+
+			/*
+			for (int i = 0; i < j.size(); i++)
+			{
+				ref[i].validate_json(j.at(i));
+				j.at(i).at("XappEventInstanceId").get_to(ref[i].XappEventInstanceId);
+				j.at(i).at("EventTriggers").get_to(ref[i].EventTriggers);
+				j.at(i).at("ActionToBeSetupList").get_to(ref[i].Data);
+			}
+			*/
+
+		}
+
+		void to_json(nlohmann::json& j, const SubscriptionDetail & ref) {
+
+			j = nlohmann::json{
+				{"XappEventInstanceId", ref.XappEventInstanceId},
+				{"EventTriggers", ref.EventTriggers}
+			};
+			nlohmann::json tmp_j;
+			to_json(tmp_j, ref.Data);
+			j["ActionToBeSetupList"] = tmp_j;
+			//for (int i = 0; i < ref.Data.size(); i++) {
+			//	nlohmann::json tmp_j;
+			//	to_json(tmp_j, ref.Data[i]);
+			//	j["ActionToBeSetupList"] += tmp_j;
+			//}
+		}
+		void to_json(nlohmann::json& j, const std::vector<SubscriptionDetail> & ref) {
+			for (int i = 0; i < ref.size(); i++)
+			{
+				nlohmann::json tmp_j;
+				to_json(tmp_j, ref[i]);
+				j += tmp_j;
+			}
+		}
+	}
+}
\ No newline at end of file
diff --git a/src/model/SubscriptionDetail.h b/src/model/SubscriptionDetail.h
new file mode 100644
index 0000000..19b7fb9
--- /dev/null
+++ b/src/model/SubscriptionDetail.h
@@ -0,0 +1,76 @@
+/*
+# ==================================================================================
+# Copyright (c) 2020 HCL Technologies Limited.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ==================================================================================
+*/
+#ifndef _SubscriptionDetails_H
+#define _SubscriptionDetails_H
+#include"ActionToBeSetup.h"
+
+namespace xapp
+{
+	namespace model
+	{
+		struct SubscriptionDetail : public ModelBase
+		{
+			std::vector<ActionToBeSetup> Data;
+			int XappEventInstanceId{0};
+			std::vector<int> EventTriggers{};
+			friend void from_json(const nlohmann::json& j, SubscriptionDetail& ref);
+			friend void to_json(nlohmann::json& j, const SubscriptionDetail& ref);
+			friend void from_json(const nlohmann::json& j, std::vector<SubscriptionDetail>& ref);
+			nlohmann::json validator_schema = R"(
+			{
+			"$schema": "http://json-schema.org/draft-07/schema#",
+			"title": "Subscription detail",
+			"properties": {
+			    "XappEventInstanceId": {
+			        "type": "integer",
+			        "minimum": 0,
+			        "maximum": 255
+			    },
+			    "EventTriggers": {
+			        "description": "Identification of Action",
+			        "type": "array",
+			        "items": {
+			            "type": "integer"
+			        }
+			    },
+			    "ActionToBeSetupList": {
+			        "type": "array"
+			    }
+			},
+			"required": [
+			             "XappEventInstanceId",
+			             "EventTriggers",
+			             "ActionToBeSetupList"
+			            ],
+			"type": "object"
+			})"_json;
+
+			virtual nlohmann::json get_validator_schema() const { return validator_schema; }
+			
+
+		};
+		void from_json(const nlohmann::json& j, SubscriptionDetail& ref);
+		void from_json(const nlohmann::json& j, std::vector<SubscriptionDetail>& ref);
+		void to_json(nlohmann::json& j, const SubscriptionDetail & ref);
+		void to_json(nlohmann::json& j, const std::vector<SubscriptionDetail> & ref);
+		
+
+	}
+}
+
+#endif
diff --git a/src/model/SubscriptionInstance.cpp b/src/model/SubscriptionInstance.cpp
new file mode 100644
index 0000000..3be4b20
--- /dev/null
+++ b/src/model/SubscriptionInstance.cpp
@@ -0,0 +1,97 @@
+/*
+# ==================================================================================
+# Copyright (c) 2020 HCL Technologies Limited.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ==================================================================================
+*/
+#include"SubscriptionInstance.h"
+namespace xapp {
+	namespace model {
+		void from_json(const nlohmann::json& j, SubscriptionInstance& ref) {
+
+			std::cout << __PRETTY_FUNCTION__ << std::endl;
+			ref.validate_json(j);
+
+			j.at("XappEventInstanceId").get_to(ref.XappEventInstanceId);
+			j.at("E2EventInstanceId").get_to(ref.E2EventInstanceId);
+			j.at("ErrorCause").get_to(ref.ErrorCause);
+			j.at("ErrorSource").get_to(ref.ErrorSource);
+			j.at("TimeoutType").get_to(ref.TimeoutType);
+		}
+		void from_json(const nlohmann::json& j, std::vector<SubscriptionInstance>& ref) {
+
+			std::cout << __PRETTY_FUNCTION__ << std::endl;
+			for (auto& element : j) {
+				SubscriptionInstance tmp;
+				tmp.validate_json(element);
+				for (auto& val : element.items())
+				{
+
+
+					if (val.key() == "XappEventInstanceId") {
+
+						tmp.XappEventInstanceId = val.value();
+
+					}
+					else if (val.key() == "E2EventInstanceId") {
+						tmp.E2EventInstanceId = val.value();
+					}
+					else if (val.key() == "ErrorCause") {
+						tmp.ErrorCause = val.value();
+					}
+					else if (val.key() == "ErrorSource") {
+						tmp.ErrorSource = val.value();
+					}
+					else if (val.key() == "TimeoutType") {
+						tmp.TimeoutType = val.value();
+					}
+
+
+				}
+				ref.push_back(tmp);
+
+
+			}
+
+
+		}
+
+		void to_json(nlohmann::json& j, const SubscriptionInstance& ref) {
+
+			j = nlohmann::json{
+				{"XappEventInstanceId", ref.XappEventInstanceId},
+				{"E2EventInstanceId", ref.E2EventInstanceId},
+				{"ErrorCause", ref.ErrorCause},
+				{"ErrorSource", ref.ErrorSource},
+				{"TimeoutType", ref.TimeoutType}
+			};
+		}
+		void to_json(nlohmann::json& j, const std::vector<SubscriptionInstance>& ref) {
+
+
+			for (int i = 0; i < ref.size(); i++)
+			{
+
+				nlohmann::json tmp = nlohmann::json{
+				{"XappEventInstanceId", ref[i].XappEventInstanceId},
+				{"E2EventInstanceId", ref[i].E2EventInstanceId},
+				{"ErrorCause", ref[i].ErrorCause},
+				{"ErrorSource", ref[i].ErrorSource},
+				{"TimeoutType", ref[i].TimeoutType}
+				};
+				j.push_back(tmp);
+			}
+		}
+	}
+}
\ No newline at end of file
diff --git a/src/model/SubscriptionInstance.h b/src/model/SubscriptionInstance.h
new file mode 100644
index 0000000..baff74f
--- /dev/null
+++ b/src/model/SubscriptionInstance.h
@@ -0,0 +1,81 @@
+/*
+# ==================================================================================
+# Copyright (c) 2020 HCL Technologies Limited.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ==================================================================================
+*/
+#ifndef SubscriptionInstance_H
+#define SubscriptionInstance_H
+#include"ModelBase.h"
+
+namespace xapp
+{
+	namespace model
+	{
+		struct SubscriptionInstance : public ModelBase
+		{
+		public:
+			nlohmann::json validator_schema = R"(
+			{
+			"$schema": "http://json-schema.org/draft-07/schema#",
+			"title": "SubscriptionInstance",
+			"description": "xApp service address and port",
+			"properties": {
+			    "XappEventInstanceId": {
+			        "type": "integer",
+			        "minimum": 0,
+			        "maximum": 65535
+			    },
+			    "E2EventInstanceId": {
+			        "type": "integer",
+			        "minimum": 0,
+			        "maximum": 65535
+			    },
+			    "ErrorCause": {
+			        "description": "Descriptive error cause. Empty string when no error.",
+			        "type": "string"
+			    },
+			    "ErrorSource": {
+			        "description": "Source of error cause.",
+			        "type": "string",
+			        "enum": ["SUBMGR", "RTMGR", "DBAAS", "ASN1", "E2Node"]
+			    },
+			    "TimeoutType": {
+			        "description": "Type timeout. xApp should retry if timeout occurs.",
+			        "type": "string",
+			        "enum": ["E2-Timeout", "RTMGR-Timeout", "DBAAS-Timeout"]
+			    }
+			},
+			"required": [
+			             "XappEventInstanceId",
+			             "E2EventInstanceId"
+			             ],
+			"type": "object"
+			})"_json;
+			virtual nlohmann::json get_validator_schema() const { return validator_schema; }
+			int XappEventInstanceId{ 0 };
+			int	E2EventInstanceId{ 0 };
+			std::string	ErrorCause{ "" };
+			std::string	ErrorSource{ "" };
+			std::string	TimeoutType{ "" };
+		};
+		void from_json(const nlohmann::json& j, SubscriptionInstance& ref);
+		void from_json(const nlohmann::json& j, std::vector<SubscriptionInstance>& ref);
+		void to_json(nlohmann::json& j, const SubscriptionInstance& ref);
+		void to_json(nlohmann::json& j, const std::vector<SubscriptionInstance>& ref);
+
+	}
+	
+}
+#endif
diff --git a/src/model/SubscriptionParams.cpp b/src/model/SubscriptionParams.cpp
new file mode 100644
index 0000000..0d5d938
--- /dev/null
+++ b/src/model/SubscriptionParams.cpp
@@ -0,0 +1,64 @@
+/*
+# ==================================================================================
+# Copyright (c) 2020 HCL Technologies Limited.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ==================================================================================
+*/
+#include"SubscriptionParams.h"
+namespace xapp {
+	namespace model {
+		void from_json(const nlohmann::json& j, SubscriptionParams& ref) {
+
+			std::cout << __PRETTY_FUNCTION__ << std::endl;
+			ref.validate_json(j);
+			j.at("ClientEndpoint").get_to(ref.ClientEndpoint);
+
+			if (j.contains("E2SubscriptionDirectives"))
+			{
+				j.at("E2SubscriptionDirectives").get_to(ref.E2SubscriptionDirectives);
+			}
+
+			if (j.contains("SubscriptionId"))
+			{
+				j.at("SubscriptionId").get_to(ref.SubscriptionId);
+			}
+
+			j.at("Meid").get_to(ref.Meid);
+			j.at("RANFunctionID").get_to(ref.RANFunctionID);
+			j.at("SubscriptionDetails").get_to(ref.Data);
+		}
+
+		void to_json(nlohmann::json& j, const SubscriptionParams& ref) {
+
+			j = nlohmann::json{
+				{"ClientEndpoint", ref.ClientEndpoint},
+				//{"E2SubscriptionDirectives", ref.E2SubscriptionDirectives},
+				{"Meid", ref.Meid},
+				{"RANFunctionID", ref.RANFunctionID},
+				{"SubscriptionId", ref.SubscriptionId}
+			};
+			if (ref.E2SubscriptionDirectives.E2RetryCount != INT_MIN && ref.E2SubscriptionDirectives.E2TimeoutTimerValue != INT_MIN) {
+				//nlohmann::json tmp_j;
+				//to_json(tmp_j, ref.E2SubscriptionDirectives);
+				//j["E2SubscriptionDirectives"] = tmp_j;
+				j["E2SubscriptionDirectives"] = ref.E2SubscriptionDirectives;
+			}
+			for (int i = 0; i < ref.Data.size(); i++) {
+				nlohmann::json tmp_j;
+				to_json(tmp_j, ref.Data[i]);
+				j["SubscriptionDetails"] += tmp_j;
+			}
+		}
+	}
+}
diff --git a/src/model/SubscriptionParams.h b/src/model/SubscriptionParams.h
new file mode 100644
index 0000000..0b65d0f
--- /dev/null
+++ b/src/model/SubscriptionParams.h
@@ -0,0 +1,85 @@
+/*
+# ==================================================================================
+# Copyright (c) 2020 HCL Technologies Limited.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ==================================================================================
+*/
+#ifndef XAPP_MODEL_SubscriptionParams_H
+#define XAPP_MODEL_SubscriptionParams_H
+#include"SubscriptionDetail.h"
+#include"SubscriptionParams_ClientEndpoint.h"
+#include"SubscriptionParams_E2SubscriptionDirectives.h"
+
+namespace xapp
+
+{
+	namespace model {
+
+		struct SubscriptionParams:public ModelBase {
+
+			std::string Host{ "" };
+			int HTTPPort{ 0 };
+			int RMRPort{ 0 };
+			SubscriptionParams_ClientEndpoint ClientEndpoint;
+			std::string Meid{ "" };
+			int RANFunctionID{ 0 };
+			std::string SubscriptionId{ "" };
+			std::vector<SubscriptionDetail> Data;
+			SubscriptionParams_E2SubscriptionDirectives E2SubscriptionDirectives;
+
+			nlohmann::json validator_schema = R"(
+			{
+			"$schema": "http://json-schema.org/draft-07/schema#",
+			"title": "SubscriptionParams",
+			"properties": {
+			    "SubscriptionId": {
+			        "description": "Optional subscription ID '(Submgr allocates if not given)'",
+			        "type": "string"
+			    },
+			    "Meid": {
+			        "type": "string"
+			    },
+			    "RANFunctionID": {
+			        "type": "integer",
+			        "minimum": 0,
+			        "maximum": 4095
+			    },
+				"ClientEndpoint":{
+					"type": "object"
+				},
+				"E2SubscriptionDirectives":{
+					"type": "object"
+				},
+				"SubscriptionDetails":{
+					"type": "array"
+				}
+			},
+			"required": [
+			             "ClientEndpoint",
+			             "Meid",
+			             "RANFunctionID",
+			             "SubscriptionDetails"
+			            ],
+			"type": "object"
+			})"_json;
+
+			virtual nlohmann::json get_validator_schema() const { return validator_schema; }
+		};
+		void from_json(const nlohmann::json& j, SubscriptionParams& ref);
+		void to_json(nlohmann::json& j, const SubscriptionParams& ref);
+
+
+	}
+}
+#endif /*XAPP_MODEL_SubscriptionParams_H*/
diff --git a/src/model/SubscriptionParams_ClientEndpoint.cpp b/src/model/SubscriptionParams_ClientEndpoint.cpp
new file mode 100644
index 0000000..89d029d
--- /dev/null
+++ b/src/model/SubscriptionParams_ClientEndpoint.cpp
@@ -0,0 +1,38 @@
+/*
+# ==================================================================================
+# Copyright (c) 2020 HCL Technologies Limited.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ==================================================================================
+*/
+#include"SubscriptionParams_ClientEndpoint.h"
+namespace xapp {
+	namespace model {
+		void from_json(const nlohmann::json& j, SubscriptionParams_ClientEndpoint& ref) {
+
+			std::cout << __PRETTY_FUNCTION__ << std::endl;
+			ref.validate_json(j);
+			j.at("HTTPPort").get_to(ref.HTTPPort);
+			j.at("Host").get_to(ref.Host);
+			j.at("RMRPort").get_to(ref.RMRPort);
+		}
+
+		void to_json(nlohmann::json& j, const SubscriptionParams_ClientEndpoint& ref) {
+			j = nlohmann::json{
+				{"HTTPPort", ref.HTTPPort},
+				{"Host", ref.Host},
+				{"RMRPort", ref.RMRPort},
+			};
+		}
+	}
+}
\ No newline at end of file
diff --git a/src/model/SubscriptionParams_ClientEndpoint.h b/src/model/SubscriptionParams_ClientEndpoint.h
new file mode 100644
index 0000000..0096c38
--- /dev/null
+++ b/src/model/SubscriptionParams_ClientEndpoint.h
@@ -0,0 +1,71 @@
+/*
+# ==================================================================================
+# Copyright (c) 2020 HCL Technologies Limited.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ==================================================================================
+*/
+#ifndef XAPP_MODEL_SubscriptionParams_ClientEndpoint_H
+#define XAPP_MODEL_SubscriptionParams_ClientEndpoint_H
+#include "ModelBase.h"
+#include"nlohmann/json.hpp"
+
+namespace xapp {
+	namespace model {
+
+		struct SubscriptionParams_ClientEndpoint :public ModelBase {
+			int HTTPPort;
+			std::string Host;
+			int RMRPort;
+			nlohmann::json validator_schema = R"(
+			{
+			"$schema": "http://json-schema.org/draft-07/schema#",
+			"title": "SubscriptionParams_ClientEndpoint",
+			"description": "xApp service address and port",
+			"properties": {
+			    "HTTPPort": {
+			        "description": "xApp HTTP service address port",
+			        "type": "integer",
+			        "minimum": 0,
+			        "maximum": 65535
+			    },
+			    "Host": {
+			        "description": "xApp service address name like service-ricxapp-xappname-http.ricxapp",
+			        "type": "string"
+			    },
+			    "RMRPort": {
+			        "description": "xApp RMR service address port",
+			        "type": "integer",
+			        "minimum": 0,
+			        "maximum": 65535
+			    }
+			},
+			"required": [
+			             "HTTPPort",
+			             "Host",
+			             "RMRPort"
+			             ],
+			"type": "object"
+			})"_json;
+
+			virtual nlohmann::json get_validator_schema() const { return validator_schema; }
+
+		};
+		void from_json(const nlohmann::json& j, SubscriptionParams_ClientEndpoint& ref);
+		void to_json(nlohmann::json& j, const SubscriptionParams_ClientEndpoint& ref);
+
+		
+	} /*namespace model*/
+} /*namespace xapp*/
+#endif /*XAPP_MODEL_SubscriptionParams_ClientEndpoint_H*/
+
diff --git a/src/model/SubscriptionParams_E2SubscriptionDirectives.cpp b/src/model/SubscriptionParams_E2SubscriptionDirectives.cpp
new file mode 100644
index 0000000..cef5add
--- /dev/null
+++ b/src/model/SubscriptionParams_E2SubscriptionDirectives.cpp
@@ -0,0 +1,39 @@
+/*
+# ==================================================================================
+# Copyright (c) 2020 HCL Technologies Limited.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ==================================================================================
+*/
+#include"SubscriptionParams_E2SubscriptionDirectives.h"
+namespace xapp {
+	namespace model {
+		void from_json(const nlohmann::json& j, SubscriptionParams_E2SubscriptionDirectives& ref) {
+
+			std::cout << __PRETTY_FUNCTION__ << std::endl;
+			ref.validate_json(j);
+			j.at("E2RetryCount").get_to(ref.E2RetryCount);
+			j.at("E2TimeoutTimerValue").get_to(ref.E2TimeoutTimerValue);
+			j.at("RMRRoutingNeeded").get_to(ref.RMRRoutingNeeded);
+		}
+
+		void to_json(nlohmann::json& j, const SubscriptionParams_E2SubscriptionDirectives& ref) {
+
+			j = nlohmann::json{
+				{"E2RetryCount", ref.E2RetryCount},
+				{"E2TimeoutTimerValue", ref.E2TimeoutTimerValue},
+				{"RMRRoutingNeeded", ref.RMRRoutingNeeded},
+			};
+		}
+	}
+}
\ No newline at end of file
diff --git a/src/model/SubscriptionParams_E2SubscriptionDirectives.h b/src/model/SubscriptionParams_E2SubscriptionDirectives.h
new file mode 100644
index 0000000..897acb3
--- /dev/null
+++ b/src/model/SubscriptionParams_E2SubscriptionDirectives.h
@@ -0,0 +1,70 @@
+/*
+# ==================================================================================
+# Copyright (c) 2020 HCL Technologies Limited.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ==================================================================================
+*/
+#ifndef XAPP_MODEL_SubscriptionParams_E2SubscriptionDirectives_H
+#define XAPP_MODEL_SubscriptionParams_E2SubscriptionDirectives_H
+#include"ModelBase.h"
+#include"nlohmann/json.hpp"
+
+namespace xapp {
+	namespace model {
+
+		struct SubscriptionParams_E2SubscriptionDirectives : public ModelBase {
+
+			int E2RetryCount=INT_MIN;
+			int E2TimeoutTimerValue=INT_MIN;
+			bool RMRRoutingNeeded;
+			nlohmann::json validator_schema = R"(
+			{
+			"$schema": "http://json-schema.org/draft-07/schema#",
+			"title": "SubscriptionParams_E2SubscriptionDirectives",
+			"description": "Optional. If not set Submgr uses its default values",
+			"properties": {
+			    "E2RetryCount": {
+			        "description": "How many times E2 subscription request is retried",
+			        "type": "integer",
+			        "minimum": 0,
+			        "maximum": 10
+			    },
+			    "E2TimeoutTimerValue": {
+			        "description": "How long time response is waited from E2 node",
+			        "type": "integer",
+			        "minimum": 0,
+			        "maximum": 10
+			    },
+			    "RMRRoutingNeeded": {
+			        "description": "Subscription needs RMR route from E2Term to xApp",
+			        "type": "boolean"
+			    }
+			},
+			"required": [
+			             "E2TimeoutTimerValue",
+			             "E2RetryCount",
+			             "RMRRoutingNeeded"
+			            ],
+			"type": "object"
+			})"_json;
+			virtual nlohmann::json get_validator_schema() const { return validator_schema; }
+		};
+		
+		void from_json(const nlohmann::json& j, SubscriptionParams_E2SubscriptionDirectives& ref);
+		void to_json(nlohmann::json& j, const SubscriptionParams_E2SubscriptionDirectives& ref);
+
+		
+	} /*namespace model*/
+} /*namespace xapp*/
+#endif /*XAPP_MODEL_SubscriptionParams_ClientEndpoint_H*/
diff --git a/src/model/SubscriptionResponse.cpp b/src/model/SubscriptionResponse.cpp
new file mode 100644
index 0000000..d651e92
--- /dev/null
+++ b/src/model/SubscriptionResponse.cpp
@@ -0,0 +1,52 @@
+/*
+# ==================================================================================
+# Copyright (c) 2020 HCL Technologies Limited.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ==================================================================================
+*/
+#include"SubscriptionResponse.h"
+namespace xapp {
+	namespace model {
+		void from_json(const  nlohmann::json& j, SubscriptionResponse& ref) {
+
+			std::cout << __PRETTY_FUNCTION__ << std::endl;
+			ref.validate_json(j);
+
+			j.at("SubscriptionId").get_to(ref.SubscriptionId);
+			j.at("SubscriptionInstances").get_to(ref.SubInst);
+		}
+
+		void to_json(nlohmann::json& j, const SubscriptionResponse& ref) {
+
+			//j = nlohmann::json{
+			//	{"SubscriptionId",ref.SubscriptionId},
+			//	{"SubscriptionInstances", ref.SubInst}
+			//};
+			j = nlohmann::json{
+				{"SubscriptionId",ref.SubscriptionId}
+			};
+			for (int i = 0; i < ref.SubInst.size(); i++)
+			{
+				j["SubscriptionInstances"] += nlohmann::json{
+				{"XappEventInstanceId", ref.SubInst[i].XappEventInstanceId},
+				{"E2EventInstanceId", ref.SubInst[i].E2EventInstanceId},
+				{"ErrorCause", ref.SubInst[i].ErrorCause},
+				{"ErrorSource", ref.SubInst[i].ErrorSource},
+				{"TimeoutType", ref.SubInst[i].TimeoutType}
+				};
+			}
+
+		}
+	}
+}
\ No newline at end of file
diff --git a/src/model/SubscriptionResponse.h b/src/model/SubscriptionResponse.h
new file mode 100644
index 0000000..d6b93ab
--- /dev/null
+++ b/src/model/SubscriptionResponse.h
@@ -0,0 +1,59 @@
+/*
+# ==================================================================================
+# Copyright (c) 2020 HCL Technologies Limited.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ==================================================================================
+*/
+#ifndef XAPP_MODEL_SubscriptionResponse_H
+#define XAPP_MODEL_SubscriptionResponse_H
+#include"SubscriptionInstance.h"
+namespace xapp
+{
+	namespace model {
+		struct SubscriptionResponse:public ModelBase
+		{
+			nlohmann::json validator_schema = R"(
+			{
+			"$schema": "http://json-schema.org/draft-07/schema#",
+			"title": "SubscriptionResponse",
+			"properties": {
+			    "SubscriptionId": {
+			        "description": "Indentification of Subscription",
+			        "type": "integer"
+			    },
+			    "SubscriptionInstances": {
+			        "description": "List of Subscription Instance",
+			        "type": "array"
+			    }
+			},
+			"required": [
+			             "SubscriptionId",
+			             "SubscriptionInstances"
+			             ],
+			"type": "object"
+			})"_json;
+
+			virtual nlohmann::json get_validator_schema() const { return validator_schema; }
+			std::string SubscriptionId{ "" };
+			std::vector<SubscriptionInstance > SubInst;
+
+		};
+		void from_json(const  nlohmann::json& j, SubscriptionResponse& ref);
+		void to_json(nlohmann::json& j, const SubscriptionResponse& ref);
+
+	}
+
+}
+#endif
+
diff --git a/src/model/SubsequentAction.cpp b/src/model/SubsequentAction.cpp
new file mode 100644
index 0000000..d646ffa
--- /dev/null
+++ b/src/model/SubsequentAction.cpp
@@ -0,0 +1,38 @@
+/*
+# ==================================================================================
+# Copyright (c) 2020 HCL Technologies Limited.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ==================================================================================
+*/
+#include"SubsequentAction.h"
+namespace xapp {
+	namespace model {
+		void from_json(const nlohmann::json& j, SubsequentAction& ref) {
+
+			std::cout << __PRETTY_FUNCTION__ << "\n";
+			ref.validate_json(j);
+
+			j.at("SubsequentActionType").get_to(ref.SubsequentActionType);
+			j.at("TimeToWait").get_to(ref.TimeToWait);
+		}
+
+		void to_json(nlohmann::json& j, const SubsequentAction& ref) {
+
+			j = nlohmann::json{
+				{"SubsequentActionType",ref.SubsequentActionType},
+				{"TimeToWait", ref.TimeToWait}
+			};
+		}
+	}
+}
\ No newline at end of file
diff --git a/src/model/SubsequentAction.h b/src/model/SubsequentAction.h
new file mode 100644
index 0000000..3ffa29d
--- /dev/null
+++ b/src/model/SubsequentAction.h
@@ -0,0 +1,62 @@
+/*
+# ==================================================================================
+# Copyright (c) 2020 HCL Technologies Limited.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ==================================================================================
+*/
+#ifndef SubsequentAction_H
+#define SubsequentAction_H
+#include"ModelBase.h"
+namespace xapp
+{
+	namespace model
+	{
+		struct SubsequentAction : public ModelBase {
+			std::string SubsequentActionType;
+			std::string TimeToWait;
+			nlohmann::json validator_schema = R"(
+			{
+			"$schema": "http://json-schema.org/draft-07/schema#",
+			"title": "SubsequentAction",
+			"properties": {
+			    "SubsequentActionType": {
+			        "description": "Type of Subsequent Action",
+			        "type": "string",
+			        "enum": ["wait", "continue"]
+
+			    },
+			    "TimeToWait": {
+			        "description": "Time to waiting",
+			        "type": "string",
+			        "enum": ["zero", "w1ms", "w2ms", "w5ms", "w10ms", "w20ms", "w30ms",
+			                "w40ms", "w50ms", "w100ms", "w200ms", "w500ms", "w1s",
+			                "w2s", "w5s", "w10s", "w20s", "w60s"]
+			    }
+			},
+			"required": [
+			             "SubsequentActionType",
+			             "TimeToWait"
+			             ],
+			"type": "object"
+			})"_json;
+			virtual nlohmann::json get_validator_schema() const { return validator_schema; }
+		};
+		void from_json(const nlohmann::json& j, SubsequentAction& ref);
+		void to_json(nlohmann::json& j, const SubsequentAction& ref);
+
+	}
+	
+}
+
+#endif
diff --git a/src/model/XAppConfig.cpp b/src/model/XAppConfig.cpp
new file mode 100644
index 0000000..a5402db
--- /dev/null
+++ b/src/model/XAppConfig.cpp
@@ -0,0 +1,62 @@
+/*
+# ==================================================================================
+# Copyright (c) 2020 HCL Technologies Limited.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ==================================================================================
+*/
+#include"XAppConfig.h"
+namespace xapp {
+	namespace model {
+		void from_json(const nlohmann::json& j, XAppConfig& ref) {
+			std::cout << __PRETTY_FUNCTION__ << std::endl;
+			ref.validate_json(j);
+			j.at("metadata").get_to(ref.m_ConfigMetadata);
+			j.at("config").get_to(ref.config);
+
+		}
+		void from_json(const nlohmann::json& j, std::vector<XAppConfig>& ref) {
+			for (auto& element : j) {
+				XAppConfig tmp;
+				tmp.validate_json(element);
+				for (auto& val : element.items())
+				{
+					if (val.key() == "metadata") {
+						tmp.m_ConfigMetadata.ConfigType = val.value()["configType"];
+						tmp.m_ConfigMetadata.XappName = val.value()["xappName"];
+					}
+					else if (val.key() == "config") {
+						tmp.config = val.value();
+					}
+				}
+				ref.push_back(tmp);
+			}
+		}
+
+		void to_json(nlohmann::json& j, const XAppConfig& ref) {
+			j = nlohmann::json{
+				{"metadata",{{"configType",ref.m_ConfigMetadata.ConfigType},{"xappName",ref.m_ConfigMetadata.XappName}}},
+				{"config",ref.config}
+			};
+		}
+
+		void to_json(nlohmann::json& j, const std::vector<XAppConfig>& ref) {
+			for (int i = 0; i < ref.size(); i++)
+			{
+				nlohmann::json tmp_j;
+				to_json(tmp_j, ref[i]);
+				j += tmp_j;
+			}
+		}
+	}
+}
\ No newline at end of file
diff --git a/src/model/XAppConfig.h b/src/model/XAppConfig.h
new file mode 100644
index 0000000..5f8a8b0
--- /dev/null
+++ b/src/model/XAppConfig.h
@@ -0,0 +1,55 @@
+/*
+# ==================================================================================
+# Copyright (c) 2020 HCL Technologies Limited.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ==================================================================================
+*/
+#ifndef XAPP_MODEL_XAppConfig_H
+#define XAPP_MODEL_XAppConfig_H
+#include"ConfigMetadata.h"
+
+namespace xapp {
+	namespace model {
+		struct  XAppConfig : public ModelBase {
+			ConfigMetadata m_ConfigMetadata;
+			nlohmann::json config;// = nlohmann::json::object();
+			nlohmann::json validator_schema = R"(
+				{
+				"$schema": "http://json-schema.org/draft-07/schema#",
+				"title": "XAppConfig",
+				"properties": {
+				    
+				    "metadata": {
+				        "type": "object"
+				    },
+					 "config": {
+				        "type": "object"
+				    }
+				},
+				"required": [
+				             "metadata",
+							 "config"
+				             ],
+				"type": "object"
+				})"_json;
+			virtual nlohmann::json get_validator_schema() const { return validator_schema; }
+		};
+		void from_json(const nlohmann::json& j, XAppConfig& ref);
+		void from_json(const nlohmann::json& j, std::vector<XAppConfig>& ref);
+		void to_json(nlohmann::json& j, const XAppConfig& ref);
+		void to_json(nlohmann::json& j, const std::vector<XAppConfig>& ref);
+
+	}
+}
+#endif
diff --git a/src/model/temperory.h b/src/model/temperory.h
new file mode 100644
index 0000000..e5b1a92
--- /dev/null
+++ b/src/model/temperory.h
@@ -0,0 +1,21 @@
+/*
+# ==================================================================================
+# Copyright (c) 2020 HCL Technologies Limited.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ==================================================================================
+*/
+#pragma once
+#if !defined(__PRETTY_FUNCTION__) && !defined(__GNUC__)
+#define __PRETTY_FUNCTION__ __FUNCSIG__
+#endif
diff --git a/src/rest-client/CMakeLists.txt b/src/rest-client/CMakeLists.txt
new file mode 100644
index 0000000..595485a
--- /dev/null
+++ b/src/rest-client/CMakeLists.txt
@@ -0,0 +1,47 @@
+# ==================================================================================
+# Copyright (c) 2020 HCL Technologies Limited.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ==================================================================================
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17")
+set(CMAKE_CXX_STANDARD 17)
+# BUILD TYPE
+message("A ${CMAKE_BUILD_TYPE} build configuration is detected")
+message("CPP flag is  ${CMAKE_CXX_FLAGS} ")
+message("CPP standard is  ${CMAKE_CXX_STANDARD} ")
+
+include_directories( "${srcd}/src/rest-client")
+#SOURCE FILES
+file(GLOB SOURCE_FILES  "${srcd}/src/rest-client/*.cpp" )
+
+
+add_library(rest-client_objects OBJECT  ${SOURCE_FILES})
+
+target_include_directories (rest-client_objects PUBLIC
+        $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
+        $<INSTALL_INTERFACE:include>
+        PRIVATE src)
+
+# header files should go into .../include/xfcpp/
+
+file(GLOB SOURCE_INSTALL_FILES  "${srcd}/src/rest-client/*.h")
+#set( install_inc_client "include/ricxfcpp/rest-client" )
+
+if( DEV_PKG )
+        install( FILES
+                 ${SOURCE_INSTALL_FILES}
+                DESTINATION ${install_inc}
+        )
+endif()
+
+
diff --git a/src/rest-client/RestClient.cpp b/src/rest-client/RestClient.cpp
new file mode 100644
index 0000000..12c8728
--- /dev/null
+++ b/src/rest-client/RestClient.cpp
@@ -0,0 +1,422 @@
+/*
+# ==================================================================================
+# Copyright (c) 2020 HCL Technologies Limited.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ==================================================================================
+*/
+#include"RestClient.h"
+namespace xapp
+{
+	void cpprestclient::SetbaseUrl(std::string url)
+	{
+		this->baseUrl = utility::conversions::to_string_t(url);
+		this->Baseurl = url;
+	}
+	cpprestclient::cpprestclient(std::string base_url) {
+		this->baseUrl = utility::conversions::to_string_t(base_url);
+		this->Baseurl = base_url;
+	}
+	cpprestclient::cpprestclient(std::string base_url, std::function<void(web::http::http_request)>callback):listener{ utility::conversions::to_string_t(resp_url) }
+	{
+		this->baseUrl= utility::conversions::to_string_t(base_url);
+		this->Baseurl = base_url;
+		try
+		{
+			listener.support(web::http::methods::POST, [callback](web::http::http_request request) { callback(request); });
+			ok_2_run = true;
+                        /*
+                        ok_2_run = true;
+                        t = new std::thread*[1];
+                        t[0] = new std::thread(&cpprestclient::response_listener, this);
+                        t[0]->detach();
+                        */
+                        response_listener();
+
+			
+		}
+		catch (std::exception const & e)
+		{
+			std::wcout << e.what() << std::endl;
+		}
+
+	}
+	cpprestclient::cpprestclient(std::string base_url,std::string response_url, std::function<void(web::http::http_request)>callback):listener{ utility::conversions::to_string_t(response_url) }{
+		
+		this->baseUrl= utility::conversions::to_string_t(base_url);
+                this->Baseurl = base_url;
+                try
+                {
+                        listener.support(web::http::methods::POST, [callback](web::http::http_request request) { callback(request); });
+                        /*
+                        ok_2_run = true;
+                        t = new std::thread*[1];
+                        t[0] = new std::thread(&cpprestclient::response_listener, this);
+                        t[0]->detach();
+                        */
+                        response_listener();
+
+
+
+                }
+                catch (std::exception const & e)
+                {
+                        std::wcout << e.what() << std::endl;
+                }
+
+
+
+	}
+
+	/*
+	void cpprestclient::start_response_listener() {
+		try {
+			t[0] = new std::thread(&cpprestclient::response_listener, this);
+			t[0]->detach();
+		}
+		catch (std::exception const & e)
+		{
+			std::wcout << e.what() << std::endl;
+		}
+	}
+	*/
+	std::string cpprestclient::getBaseUrl()
+	{
+		return Baseurl;
+	}
+	void cpprestclient::response_listener() {
+		try
+		{
+			this->listener.open().wait();
+			//std::cout<<"kumar "<<"\n";
+			//std::this_thread::sleep_for(std::chrono::seconds(20));
+                       /*
+			while (ok_2_run) {
+				//std::cout<<"sandeeep ";
+
+			}
+                        */
+
+		}
+		catch (std::exception const & e)
+		{
+			std::wcout << e.what() << std::endl;
+		}
+	}
+	void cpprestclient::stop_response_listener() {
+		try
+		{
+			ok_2_run = false;
+			listener.close();
+			//delete[] t;
+			std::cout << "\nclosed1\n";
+		}
+		catch (std::exception const & e)
+		{
+			std::wcout << e.what() << std::endl;
+		}
+	}
+	oresponse_t cpprestclient::post_subscriptions(const nlohmann::json & json, std::string path) {
+		oresponse_t res;
+		res.status_code = 0;
+		res.SubscriptionId = "";
+		auto postJson = pplx::create_task([&]() {
+			utility::stringstream_t s;
+			s << json.dump().c_str();
+			web::json::value sdk_json = web::json::value::parse(s);
+			web::uri_builder uri(this->baseUrl + utility::conversions::to_string_t(path));
+			auto addr = uri.to_uri().to_string();
+			web::http::client::http_client client(addr);
+			return client.request(web::http::methods::POST, U("/"), sdk_json.serialize(), U("application/json"));
+		})
+			.then([&](web::http::http_response response) {
+
+			res.status_code = response.status_code();
+			if (response.status_code() != 201) {
+				throw std::runtime_error("Returned " + std::to_string(response.status_code()));
+			}
+			ucout << response.to_string() << "\n";
+			response.headers().set_content_type(U("application/json"));
+			return response.extract_json();
+		})
+
+			.then([&](web::json::value jsonObject) {
+			res.SubscriptionId = utility::conversions::to_utf8string(jsonObject[U("SubscriptionId")].as_string());
+
+			//validating subscription response against its schema
+			std::string s = utility::conversions::to_utf8string(jsonObject.serialize());
+			nlohmann::json  j= nlohmann::json::parse(s);
+			xapp::model::SubscriptionResponse SResp;
+			xapp::model::from_json(j, SResp);
+			
+			//sanity check
+			nlohmann::json ans;
+			xapp::model::to_json(ans, SResp);
+			std::cout << ans.dump(4) << "\n";
+
+		});
+		try {
+			postJson.wait();
+		}
+		catch (const std::exception& e) {
+			
+			printf("Error exception:%s\n", e.what());
+		}
+		return res;
+
+	}
+	int  cpprestclient::delete_subscriptions(std::string Id, std::string path)
+	{
+		int status_code=0;
+		auto delJson = pplx::create_task([&]() {
+			web::uri_builder uri(this->baseUrl + utility::conversions::to_string_t(path));
+			auto addr = uri.to_uri().to_string();
+			web::http::client::http_client client(addr);
+			addr.append(utility::conversions::to_string_t(Id));
+			//ucout << utility::string_t(U("making requests at: ")) << addr << std::endl;
+			return client.request(web::http::methods::DEL);
+		})
+
+
+			.then([&](web::http::http_response response) {
+			status_code = response.status_code();
+			if (response.status_code() != 204) {
+				throw std::runtime_error("Returned " + std::to_string(response.status_code()));
+			}
+		});
+
+		try {
+			delJson.wait();
+		}
+		catch (const std::exception& e) {
+			printf("Error exception:%s\n", e.what());
+		}
+
+		return status_code;
+	}
+	response_t  cpprestclient::get_config(std::string path)
+	{
+		response_t res;
+		res.status_code = 0;
+		res.body = utility::conversions::to_string_t("");
+		auto postJson = pplx::create_task([&]() {
+
+
+			web::http::client::http_client client(this->baseUrl);
+
+
+			return client.request(web::http::methods::GET, web::uri_builder(U("/")).append_path(utility::conversions::to_string_t(path)).to_string());
+		})
+			.then([&](web::http::http_response response) {
+
+			res.status_code = response.status_code();
+			if (response.status_code() != 200) {
+				throw std::runtime_error("Returned " + std::to_string(response.status_code()));
+			}
+			ucout << response.to_string() << "\n";
+			response.headers().set_content_type(U("application/json"));
+			return response.extract_json();
+		})
+
+			.then([&](web::json::value jsonObject) {
+			//validating configlist against its schema
+			std::string s = utility::conversions::to_utf8string(jsonObject.serialize());
+			res.body = nlohmann::json::parse(s);
+			std::vector<xapp::model::XAppConfig> cfg;
+			xapp::model::from_json(res.body, cfg);
+			
+			//sanity check
+			nlohmann::json ans;
+			xapp::model::to_json(ans, cfg);
+			std::cout << ans.dump(4) << "\n";
+		});
+		try {
+			postJson.wait();
+		}
+		catch (const std::exception& e) {
+			printf("Error exception:%s\n", e.what());
+		}
+		return res;
+	}
+	response_t  cpprestclient::get_subscriptions(std::string path)
+	{
+		response_t res;
+		res.status_code = 0;
+		res.body = utility::conversions::to_string_t("");
+		auto postJson = pplx::create_task([&]() {
+
+
+			web::http::client::http_client client(this->baseUrl);
+
+
+			return client.request(web::http::methods::GET, web::uri_builder(U("/")).append_path(utility::conversions::to_string_t(path)).to_string());
+		})
+			.then([&](web::http::http_response response) {
+
+			res.status_code = response.status_code();
+			if (response.status_code() != 200) {
+				throw std::runtime_error("Returned " + std::to_string(response.status_code()));
+			}
+			ucout << response.to_string() << "\n";
+			response.headers().set_content_type(U("application/json"));
+			return response.extract_json();
+		})
+
+			.then([&](web::json::value jsonObject) {
+
+			//validating subscription list  against its schema
+			std::string s = utility::conversions::to_utf8string(jsonObject.serialize());
+			res.body = nlohmann::json::parse(s);
+			std::vector<xapp::model::SubscriptionData> subList;
+			xapp::model::from_json(res.body, subList);
+
+			//sanity check
+			nlohmann::json ans;
+			xapp::model::to_json(ans, subList);
+			std::cout << ans.dump(4) << "\n";
+
+		});
+		try {
+			postJson.wait();
+		}
+		catch (const std::exception& e) {
+			printf("Error exception:%s\n", e.what());
+		}
+		return res;
+	}
+	response_t cpprestclient::do_post(const nlohmann::json & json, std::string path)
+	{
+		response_t res;
+		res.status_code = 0;
+		res.body = utility::conversions::to_string_t("");
+		auto postJson = pplx::create_task([&]() {
+			//conversion from nlhomann json to cpprestsdk json
+			utility::stringstream_t s;
+			s << json.dump().c_str();
+			web::json::value sdk_json = web::json::value::parse(s);
+			web::uri_builder uri(this->baseUrl + utility::conversions::to_string_t(path));
+			auto addr = uri.to_uri().to_string();
+			web::http::client::http_client client(addr);
+			return client.request(web::http::methods::POST, U("/"), sdk_json.serialize(), U("application/json"));
+		})
+				.then([&](web::http::http_response response) {
+
+					res.status_code = response.status_code();
+					if (response.status_code() != 201) {
+					throw std::runtime_error("Returned " + std::to_string(response.status_code()));
+					}
+					ucout << response.to_string() << "\n";
+					response.headers().set_content_type(U("application/json"));
+					return response.extract_json();
+			})
+				
+				.then([&](web::json::value jsonObject) {
+					//std::cout << "\nRecieved REST subscription response\n";
+					//std::wcout << jsonObject.serialize().c_str() << "\n";
+					//resp.body = jsonObject.serialize();
+
+				//conversion from cpprestsdk json to nlhomann json
+				std::string s = utility::conversions::to_utf8string(jsonObject.serialize());
+				res.body = nlohmann::json::parse(s);
+			});
+			try {
+				postJson.wait();
+			}
+			catch (const std::exception& e) {
+				printf("Error exception:%s\n", e.what());
+			}
+			return res;
+	}
+	response_t cpprestclient::do_del(std::string Id, std::string path)
+	{
+		response_t res;
+		res.status_code = 0;
+		res.body = utility::conversions::to_string_t("");
+		auto delJson = pplx::create_task([&]() {
+			web::uri_builder uri(this->baseUrl + utility::conversions::to_string_t(path));
+			auto addr = uri.to_uri().to_string();
+			web::http::client::http_client client(addr);
+			addr.append(utility::conversions::to_string_t(Id));
+			//ucout << utility::string_t(U("making requests at: ")) << addr << std::endl;
+			return client.request(web::http::methods::DEL);
+		})
+
+			
+			.then([&](web::http::http_response response) {
+				res.status_code = response.status_code();
+				if (response.status_code() != 204) {
+					throw std::runtime_error("Returned " + std::to_string(response.status_code()));
+				}
+				ucout << response.to_string() << "\n";
+				response.headers().set_content_type(U("application/json"));
+				return response.extract_json();
+				//std::wcout << "Deleted: " << std::boolalpha << (response.status_code() == 204) << std::endl;
+		})
+			.then([&](web::json::value jsonObject) {
+
+				//resp.body = jsonObject.serialize();
+			std::string s = utility::conversions::to_utf8string(jsonObject.serialize());
+			res.body = nlohmann::json::parse(s);
+		});
+
+		try {
+			delJson.wait();
+		}
+		catch (const std::exception& e) {
+			printf("Error exception:%s\n", e.what());
+		}
+
+		return res;
+
+	}
+	 response_t cpprestclient::do_get(std::string path)
+	{
+		response_t res;
+		res.status_code = 0;
+		res.body = utility::conversions::to_string_t("");
+		auto postJson = pplx::create_task([&]() {
+
+
+			web::http::client::http_client client(this->baseUrl);
+
+			
+			return client.request(web::http::methods::GET, web::uri_builder(U("/")).append_path(utility::conversions::to_string_t(path)).to_string());
+		})
+			.then([&](web::http::http_response response) {
+
+			res.status_code = response.status_code();
+			if (response.status_code() != 200) {
+				throw std::runtime_error("Returned " + std::to_string(response.status_code()));
+			}
+			ucout << response.to_string() << "\n";
+			response.headers().set_content_type(U("application/json"));
+			return response.extract_json();
+		})
+
+			.then([&](web::json::value jsonObject) {
+	
+			//resp.body = jsonObject.serialize();
+			std::string s = utility::conversions::to_utf8string(jsonObject.serialize());
+			res.body = nlohmann::json::parse(s);
+		});
+		try {
+			postJson.wait();
+		}
+		catch (const std::exception& e) {
+			printf("Error exception:%s\n", e.what());
+		}
+		return res;
+	}
+}
+
+
diff --git a/src/rest-client/RestClient.h b/src/rest-client/RestClient.h
new file mode 100644
index 0000000..8368547
--- /dev/null
+++ b/src/rest-client/RestClient.h
@@ -0,0 +1,90 @@
+/*
+# ==================================================================================
+# Copyright (c) 2020 HCL Technologies Limited.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ==================================================================================
+*/
+#ifndef _CPPREST_SDK_WRAPPER_H
+#define _CPPREST_SDK_WRAPPER_H
+
+#include<string>
+#include<cpprest/http_client.h>
+#include<cpprest/filestream.h>
+#include<cpprest/uri.h>
+#include<cpprest/json.h>
+#include<sstream>
+#include <cpprest/http_listener.h>
+#include"nlohmann/json.hpp"
+#include<functional>
+#include"RestModel.h"
+#include<thread>
+#include <chrono>
+#include <pthread.h>
+
+
+namespace xapp
+{
+	typedef struct resp
+	{
+		long status_code;
+		nlohmann::json body;
+		//utility::string_t body;
+	}response_t;
+
+	typedef struct oran_resp
+	{
+		long status_code;
+		std::string SubscriptionId;
+	}oresponse_t;
+
+	class cpprestclient
+	{
+	protected:
+		utility::string_t baseUrl;
+		std::string Baseurl;
+		//utility::string_t resp_url=U("http://0.0.0.0:8080/ric/v1/subscriptions/response");
+		std::string resp_url = "http://0.0.0.0:8080/ric/v1/subscriptions/response";//default response url
+		web::http::experimental::listener::http_listener listener;
+		std::thread** t;
+		void response_listener();
+		bool ok_2_run;
+	public:
+		void SetbaseUrl(std::string);
+		std::string getBaseUrl();
+		//O-RAN specific api calls
+		oresponse_t post_subscriptions(const nlohmann::json & json, std::string path);
+		int delete_subscriptions(std::string Id, std::string path);
+		response_t get_subscriptions(std::string path);
+		response_t get_config(std::string path);
+
+		//general api calls
+		virtual response_t do_get(std::string path);
+		virtual response_t do_post(const nlohmann::json & json, std::string path);
+		virtual response_t do_del(std::string Id, std::string path);
+		//virtual response_t do_post(const web::json::value & json, std::string path);
+		cpprestclient(std::string base_url, std::function<void(web::http::http_request)>callback);
+		cpprestclient(std::string base_url,std::string response_url, std::function<void(web::http::http_request)>callback);
+		cpprestclient(std::string base_url);
+		virtual ~cpprestclient(){}
+		//void start_response_listener();
+		void stop_response_listener();
+	};
+
+}
+
+
+
+
+
+#endif
diff --git a/src/rest-server/CMakeLists.txt b/src/rest-server/CMakeLists.txt
new file mode 100644
index 0000000..5629496
--- /dev/null
+++ b/src/rest-server/CMakeLists.txt
@@ -0,0 +1,48 @@
+# ==================================================================================
+# Copyright (c) 2020 HCL Technologies Limited.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ==================================================================================
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17")
+set(CMAKE_CXX_STANDARD 17)
+# BUILD TYPE
+message("A ${CMAKE_BUILD_TYPE} build configuration is detected")
+message("CPP flag is  ${CMAKE_CXX_FLAGS} ")
+message("CPP standard is  ${CMAKE_CXX_STANDARD} ")
+
+#include_directories( "${srcd}/src/rest-server")
+#SOURCE FILES
+file(GLOB SOURCE_FILES  "${srcd}/src/rest-server/*.cpp" )
+
+
+add_library(rest-server_objects OBJECT  ${SOURCE_FILES})
+
+target_include_directories (rest-server_objects PUBLIC
+        $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
+        $<INSTALL_INTERFACE:include>
+        PRIVATE src)
+
+# header files should go into .../include/xfcpp/
+
+file(GLOB SOURCE_INSTALL_FILES  "${srcd}/src/rest-server/*.h")
+#set( install_inc_server "include/ricxfcpp/rest-server" )
+
+if( DEV_PKG )
+        install( FILES
+                 ${SOURCE_INSTALL_FILES}
+                DESTINATION ${install_inc}
+        )
+endif()
+
+
+
diff --git a/src/rest-server/pistacheserver.cpp b/src/rest-server/pistacheserver.cpp
new file mode 100644
index 0000000..7f7fed9
--- /dev/null
+++ b/src/rest-server/pistacheserver.cpp
@@ -0,0 +1,200 @@
+/*
+# ==================================================================================
+# Copyright (c) 2020 HCL Technologies Limited.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ==================================================================================
+*/
+#include"pistacheserver.h"
+namespace xapp
+{
+ 
+	pistacheserver::pistacheserver(Pistache::Address addr,std::vector<std::string> method,std::vector<bool> static_routing,std::vector<bool> dynamic_routing)
+        : httpEndpoint(std::make_shared<Pistache::Http::Endpoint>(addr))
+    { 
+	this->t=new std::thread*[1];
+        this->method=method;
+	this->static_routing=static_routing;
+	this->dynamic_routing=dynamic_routing;
+	assert(static_routing.size()==method.size() && dynamic_routing.size()==method.size());
+	stat_sz=cal_stat_size();
+	dyn_sz=cal_dyn_size();
+    }
+   int pistacheserver::cal_stat_size()//caclualting no of true in static_routing
+	{
+		int size=0;
+		for(int i=0;i<static_routing.size();i++)
+		{
+			if (static_routing[i])
+				size++;
+		}
+		return size;
+	}
+
+	 int pistacheserver::cal_dyn_size() //calaculating no true in dynamic_routing
+        {
+                int size=0;
+                for(int i=0;i<dynamic_routing.size();i++)
+                {
+                        if (dynamic_routing[i])
+                                size++;
+                }
+                return size;
+        }
+
+    void pistacheserver::setup_base_url(std::string base)
+    {
+        this->base=base;
+    }
+    void pistacheserver::setup_static_route(std::unordered_map<int,std::string> route)//routing path
+    {
+        this->route_static=route;
+    }
+ void pistacheserver::setup_dynamic_route(std::unordered_map<int,std::string> route)//routing path
+    {
+        this->route_dynamic=route;
+    }
+void pistacheserver::add_static_cb(std::unordered_map<int,usr_callback> cb)
+{
+	this->cb_static=cb;
+}
+void pistacheserver::add_dynamic_cb(std::unordered_map<int,usr_callback> cb) 
+{
+        this->cb_dynamic=cb;
+}
+
+    void pistacheserver::init(size_t thr = 2) 
+    {
+       		 auto opts = Pistache::Http::Endpoint::options().threads(thr).flags(Pistache::Tcp::Options::ReuseAddr)/*.flags(Pistache::Tcp::Options::ReusePort)*/; // how many threads for the server
+       		 httpEndpoint->init(opts);
+		assert(route_static.size()==stat_sz && route_dynamic.size()==dyn_sz); //no of true in satatic_routing and dynamic_routig should match with size of route_static and  route_dynamic respectively. 
+
+		assert(cb_static.size()==stat_sz && cb_dynamic.size()==dyn_sz); //no of true in satatic_routing and dynamic_routig should match with size of cb_static and cb_dynamic respectively.
+		for (int i=0;i<method.size();i++)
+	{
+        	if (method[i]=="get")
+        	{
+            		setupRoutes_get(i+1);
+        	}
+        	else if (method[i]=="post" )
+        	{
+            		setupRoutes_post(i+1);
+        	}
+
+        	else if (method[i]=="del")
+        	{
+            		setupRoutes_del(i+1);
+        	}
+	
+       		else
+        	{
+            		std::cout<<"Wrong Method called \n";
+        	}
+    	}
+
+
+    }
+
+
+    void pistacheserver::start()
+    {
+	httpEndpoint->setHandler(router.handler());
+        t[0]=new std::thread(&pistacheserver::thread_start,this);
+	t[0]->detach();
+    }
+    void pistacheserver::thread_start()
+    {
+       this->httpEndpoint->serve();
+
+    }
+
+    void pistacheserver::shutdown()
+    {
+        httpEndpoint->shutdown();
+    }
+
+    void pistacheserver::setupRoutes_get(int index)
+    {
+        using namespace Pistache::Rest;
+	auto search_s=route_static.find(index);
+        auto search_d=route_dynamic.find(index);
+        auto cbs_search=cb_static.find(index);
+        auto cbd_search=cb_dynamic.find(index);
+        assert (search_s!=route_static.end() || search_d!=route_dynamic.end()); 
+        if (static_routing[index-1])
+                {
+		std::cout<<"static routing get"<<std::endl;
+                assert (search_s!=route_static.end() && cbs_search!=cb_static.end());
+                Routes::Get(router, base + search_s->second, Routes::bind(cbs_search->second));
+                }
+        if (dynamic_routing[index-1])
+                {
+		std::cout<<"dynamic routing get"<<std::endl;
+                assert (search_d!=route_dynamic.end() && cbd_search!=cb_dynamic.end());
+                Routes::Get(router, base + search_d->second+ dynamic_id, Routes::bind(cbd_search->second));
+                }
+
+	// Default handler, called when a route is not found
+        router.addCustomHandler(Routes::bind(&pistacheserver::default_handler, this));
+    }
+    void pistacheserver::setupRoutes_post(int index)
+    {
+        using namespace Pistache::Rest;
+	auto search_s=route_static.find(index);
+	auto search_d=route_dynamic.find(index);
+	auto cbs_search=cb_static.find(index);
+	auto cbd_search=cb_dynamic.find(index);
+	assert (search_s!=route_static.end() || search_d!=route_dynamic.end()); 
+	if (static_routing[index-1])
+		{
+		std::cout<<"static routing post"<<std::endl;
+		assert (search_s!=route_static.end() && cbs_search!=cb_static.end());
+        	Routes::Post(router, base + search_s->second, Routes::bind(cbs_search->second));
+		}
+	if (dynamic_routing[index-1])
+		{
+		std::cout<<"dynamic routing post"<<std::endl;
+		assert (search_d!=route_dynamic.end() && cbd_search!=cb_dynamic.end());
+		Routes::Post(router, base + search_d->second+ dynamic_id, Routes::bind(cbd_search->second));
+		}
+        // Default handler, called when a route is not found
+        router.addCustomHandler(Routes::bind(&pistacheserver::default_handler, this));
+    }
+    void pistacheserver::setupRoutes_del(int index)
+    {
+        using namespace Pistache::Rest;
+        auto search_s=route_static.find(index);
+        auto search_d=route_dynamic.find(index);
+        auto cbs_search=cb_static.find(index);
+        auto cbd_search=cb_dynamic.find(index);
+        assert (search_s!=route_static.end() || search_d!=route_dynamic.end()); 
+        if (static_routing[index-1])
+                {
+		std::cout<<"static routing delete"<<std::endl;
+                assert (search_s!=route_static.end() && cbs_search!=cb_static.end());
+                Routes::Delete(router, base + search_s->second, Routes::bind(cbs_search->second));
+                }
+        if (dynamic_routing[index-1])
+                {
+		std::cout<<"dynamic routing delete"<<std::endl;
+                assert (search_d!=route_dynamic.end() && cbd_search!=cb_dynamic.end());
+                Routes::Delete(router, base + search_d->second+ dynamic_id, Routes::bind(cbd_search->second));
+		}
+	// Default handler, called when a route is not found
+        router.addCustomHandler(Routes::bind(&pistacheserver::default_handler, this));
+    }
+
+}
+
+
+
diff --git a/src/rest-server/pistacheserver.h b/src/rest-server/pistacheserver.h
new file mode 100644
index 0000000..75fb9b8
--- /dev/null
+++ b/src/rest-server/pistacheserver.h
@@ -0,0 +1,80 @@
+/*
+# ==================================================================================
+# Copyright (c) 2020 HCL Technologies Limited.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ==================================================================================
+*/
+#ifndef _pistacheserver_h
+#define _pistacheserver_h
+#include <pistache/endpoint.h>
+#include <pistache/http.h>
+#include <pistache/router.h>
+#include <pistache/http_headers.h>
+#include<vector>
+#include<string>
+#include<memory>
+#include<thread>
+#include<vector>
+#include<unordered_set>
+#include<assert.h>
+#include<functional>
+#include<unordered_map>
+namespace xapp
+{
+    using usr_callback=void(*)(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
+    class pistacheserver
+    {
+        private:
+            std::shared_ptr<Pistache::Http::Endpoint> httpEndpoint;
+            Pistache::Rest::Router router;
+            void setupRoutes_get(int index);
+            void setupRoutes_post(int index);
+            void setupRoutes_del(int index);
+
+            std::vector<std::string> method;
+	    std::vector< bool> static_routing;
+            std::vector<bool> dynamic_routing;
+            std::unordered_map<int,std::string> route_static;
+	    std::unordered_map<int,std::string> route_dynamic;
+	    std::unordered_map<int,usr_callback> cb_static;
+	    std::unordered_map<int,usr_callback> cb_dynamic;
+
+	    std::string base = "/ric/v1";
+            std::string dynamic_id="/:Id";
+	    int stat_sz=0;
+	    int dyn_sz=0;
+	    int cal_stat_size();
+	    int cal_dyn_size();
+	    std::thread **t;
+        public:
+	    void thread_start();
+            pistacheserver(Pistache::Address addr,std::vector<std::string> method,std::vector<bool> static_routing,std::vector<bool> dynamic_routing);
+	    virtual ~pistacheserver(){};
+	    virtual void default_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response)
+		 {
+        		response.send(Pistache::Http::Code::Not_Found, "The requested method does not exist");
+   		 }
+
+            void init(size_t thr);
+            void setup_base_url(std::string base);
+            void setup_static_route(std::unordered_map<int,std::string> route);//routing path
+	    void setup_dynamic_route(std::unordered_map<int,std::string> route);
+	    void add_static_cb(std::unordered_map<int,usr_callback> cb);
+	    void add_dynamic_cb(std::unordered_map<int,usr_callback> cb);
+            void start();
+            void shutdown();
+    };
+}
+#endif
+
diff --git a/src/rest/CMakeLists.txt b/src/rest/CMakeLists.txt
deleted file mode 100644
index 282e9b9..0000000
--- a/src/rest/CMakeLists.txt
+++ /dev/null
@@ -1,27 +0,0 @@
-# vim: sw=4 ts=4 noet:
-#
-#==================================================================================
-#   Copyright (c) 2020 Nokia
-#   Copyright (c) 2020 AT&T Intellectual Property.
-#
-#   Licensed under the Apache License, Version 2.0 (the "License");
-#   you may not use this file except in compliance with the License.
-#   You may obtain a copy of the License at
-#
-#       http://www.apache.org/licenses/LICENSE-2.0
-#
-#   Unless required by applicable law or agreed to in writing, software
-#   distributed under the License is distributed on an "AS IS" BASIS,
-#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#   See the License for the specific language governing permissions and
-#   limitations under the License.
-#==================================================================================
-#
-
-
-# For clarity: this generates object, not a lib as the CM command implies.
-#
-add_subdirectory(./model)
-#add_subdirectory(./clientapi)
-#add_subdirectory(./serverapi)
-
diff --git a/src/rest/model/ActionToBeSetup.h b/src/rest/model/ActionToBeSetup.h
deleted file mode 100644
index 6bb8d55..0000000
--- a/src/rest/model/ActionToBeSetup.h
+++ /dev/null
@@ -1,85 +0,0 @@
-#ifndef XAPP_MODEL_ActionToBeSetup_H
-#define XAPP_MODEL_ActionToBeSetup_H
-#include "ModelBase.h"
-#include "SubsequentAction.h"
-
-namespace xapp {
-namespace model {
-
-using namespace xapp::model;
-using ActionDefinition = std::vector<int>;
-
-struct ActionToBeSetup: ModelBase {
-    ActionDefinition m_ActionDefinition;
-    int ActionID;
-    std::string ActionType;
-    SubsequentAction m_SubsequentAction;
-
-    json validator_schema = R"(
-    {
-    "$schema": "http://json-schema.org/draft-07/schema#",
-    "title": "SubsequentAction",
-    "properties": {
-        "ActionDefinition": {
-            "description": "Action Definition",
-            "type": "array",
-            "items": {
-                "type": "integer"
-            }
-        },
-        "ActionID": {
-            "description": "Identification of Action",
-            "type": "integer",
-            "minimum": 0,
-            "maximum": 255
-        },
-        "ActionType": {
-            "description": "Type of Action",
-            "type": "string",
-            "enum": ["policy", "insert", "report"]
-        },
-        "SubsequentAction": {
-            "description": "Subsequent Action",
-            "type": "object"
-        }
-    },
-    "required": [
-                 "ActionDefinition",
-                 "ActionID",
-                 "ActionType",
-                 "SubsequentAction"
-                ],
-    "type": "object"
-    })"_json;
-
-    virtual json get_validator_schema() const { return validator_schema; }
-};
-
-void from_json(const json& j, ActionToBeSetup& ref) {
-
-    std::cout << __PRETTY_FUNCTION__ << std::endl;
-    ref.validate_json(j);
-    j.at("ActionDefinition").get_to(ref.m_ActionDefinition);
-    j.at("ActionID").get_to(ref.ActionID);
-    j.at("ActionType").get_to(ref.ActionType);
-    j.at("SubsequentAction").get_to(ref.m_SubsequentAction);
-
-}
-
-void to_json(json& j, const ActionToBeSetup& ref) {
-
-    j = json {
-        {"ActionDefinition", ref.m_ActionDefinition},
-        {"ActionID", ref.ActionID},
-        {"ActionType", ref.ActionType},
-        {"SubsequentAction", ref.m_SubsequentAction}
-    };
-}
-
-using ActionsToBeSetup = std::vector<ActionToBeSetup>;
-
-} /*namespace model*/
-} /*namespace xapp*/
-
-#endif /* XAPP_MODEL_ActionToBeSetup_H */
-
diff --git a/src/rest/model/CMakeLists.txt b/src/rest/model/CMakeLists.txt
deleted file mode 100644
index 932a93c..0000000
--- a/src/rest/model/CMakeLists.txt
+++ /dev/null
@@ -1,30 +0,0 @@
-# vim: sw=4 ts=4 noet:
-#
-#==================================================================================
-#   Copyright (c) 2020 Nokia
-#   Copyright (c) 2020 AT&T Intellectual Property.
-#
-#   Licensed under the Apache License, Version 2.0 (the "License");
-#   you may not use this file except in compliance with the License.
-#   You may obtain a copy of the License at
-#
-#       http://www.apache.org/licenses/LICENSE-2.0
-#
-#   Unless required by applicable law or agreed to in writing, software
-#   distributed under the License is distributed on an "AS IS" BASIS,
-#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#   See the License for the specific language governing permissions and
-#   limitations under the License.
-#==================================================================================
-#
-
-
-# For clarity: this generates object, not a lib as the CM command implies.
-#
-if( DEV_PKG )
-	install(
-		DIRECTORY ./ DESTINATION ${install_inc}
-		FILES_MATCHING PATTERN "*.h"
-	)
-endif()
-
diff --git a/src/rest/model/ConfigMetadata.h b/src/rest/model/ConfigMetadata.h
deleted file mode 100644
index a60bfb5..0000000
--- a/src/rest/model/ConfigMetadata.h
+++ /dev/null
@@ -1,54 +0,0 @@
-#ifndef XAPP_MODEL_ConfigMetadata_H
-#define XAPP_MODEL_ConfigMetadata_H
-
-#include "ModelBase.h"
-
-namespace xapp {
-namespace model {
-
-struct ConfigMetadata: ModelBase {
-    std::string ConfigType;
-    std::string XappName;
-    json validator_schema = R"(
-    {
-    "$schema": "http://json-schema.org/draft-07/schema#",
-    "title": "ConfigMetadata",
-    "properties": {
-        "ConfigType": {
-            "description": "Type of Config",
-            "type": "string",
-            "enum": ["json", "xml", "other"]
-        },
-        "XappName": {
-            "description": "Name of xApp",
-            "type": "string"
-        }
-    },
-    "required": [
-                 "ConfigType",
-                 "XappName"
-                 ],
-    "type": "object"
-    })"_json;
-
-    virtual json get_validator_schema() const { return validator_schema; }
-};
-
-void from_json(const json& j, ConfigMetadata& ref) {
-
-    std::cout << __func__ << " ConfigMetadata " << std::endl;
-    ref.validate_json(j);
-    j.at("ConfigType").get_to(ref.ConfigType);
-    j.at("XappName").get_to(ref.XappName);
-}
-
-void to_json(json& j, const ConfigMetadata& ref) {
-    j = json {
-        {"ConfigType",ref.ConfigType},
-        {"XappName", ref.XappName}
-    };
-}
-
-} /*namespace model*/
-} /*namespace xapp*/
-#endif /*XAPP_MODEL_ConfigMetadata_H*/
diff --git a/src/rest/model/ModelBase.h b/src/rest/model/ModelBase.h
deleted file mode 100644
index 159b772..0000000
--- a/src/rest/model/ModelBase.h
+++ /dev/null
@@ -1,66 +0,0 @@
-#ifndef XAPP_MODEL_ModelBase_H
-#define XAPP_MODEL_ModelBase_H
-#include <iostream>
-#include <string.h>
-#include <nlohmann/json.hpp>
-#include <nlohmann/json-schema.hpp>
-#include <type_traits>
-
-using nlohmann::json_schema::json_validator;
-using json = nlohmann::json;
-
-namespace xapp {
-namespace model {
-
-std::invalid_argument invalid_parameter("Invalid Json Input");
-
-template<typename ModelType>
-bool _validate(const ModelType model) {
-    json _json = model;
-    json_validator validator;
-    validator.set_root_schema(model.validator_schema);
-
-    try {
-        validator.validate(_json);
-    } catch (const std::exception& e) {
-        std::cerr << "Struct Validation failed, here is why: " << e.what() << "\n";
-        throw;
-    }
-    return true;
-}
-
-struct ModelBase {
-    json validator_schema = R"(
-    {
-        "$schema": "http://json-schema.org/draft-07/schema#",
-        "title": "ModelBase"
-    })"_json;
-
-    bool validate_() {
-        return _validate(std::move(*this));
-    }
-
-    void validate_json(const json& _json) {
-        json_validator validator;
-        validator.set_root_schema(get_validator_schema());
-        try {
-            validator.validate(_json);
-        } catch (const std::exception& e) {
-            throw;
-        }
-        return;
-    }
-
-    virtual json get_validator_schema() const { return validator_schema; }
-};
-
-void from_json(const json& j, ModelBase& ref) {
-    return;
-}
-void to_json(json& j, const ModelBase& ref) {
-    return;
-}
-
-} /*model*/
-} /*xapp*/
-#endif /*XAPP_MODEL_ModelBase_H*/
diff --git a/src/rest/model/RestModel.h b/src/rest/model/RestModel.h
deleted file mode 100644
index 266e221..0000000
--- a/src/rest/model/RestModel.h
+++ /dev/null
@@ -1,15 +0,0 @@
-#ifndef XAPP_MODEL_H
-#define XAPP_MODEL_H
-#include "ModelBase.h"
-#include "SubsequentAction.h"
-#include "ActionToBeSetup.h"
-#include "SubscriptionResponse.h"
-#include "ConfigMetadata.h"
-#include "SubscriptionDetail.h"
-#include "SubscriptionParams_ClientEndpoint.h"
-#include "SubscriptionParams_E2SubscriptionDirectives.h"
-#include "SubscriptionParams.h"
-#include "SubscriptionInstance.h"
-#include "SubscriptionData.h"
-
-#endif /*XAPP_MODEL_H*/
diff --git a/src/rest/model/SubscriptionData.h b/src/rest/model/SubscriptionData.h
deleted file mode 100644
index 008b72a..0000000
--- a/src/rest/model/SubscriptionData.h
+++ /dev/null
@@ -1,72 +0,0 @@
-#ifndef XAPP_MODEL_SubscriptionData_H
-#define XAPP_MODEL_SubscriptionData_H
-#include "ModelBase.h"
-#include "SubscriptionInstance.h"
-namespace xapp {
-namespace model {
-
-struct SubscriptionData: ModelBase {
-    std::vector<std::string> ClientEndpoint;
-    std::string Meid;
-    int SubscriptionID;
-    SubscriptionInstances m_SubscriptionInstances;
-
-    json validator_schema = R"(
-    {
-    "$schema": "http://json-schema.org/draft-07/schema#",
-    "title": "SubscriptionData",
-    "properties": {
-        "SubscriptionId": {
-            "type": "integer"
-        },
-        "Meid": {
-            "type": "string"
-        },
-        "ClientEndpoint": {
-            "type": "array",
-            "items": {
-                "type": "string"
-            }
-        },
-        "SubscriptionInstances": {
-            "type": "array"
-        }
-    },
-    "required": [
-                 "SubscriptionId",
-                 "Meid",
-                 "ClientEndpoint",
-                 "SubscriptionInstances"
-                 ],
-    "type": "object"
-    })"_json;
-
-    virtual json get_validator_schema() const { return validator_schema; }
-};
-
-void from_json(const json& j, SubscriptionData& ref) {
-
-    std::cout << __PRETTY_FUNCTION__ << std::endl;
-    ref.validate_json(j);
-
-    j.at("SubscriptionId").get_to(ref.SubscriptionID);
-    j.at("SubscriptionInstances").get_to(ref.m_SubscriptionInstances);
-    j.at("Meid").get_to(ref.Meid);
-    j.at("ClientEndpoint").get_to(ref.ClientEndpoint);
-}
-
-void to_json(json& j, const SubscriptionData& ref) {
-
-    j = json {
-        {"SubscriptionId",ref.SubscriptionID},
-        {"Meid",ref.Meid},
-        {"ClientEndpoint", ref.ClientEndpoint},
-        {"SubscriptionInstances", ref.m_SubscriptionInstances}
-    };
-}
-
-using SubscriptionList = std::vector<SubscriptionData>;
-
-} /*namespace model*/
-} /*namespace xapp*/
-#endif /*XAPP_MODEL_SubscriptionData_H*/
diff --git a/src/rest/model/SubscriptionDetail.h b/src/rest/model/SubscriptionDetail.h
deleted file mode 100644
index 1651619..0000000
--- a/src/rest/model/SubscriptionDetail.h
+++ /dev/null
@@ -1,71 +0,0 @@
-#ifndef XAPP_MODEL_SubscriptionDetail_H
-#define XAPP_MODEL_SubscriptionDetail_H
-#include "ModelBase.h"
-#include "ActionToBeSetup.h"
-
-namespace xapp {
-namespace model {
-
-using EventTriggerDefinition = std::vector<int>;
-
-struct SubscriptionDetail: ModelBase {
-    ActionsToBeSetup ActionToBeSetupList;
-    EventTriggerDefinition EventTriggers;
-    int XappEventInstanceID;
-    json validator_schema = R"(
-    {
-    "$schema": "http://json-schema.org/draft-07/schema#",
-    "title": "Subscription detail",
-    "properties": {
-        "XappEventInstanceId": {
-            "type": "integer",
-            "minimum": 0,
-            "maximum": 255
-        },
-        "EventTriggers": {
-            "description": "Identification of Action",
-            "type": "array",
-            "items": {
-                "type": "integer"
-            }
-        },
-        "ActionToBeSetupList": {
-            "type": "array"
-        }
-    },
-    "required": [
-                 "XappEventInstanceId",
-                 "EventTriggers",
-                 "ActionToBeSetupList"
-                ],
-    "type": "object"
-    })"_json;
-
-    virtual json get_validator_schema() const { return validator_schema; }
-
-};
-
-void from_json(const json& j, SubscriptionDetail& ref) {
-
-    std::cout << __PRETTY_FUNCTION__ << std::endl;
-    ref.validate_json(j);
-
-    j.at("XappEventInstanceId").get_to(ref.XappEventInstanceID);
-    j.at("EventTriggers").get_to(ref.EventTriggers);
-    j.at("ActionToBeSetupList").get_to(ref.ActionToBeSetupList);
-}
-
-void to_json(json& j, const SubscriptionDetail& ref) {
-
-    j = json {
-        {"XappEventInstanceId", ref.XappEventInstanceID},
-        {"EventTriggers", ref.EventTriggers},
-        {"ActionToBeSetupList", ref.ActionToBeSetupList},
-    };
-}
-
-using SubscriptionDetailsList = std::vector<SubscriptionDetail>;
-
-} /*namespace model*/
-} /*namespace xapp*/
-#endif /*XAPP_MODEL_SubscriptionDetail_H*/
diff --git a/src/rest/model/SubscriptionInstance.h b/src/rest/model/SubscriptionInstance.h
deleted file mode 100644
index f427e79..0000000
--- a/src/rest/model/SubscriptionInstance.h
+++ /dev/null
@@ -1,83 +0,0 @@
-#ifndef XAPP_MODEL_SubscriptionInstance_H
-#define XAPP_MODEL_SubscriptionInstance_H
-#include "ModelBase.h"
-
-namespace xapp {
-namespace model {
-
-struct SubscriptionInstance: ModelBase {
-    int E2EventInstanceID;
-    std::string ErrorCause;
-    std::string ErrorSource;
-    std::string TimeoutType;
-    int XappEventInstanceID;
-
-    json validator_schema = R"(
-    {
-    "$schema": "http://json-schema.org/draft-07/schema#",
-    "title": "SubscriptionInstance",
-    "description": "xApp service address and port",
-    "properties": {
-        "XappEventInstanceId": {
-            "type": "integer",
-            "minimum": 0,
-            "maximum": 65535
-        },
-        "E2EventInstanceId": {
-            "type": "integer",
-            "minimum": 0,
-            "maximum": 65535
-        },
-        "ErrorCause": {
-            "description": "Descriptive error cause. Empty string when no error.",
-            "type": "string"
-        },
-        "ErrorSource": {
-            "description": "Source of error cause.",
-            "type": "string",
-            "enum": ["SUBMGR", "RTMGR", "DBAAS", "ASN1", "E2Node"]
-        },
-        "TimeoutType": {
-            "description": "Type timeout. xApp should retry if timeout occurs.",
-            "type": "string",
-            "enum": ["E2-Timeout", "RTMGR-Timeout", "DBAAS-Timeout"]
-        }
-    },
-    "required": [
-                 "XappEventInstanceId",
-                 "E2EventInstanceId"
-                 ],
-    "type": "object"
-    })"_json;
-
-    virtual json get_validator_schema() const { return validator_schema; }
-};
-
-void from_json(const json& j, SubscriptionInstance& ref) {
-
-    std::cout << __PRETTY_FUNCTION__ << std::endl;
-    ref.validate_json(j);
-
-    j.at("XappEventInstanceId").get_to(ref.XappEventInstanceID);
-    j.at("E2EventInstanceId").get_to(ref.E2EventInstanceID);
-    j.at("ErrorCause").get_to(ref.ErrorCause);
-    j.at("ErrorSource").get_to(ref.ErrorSource);
-    j.at("TimeoutType").get_to(ref.TimeoutType);
-}
-
-void to_json(json& j, const SubscriptionInstance& ref) {
-
-    j = json {
-        {"XappEventInstanceId", ref.XappEventInstanceID},
-        {"E2EventInstanceId", ref.E2EventInstanceID},
-        {"ErrorCause", ref.ErrorCause},
-        {"ErrorSource", ref.ErrorSource},
-        {"TimeoutType", ref.TimeoutType}
-    };
-}
-
-using SubscriptionInstances = std::vector<SubscriptionInstance>;
-
-} /*namespace model*/
-} /*namespace xapp*/
-#endif /*XAPP_MODEL_SubscriptionInstance_H*/
diff --git a/src/rest/model/SubscriptionParams.h b/src/rest/model/SubscriptionParams.h
deleted file mode 100644
index cc19750..0000000
--- a/src/rest/model/SubscriptionParams.h
+++ /dev/null
@@ -1,86 +0,0 @@
-#ifndef XAPP_MODEL_SubscriptionParams_H
-#define XAPP_MODEL_SubscriptionParams_H
-#include "ModelBase.h"
-#include "SubscriptionDetail.h"
-#include "SubscriptionParams_ClientEndpoint.h"
-#include "SubscriptionParams_E2SubscriptionDirectives.h"
-
-namespace xapp {
-namespace model {
-
-struct SubscriptionParams: public ModelBase {
-
-    SubscriptionParams_ClientEndpoint ClientEndpoint;
-    SubscriptionParams_E2SubscriptionDirectives E2SubscriptionDirectives;
-    std::string Meid;
-    int RANFunctionID;
-    std::string SubscriptionID;
-    SubscriptionDetailsList m_SubscriptionDetailsList;
-
-    json validator_schema = R"(
-    {
-    "$schema": "http://json-schema.org/draft-07/schema#",
-    "title": "SubscriptionParams",
-    "properties": {
-        "SubscriptionId": {
-            "description": "Optional subscription ID '(Submgr allocates if not given)'",
-            "type": "string"
-        },
-        "Meid": {
-            "type": "string"
-        },
-        "RANFunctionId": {
-            "type": "integer",
-            "minimum": 0,
-            "maximum": 4095
-        }
-    },
-    "required": [
-                 "ClientEndpoint",
-                 "Meid",
-                 "RANFunctionId",
-                 "SubscriptionDetails"
-                ],
-    "type": "object"
-    })"_json;
-
-    virtual json get_validator_schema() const { return validator_schema; }
-
-};
-
-void from_json(const json& j, SubscriptionParams& ref) {
-
-    std::cout << __PRETTY_FUNCTION__ << std::endl;
-    ref.validate_json(j);
-    j.at("ClientEndpoint").get_to(ref.ClientEndpoint);
-
-    if (j.contains("E2SubscriptionDirectives"))
-    {
-        j.at("E2SubscriptionDirectives").get_to(ref.E2SubscriptionDirectives);
-    }
-
-    if (j.contains("SubscriptionId"))
-    {
-        j.at("SubscriptionId").get_to(ref.SubscriptionID);
-    }
-
-    j.at("Meid").get_to(ref.Meid);
-    j.at("RANFunctionId").get_to(ref.RANFunctionID);
-    j.at("SubscriptionDetails").get_to(ref.m_SubscriptionDetailsList);
-}
-
-void to_json(json& j, const SubscriptionParams& ref) {
-
-    j = json {
-        {"ClientEndpoint", ref.ClientEndpoint},
-        {"E2SubscriptionDirectives", ref.E2SubscriptionDirectives},
-        {"Meid", ref.Meid},
-        {"RANFunctionId", ref.RANFunctionID},
-        {"SubscriptionId", ref.SubscriptionID},
-        {"SubscriptionDetails", ref.m_SubscriptionDetailsList},
-    };
-}
-
-} /*namespace model*/
-} /*namespace xapp*/
-#endif /*XAPP_MODEL_SubscriptionParams_H*/
diff --git a/src/rest/model/SubscriptionParams_ClientEndpoint.h b/src/rest/model/SubscriptionParams_ClientEndpoint.h
deleted file mode 100644
index 3d43997..0000000
--- a/src/rest/model/SubscriptionParams_ClientEndpoint.h
+++ /dev/null
@@ -1,65 +0,0 @@
-#ifndef XAPP_MODEL_SubscriptionParams_ClientEndpoint_H
-#define XAPP_MODEL_SubscriptionParams_ClientEndpoint_H
-#include "ModelBase.h"
-
-namespace xapp {
-namespace model {
-
-struct SubscriptionParams_ClientEndpoint: ModelBase {
-    int HTTPPort;
-    std::string Host;
-    int RMRPort;
-    json validator_schema = R"(
-    {
-    "$schema": "http://json-schema.org/draft-07/schema#",
-    "title": "SubscriptionParams_ClientEndpoint",
-    "description": "xApp service address and port",
-    "properties": {
-        "HTTPPort": {
-            "description": "xApp HTTP service address port",
-            "type": "integer",
-            "minimum": 0,
-            "maximum": 65535
-        },
-        "Host": {
-            "description": "xApp service address name like service-ricxapp-xappname-http.ricxapp",
-            "type": "string"
-        },
-        "RMRPort": {
-            "description": "xApp RMR service address port",
-            "type": "integer",
-            "minimum": 0,
-            "maximum": 65535
-        }
-    },
-    "required": [
-                 "HTTPPort",
-                 "Host",
-                 "RMRPort"
-                 ],
-    "type": "object"
-    })"_json;
-
-    virtual json get_validator_schema() const { return validator_schema; }
-};
-
-void from_json(const json& j, SubscriptionParams_ClientEndpoint& ref) {
-
-    std::cout << __PRETTY_FUNCTION__ << std::endl;
-    ref.validate_json(j);
-    j.at("HTTPPort").get_to(ref.HTTPPort);
-    j.at("Host").get_to(ref.Host);
-    j.at("RMRPort").get_to(ref.RMRPort);
-}
-
-void to_json(json& j, const SubscriptionParams_ClientEndpoint& ref) {
-    j = json {
-        {"HTTPPort", ref.HTTPPort},
-        {"Host", ref.Host},
-        {"RMRPort", ref.RMRPort},
-    };
-}
-
-} /*namespace model*/
-} /*namespace xapp*/
-#endif /*XAPP_MODEL_SubscriptionParams_ClientEndpoint_H*/
diff --git a/src/rest/model/SubscriptionParams_E2SubscriptionDirectives.h b/src/rest/model/SubscriptionParams_E2SubscriptionDirectives.h
deleted file mode 100644
index a0f783c..0000000
--- a/src/rest/model/SubscriptionParams_E2SubscriptionDirectives.h
+++ /dev/null
@@ -1,66 +0,0 @@
-#ifndef XAPP_MODEL_SubscriptionParams_E2SubscriptionDirectives_H
-#define XAPP_MODEL_SubscriptionParams_E2SubscriptionDirectives_H
-#include "ModelBase.h"
-
-namespace xapp {
-namespace model {
-
-struct SubscriptionParams_E2SubscriptionDirectives: ModelBase {
-    int E2RetryCount;
-    int E2TimeoutTimerValue;
-    bool RMRRoutingNeeded;
-    json validator_schema = R"(
-    {
-    "$schema": "http://json-schema.org/draft-07/schema#",
-    "title": "SubscriptionParams_E2SubscriptionDirectives",
-    "description": "Optional. If not set Submgr uses its default values",
-    "properties": {
-        "E2RetryCount": {
-            "description": "How many times E2 subscription request is retried",
-            "type": "integer",
-            "minimum": 0,
-            "maximum": 10
-        },
-        "E2TimeoutTimerValue": {
-            "description": "How long time response is waited from E2 node",
-            "type": "integer",
-            "minimum": 0,
-            "maximum": 10
-        },
-        "RMRRoutingNeeded": {
-            "description": "Subscription needs RMR route from E2Term to xApp",
-            "type": "boolean"
-        }
-    },
-    "required": [
-                 "E2TimeoutTimerValue",
-                 "E2RetryCount",
-                 "RMRRoutingNeeded"
-                ],
-    "type": "object"
-    })"_json;
-
-    virtual json get_validator_schema() const { return validator_schema; }
-};
-
-void from_json(const json& j, SubscriptionParams_E2SubscriptionDirectives& ref) {
-
-    std::cout << __PRETTY_FUNCTION__ << std::endl;
-
-    j.at("E2RetryCount").get_to(ref.E2RetryCount);
-    j.at("E2TimeoutTimerValue").get_to(ref.E2TimeoutTimerValue);
-    j.at("RMRRoutingNeeded").get_to(ref.RMRRoutingNeeded);
-}
-
-void to_json(json& j, const SubscriptionParams_E2SubscriptionDirectives& ref) {
-
-    j = json {
-        {"E2RetryCount", ref.E2RetryCount},
-        {"E2TimeoutTimerValue", ref.E2TimeoutTimerValue},
-        {"RMRRoutingNeeded", ref.RMRRoutingNeeded},
-    };
-}
-
-} /*namespace model*/
-} /*namespace xapp*/
-#endif /*XAPP_MODEL_SubscriptionParams_ClientEndpoint_H*/
diff --git a/src/rest/model/SubscriptionResponse.h b/src/rest/model/SubscriptionResponse.h
deleted file mode 100644
index 3d8e8d4..0000000
--- a/src/rest/model/SubscriptionResponse.h
+++ /dev/null
@@ -1,56 +0,0 @@
-#ifndef XAPP_MODEL_SubscriptionResponse_H
-#define XAPP_MODEL_SubscriptionResponse_H
-#include "ModelBase.h"
-#include "SubscriptionInstance.h"
-
-namespace xapp {
-namespace model {
-
-struct SubscriptionResponse: ModelBase {
-    int SubscriptionID;
-    SubscriptionInstances m_SubscriptionInstances;
-
-    json validator_schema = R"(
-    {
-    "$schema": "http://json-schema.org/draft-07/schema#",
-    "title": "SubscriptionResponse",
-    "properties": {
-        "SubscriptionId": {
-            "description": "Indentification of Subscription",
-            "type": "integer"
-        },
-        "SubscriptionInstances": {
-            "description": "List of Subscription Instance",
-            "type": "array"
-        }
-    },
-    "required": [
-                 "SubscriptionId",
-                 "SubscriptionInstances"
-                 ],
-    "type": "object"
-    })"_json;
-
-    virtual json get_validator_schema() const { return validator_schema; }
-};
-
-void from_json(const json& j, SubscriptionResponse& ref) {
-
-    std::cout << __PRETTY_FUNCTION__ << std::endl;
-    ref.validate_json(j);
-
-    j.at("SubscriptionId").get_to(ref.SubscriptionID);
-    j.at("SubscriptionInstances").get_to(ref.m_SubscriptionInstances);
-}
-
-void to_json(json& j, const SubscriptionResponse& ref) {
-
-    j = json {
-        {"SubscriptionId",ref.SubscriptionID},
-        {"SubscriptionInstances", ref.m_SubscriptionInstances}
-    };
-}
-
-} /*model*/
-} /*xapp*/
-#endif /*XAPP_MODEL_SubscriptionResponse_H*/
diff --git a/src/rest/model/SubsequentAction.h b/src/rest/model/SubsequentAction.h
deleted file mode 100644
index 0943579..0000000
--- a/src/rest/model/SubsequentAction.h
+++ /dev/null
@@ -1,59 +0,0 @@
-#ifndef XAPP_MODEL_SubsequentAction_H
-#define XAPP_MODEL_SubsequentAction_H
-#include "ModelBase.h"
-
-namespace xapp {
-namespace model {
-
-struct SubsequentAction: ModelBase {
-    std::string SubsequentActionType;
-    std::string TimeToWait;
-    json validator_schema = R"(
-    {
-    "$schema": "http://json-schema.org/draft-07/schema#",
-    "title": "SubsequentAction",
-    "properties": {
-        "SubsequentActionType": {
-            "description": "Type of Subsequent Action",
-            "type": "string",
-            "enum": ["wait", "continue"]
-
-        },
-        "TimeToWait": {
-            "description": "Time to waiting",
-            "type": "string",
-            "enum": ["zero", "w1ms", "w2ms", "w5ms", "w10ms", "w20ms", "w30ms",
-                    "w40ms", "w50ms", "w100ms", "w200ms", "w500ms", "w1s",
-                    "w2s", "w5s", "w10s", "w20s", "w60s"]
-        }
-    },
-    "required": [
-                 "SubsequentActionType",
-                 "TimeToWait"
-                 ],
-    "type": "object"
-    })"_json;
-
-    virtual json get_validator_schema() const { return validator_schema; }
-};
-
-void from_json(const json& j, SubsequentAction& ref) {
-
-    std::cout << __PRETTY_FUNCTION__ << "\n";
-    ref.validate_json(j);
-
-    j.at("SubsequentActionType").get_to(ref.SubsequentActionType);
-    j.at("TimeToWait").get_to(ref.TimeToWait);
-}
-
-void to_json(json& j, const SubsequentAction& ref) {
-
-    j = json {
-        {"SubsequentActionType",ref.SubsequentActionType},
-        {"TimeToWait", ref.TimeToWait}
-    };
-}
-
-} /*model*/
-} /*xapp*/
-#endif /*XAPP_MODEL_SubsequentAction_H*/
diff --git a/test/Makefile b/test/Makefile
index 7be7eee..ed36205 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -2,7 +2,7 @@
 coverage_opts = -ftest-coverage -fprofile-arcs
 
 binaries = unit_test jhash_test config_test metrics_test
-include = -I ../src/xapp -I ../src/alarm -I ../src/messaging  -I  ../src/config -I ../ext/jsmn  -I  ../src/json -I ../src/metrics
+include = -I ../src/xapp -I ../src/alarm -I ../src/messaging  -I  ../src/config -I ../ext/jsmn  -I  ../src/json -I ../src/metrics  -I ../src/model -I ../src/rest-client -I ../src/rest-server
 
 tests::	$(binaries)
 
@@ -14,7 +14,7 @@
 # emulate (and don't need to)
 #
 unit_test:: unit_test.cpp rmr_em.o
-	g++ -g $(coverage_opts) $(include) unit_test.cpp -o unit_test -L../.build -lricxfcpp rmr_em.o  -lrmr_si -lpthread
+	g++ -g $(coverage_opts) $(include) unit_test.cpp -o unit_test -L../.build -lricxfcpp rmr_em.o  -lrmr_si -lpthread -lm -lboost_system -lcrypto -lssl -lcpprest -lpistache -lnlohmann_json_schema_validator
 
 # build a special jwrapper object with coverage settings
 jwrapper_test.o:: ../src/json/jwrapper.c ../src/json/jwrapper.h
@@ -22,13 +22,13 @@
 
 jhash_test:: jwrapper_test.o jhash_test.cpp
 	# do NOT link the xapp lib; we include all modules in the test programme
-	g++ -g $(coverage_opts) -I ../src/json -I ../ext/jsmn jhash_test.cpp -o jhash_test jwrapper_test.o -lrmr_si -lpthread
+	g++ -g $(coverage_opts) -I ../src/json -I ../ext/jsmn jhash_test.cpp -o jhash_test jwrapper_test.o -lrmr_si -lpthread -lm -lboost_system -lcrypto -lssl -lcpprest -lpistache -lnlohmann_json_schema_validator
 
 metrics_test:: metrics_test.cpp rmr_em.o
-	g++ -g $(coverage_opts) $(include) metrics_test.cpp -o metrics_test -L../.build -lricxfcpp rmr_em.o -l rmr_si -lpthread
+	g++ -g $(coverage_opts) $(include) metrics_test.cpp -o metrics_test -L../.build -lricxfcpp rmr_em.o -l rmr_si -lpthread -lm -lboost_system -lcrypto -lssl -lcpprest -lpistache -lnlohmann_json_schema_validator
 
 config_test:: config_test.cpp jwrapper_test.o
-	g++ -g $(coverage_opts) $(include) config_test.cpp -o config_test jwrapper_test.o -lricxfcpp -lrmr_si -lpthread
+	g++ -g $(coverage_opts) $(include) config_test.cpp -o config_test jwrapper_test.o -lricxfcpp -lrmr_si -lpthread -lm -lboost_system -lcrypto -lssl -lcpprest -lpistache -lnlohmann_json_schema_validator
 
 # prune gcov files generated by system include files
 clean::
@@ -38,3 +38,4 @@
 nuke::
 	rm -f *.a *.o *.gcov *.gcda *.gcno core a.out $(binaries)
 
+
