diff --git a/components/sms-mgt/io.entgra.sms.mgt.api/pom.xml b/components/sms-mgt/io.entgra.sms.mgt.api/pom.xml
new file mode 100644
index 00000000000..587153c06dc
--- /dev/null
+++ b/components/sms-mgt/io.entgra.sms.mgt.api/pom.xml
@@ -0,0 +1,224 @@
+
+
+
+
+
+
+ org.wso2.carbon.devicemgt
+ sms-mgt
+ 4.1.12-SNAPSHOT
+ ../pom.xml
+
+
+ 4.0.0
+ io.entgra.sms.mgt.api
+ war
+ Entgra IoT - SMS Management Core
+ Entgra IoT - SMS Management API
+ http://entgra.io
+
+
+
+
+ maven-compiler-plugin
+
+
+ 1.8
+
+
+
+ maven-war-plugin
+
+ WEB-INF/lib/*cxf*.jar
+ api#sms-mgt#v1.0
+
+
+
+ org.jacoco
+ jacoco-maven-plugin
+
+ ${basedir}/target/coverage-reports/jacoco-unit.exec
+
+
+
+ jacoco-initialize
+
+ prepare-agent
+
+
+
+ jacoco-site
+ test
+
+ report
+
+
+ ${basedir}/target/coverage-reports/jacoco-unit.exec
+ ${basedir}/target/coverage-reports/site
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-surefire-plugin
+
+
+ file:src/test/resources/log4j.properties
+
+
+ src/test/resources/testng.xml
+
+
+
+
+
+
+
+
+ deploy
+
+ compile
+
+
+ org.apache.maven.plugins
+ maven-antrun-plugin
+ 1.7
+
+
+ compile
+
+ run
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ client
+
+ test
+
+
+ org.codehaus.mojo
+ exec-maven-plugin
+ 1.2.1
+
+
+ test
+
+ java
+
+
+
+
+
+
+
+
+
+
+
+ org.apache.cxf
+ cxf-rt-frontend-jaxws
+ provided
+
+
+ org.apache.cxf
+ cxf-rt-frontend-jaxrs
+ provided
+
+
+ org.apache.cxf
+ cxf-rt-transports-http
+ provided
+
+
+ javax.servlet
+ javax.servlet-api
+ provided
+
+
+ javax.ws.rs
+ javax.ws.rs-api
+ provided
+
+
+ io.swagger
+ swagger-annotations
+
+
+ io.swagger
+ swagger-jaxrs
+
+
+ com.fasterxml.jackson.module
+ jackson-module-jaxb-annotations
+
+
+ org.slf4j
+ slf4j-api
+
+
+ org.wso2.orbit.com.fasterxml.jackson.core
+ jackson-core
+
+
+
+
+ org.wso2.carbon.devicemgt
+ org.wso2.carbon.apimgt.annotations
+ provided
+
+
+ org.wso2.carbon
+ org.wso2.carbon.logging
+ provided
+
+
+ org.wso2.carbon.devicemgt
+ org.wso2.carbon.device.mgt.common
+ provided
+
+
+ org.wso2.carbon.devicemgt
+ io.entgra.sms.mgt.core
+ provided
+
+
+ org.wso2.carbon.devicemgt
+ io.entgra.sms.mgt.common
+ provided
+
+
+
+
diff --git a/components/sms-mgt/io.entgra.sms.mgt.api/src/main/java/io/entgra/sms/mgt/api/service/ConfigurationManagementService.java b/components/sms-mgt/io.entgra.sms.mgt.api/src/main/java/io/entgra/sms/mgt/api/service/ConfigurationManagementService.java
new file mode 100644
index 00000000000..d987b8149cc
--- /dev/null
+++ b/components/sms-mgt/io.entgra.sms.mgt.api/src/main/java/io/entgra/sms/mgt/api/service/ConfigurationManagementService.java
@@ -0,0 +1,118 @@
+/*
+ * Copyright (c) 2021, Entgra (Pvt) Ltd. (http://www.entgra.io) All Rights Reserved.
+ *
+ * Entgra (Pvt) Ltd. licenses this file to you 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.
+ */
+
+package io.entgra.sms.mgt.api.service;
+
+import io.entgra.sms.mgt.common.SMSMgtConstants;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiResponse;
+import io.swagger.annotations.ApiResponses;
+import io.swagger.annotations.Extension;
+import io.swagger.annotations.ExtensionProperty;
+import io.swagger.annotations.Info;
+import io.swagger.annotations.ResponseHeader;
+import io.swagger.annotations.SwaggerDefinition;
+import io.swagger.annotations.Tag;
+import org.wso2.carbon.apimgt.annotations.api.Scope;
+import org.wso2.carbon.apimgt.annotations.api.Scopes;
+
+import javax.ws.rs.Consumes;
+import javax.ws.rs.GET;
+import javax.ws.rs.Path;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+
+@SwaggerDefinition(
+ info = @Info(
+ version = "1.0.0",
+ title = "",
+ extensions = {
+ @Extension(properties = {
+ @ExtensionProperty(name = "name", value = "ConfigurationManagementService"),
+ @ExtensionProperty(name = "context", value = "/api/sms-mgt/v1.0/configuration"),
+ })
+ }
+ ),
+ tags = {
+ @Tag(name = "sms_management", description = "")
+ }
+)
+@Path("/configuration")
+@Api(value = "Configuration Management", description = "The general SMS configuration management capabilities " +
+ "are exposed through this API.")
+@Produces(MediaType.APPLICATION_JSON)
+@Consumes(MediaType.APPLICATION_JSON)
+@Scopes(scopes = {
+ @Scope(
+ name = "View configurations",
+ description = "",
+ key = "perm:sms-mgt:view-configuration",
+ permissions = {"/sms-mgt/platform-configurations/view"}
+ )
+})
+public interface ConfigurationManagementService {
+
+ @GET
+ @ApiOperation(
+ produces = MediaType.APPLICATION_JSON,
+ httpMethod = "GET",
+ value = "Reload SMS Configuration",
+ notes = "Reload SMS Configuration in sms-mgt.xml file",
+ tags = "SMS Configuration Management",
+ extensions = {
+ @Extension(properties = {
+ @ExtensionProperty(name = SMSMgtConstants.SCOPE, value = "perm:sms-mgt:view-configuration")
+ })
+ }
+ )
+ @ApiResponses(
+ value = {
+ @ApiResponse(
+ code = 200,
+ message = "OK. \n Successfully reloaded SMS configurations.",
+ responseContainer = "List",
+ responseHeaders = {
+ @ResponseHeader(
+ name = "Content-Type",
+ description = "The content type of the body"),
+ @ResponseHeader(
+ name = "ETag",
+ description = "Entity Tag of the response resource.\n" +
+ "Used by caches, or in conditional requests."),
+ @ResponseHeader(
+ name = "Last-Modified",
+ description = "Date and time the resource has been modified the last time.\n" +
+ "Used by caches, or in conditional requests."),
+ }
+ ),
+ @ApiResponse(
+ code = 304,
+ message = "Not Modified. \n Empty body because the client already has the latest "
+ + "version of the requested resource."),
+ @ApiResponse(
+ code = 406,
+ message = "Not Acceptable.\n The requested media type is not supported."),
+ @ApiResponse(
+ code = 500,
+ message = "Internal Server Error. \n Server error occurred while fetching the general " +
+ "platform configurations.")
+ })
+ Response reloadConfiguration();
+}
diff --git a/components/sms-mgt/io.entgra.sms.mgt.api/src/main/java/io/entgra/sms/mgt/api/service/addons/ApiOriginFilter.java b/components/sms-mgt/io.entgra.sms.mgt.api/src/main/java/io/entgra/sms/mgt/api/service/addons/ApiOriginFilter.java
new file mode 100644
index 00000000000..461a1574ef8
--- /dev/null
+++ b/components/sms-mgt/io.entgra.sms.mgt.api/src/main/java/io/entgra/sms/mgt/api/service/addons/ApiOriginFilter.java
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2021, Entgra (Pvt) Ltd. (http://www.entgra.io) All Rights Reserved.
+ *
+ * Entgra (Pvt) Ltd. licenses this file to you 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.
+ */
+
+package io.entgra.sms.mgt.api.service.addons;
+
+import javax.servlet.Filter;
+import javax.servlet.FilterChain;
+import javax.servlet.FilterConfig;
+import javax.servlet.ServletException;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+
+public class ApiOriginFilter implements Filter {
+
+ public void doFilter(ServletRequest request, ServletResponse response,
+ FilterChain chain) throws IOException, ServletException {
+ HttpServletResponse res = (HttpServletResponse) response;
+ res.addHeader("Access-Control-Allow-Origin", "*");
+ res.addHeader("Access-Control-Allow-Methods", "GET, POST, DELETE, PUT");
+ res.addHeader("Access-Control-Allow-Headers", "Content-Type");
+ chain.doFilter(request, response);
+ }
+
+ public void destroy() {
+ //do nothing
+ }
+
+ public void init(FilterConfig filterConfig) throws ServletException {
+ //do nothing
+ }
+}
diff --git a/components/sms-mgt/io.entgra.sms.mgt.api/src/main/java/io/entgra/sms/mgt/api/service/addons/GsonMessageBodyHandler.java b/components/sms-mgt/io.entgra.sms.mgt.api/src/main/java/io/entgra/sms/mgt/api/service/addons/GsonMessageBodyHandler.java
new file mode 100644
index 00000000000..6a6a640b369
--- /dev/null
+++ b/components/sms-mgt/io.entgra.sms.mgt.api/src/main/java/io/entgra/sms/mgt/api/service/addons/GsonMessageBodyHandler.java
@@ -0,0 +1,85 @@
+/*
+ * Copyright (c) 2021, Entgra (Pvt) Ltd. (http://www.entgra.io) All Rights Reserved.
+ *
+ * Entgra (Pvt) Ltd. licenses this file to you 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.
+ */
+
+package io.entgra.sms.mgt.api.service.addons;
+
+import com.google.gson.Gson;
+import com.google.gson.GsonBuilder;
+
+import javax.ws.rs.WebApplicationException;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.MultivaluedMap;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.OutputStream;
+import java.io.OutputStreamWriter;
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Type;
+
+public class GsonMessageBodyHandler {
+
+ public static final String DATE_FORMAT = "EEE, d MMM yyyy HH:mm:ss Z";
+ private Gson gson;
+ private static final String UTF_8 = "UTF-8";
+
+ public boolean isReadable(Class> aClass, Type type, Annotation[] annotations, MediaType mediaType) {
+ return true;
+ }
+
+ private Gson getGson() {
+ if (gson == null) {
+ final GsonBuilder gsonBuilder = new GsonBuilder();
+ gson = gsonBuilder.setDateFormat(DATE_FORMAT).create();
+ }
+ return gson;
+ }
+
+ public Object readFrom(Class