EventTypeInfo

Represents an Event typeEach AppInfo defines a set Events that that users can expect to have published. Reference these events when defining an Alarm Definition.

Event types are used to signify different happenings in the system. An event is an actual thing that happened. This tells you of what priority how and potentially why.

For multiple examples on the Publish Method and more detail on Hardware commands please see the linked below.

Possible Mercury Commands: Mercury Service Commands

Possible Bosch Commands: Bosch Service Commands

Possible Engage Commands: Engage Service Commands

EventTypeInfo Properties

Item -> BaseInfo -> EventTypeInfo

Field Type Inherited from Description
Href String Item Gets or sets the href.
CommonName String BaseInfo Common Name of the resource.The common name of the resource.
InFolderHref String BaseInfo relative path Href value for the containing folderAll objects exist within a folder. Even folders!
InFolderKey String BaseInfo Represents the internal ID of the containing folder
IsGlobal Boolean BaseInfo If set True, the object will be exposed to the entire instance scope in which it resides. Meaning this object will always pass scope wide permissions tests when being queried although other restrictions such as by type will still apply (You need at least Read on the object type to see it regardless where you are in the instance scope). This Attribute is intended for use with AccessLevelInfo objects only. Use with other model objects may cause unexpected behaviors. Particularly this should not be used with ScheduleInfos, HolidayInfos, HolidayDayInfos, or ElevatorAccessLevelInfos. In time more objects will be allowed for use with this attribute but for the time being please only use with AccessLevelInfo Objects.
Key String BaseInfo Represents the internal ID of the object.
Links List<Link> BaseInfo List of related resourcesIt is expected that a resource will have many related resources (i.e. person has many access levels) Consumers of the API are encouraged to iterate through the list of links requesting this additional information as required.
Metadata MetadataItem[] BaseInfo The set of metadata attached to this resourceMetadata is opaque to the server code. Key value pairs are saved as part of a client activity. Users of the Native windows client, are able to design custom forms to display and edit scalar values in the meta data.
Monikers MonikerItem[] BaseInfo the set of Monikers for this object
Notes NoteInfo[] BaseInfo The set of notes attached to this resourceNotes are free form text only that is stored in chronological order. All notes are retrieved as part of an OBJECT get. Notes may be added as one POST but not updated with a PUT of the primary resource. WHen the resource is deleted all the notes are also deleted.
ObjectLinks ObjectLinkItem[] BaseInfo The set of resources that are related to this resourceFrequently resources have a one to one, or one to many relationship with other resources in the system. Use this set of links to discover related resources. 2016/09/29 Href property of the related resource may be null. In which case it’s expected that a set of related objects has already been retrieved by the client and the Key value will be used to index into that set.
Tags String[] BaseInfo the set of tags for this objectTags are used to group objects together for the purposes of selection and assignment of operation rights
MessageTemplateLong String EventTypeInfo Gets or sets the message template long.
MessageTemplateShort String EventTypeInfo Gets or sets the message template short.
NonLogging Boolean EventTypeInfo Gets or sets a value indicating whether [non logging].Possible Values (true, false)
Priority Int32 EventTypeInfo Gets or sets the priority.
RequiresAcknowledgement Boolean EventTypeInfo Gets or sets a value indicating whether [requires acknowledgement].Possible Values (true, false)

JSON Structure of EventTypeInfo

{
   "Href"	:	"String",
   "CommonName"	:	"String",
   "InFolderHref"	:	"String",
   "InFolderKey"	:	"String",
   "IsGlobal"	:	"Boolean",
   "Key"	:	"String",
   "Links"	:	"List\<[Link](/object-model/link)\>",
   "Metadata"	:	"[MetadataItem](/object-model/metadataitem)[]",
   "Monikers"	:	"[MonikerItem](/object-model/monikeritem)[]",
   "Notes"	:	"[NoteInfo](/object-model/noteinfo)[]",
   "ObjectLinks"	:	"[ObjectLinkItem](/object-model/objectlinkitem)[]",
   "Tags"	:	"String[]",
   "MessageTemplateLong"	:	"String",
   "MessageTemplateShort"	:	"String",
   "NonLogging"	:	"Boolean",
   "Priority"	:	"Int32",
   "RequiresAcknowledgement"	:	"Boolean"
}

Add Event Type To Alarm Definition Async

Example in C#

// Returns: nothing
await client.AddEventTypeToAlarmDefinitionAsync(AlarmDefinitionInfo alarmDefinition, EventTypeInfo eventType)

