diff --git a/person_detection/roc.py b/person_detection/roc.py
index 003d121..35680a4 100644
--- a/person_detection/roc.py
+++ b/person_detection/roc.py
@@ -3,22 +3,23 @@
 SPDX-License-Identifier: LicenseRef-ONF-Member-1.01
 """
 
+import sys
 import requests
 import json
 from requests.structures import CaseInsensitiveDict
 import logging as log
 
 
-URL = "https://roc.menlo.aetherproject.org/aether-roc-api/aether/v4.0.0/connectivity-service-v4/"
-#URL = "https://roc.staging.aether.onlab.us/aether-roc-api/aether/v4.0.0/connectivity-service-v4/"
-
-
 class Roc(object):
 
-    def __init__(self, user, password):
+    def __init__(self, url, user, password, enterpriseId, siteId):
+        self.url = url
         self.user = user
         self.password = password
         self.key = self.get_key()
+        self.enterpriseId = enterpriseId
+        self.siteId = siteId
+        self.update()
 
     def headers(self):
         h = CaseInsensitiveDict()
@@ -26,8 +27,23 @@
         h["Authorization"] = "Bearer " + self.key
         return h
 
+    def update(self):
+        url = self.url + "enterprises"
+        response = requests.get(url, headers=self.headers())
+        if response.status_code != 200:
+            log.error("get_enterprise() failed, status_code: {}".format(response.status_code))
+            return None
+
+        result = json.loads(response.text)
+        enterprises = result['enterprise']
+
+        for enterprise in enterprises:
+            for k, v in enterprise.items():
+                if k == 'enterprise-id' and v == self.enterpriseId:
+                    self.enterprise = enterprise
+
     def get_mbr(self, device_group):
-        url = URL + "vcs/vcs/vcs-{}/slice/mbr".format(device_group)
+        url = self.url + "enterprises/enterprise/{}/site/{}/device-group/{}/mbr".format(self.enterpriseId, self.siteId, device_group)
         response = requests.get(url, headers=self.headers())
         if response.status_code != 200:
             log.error("Failed to get mbr, status_code: {}".format(response.status_code))
@@ -37,8 +53,8 @@
 
     def set_mbr(self, device_group, mbr):
         log.info("Set {} mbr to {}".format(device_group, mbr))
-        m = {'uplink' : mbr}
-        url = URL + "vcs/vcs/vcs-{}/slice/mbr".format(device_group)
+        m = {"downlink": 10000000, "uplink": mbr}
+        url = self.url + "enterprises/enterprise/{}/site/{}/device-group/{}/mbr".format(self.enterpriseId, self.siteId, device_group)
         response = requests.post(url, headers=self.headers(), json=m)
 
         # If error, renew api key and try again
@@ -67,16 +83,30 @@
 
 if __name__ == '__main__':
 
+    log.basicConfig(
+            format='%(asctime)s %(levelname)-8s %(message)s',
+            level=log.DEBUG,
+            datefmt='%Y-%m-%d %H:%M:%S',
+            stream=sys.stdout)
+    log.debug("Testing roc...")
+
     # use valid keycloak user/password
-    roc = Roc("user", "password")
+    url = "https://roc.menlo.aetherproject.org/aether-roc-api/aether/v2.0.0/connectivity-service-v2/"
+    user = sys.argv[1]
+    password = sys.argv[2]
+    enterprise = 'aether-onf'
+    site = 'menlo-4g'
+
+    roc = Roc(url, user, password, enterprise, site)
 
     cameras = "menlo-4g-cameras"
+    mbr = roc.get_mbr(cameras)
+    print("uplink mbr:{}, downlink mbr: {}".format(mbr["uplink"], mbr["downlink"]))
 
+    roc.set_mbr(cameras, 7000000)
     mbr = roc.get_mbr(cameras)
     print("uplink mbr:{}, downlink mbr: {}".format(mbr["uplink"], mbr["downlink"]))
-    roc.set_mbr(cameras, 5000000)
-    mbr = roc.get_mbr(cameras)
-    print("uplink mbr:{}, downlink mbr: {}".format(mbr["uplink"], mbr["downlink"]))
+
     roc.set_mbr(cameras, 10000000)
     mbr = roc.get_mbr(cameras)
     print("uplink mbr:{}, downlink mbr: {}".format(mbr["uplink"], mbr["downlink"]))
