Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
https://[IP address or hostname]:[port]/video/

WILL BE DEPRECATED IN NEXT RELEASE, USE /channels

Returns stored video from the camera with the given camera number and options (start time, end time, length, framerate, and/or resolution). Note: Datetime values are formatted according to the ISO 8601 specification: YYYY-MM-DDTHH:MM:SS For example, 2012-12-05T13:40:27. For more information, see this article from the W3C W3.org: Date and Time Formats.

...

Code Block
languagexml
<CreateGenericEventDefinition xmlns="http://3vr.com">
<eventDefinition>
<Name>Bank Teller</Name>
<ShortName>Bank</ShortName>
<GUID>1cdf7bb4-2955-4716-b971-58daf7e73365</GUID>
<HelpText>Bank Teller Transactions</HelpText>
<MetadataFields>
<MetadataField>
<GUID>6e4a0f9d-38e9-4350-ab20-fa2cfa0729b3</GUID>
<Name>Account Type</Name>
<Description>Bank Account Type</Description>
<Type>String</Type>
<DisplayPosition>1</DisplayPosition>
<DisplayFormat>{bold}{value}{bold} {joinline}</DisplayFormat>
</MetadataField>
<MetadataField>
<GUID>21b35e5b-6098-4c91-a3c6-d4666af6a2d0</GUID>
<Name>Transaction Type</Name>
<Description>Bank Transaction Type</Description>
<Type>String</Type>
<DisplayPosition>2</DisplayPosition>
<DisplayFormat>{value}</DisplayFormat>
</MetadataField>
<MetadataField>
<GUID>5ef29aa5-3f87-461b-ba8a-dd1ed8f503f8</GUID>
<Name>Account Number</Name>
<Description>Bank Account</Description>
<Type>String</Type>
<DisplayPosition>3</DisplayPosition>
<DisplayFormat>{bold}Acct #{bold} {value}</DisplayFormat>
</MetadataField>
<MetadataField>
<GUID>ef6c4d44-7692-4127-9883-3ec390df46de</GUID>
<Name>Amount</Name>
<Description>Bank Transaction Amount</Description>
<Type>String</Type>
<DisplayPosition>4</DisplayPosition>
<DisplayFormat>{bold}Amt{bold} {value}</DisplayFormat>
</MetadataField>
<MetadataField>
<GUID>7da3178d-135f-4aad-91a4-eca544a781a2</GUID>
<Name>Teller Id #</Name>
<Description>Bank Teller Id</Description>
<Type>String</Type>
<DisplayPosition>5</DisplayPosition>
<DisplayFormat>{bold}Teller#{bold} {value}</DisplayFormat>
</MetadataField>
</MetadataFields>
</eventDefinition>
</CreateGenericEventDefinition>

The Details tab of the event editor will show all of the metadata fields and their values, and the Search panel makes these fields available for searching:

...

CreateGenericEvent

Once an event definition has been created, use CreateGenericEvent to send all the data for a new event:

Code Block
languagexml
<CreateGenericEvent xmlns="http://3vr.com">
<genericEvent>
<GUID>string</GUID>
<EventTime>dateTime</EventTime>
<StartTimeDelta>int</StartTimeDelta>
<EndTimeDelta>int</EndTimeDelta>
<UseServerTime>boolean</UseServerTime>
<ChannelId>long</ChannelId>
<DefinitionGUID>string</DefinitionGUID>
<CloseEvent>boolean</CloseEvent>
<MetadataList>
<GenericEventMetadata>
<GUID>string</GUID>
<Value>string</Value>
</GenericEventMetadata>
<GenericEventMetadata>
...
</GenericEventMetadata>
</MetadataList>
<Images/>
<SpecialSearchDataList/>
<FaceComparison/>
</genericEvent>
</CreateGenericEvent>

Generic Event Metadata Fields

  • <GUID> The GUID of the event; left empty for the Create operation

  • <EventTime> The DateTime of the event

  • <StartTimeDelta> Millisecond time span added to Event Time for the start of the Event Video. To start recording the video 2 seconds before the event time, the value would be -2000

  • <EndTimeDelta> Millisecond time span added to Event Time for the end of the Event Video. To stop recording the video 2 seconds after the event time, the value would be 2000.

  • <UseServerTime> Set to "true," the event time provided will be replaced with the server time when the event is recorded on the server. (The Event Time must still be set on the request. DateTime values cannot be null.)

  • <ChannelId> The ID of the camera recording the event.

  • <DefinitionGUID> The GUID of the Generic Event Definition.

  • <CloseEvent> If true the event is closed immediately, even if the event will update. It allows the details of the event to be available as soon as the event is created. There may be a delay while the video is buffered and saved.

  • <MetadataList> List of GUID, value pairs for the event.

  • <Images> Optional, supply images that can be inserted into the event. These images are used instead of images captured by the 3VR appliance. See "The Images Element" below for more information.

  • <SpecialSearchDataList> Internal use.

  • <FaceComparison> Optional, compares a reference person to a face event near the time the event is created.

