diff --git a/main/src/main/java/org/onap/policy/distribution/main/rest/DistributionRestController.java b/main/src/main/java/org/onap/policy/distribution/main/rest/DistributionRestController.java
index 1b87fb5..702f8a2 100644
--- a/main/src/main/java/org/onap/policy/distribution/main/rest/DistributionRestController.java
+++ b/main/src/main/java/org/onap/policy/distribution/main/rest/DistributionRestController.java
@@ -1,6 +1,7 @@
 /*-
  * ============LICENSE_START=======================================================
  *  Copyright (C) 2018 Ericsson. All rights reserved.
+ *  Modifications Copyright (C) 2023 Bell Canada. All rights reserved.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -56,13 +57,4 @@
         return Response.status(Response.Status.OK).entity(new HealthCheckProvider().performHealthCheck()).build();
     }
 
-    @GET
-    @Path("statistics")
-    @Produces(MediaType.APPLICATION_JSON)
-    @ApiOperation(value = "Fetch current statistics",
-            notes = "Provides current statistics of the Policy Distribution component",
-            response = StatisticsReport.class)
-    public Response statistics() {
-        return Response.status(Response.Status.OK).entity(new StatisticsProvider().fetchCurrentStatistics()).build();
-    }
 }
diff --git a/main/src/main/java/org/onap/policy/distribution/main/rest/StatisticsProvider.java b/main/src/main/java/org/onap/policy/distribution/main/rest/StatisticsProvider.java
deleted file mode 100644
index 426436f..0000000
--- a/main/src/main/java/org/onap/policy/distribution/main/rest/StatisticsProvider.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- *  Copyright (C) 2018 Ericsson. All rights reserved.
- *  Modifications Copyright (C) 2021 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * 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.policy.distribution.main.rest;
-
-import org.onap.policy.distribution.main.startstop.DistributionActivator;
-import org.onap.policy.distribution.reception.statistics.DistributionStatisticsManager;
-
-/**
- * Class to fetch statistics of distribution service.
- *
- * @author Ram Krishna Verma (ram.krishna.verma@ericsson.com)
- */
-public class StatisticsProvider {
-
-    /**
-     * Returns the current statistics of distribution service.
-     *
-     * @return Report containing statistics of distribution service
-     */
-    public StatisticsReport fetchCurrentStatistics() {
-        final var report = new StatisticsReport();
-        report.setCode(DistributionActivator.isAlive() ? 200 : 500);
-        report.setTotalDistributionCount(DistributionStatisticsManager.getTotalDistributionCount());
-        report.setDistributionSuccessCount(DistributionStatisticsManager.getDistributionSuccessCount());
-        report.setDistributionFailureCount(DistributionStatisticsManager.getDistributionFailureCount());
-        report.setTotalDownloadCount(DistributionStatisticsManager.getTotalDownloadCount());
-        report.setDownloadSuccessCount(DistributionStatisticsManager.getDownloadSuccessCount());
-        report.setDownloadFailureCount(DistributionStatisticsManager.getDownloadFailureCount());
-        return report;
-    }
-}
diff --git a/main/src/main/java/org/onap/policy/distribution/main/rest/StatisticsReport.java b/main/src/main/java/org/onap/policy/distribution/main/rest/StatisticsReport.java
deleted file mode 100644
index 107d780..0000000
--- a/main/src/main/java/org/onap/policy/distribution/main/rest/StatisticsReport.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- *  Copyright (C) 2018 Ericsson. All rights reserved.
- *  Modifications Copyright (C) 2021 AT&T Intellectual Property. All rights reserved.
- *  Modifications Copyright (C) 2021 Bell Canada. All rights reserved.
- * ================================================================================
- * 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.policy.distribution.main.rest;
-
-import lombok.Getter;
-import lombok.Setter;
-import lombok.ToString;
-
-/**
- * Class to represent statistics report of distribution service.
- *
- * @author Ram Krishna Verma (ram.krishna.verma@ericsson.com)
- */
-@ToString
-@Getter
-@Setter
-public class StatisticsReport {
-
-    private int code;
-    private long totalDistributionCount;
-    private long distributionSuccessCount;
-    private long distributionFailureCount;
-    private long totalDownloadCount;
-    private long downloadSuccessCount;
-    private long downloadFailureCount;
-}
diff --git a/main/src/test/java/org/onap/policy/distribution/main/rest/TestDistributionStatistics.java b/main/src/test/java/org/onap/policy/distribution/main/rest/TestDistributionStatistics.java
deleted file mode 100644
index 0c73257..0000000
--- a/main/src/test/java/org/onap/policy/distribution/main/rest/TestDistributionStatistics.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- *  Copyright (C) 2018 Ericsson. All rights reserved.
- *  Copyright (C) 2019 Nordix Foundation.
- *  Modifications Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved.
- *  Modifications Copyright (C) 2020 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.policy.distribution.main.rest;
-
-import static org.assertj.core.api.Assertions.assertThatCode;
-import static org.junit.Assert.assertEquals;
-
-import java.io.IOException;
-import javax.ws.rs.client.Client;
-import javax.ws.rs.client.ClientBuilder;
-import javax.ws.rs.client.Invocation;
-import javax.ws.rs.client.WebTarget;
-import javax.ws.rs.core.MediaType;
-import org.glassfish.jersey.client.ClientConfig;
-import org.glassfish.jersey.client.authentication.HttpAuthenticationFeature;
-import org.junit.Test;
-import org.mockito.internal.util.reflection.Whitebox;
-import org.onap.policy.common.endpoints.http.server.RestServer;
-import org.onap.policy.common.endpoints.parameters.RestServerParameters;
-import org.onap.policy.common.utils.network.NetworkUtil;
-import org.onap.policy.distribution.main.PolicyDistributionException;
-import org.onap.policy.distribution.main.parameters.CommonTestData;
-import org.onap.policy.distribution.main.startstop.Main;
-import org.onap.policy.distribution.reception.statistics.DistributionStatisticsManager;
-
-/**
- * Class to perform unit test of {@link DistributionRestController}.
- *
- * @author Ram Krishna Verma (ram.krishna.verma@ericsson.com)
- */
-public class TestDistributionStatistics {
-
-    private int port;
-
-    @Test
-    public void testDistributionStatistics_200() {
-        assertThatCode(() -> {
-            final Main main = startDistributionService();
-            StatisticsReport report = getDistributionStatistics();
-            validateReport(report, 0, 200);
-            updateDistributionStatistics();
-            report = getDistributionStatistics();
-            validateReport(report, 1, 200);
-            stopDistributionService(main);
-            DistributionStatisticsManager.resetAllStatistics();
-        }).doesNotThrowAnyException();
-    }
-
-    @Test
-    public void testDistributionStatistics_500() throws InterruptedException, IOException {
-        port = NetworkUtil.allocPort();
-        final RestServerParameters restServerParams = new CommonTestData().getRestServerParameters(false);
-        Whitebox.setInternalState(restServerParams, "port", port);
-        restServerParams.setName(CommonTestData.DISTRIBUTION_GROUP_NAME);
-        final RestServer restServer = new RestServer(restServerParams, null, DistributionRestController.class);
-        assertThatCode(() -> {
-            restServer.start();
-            final StatisticsReport report = getDistributionStatistics();
-            validateReport(report, 0, 500);
-            restServer.shutdown();
-            DistributionStatisticsManager.resetAllStatistics();
-        }).doesNotThrowAnyException();
-    }
-
-    private Main startDistributionService() throws IOException {
-        port = CommonTestData.makeConfigFile("parameters/DistributionConfigParameters.json");
-        final String[] distributionConfigParameters = { "-c", CommonTestData.CONFIG_FILE };
-        return new Main(distributionConfigParameters);
-    }
-
-    private void stopDistributionService(final Main main) throws PolicyDistributionException {
-        main.shutdown();
-    }
-
-    private StatisticsReport getDistributionStatistics() throws InterruptedException, IOException {
-        final ClientConfig clientConfig = new ClientConfig();
-
-        final HttpAuthenticationFeature feature = HttpAuthenticationFeature.basic("healthcheck", "zb!XztG34");
-        clientConfig.register(feature);
-
-        final Client client = ClientBuilder.newClient(clientConfig);
-        final WebTarget webTarget = client.target("http://localhost:" + port + "/statistics");
-
-        final Invocation.Builder invocationBuilder = webTarget.request(MediaType.APPLICATION_JSON);
-
-        CommonTestData.awaitServer(port);
-        return invocationBuilder.get(StatisticsReport.class);
-    }
-
-    private void updateDistributionStatistics() {
-        DistributionStatisticsManager.updateTotalDistributionCount();
-        DistributionStatisticsManager.updateDistributionSuccessCount();
-        DistributionStatisticsManager.updateDistributionFailureCount();
-        DistributionStatisticsManager.updateTotalDownloadCount();
-        DistributionStatisticsManager.updateDownloadSuccessCount();
-        DistributionStatisticsManager.updateDownloadFailureCount();
-    }
-
-    private void validateReport(final StatisticsReport report, final int count, final int code) {
-        assertEquals(code, report.getCode());
-        assertEquals(count, report.getTotalDistributionCount());
-        assertEquals(count, report.getDistributionSuccessCount());
-        assertEquals(count, report.getDistributionFailureCount());
-        assertEquals(count, report.getTotalDownloadCount());
-        assertEquals(count, report.getDownloadSuccessCount());
-        assertEquals(count, report.getDownloadFailureCount());
-    }
-}
diff --git a/main/src/test/java/org/onap/policy/distribution/main/rest/TestHttpsStatisticDistributionRestServer.java b/main/src/test/java/org/onap/policy/distribution/main/rest/TestHttpsStatisticDistributionRestServer.java
deleted file mode 100644
index d47cb52..0000000
--- a/main/src/test/java/org/onap/policy/distribution/main/rest/TestHttpsStatisticDistributionRestServer.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- *  Copyright (C) 2018 Intel. All rights reserved.
- *  Copyright (C) 2019 Nordix Foundation.
- *  Modifications Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved.
- *  Modifications Copyright (C) 2020 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.policy.distribution.main.rest;
-
-import static org.assertj.core.api.Assertions.assertThatCode;
-import static org.junit.Assert.assertEquals;
-
-import java.io.IOException;
-import java.security.SecureRandom;
-import java.util.Properties;
-import javax.net.ssl.SSLContext;
-import javax.net.ssl.TrustManager;
-import javax.ws.rs.client.Client;
-import javax.ws.rs.client.ClientBuilder;
-import javax.ws.rs.client.Invocation;
-import javax.ws.rs.client.WebTarget;
-import javax.ws.rs.core.MediaType;
-import org.glassfish.jersey.client.authentication.HttpAuthenticationFeature;
-import org.junit.Before;
-import org.junit.Test;
-import org.onap.policy.common.parameters.ParameterService;
-import org.onap.policy.common.utils.network.NetworkUtil;
-import org.onap.policy.common.utils.security.SelfSignedKeyStore;
-import org.onap.policy.distribution.main.PolicyDistributionException;
-import org.onap.policy.distribution.main.parameters.CommonTestData;
-import org.onap.policy.distribution.main.startstop.Main;
-
-/**
- * Class to perform unit test of HealthCheckMonitor.
- *
- * @author Libo Zhu (libo.zhu@intel.com)
- */
-public class TestHttpsStatisticDistributionRestServer {
-
-    private int port;
-
-    @Before
-    public void setUp() {
-        ParameterService.clear();
-    }
-
-    @Test
-    public void testHttpsDistributionStatistic() {
-        assertThatCode(() -> {
-            final Main main = startDistributionService();
-            final StatisticsReport report = performStatisticCheck();
-            validateReport(200, 0, 0, 0, 0, 0, 0, report);
-            stopDistributionService(main);
-        }).doesNotThrowAnyException();
-    }
-
-    private Main startDistributionService() throws IOException, InterruptedException {
-        final Properties systemProps = System.getProperties();
-        systemProps.put("javax.net.ssl.keyStore", new SelfSignedKeyStore().getKeystoreName());
-        systemProps.put("javax.net.ssl.keyStorePassword", SelfSignedKeyStore.KEYSTORE_PASSWORD);
-        System.setProperties(systemProps);
-
-        port = CommonTestData.makeConfigFile("parameters/DistributionConfigParameters_Https.json");
-        final String[] distributionConfigParameters = { "-c", CommonTestData.CONFIG_FILE };
-        return new Main(distributionConfigParameters);
-    }
-
-    private void stopDistributionService(final Main main) throws PolicyDistributionException {
-        main.shutdown();
-    }
-
-    private StatisticsReport performStatisticCheck() throws Exception {
-        final TrustManager[] noopTrustManager = NetworkUtil.getAlwaysTrustingManager();
-
-        final SSLContext sc = SSLContext.getInstance("TLSv1.2");
-        sc.init(null, noopTrustManager, new SecureRandom());
-        final ClientBuilder clientBuilder =
-                ClientBuilder.newBuilder().sslContext(sc).hostnameVerifier((host, session) -> true);
-        final Client client = clientBuilder.build();
-        final HttpAuthenticationFeature feature = HttpAuthenticationFeature.basic("healthcheck", "zb!XztG34");
-        client.register(feature);
-
-        final WebTarget webTarget = client.target("https://localhost:" + port + "/statistics");
-
-        final Invocation.Builder invocationBuilder = webTarget.request(MediaType.APPLICATION_JSON);
-
-        CommonTestData.awaitServer(port);
-        return invocationBuilder.get(StatisticsReport.class);
-    }
-
-    private void validateReport(final int code, final int total, final int successCount, final int failureCount,
-            final int download, final int downloadSuccess, final int downloadFailure, final StatisticsReport report) {
-        assertEquals(code, report.getCode());
-        assertEquals(total, report.getTotalDistributionCount());
-        assertEquals(successCount, report.getDistributionSuccessCount());
-        assertEquals(failureCount, report.getDistributionFailureCount());
-        assertEquals(download, report.getTotalDownloadCount());
-        assertEquals(downloadSuccess, report.getDownloadSuccessCount());
-        assertEquals(downloadFailure, report.getDownloadFailureCount());
-    }
-}
diff --git a/main/src/test/java/org/onap/policy/distribution/main/rest/TestStatisticsReport.java b/main/src/test/java/org/onap/policy/distribution/main/rest/TestStatisticsReport.java
deleted file mode 100644
index 299c5e3..0000000
--- a/main/src/test/java/org/onap/policy/distribution/main/rest/TestStatisticsReport.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- *  Copyright (C) 2018 Ericsson. All rights reserved.
- * ================================================================================
- * 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.policy.distribution.main.rest;
-
-import com.openpojo.reflection.filters.FilterClassName;
-import com.openpojo.validation.Validator;
-import com.openpojo.validation.ValidatorBuilder;
-import com.openpojo.validation.rule.impl.SetterMustExistRule;
-import com.openpojo.validation.test.impl.GetterTester;
-import com.openpojo.validation.test.impl.SetterTester;
-import org.junit.Test;
-import org.onap.policy.common.utils.test.ToStringTester;
-
-/**
- * Class to perform unit testing of {@link StatisticsReport}.
- *
- * @author Ram Krishna Verma (ram.krishna.verma@ericsson.com)
- */
-public class TestStatisticsReport {
-
-    @Test
-    public void testStatisticsReport() {
-        final Validator validator = ValidatorBuilder.create().with(new ToStringTester()).with(new SetterMustExistRule())
-                .with(new SetterTester()).with(new GetterTester()).build();
-        validator.validate(StatisticsReport.class.getPackage().getName(),
-                new FilterClassName(StatisticsReport.class.getName()));
-    }
-}
diff --git a/testsuites/stability/src/main/resources/setup/config/papParameters.yaml b/testsuites/stability/src/main/resources/setup/config/papParameters.yaml
index bb05020..8249edd 100644
--- a/testsuites/stability/src/main/resources/setup/config/papParameters.yaml
+++ b/testsuites/stability/src/main/resources/setup/config/papParameters.yaml
@@ -37,7 +37,6 @@
     stateChangeParameters:
       maxRetryCount: 1
       maxWaitMs: 30000
-  savePdpStatisticsInDb: true
   topicParameterGroup:
     topicSources:
     - topic: POLICY-PDP-PAP
