String response = new ResponseTemplate().execute(logger, connectionId, request, new ResponseCallback() {
public Object execute() throws Exception {
//Convert the json keys into a DB object
DBObject keys = (DBObject) JSON.parse(index_keys);
SystemCollectionService systemCollectionService = new SystemCollectionServiceImpl(connectionId);
return systemCollectionService.addIndex(dbName, collectionName, keys);
}
});
return response;