def login(name, password):
  body = {
    "username": name,
    "password": password
  }
  client = VSOM.client.new("/authentication/login", body)
  return client.post_it()
示例#2
0
def get_first_last_recording_catalog_entry(token, device_reference, id):
  body = {
    "cameraRef": device_reference,
    "recordingCatalogEntryId": id
  }
  client = VSOM.client.new("/camerarecording/getFirstLastForRecordingCatalogEntry", body, token)
  return client.post_it()
def associate_cameras_to_device_template(token, device_references, template_reference):
  body = {
    "deviceRefs": device_references,
    "templateRef": template_reference
  }
  client = VSOM.client.new("/camerabulkops/associateCamerasToDeviceTemplate", body, token)
  return client.post_it()
def get_by_name(token, name):
  body = {
    "filter": {
      "byExactName": name
    }
  }
  client = VSOM.client.new("/devicetemplate/getDeviceTemplates", body, token)
  return client.post_it()
示例#5
0
def get_tree_root(token):
    body = {
        "treeFilter": {
            "objectTypes": [],
            "depth": 0,
            "getLocalTreeOnly": False
        }
    }
    client = VSOM.client.new("/location/getLocationTree", body, token)
    return client.post_it()
示例#6
0
def get_tree_root(token):
  body = {
    "treeFilter": {
      "objectTypes": [],
      "depth": 0,
      "getLocalTreeOnly": False
    }
  }
  client = VSOM.client.new("/location/getLocationTree", body, token)
  return client.post_it()
示例#7
0
def get_cameras(token):
    body = {
        "filter": {
            "byObjectType": "device_vs_camera",
            "pageInfo": {
                "start": "0",
                "limit": "100"
            }
        }
    }
    client = VSOM.client.new("/camera/getCameras", body, token)
    return client.post_it()
示例#8
0
def get_cameras(token):
  body = {
    "filter": {
      "byObjectType": "device_vs_camera",
      "pageInfo": {
        "start": "0",
        "limit": "100"
      }
    }
  }
  client =  VSOM.client.new("/camera/getCameras", body, token)
  return client.post_it()
def create_default_template(token, name, description, vsom_uid, location_ref):
  body = {
    "template":{
      "systemDefined": False,
      "shared": True,
      "generic": True,
      "numAssocDevices": 0,  
      "ownerLocationRef": location_ref,
      "videoStreams": [{
        "streamNum": 1,
        "viewable": True,
        "motion_configured": True,
        "recordable": True,
        "videoStreamProfile": {
          "videoQuality": "medium",
          "format": "NTSC",
          "ltsRetentionDays": 0,
          "suspendableProxy": False
        }
      }],
      "recordings": [{
        "recordingType": "LOOP",
        "streamNum": 1,
        "duration": 86400,
        "expireTime": 1,
        "eventExpireTime": 30,
        "storageEstimation": True,
        "startImmediate": True,
        "recordIframe": False,
        "archiveToLTS": False,
        "ltsRetentionTime": 0,
        "zeroVideoLossEnabled": False
      }],
      "participateInFailover": False,
      "preBuffer": 0,
      "postBuffer": 0,
      "lastModified": 0,
      "enableRecordNow": True,
      "mergeRecordings": False,
      "name": name,
      "tags": "tags",
      "description": description,
      "vsomUid": vsom_uid,
      "objectType": "vs_deviceTemplate"
    }
  }
  client = VSOM.client.new("/devicetemplate/createDeviceTemplate", body, token)
  return client.post_it()
示例#10
0
def get_status(token, job_reference):
    body = {"jobRef": job_reference}
    client = VSOM.client.new("/job/getJobStatus", body, token)
    return client.post_it()
示例#11
0
def get_by_name(token, name):
    body = {"filter": {"byExactName": name}}
    client = VSOM.client.new("/devicetemplate/getDeviceTemplates", body, token)
    return client.post_it()
示例#12
0
def create_default_template(token, name, description, vsom_uid, location_ref):
    body = {
        "template": {
            "systemDefined":
            False,
            "shared":
            True,
            "generic":
            True,
            "numAssocDevices":
            0,
            "ownerLocationRef":
            location_ref,
            "videoStreams": [{
                "streamNum": 1,
                "viewable": True,
                "motion_configured": True,
                "recordable": True,
                "videoStreamProfile": {
                    "videoQuality": "medium",
                    "format": "NTSC",
                    "ltsRetentionDays": 0,
                    "suspendableProxy": False
                }
            }],
            "recordings": [{
                "recordingType": "LOOP",
                "streamNum": 1,
                "duration": 86400,
                "expireTime": 1,
                "eventExpireTime": 30,
                "storageEstimation": True,
                "startImmediate": True,
                "recordIframe": False,
                "archiveToLTS": False,
                "ltsRetentionTime": 0,
                "zeroVideoLossEnabled": False
            }],
            "participateInFailover":
            False,
            "preBuffer":
            0,
            "postBuffer":
            0,
            "lastModified":
            0,
            "enableRecordNow":
            True,
            "mergeRecordings":
            False,
            "name":
            name,
            "tags":
            "tags",
            "description":
            description,
            "vsomUid":
            vsom_uid,
            "objectType":
            "vs_deviceTemplate"
        }
    }
    client = VSOM.client.new("/devicetemplate/createDeviceTemplate", body,
                             token)
    return client.post_it()
示例#13
0
def get_status(token, job_reference):
  body   = { "jobRef": job_reference }
  client = VSOM.client.new("/job/getJobStatus", body, token)
  return client.post_it()
示例#14
0
def associate_cameras_to_device_template(token, device_references,
                                         template_reference):
    body = {"deviceRefs": device_references, "templateRef": template_reference}
    client = VSOM.client.new("/camerabulkops/associateCamerasToDeviceTemplate",
                             body, token)
    return client.post_it()
示例#15
0
def login(name, password):
    body = {"username": name, "password": password}
    client = VSOM.client.new("/authentication/login", body)
    return client.post_it()
示例#16
0
def get_camera_recording_catalog_entries(token, filter):
  body = {
    "filter": filter
  }
  client = VSOM.client.new("/camerarecording/getRecordingCatalogEntries", body, token)
  return client.post_it()
示例#17
0
def create_full_motion_windows(token, device_references):
  body = {
    "deviceRefs": device_references
  }
  client = VSOM.client.new("/camerabulkops/createFullMotionWindows", body, token)
  return client.post_it()
示例#18
0
def stop_on_demand(token, device_reference):
  body = {
    "cameraRef": device_reference
  }
  client = VSOM.client.new("/camerarecording/stopOnDemandRecording", body, token)
  return client.post_it()
示例#19
0
def create_full_motion_windows(token, device_references):
    body = {"deviceRefs": device_references}
    client = VSOM.client.new("/camerabulkops/createFullMotionWindows", body,
                             token)
    return client.post_it()