CreateGenericEvent Response

The response to a succesful CreateGenericEvent request will contain the GUID of the Generic Event:

Code Block
languagexml
<CreateGenericEventResponse xmlns="http://3vr.com">
<CreateGenericEventResult>string</CreateGenericEventResult>
</CreateGenericEventResponse>

The Images Element

If the images for the event are provided from outside the 3VR appliance, use the <Images> tag. These images will be displayed in the event details.

Code Block
languagexml
<Images>
<GenericEventImage>
<Width>int</Width>
<Height>int</Height>
<Format>Unknown or Yuv444 or Yuv420 or Grayscale or GrayscaleRgb or Rgb or Jpeg or
Bitmap</Format>
<NominalAspectRatio>unsignedInt</NominalAspectRatio>
<AspectRatioAdjustment>double</AspectRatioAdjustment>
<ImageBuffer>base64Binary</ImageBuffer>
<ImageTime>dateTime</ImageTime>
</GenericEventImage>
<GenericEventImage>
...
</GenericEventImage>
</Images>

Each image sent with a generic event should have the following properties:

Generic Event Image Element Content

  • <Width> The pixel width of the image.

  • <Height> The pixel height of the image

  • <Format> The format of the Image Buffer bytes.

  • <NominalAspectRatio> Set to 2 for an NTSC interlaced image field and set to 1 for a mega pixel or non-interlaced image.

  • <AspectRatioAdjustment> Accounts for non-square pixels. Value is 1.0 for square pixels.

  • <ImageBuffer> Contains the base 64 encoded bytes of the image in the format specified in the <Format> tag.

  • <ImageTime> The DateTime of the image.

The SpecialSearchDataList Element

Leave the following eleemnt empty; it is reserved for internal use.

Code Block
languagexml
<SpecialSearchDataList>
<GenericEventSpecialSearchData>
<SearchEngineGUID>string</SearchEngineGUID>
<SearchData>base64Binary</SearchData>
</GenericEventSpecialSearchData>
<GenericEventSpecialSearchData>
<SearchEngineGUID>string</SearchEngineGUID>
<SearchData>base64Binary</SearchData>
</GenericEventSpecialSearchData>
</SpecialSearchDataList>

The FaceComparison Element

...

Face Comparison events extend Generic Events by comparing the image of a known person with a face from a face event near the same time as the Generic Event. Face Comparison events are created when the <FaceComparison> XML is provided to the CreateGenericEvent operation.

Code Block
languagexml
<FaceComparison>
<StartTimeReferenceDelta>int</StartTimeReferenceDelta>
<EndTimeReferenceDelta>int</EndTimeReferenceDelta>
<ReferenceImage/>
<CustomFieldName>string</CustomFieldName>
<CustomFieldValue>string</CustomFieldValue>
</FaceComparison>

...

The following list provides more detail on each child element of <FaceComparison>:

Face Comparison Metadata

  • <StartTimeReferenceDelta> Sets the time to start searching for a face event, relative to the event start time (in milliseconds). To search 5 seconds before the event time, the value is -5000. To search 3.5 seconds after the event time, the value is 3500.

  • <EndTimeReferenceDelta> Sets the time to stop searching for a face event, relative to the event start time (in milliseconds). To search 5 seconds after the event time, the values is 5000. To search 10.5 seconds after the event time, the value is 10500.

  • <ReferenceImage> Provides an alternate face reference image instead of using people in the 3VR system. If this tag is set, the Custom Field tags below are ignored.

  • <CustomFieldName> The Custom Field name used to identify people in the 3VR system. Custom Fields are listed on the Person card in OpCenter, or can be retrieved by the CustomFieldNames operation.

  • <CustomFieldValue> The value of the Custom Field.

If a <ReferenceImage> is used, it should have the same children elements as the <Image> element defined previously (e.g. <Width> <Height> <Format> and so on.)

Extended Generic Event Operations

The following operations are supplemental to the creation of Generic Events. In the XML, these examples would be wrapped in the soap:body part of the envelope. The SOAP header would contain the ServiceToken found in the response from Authenticate.

Channels

Get a list of cameras.

Sample Request

Code Block
languagexml
<Channels xmlns="http://3vr.com" />

Sample Response

Code Block
languagexml
<ChannelsResponse xmlns="http://3vr.com">
<ChannelsResult>
<ChannelInfo>
<Id>long</Id>
<Name>string</Name>
<DisplayNumber>int</DisplayNumber>
<Identifier>string</Identifier>
<Description>string</Description>
<HostName>string</HostName>
<IsActive>boolean</IsActive>
</ChannelInfo>
<ChannelInfo>
...
</ChannelInfo>
</ChannelsResult>

CustomFieldNames

Get a list of custom field names associated with a person profile in the 3VR system. These can be used when specifying Face Comparison events.

Sample Request

Code Block
languagexml
<CustomFieldNames xmlns="http://3vr.com" />

Sample Response