Example in CURL



           curl -X PUT \
               https://keepapi.feenicshosting.com/api/f/INSTANCE.KEY/alarmdefinitions/ALARMDEFINTION.KEY/collections/eventtypes \
               -H 'Authorization: Bearer TOKEN_GOES_HERE' \
               -H 'Content-Type: application/json' \
               -d '"/api/f/INSTANCE.KEY/eventtypes/EVENTTYPE.KEY"'
            

Add Event Type To App Async

Example in C#

// Returns: EventTypeInfo
var eventTypeInfo = await client.AddEventTypeToAppAsync(AppInfo app, EventTypeInfo eventTypeInfo)

Example in CURL



           curl -X PUT \
               https://keepapi.feenicshosting.com/api/f/INSTANCE.KEY/apps/APP.KEY/eventtypes \
               -H 'Authorization: Bearer TOKEN_GOES_HERE' \
               -H 'Content-Type: application/json' \
               -D '{
                       "$type":"Feenics.Keep.WebApi.Model.EventTypeInfo, Feenics.Keep.WebApi.Model",
                       "MessageTemplateLong":null,
                       "MessageTemplateShort":null,
                       "Priority":0,
                       "RequiresAcknowledgement":false,
                       "NonLogging":false,
                       "Key":null,
                       "CommonName":"ExampleEventForCurl",
                       "InFolderHref":null,
                       "InFolderKey":null,
                       "Links":[],
                       "ObjectLinks":null,
                       "Metadata":null,
                       "Notes":null,
                       "Tags":null,
                       "Monikers":
                       [
                           {
                               "$type":"Feenics.Keep.WebApi.Model.MonikerItem, Feenics.Keep.WebApi.Model",
                               "Namespace":"cUrlExamples",
                               "Nickname":"ExampleEventForCurl"
                           }
                       ],
                       "Href":null
                   }'
            

Delete Event Type Async

Example in C#

// Returns: nothing
await client.DeleteEventTypeAsync(EventTypeInfo eventType)

Example in CURL



           curl -X DELETE \
               https://keepapi.feenicshosting.com/api/f/INSTANCE.KEY/apps/APP.KEY/eventtypes/EVENTTYPE.KEY \
               -H 'Authorization: Bearer TOKEN_GOES_HERE' 
            

Get Alarm Defintion Event Types Async

Example in C#

// Returns: IEnumerable<EventTypeInfo>
var eventTypeInfo = await client.GetAlarmDefintionEventTypesAsync(AlarmDefinitionInfo alarmDefinition)

Example in CURL



           curl -X GET \
               https://keepapi.feenicshosting.com/api/f/INSTANCE.KEY/alarmdefinitions/ALARMDEFINTION.KEY/collections/eventtypes \
               -H 'Authorization: Bearer TOKEN_GOES_HERE'
            

Get Event Type For App By Moniker Async

Example in C#

// Returns: EventTypeInfo
var eventTypeInfo = await client.GetEventTypeForAppByMonikerAsync(AppInfo app, MonikerItem moniker)

Example in CURL



           curl -X GET \
               https://keepapi.feenicshosting.com/api/f/INSTANCE.KEY/apps/APP.KEY/eventtypes?namespace=cUrlExamples&nickname=ExampleEventForCurl \
               -H 'Authorization: Bearer TOKEN_GOES_HERE' 
            

Get Event Types Async

Example in C#

// Returns: IEnumerable<EventTypeInfo>
var eventTypeInfo = await client.GetEventTypesAsync(AppInfo app)

Example in CURL



           curl -X GET \
               https://keepapi.feenicshosting.com/api/f/INSTANCE.KEY/apps/APP.KEY/eventtypes \
               -H 'Authorization: Bearer TOKEN_GOES_HERE' 
            

Get Events Async

Example in C#

// Returns: IEnumerable<EventMessageData>
var eventMessageData = await client.GetEventsAsync(FolderInfo folder, Int32 page, Int32 pageSize, Boolean includeSubFolders, Boolean includeSharedInstances, Boolean spanScope, Boolean requiresAck, DateTime startingOn, DateTime endingOn, TimeSpan timeWindowStarting, TimeSpan timeWindowEnding, Int32 priorityThreshold, String forKeys, String forAllKeys, String sinceKey, String query, String forPeopleInAccessLevels)

Example in CURL



           curl -X GET \
               https://keepapi.feenicshosting.com/api/f/INSTANCE.KEY/events?page=0&pageSize=1000&includeSubFolders=False&includeSharedInstances=False&spanScope=False&requiresAck=False&priorityThreshold=0 \
               -H 'Authorization: Bearer TOKEN_GOES_HERE' 
            

Get Most Recent Event For Object Async

Example in C#

