diff --git a/src/main/java/iudx/rs/proxy/apiserver/ApiServerVerticle.java b/src/main/java/iudx/rs/proxy/apiserver/ApiServerVerticle.java index d7f287e..fc98489 100644 --- a/src/main/java/iudx/rs/proxy/apiserver/ApiServerVerticle.java +++ b/src/main/java/iudx/rs/proxy/apiserver/ApiServerVerticle.java @@ -622,6 +622,14 @@ private void updateAuditTable(RoutingContext context) { } JsonObject jsonObject = CatalogueService.getCatalogueItemJson(resourceid); String providerID = jsonObject.getString("provider"); + String type = + jsonObject.containsKey(RESOURCE_GROUP) ? "RESOURCE" : "RESOURCE_GROUP"; + String resourceGroup = + jsonObject.containsKey(RESOURCE_GROUP) + ? jsonObject.getString(RESOURCE_GROUP) + : jsonObject.getString(ID); + request.put(RESOURCE_GROUP, resourceGroup); + request.put(TYPE_KEY, type); request.put(EPOCH_TIME,time); request.put(ISO_TIME,isoTime); request.put(USER_ID, authInfo.getValue(USER_ID)); diff --git a/src/main/java/iudx/rs/proxy/apiserver/util/ApiServerConstants.java b/src/main/java/iudx/rs/proxy/apiserver/util/ApiServerConstants.java index 9bccbe5..7b614b7 100644 --- a/src/main/java/iudx/rs/proxy/apiserver/util/ApiServerConstants.java +++ b/src/main/java/iudx/rs/proxy/apiserver/util/ApiServerConstants.java @@ -104,6 +104,8 @@ public class ApiServerConstants { public static final String IID = "iid"; public static final String API = "api"; public static final String USER_ID = "userid"; + public static final String RESOURCE_GROUP = "resourceGroup"; + public static final String TYPE_KEY = "type"; public static final String GEO_QUERY = "geo-query"; public static final String TEMPORAL_QUERY = "temporal-query";