...
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.
...
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.
...
Code Block | ||
---|---|---|
| ||
<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> |
UpdateGenericEvent
Update a generic event with new data.
Request Response
Code Block | ||
---|---|---|
| ||
<UpdateGenericEvent 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>
<MetadataList>
<GenericEventMetadata>
<GUID>string</GUID>
<Value>string</Value>
</GenericEventMetadata>
<GenericEventMetadata>
...
</GenericEventMetadata>
</MetadataList>
<Images>
<GenericEventImage>
...
</GenericEventImage>
</Images>
<SpecialSearchDataList/>
<CloseEvent>boolean</CloseEvent>
<FaceComparison/>
</genericEvent>
</UpdateGenericEvent> |
Sample Response
Returns the GUID of the event.
Code Block | ||
---|---|---|
| ||
<UpdateGenericEventResponse xmlns="http://3vr.com">
<UpdateGenericEventResult>string</UpdateGenericEventResult>
</UpdateGenericEventResponse> |
UpdateGenericEventDefinition
Update an existing Generic Event Definition. GUIDs must match for existing elements.
Sample Request
Code Block | ||
---|---|---|
| ||
<UpdateGenericEventDefinition xmlns="http://3vr.com">
<eventDefinition>
<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>
</eventDefinition>
</UpdateGenericEventDefinition> |
Sample Response
Code Block | ||
---|---|---|
| ||
<UpdateGenericEventDefinitionResponse xmlns="http://3vr.com">
<UpdateGenericEventDefinitionResult>
<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>
</UpdateGenericEventDefinitionResult>
</UpdateGenericEventDefinitionResponse> |
Interface and Data Classes
If you are using a high level language like C#, you may have access to support classes that will serialize and deserialize the XML for you. Here are the data and interface classes for the Generic Event Service.
C# Interface for the IGenericEventService operations
Code Block | ||
---|---|---|
| ||
publicinterfaceIGenericEventService {
public interface IGenericEventService{EventDefinitionData CreateGenericEventDe finiti
on(EventDefinitionDataeventDefinition);
EventDefinitionData UpdateGenericEventDefinition(EventDefinitionDataeventDefinition);
EventDefinitionData[] GenericEventDefinitionsByName(string name);
EventDefinitionData GenericEventDefinitionByGuid(string guid);
EventDefinitionData[] GenericEventDefinitionsAll();
string DeleteGenericEventDefinition(string guid);
ChannelInfo[] Channels();
GenericEventData GenericEvent(string guid);
string CreateGenericEvent(GenericEventData genericEvent);
string UpdateGenericEvent(GenericEventData genericEvent);
string DeleteGenericEvent(string guid);
string[] CustomFieldNames();
} |
C# classes for IGenericEventService operations
Code Block | ||
---|---|---|
| ||
[Serializable]
public class GenericEventData
{
public string Guid;
public DateTime EventTime;
public int StartTimeDelta;
public int EndTimeDelta;
public bool UseServerTime;
public long ChannelId;
public string DefinitionGuid;
public GenericEventMetadata[] MetadataList;
public GenericEventImage[] Images;
public GenericEventSpecialSearchData[] SpecialSearchDataList;
publicbool CloseEvent = true;
public ReferenceComparison FaceComparison;
[Serializable]
public class ReferenceComparison
{
public int StartTimeReferenceDelta;
public int EndTimeReferenceDelta;
public GenericEventImage ReferenceImage;
public string CustomFieldName;
public string CustomFieldValue;
}
[Serializable]
public class GenericEventMetadata
{
public string Guid;
public string Value;
}
[Serializable]
public class EventDefinitionData
{
public string Name;
public string ShortName;
public string Guid;
public string HelpText;
public MetadataField[] MetadataFields;
}
[Serializable]
public classMetadataField
{
public string Guid;
public string Name;
public string Description;
public MetadataType Type;
public int DisplayPosition;
public string DisplayFormat;
public EnumeratedData EnumeratedData;
}
[Serializable]
public class EnumeratedData
{
public string Name;
public string[] Values;
}
[Serializable]
public enum MetadataType
{
String = 1,
Number = 2,
DateTime = 3,
EnumeratedType = 4 }
/// Sensor types
/// Unknown = 0,
/// AnalogCamera = 1, 'Live' input from Hikvision
/// ImageFiles = 2, 'Imported from the UI
/// IPNetworkCamera = 3, 'Live' input from IMF
/// VideoFiles = 4, 'Live' input from FIM
/// UsbCamera = 5, 'Live' input from FIM
[Serializable]
public class ChannelInfo
{
public long Id;
public string Name;
public int DisplayNumber;
public string Identifier;
public string Description;
public string HostName;
public Boolean IsActive;
} [Serializable]
public class GenericEventImage
{
public int Width;
public int Height;
public PictureFormat Format;
public int NominalAspectRatio;
public double AspectRatioAdjustment;
public byte[] ImageBuffer;
public DateTime ImageTime;
public enumPictureFormat
{
Unknown,
Yuv444,
Yuv420,
Grayscale,
GrayscaleRgb,
Rgb,
Jpeg,
Bitmap
}
}
[Serializable]
public class GenericEventSpecialSearchData
{
public string SearchEngineGuid;
public byte[] SearchData;
} |
3VR External Query API
Overview
The 3VR External Query API is used to retrieve events from a standalone 3VR system. The 3VR External Query API cannot be used to retrieve information from an Enterprise appliance. These events correspond to the event cards displayed using 3VR's OpCenter UI.
Queries are formed as XML documents called "predicates". A predicate is sent to the 3VR system using an HTTP POST command. In response, the server will send a well-formed RSS 2.0 XML document listing the set of events that match the predicate. Included in the list is a URL for each event.
Using an HTTP GET command, the client can then retrieve detailed information about the event (also in XML form) from that URL. Each event retrieved is a structured object with a set of attached data.
The exchange between client and server is shown here:
...