// Returns: IEnumerable<EventMessageSummaryItem>
var eventMessageSummaryItem = await client.GetMostRecentEventForObjectAsync(FolderInfo folder, DateTime since, String keys)

Example in CURL



           curl -X GET \
               https://keepapi.feenicshosting.com/api/f/INSTANCE.KEY/lastevent?since=2019-02-25T21%3A27%3A07.6505885Z \
               -H 'Authorization: Bearer TOKEN_GOES_HERE' \
               -H 'Content-Type: application/json' \
               -D '["OBJECT_TO_CHECK_KEY"]'
            

Publish Event Async

Example in C#

// Returns: nothing
await client.PublishEventAsync(FolderInfo folder, String apiKey, MonikerItem eventTypeMoniker, DateTime occuredOn, Object data, ObjectLinkItem linkedObjects)

Example in CURL



           curl -X POST \
               https://keepapi.feenicshosting.com/api/f/INSTANCE.KEY/eventmessagesink \
               -H 'Authorization:  Bearer TOKEN_GOES_HERE' \
               -H 'Content-Type: application/json' \
               -d '{
                       "$type":"Feenics.Keep.WebApi.Model.EventMessagePosting, Feenics.Keep.WebApi.Model",
                       "OccurredOn":"2019-01-23T19:30:49.10947Z",
                       "AppKey":"MercuryCommands",
                       "EventTypeMoniker":
                      {
                           "$type":"Feenics.Keep.WebApi.Model.MonikerItem, Feenics.Keep.WebApi.Model",
                           "Namespace":"MercuryServiceCommands",
                           "Nickname":"mercury:command-simulateKeyPress"
                       },
                       "RelatedObjects":
                       [
                           {
                               "$type":"Feenics.Keep.WebApi.Model.ObjectLinkItem, Feenics.Keep.WebApi.Model",
                               "Href":"/api/f/INSTANCE.KEY/peripherals/READER.KEY",
                               "LinkedObjectKey":"READER.KEY",
                               "CommonName":"ReaderExampleForCurl",
                               "Relation":"Reader",
                               "MetaDataBson":null
                           },
                           {
                               "$type":"Feenics.Keep.WebApi.Model.ObjectLinkItem, Feenics.Keep.WebApi.Model",
                               "Href":"/api/f/INSTANCE.KEY/controllers/CONTROLLER.KEY",
                               "LinkedObjectKey":"CONTROLLER.KEY",
                               "CommonName":"ControllerExampleForCurl",
                               "Relation":"Controller",
                               "MetaDataBson":null
                           }
                       ],
                       "EventDataBsonBase64":"FAAAAAJLZXlzAAUAAAA3MDUyAAA="
                   }'
            

Remove Event Type From Alarm Definition Async

Example in C#

// Returns: nothing
await client.RemoveEventTypeFromAlarmDefinitionAsync(AlarmDefinitionInfo alarmDefinition, EventTypeInfo eventType)

Example in CURL



           curl -X DELETE \
               https://keepapi.feenicshosting.com/api/f/INSTANCE.KEY/alarmdefinitions/ALARMDEFINTION.KEY/collections/eventtypes/EVENTTYPES.KEY \
               -H 'Authorization: Bearer TOKEN_GOES_HERE'
            

Update Event Type Async

Example in C#

// Returns: nothing
await client.UpdateEventTypeAsync(EventTypeInfo eventType)

