diff --git a/cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/config/NetworkCmProxyConfig.java b/cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/config/NetworkCmProxyConfig.java
new file mode 100644
index 0000000..300765d
--- /dev/null
+++ b/cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/config/NetworkCmProxyConfig.java
@@ -0,0 +1,47 @@
+/*-
+ * ============LICENSE_START=======================================================
+ *  Copyright (C) 2021 Pantheon.tech
+ *  Modifications (C) 2021 Nordix Foundation
+ * ================================================================================
+ * 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.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.cps.ncmp.config;
+
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import springfox.documentation.builders.PathSelectors;
+import springfox.documentation.builders.RequestHandlerSelectors;
+import springfox.documentation.spi.DocumentationType;
+import springfox.documentation.spring.web.plugins.Docket;
+
+@Configuration
+public class NetworkCmProxyConfig {
+
+    /**
+     * Swagger-ui configuration.
+     */
+    @Bean("ncmp-docket")
+    public Docket api() {
+        return new Docket(DocumentationType.OAS_30)
+            .groupName("ncmp-docket")
+            .select()
+            .apis(RequestHandlerSelectors.any())
+            .paths(PathSelectors.any())
+            .build();
+    }
+
+}
\ No newline at end of file
diff --git a/cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/controller/NetworkCmProxyController.java b/cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/controller/NetworkCmProxyController.java
new file mode 100644
index 0000000..acbbdd9
--- /dev/null
+++ b/cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/controller/NetworkCmProxyController.java
@@ -0,0 +1,85 @@
+/*
+ *  ============LICENSE_START=======================================================
+ *  Copyright (C) 2021 Pantheon.tech
+ *  Modifications (C) 2021 Nordix Foundation
+ *  Modification Copyright (C) 2021 highstreet technologies GmbH
+ *  ================================================================================
+ *  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.
+ *
+ *  SPDX-License-Identifier: Apache-2.0
+ *  ============LICENSE_END=========================================================
+ */
+
+package org.onap.cps.ncmp.rest.controller;
+
+import com.google.gson.Gson;
+import com.google.gson.GsonBuilder;
+import java.util.Collection;
+import javax.validation.Valid;
+import org.onap.cps.ncmp.api.NetworkCmProxyDataService;
+import org.onap.cps.ncmp.rest.api.NetworkCmProxyApi;
+import org.onap.cps.spi.FetchDescendantsOption;
+import org.onap.cps.spi.model.DataNode;
+import org.onap.cps.utils.DataMapUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+
+@RestController
+@RequestMapping("${rest.api.ncmp-base-path}")
+public class NetworkCmProxyController implements NetworkCmProxyApi {
+
+    private static final Gson GSON = new GsonBuilder().create();
+    private static final String XPATH_ROOT = "/";
+
+    @Autowired
+    private NetworkCmProxyDataService networkCmProxyDataService;
+
+    @Override
+    public ResponseEntity<Object> getNodeByCmHandleAndXpath(final String cmHandle, @Valid final String xpath,
+        @Valid final Boolean includeDescendants) {
+        if (XPATH_ROOT.equals(xpath)) {
+            return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
+        }
+        final FetchDescendantsOption fetchDescendantsOption = Boolean.TRUE.equals(includeDescendants)
+            ? FetchDescendantsOption.INCLUDE_ALL_DESCENDANTS : FetchDescendantsOption.OMIT_DESCENDANTS;
+        final DataNode dataNode = networkCmProxyDataService.getDataNode(cmHandle, xpath, fetchDescendantsOption);
+        return new ResponseEntity<>(DataMapUtils.toDataMap(dataNode), HttpStatus.OK);
+    }
+
+    @Override
+    public ResponseEntity<Object> queryNodesByCmHandleAndCpsPath(final String cmHandle, @Valid final String cpsPath,
+        @Valid final Boolean includeDescendants) {
+        final FetchDescendantsOption fetchDescendantsOption = Boolean.TRUE.equals(includeDescendants)
+            ? FetchDescendantsOption.INCLUDE_ALL_DESCENDANTS : FetchDescendantsOption.OMIT_DESCENDANTS;
+        final Collection<DataNode> dataNodes =
+            networkCmProxyDataService.queryDataNodes(cmHandle, cpsPath, fetchDescendantsOption);
+        return new ResponseEntity<>(GSON.toJson(dataNodes), HttpStatus.OK);
+    }
+
+    @Override
+    public ResponseEntity<Object> replaceNode(@Valid final String jsonData, final String cmHandle,
+        @Valid final String parentNodeXpath) {
+        networkCmProxyDataService.replaceNodeTree(cmHandle, parentNodeXpath, jsonData);
+        return new ResponseEntity<>(HttpStatus.OK);
+    }
+
+    @Override
+    public ResponseEntity<Object> updateNodeLeaves(@Valid final String jsonData, final String cmHandle,
+        @Valid final String parentNodeXpath) {
+        networkCmProxyDataService.updateNodeLeaves(cmHandle, parentNodeXpath, jsonData);
+        return new ResponseEntity<>(HttpStatus.OK);
+    }
+}
diff --git a/cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/exceptions/NetworkCmProxyRestExceptionHandler.java b/cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/exceptions/NetworkCmProxyRestExceptionHandler.java
new file mode 100755
index 0000000..bb922e7
--- /dev/null
+++ b/cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/exceptions/NetworkCmProxyRestExceptionHandler.java
@@ -0,0 +1,71 @@
+/*
+ *  ============LICENSE_START=======================================================
+ *  Copyright (C) 2021 Pantheon.tech
+ *  ================================================================================
+ *  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.
+ *
+ *  SPDX-License-Identifier: Apache-2.0
+ *  ============LICENSE_END=========================================================
+ */
+
+package org.onap.cps.ncmp.rest.exceptions;
+
+import lombok.AccessLevel;
+import lombok.NoArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+import org.onap.cps.ncmp.rest.controller.NetworkCmProxyController;
+import org.onap.cps.ncmp.rest.model.ErrorMessage;
+import org.onap.cps.spi.exceptions.CpsException;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.bind.annotation.ExceptionHandler;
+import org.springframework.web.bind.annotation.RestControllerAdvice;
+
+/**
+ * Exception handler with error message return.
+ */
+@Slf4j
+@NoArgsConstructor(access = AccessLevel.PRIVATE)
+@RestControllerAdvice(assignableTypes = {NetworkCmProxyController.class})
+public class NetworkCmProxyRestExceptionHandler {
+
+    private static final String CHECK_LOGS_FOR_DETAILS = "Check logs for details.";
+
+    /**
+     * Default exception handler.
+     *
+     * @param exception the exception to handle
+     * @return response with response code 500.
+     */
+    @ExceptionHandler
+    public static ResponseEntity<Object> handleInternalServerErrorExceptions(
+        final Exception exception) {
+        return buildErrorResponse(HttpStatus.INTERNAL_SERVER_ERROR, exception);
+    }
+
+    @ExceptionHandler({CpsException.class})
+    public static ResponseEntity<Object> handleAnyOtherCpsExceptions(final CpsException exception) {
+        return buildErrorResponse(HttpStatus.INTERNAL_SERVER_ERROR, exception);
+    }
+
+    private static ResponseEntity<Object> buildErrorResponse(final HttpStatus status, final Exception exception) {
+        if (exception.getCause() != null || !(exception instanceof CpsException)) {
+            log.error("Exception occurred", exception);
+        }
+        final ErrorMessage errorMessage = new ErrorMessage();
+        errorMessage.setStatus(status.toString());
+        errorMessage.setMessage(exception.getMessage());
+        errorMessage.setDetails(exception instanceof CpsException ? ((CpsException) exception).getDetails() :
+            CHECK_LOGS_FOR_DETAILS);
+        return new ResponseEntity<>(errorMessage, status);
+    }
+}
diff --git a/cps-ncmp-rest/src/main/resources/openapi-configuration.json b/cps-ncmp-rest/src/main/resources/openapi-configuration.json
new file mode 100644
index 0000000..5736c3d
--- /dev/null
+++ b/cps-ncmp-rest/src/main/resources/openapi-configuration.json
@@ -0,0 +1,28 @@
+{
+    "resourcePackages": [
+        "org.onap.cps.ncmp.rest.controller"
+    ],
+    "prettyPrint": true,
+    "cacheTTL": 0,
+    "openAPI": {
+        "info": {
+            "title": "ONAP Open API v3 CPS Network CM Proxy Spec",
+            "description": "The API Description may be multiline, and GitHub Flavored Markdown, GFM syntax, can be used for rich text representation.",
+            "x-logo": {
+                "url": "logo.png"
+            },
+            "contact": {
+                "name": "ONAP",
+                "url": "https://onap.readthedocs.io",
+                "email": "onap-discuss@lists.onap.org"
+            },
+            "license": {
+                "name": "Apache 2.0",
+                "url": "http://www.apache.org/licenses/LICENSE-2.0"
+            },
+            "version": "1.2.34",
+            "x-planned-retirement-date": "202207",
+            "x-component": "Modeling"
+        }
+    }
+}
