diff --git a/src/main/java/org/etsi/osl/tmf/metrics/api/MetricsApiController.java b/src/main/java/org/etsi/osl/tmf/metrics/api/MetricsApiController.java
index 2e52478490eb6990cbee9548f83e2b40cc1c3786..70bd5a0bb9508d9e742557e798c1fddc26b120c5 100644
--- a/src/main/java/org/etsi/osl/tmf/metrics/api/MetricsApiController.java
+++ b/src/main/java/org/etsi/osl/tmf/metrics/api/MetricsApiController.java
@@ -11,7 +11,6 @@ import org.springframework.http.ResponseEntity;
 import org.springframework.stereotype.Controller;
 
 import java.time.OffsetDateTime;
-import java.util.HashMap;
 import java.util.LinkedHashMap;
 import java.util.List;
 import java.util.Map;
@@ -56,12 +55,12 @@ public class MetricsApiController implements MetricsApi {
             });
 
             // Create aggregation items
-            List<GroupByItem> groupByStateList = fullStateMap.entrySet().stream()
-                    .map(entry -> new GroupByItem(entry.getKey(), entry.getValue()))
+            List<ServicesGroupByStateItem> groupByStateList = fullStateMap.entrySet().stream()
+                    .map(entry -> new ServicesGroupByStateItem(ServiceStateType.valueOf(entry.getKey()), entry.getValue()))
                     .toList();
 
             // Build response structure using metrics models
-            GroupByStateAggregations aggregations = new GroupByStateAggregations(groupByStateList);
+            ServicesGroupByStateAggregations aggregations = new ServicesGroupByStateAggregations(groupByStateList);
             int total = fullStateMap.values().stream().mapToInt(Integer::intValue).sum();
             Services services = new Services(total, aggregations);
             ServicesGroupByState response = new ServicesGroupByState(services);