Code Block
languagexml
<CustomFieldNamesResponse xmlns="http://3vr.com">
<CustomFieldNamesResult>
<string>string</string>
<string>string</string>
</CustomFieldNamesResult>
</CustomFieldNamesResponse>

DeleteGenericEvent

Delete a generic event from the server with given GUID.

Sample Request

Code Block
languagexml
<DeleteGenericEventDefinition xmlns="http://3vr.com">
<guid>string</guid>
</DeleteGenericEventDefinition>

Sample Response

Code Block
<DeleteGenericEventDefinitionResponse xmlns="http://3vr.com">
<DeleteGenericEventDefinitionResult>String</DeleteGenericEventDefinitionResult>
</DeleteGenericEventDefinitionResponse>

GenericEvent

Get a Generic Event from the server with given GUID.

Sample Request

Code Block
languagexml
<GenericEvent xmlns="http://3vr.com">
<GUID>string</GUID>
</GenericEvent>

Sample Response

Code Block
languagexml
<GenericEventResponse xmlns="http://3vr.com">
<GenericEventResult>
<GUID>string</GUID>
<EventTime>dateTime</EventTime>
<StartTimeDelta>int</StartTimeDelta>
<EndTimeDelta>int</EndTimeDelta>
<UseServerTime>boolean</UseServerTime>
<ChannelId>long</ChannelId>
<DefinitionGUID>string</DefinitionGUID>
<MetadataList>
<GenericEventMetadata>
<GUID>string</GUID>
<Value>string</Value>
</GenericEventMetadata>
<GenericEventMetadata>
...
</GenericEventMetadata>
</MetadataList>
<Images>
<GenericEventImage>
...
</GenericEventImage>
<GenericEventImage>
...
</GenericEventImage>
</Images>
<SpecialSearchDataList>
<GenericEventSpecialSearchData>
<SearchEngineGUID>string</SearchEngineGUID>
<SearchData>base64Binary</SearchData>
</GenericEventSpecialSearchData>
<GenericEventSpecialSearchData>
...
</GenericEventSpecialSearchData>
<SpecialSearchDataList/>
<CloseEvent>boolean</CloseEvent>
<FaceComparison/>
</GenericEventResult>
</GenericEventResponse>

GenericEventDefinitionByGUID

Find the Generic Event Definition with the provided GUID.

Sample Request

Code Block
languagexml
<GenericEventDefinitionByGUID xmlns="http://3vr.com">
<GUID>string</GUID>
</GenericEventDefinitionByGUID>

Sample response

Code Block
<GenericEventDefinitionByGUIDResponse xmlns="http://3vr.com">
<GenericEventDefinitionByGUIDResult>
<Name>string</Name>
<ShortName>string</ShortName>
<GUID>string</GUID>
<HelpText>string</HelpText>
<MetadataFields>
<MetadataField>
<GUID>string</GUID>
<Name>string</Name>
<Description>string</Description>
<Type>String or Number or DateTime or EnumeratedType</Type>
<DisplayPosition>int</DisplayPosition>
<DisplayFormat>string</DisplayFormat>
<EnumeratedData xsi:nil="true" />
</MetadataField>
<MetadataField>
...
</MetadataField>
</MetadataFields>
</GenericEventDefinitionByGUIDResult>
</GenericEventDefinitionByGUIDResponse>

GenericEventDefinitionsAll

Sample Request

Code Block
<GenericEventDefinitionsAll xmlns="http://3vr.com" />

Sample Response

Code Block
languagexml
<GenericEventDefinitionsAllResponse xmlns="http://3vr.com">
<GenericEventDefinitionsAllResult>
<EventDefinitionData>
<Name>string</Name>
<ShortName>string</ShortName>
<GUID>string</GUID>
<HelpText>string</HelpText>
<MetadataFields>
<MetadataField xsi:nil="true" />
<MetadataField xsi:nil="true" />
</MetadataFields>
</EventDefinitionData>
<EventDefinitionData>
...
</EventDefinitionData>
</GenericEventDefinitionsAllResult>
</GenericEventDefinitionsAllResponse>

GenericEventDefinitionsByName

Find all the generic event definitions with the provided name.

Sample Request

Code Block
languagexml
<GenericEventDefinitionsByName xmlns="http://3vr.com">
<name>string</name>
</GenericEventDefinitionsByName>

Sample Response

Code Block
languagexml
<GenericEventDefinitionsByNameResponse xmlns="http://3vr.com">
<GenericEventDefinitionsByNameResult>
<EventDefinitionData>
<Name>string</Name>
<ShortName>string</ShortName>
<GUID>string</GUID>
<HelpText>string</HelpText>
<MetadataFields>
<MetadataField xsi:nil="true" />
<MetadataField xsi:nil="true" />
</MetadataFields>
</EventDefinitionData>
<EventDefinitionData>
...
</EventDefinitionData>
</GenericEventDefinitionsByNameResult>
</GenericEventDefinitionsByNameResponse>