Example in CURL



           curl -X GET \
               https://keepapi.feenicshosting.com/api/f/INSTANCE.KEY/apps/APP.KEY/eventtypes/EVENTTYPE.KEY \
               -H 'Authorization: Bearer TOKEN_GOES_HERE' \
               -H 'Content-Type: application/json' \
               -D '{
                       "$type":"Feenics.Keep.WebApi.Model.EventTypeInfo, Feenics.Keep.WebApi.Model",
                       "MessageTemplateLong":null,
                       "MessageTemplateShort":null,
                       "Priority":0,
                       "RequiresAcknowledgement":false,
                       "NonLogging":false,
                       "Key":"EVENTTYPE.KEY",
                       "CommonName":"ExampleEventForCurl",
                       "InFolderHref":"/api/f/INSTANCE.KEY",
                       "InFolderKey":"INSTANCE.KEY",
                       "Links":
                       [
                           {
                               "$type":"Feenics.Keep.WebApi.Model.Link, Feenics.Keep.WebApi.Model",
                               "Relation":"Meta",
                               "Anchor":
                               {
                                   "$type":"Feenics.Keep.WebApi.Model.Anchor, Feenics.Keep.WebApi.Model",
                                   "Href":"meta",
                                   "Text":"Metadata"
                               }
                           },
                           {
                               "$type":"Feenics.Keep.WebApi.Model.Link, Feenics.Keep.WebApi.Model",
                               "Relation":"Monikers",
                               "Anchor":
                               {
                                   "$type":"Feenics.Keep.WebApi.Model.Anchor, Feenics.Keep.WebApi.Model",
                                   "Href":"monikers",
                                   "Text":"Monikers"
                               }
                           },
                           {
                               "$type":"Feenics.Keep.WebApi.Model.Link, Feenics.Keep.WebApi.Model",
                               "Relation":"CommonName",
                               "Anchor":
                               {
                                   "$type":"Feenics.Keep.WebApi.Model.Anchor, Feenics.Keep.WebApi.Model",
                                   "Href":"commonname",
                                   "Text":"Common Name"
                               }
                           },
                           {
                               "$type":"Feenics.Keep.WebApi.Model.Link, Feenics.Keep.WebApi.Model",
                               "Relation":"Images",
                               "Anchor":
                               {
                                   "$type":"Feenics.Keep.WebApi.Model.Anchor, Feenics.Keep.WebApi.Model",
                                   "Href":"images",
                                   "Text":"Images"
                               }
                           },
                           {
                               "$type":"Feenics.Keep.WebApi.Model.Link, Feenics.Keep.WebApi.Model",
                               "Relation":"TakeOwnership",
                               "Anchor":
                               {
                                   "$type":"Feenics.Keep.WebApi.Model.Anchor, Feenics.Keep.WebApi.Model",
                                   "Href":"takeownership",
                                   "Text":"Take Ownership"
                               }
                           },
                           {
                               "$type":"Feenics.Keep.WebApi.Model.Link, Feenics.Keep.WebApi.Model",
                               "Relation":"Connections",
                               "Anchor":
                               {
                                   "$type":"Feenics.Keep.WebApi.Model.Anchor, Feenics.Keep.WebApi.Model",
                                   "Href":"connections",
                                   "Text":"Connected Objects"
                               }
                           },
                           {
                               "$type":"Feenics.Keep.WebApi.Model.Link, Feenics.Keep.WebApi.Model",
                               "Relation":"References",
                               "Anchor":
                               {
                                   "$type":"Feenics.Keep.WebApi.Model.Anchor, Feenics.Keep.WebApi.Model",
                                   "Href":"references",
                                   "Text":"Referencing Objects"
                               }
                           },
                           {
                               "$type":"Feenics.Keep.WebApi.Model.Link, Feenics.Keep.WebApi.Model",
                               "Relation":"Notes",
                               "Anchor":
                               {
                                   "$type":"Feenics.Keep.WebApi.Model.Anchor, Feenics.Keep.WebApi.Model",
                                   "Href":"notes",
                                   "Text":"Notes"
                               }
                           }
                       ],
                       "ObjectLinks":
                       [
                           {
                               "$type":"Feenics.Keep.WebApi.Model.ObjectLinkItem, Feenics.Keep.WebApi.Model",
                               "Href":null,
                               "LinkedObjectKey":"APP.KEY",
                               "CommonName":"Keep API",
                               "Relation":"App",
                               "MetaDataBson":
                               {
                                   "$type":"System.Byte[], mscorlib",
                                   "$value":""
                               }
                           },
                           {
                               "$type":"Feenics.Keep.WebApi.Model.ObjectLinkItem, Feenics.Keep.WebApi.Model",
                               "Href":null,
                               "LinkedObjectKey":"INSTANCE.KEY",
                               "CommonName":"INSTANCE_NAME",
                               "Relation":"InInstance",
                               "MetaDataBson":
                               {
                                   "$type":"System.Byte[], mscorlib",
                                   "$value":""
                               }
                           },
                           {
                               "$type":"Feenics.Keep.WebApi.Model.ObjectLinkItem, Feenics.Keep.WebApi.Model",
                               "Href":null,
                               "LinkedObjectKey":"INSTANCE.KEY",
                               "CommonName":"INSTANCE_NAME",
                               "Relation":"InstanceScope",
                               "MetaDataBson":
                               {
                                   "$type":"System.Byte[], mscorlib",
                                   "$value":""
                               }
                           }
                       ],
                       "Metadata":[],
                       "Notes":[],
                       "Tags":[],
                       "Monikers":
                       [
                           {
                               "$type":"Feenics.Keep.WebApi.Model.MonikerItem, Feenics.Keep.WebApi.Model",
                               "Namespace":"cUrlExamples",
                               "Nickname":"ExampleEventForCurl"
                           }
                       ],
                       "Href":"/api/f/INSTANCE.KEY/eventtypes/EVENTTYPE.KEY"
                   }'