The Mercury Service uses the Publish Method (attached to EventTypeInfo) to interact with its respective hardware.
Please observe the examples of how to use the service commands. The examples assume you have already set up the appropriate object to use for the object link. However the objects used are named to correspond to the type of object that is meant to be linked.
AppKey | Namespace |
---|---|
MercuryCommands | MercuryServiceCommands |
The available commands for this service are presented below:
Command | Nickname | Object Links | Parameters |
---|---|---|---|
Push Controller’s Database | mercury:command-downloadDB | Controller | NONE |
Push Controller’s Database
Example in C#
await client.PublishEventAsync(currentInstance,
"MercuryCommands",
new MonikerItem
{
Namespace = "MercuryServiceCommands",
Nickname = "mercury:command-downloadDB"
},
DateTime.UtcNow, new { },
controller.AsObjectLink("Controller")
);
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-downloadDB"
},
"RelatedObjects":
[
{
"$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":"BQAAAAA="
}'
Command | Nickname | Object Links | Parameters |
---|---|---|---|
Clear And Reload All Cards | mercury:command-clearAndReload | Controller | NONE |
Clear And Reload All Cards
Example in C#
await client.PublishEventAsync(currentInstance,
"MercuryCommands",
new MonikerItem
{
Namespace = "MercuryServiceCommands",
Nickname = "mercury:command-clearAndReload"
},
DateTime.UtcNow, new { },
controller.AsObjectLink("Controller")
);
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-clearAndReload"
},
"RelatedObjects":
[
{
"$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":"BQAAAAA="
}'
Command | Nickname | Object Links | Parameters |
---|---|---|---|
Lock Down Reader | mercury:command-lockDown | Controller,Mercury Reader | NONE |
Lock Down Reader
Example in C#
await client.PublishEventAsync(currentInstance,
"MercuryCommands",
new MonikerItem
{
Namespace = "MercuryServiceCommands",
Nickname = "mercury:command-lockDown"
},
DateTime.UtcNow, new { },
reader.AsObjectLink("Reader"),
controller.AsObjectLink("Controller")
);
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-lockDown"
},
"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":"BQAAAAA="
}'
Command | Nickname | Object Links | Parameters |
---|---|---|---|
Unlock Reader | mercury:command-unlock | Controller,Mercury Reader | NONE |
Unlock Reader
Example in C#
await client.PublishEventAsync(currentInstance,
"MercuryCommands",
new MonikerItem
{
Namespace = "MercuryServiceCommands",
Nickname = "mercury:command-unlock"
},
DateTime.UtcNow, new { },
reader.AsObjectLink("Reader"),
controller.AsObjectLink("Controller")
);
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-unlock"
},
"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":"BQAAAAA="
}'
Command | Nickname | Object Links | Parameters |
---|---|---|---|
On-line Mode | mercury:command-onlineMode | Controller,Mercury Reader | Mode:int (set to one of the values of MercuryReaderAccessMethods “OPTIONAL”) |
On-line Mode
Example in C#
await client.PublishEventAsync(currentInstance,
"MercuryCommands",
new MonikerItem
{
Namespace = "MercuryServiceCommands",
Nickname = "mercury:command-onlineMode"
},
DateTime.UtcNow,
new { Mode = 0},
reader.AsObjectLink("Reader"),
controller.AsObjectLink("Controller")
);
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-onlineMode"
},
"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":"DwAAABBNb2RlAAAAAAAA"
}'
Command | Nickname | Object Links | Parameters |
---|---|---|---|
Reset Reader | mercury:command-reset | Controller,Mercury Reader | NONE |
Reset Reader
Example in C#
await client.PublishEventAsync(currentInstance,
"MercuryCommands",
new MonikerItem
{
Namespace = "MercuryServiceCommands",
Nickname = "mercury:command-reset"
},
DateTime.UtcNow, new { },
reader.AsObjectLink("Reader"),
controller.AsObjectLink("Controller")
);
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-reset"
},
"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":"BQAAAAA="
}'
Command | Nickname | Object Links | Parameters |
---|---|---|---|
Pulse Reader | mercury:command-pulse | Controller,Mercury Reader | Floor:int (set to zero to pulse all floors) |
Pulse Reader
Example in C#
await client.PublishEventAsync(currentInstance,
"MercuryCommands",
new MonikerItem
{
Namespace = "MercuryServiceCommands",
Nickname = "mercury:command-pulse"
},
DateTime.UtcNow, new { },
reader.AsObjectLink("Reader"),
controller.AsObjectLink("Controller")
);
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-pulse"
},
"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":"BQAAAAA="
}'
Command | Nickname | Object Links | Parameters |
---|---|---|---|
Simulate Card Read | mercury:command-simulateCardRead | Controller,Mercury Reader,CardFormat | FaciltityCode: int (Facility Code number to use)EncodedCardNumber: long ( Encoded Card number to use) |
Simulate Card Read
Example in C#
await client.PublishEventAsync(currentInstance,
"MercuryCommands",
new MonikerItem
{
Namespace = "MercuryServiceCommands",
Nickname = "mercury:command-simulateCardRead"
},
DateTime.UtcNow,
new { Reason = "learning how to use the api" ,
FacilityCode = 44,
EncodedCardNumber = 1111000000},
reader.AsObjectLink("Reader"),
cardFormat.AsObjectLink("CardFormat"),
controller.AsObjectLink("Controller")
);
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-simulateCardRead"
},
"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/cardformats/CARD_FORMAT.KEY",
"LinkedObjectKey":"READER.KEY",
"CommonName":"CardFormatExampleForCurl",
"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":"VgAAAAJSZWFzb24AHAAAAGxlYXJuaW5nIGhvdyB0byB1c2UgdGhlIGFwaQAQRmFjaWxpdHlDb2RlACwAAAAQRW5jb2RlZENhcmROdW1iZXIAwIM4QgA="
}'
Command | Nickname | Object Links | Parameters |
---|---|---|---|
Simulate Key Press | mercury:command-simulateKeyPress | Controller,Mercury Reader | Keys: string (This would be the access pin) |
Simulate Key Press
Example in C#
await client.PublishEventAsync(currentInstance,
"MercuryCommands",
new MonikerItem
{
Namespace = "MercuryServiceCommands",
Nickname = "mercury:command-simulateKeyPress"
},
DateTime.UtcNow,
new { Keys = "7052"},
reader.AsObjectLink("Reader"),
controller.AsObjectLink("Controller")
);
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="
}'
Command | Nickname | Object Links | Parameters |
---|---|---|---|
Command Output | mercury:command-output | Controller,Mercury Output | Command:String (Can be : Deactivate, Activate, Pulse, Repeated Pulse)(For Pulse Command, you can supply a Duration:int to specify the pulse duration. For Repeated Pulse you need to supply OnDuration:int, OffDuration:int, RepeatCount:int.) |
Command Output
Example in C#
await client.PublishEventAsync(currentInstance,
"MercuryCommands",
new MonikerItem
{
Namespace = "MercuryServiceCommands",
Nickname = "mercury:command-output"
},
DateTime.UtcNow,
new { Command = "Deactivate"},
reader.AsObjectLink("Reader"),
controller.AsObjectLink("Controller")
);
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-output"
},
"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":"HQAAAAJDb21tYW5kAAsAAABEZWFjdGl2YXRlAAA="
}'
Command | Nickname | Object Links | Parameters |
---|---|---|---|
Update Controller Firmware | mercury:command-updateController | Controller | NONE |
Update Controller Firmware
Example in C#
await client.PublishEventAsync(currentInstance,
"MercuryCommands",
new MonikerItem
{
Namespace = "MercuryServiceCommands",
Nickname = "mercury:command-updateController"
},
DateTime.UtcNow, new { },
controller.AsObjectLink("Controller")
);
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-updateController"
},
"RelatedObjects":
[
{
"$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":"BQAAAAA="
}'
Command | Nickname | Object Links | Parameters |
---|---|---|---|
Update Downstream Firmware | mercury:command-updateDownstream | Controller,Mercury Downstream | Series3: Boolean (distinguishes which series of downstream is being used - Series 2 or Series 3 “OPTIONAL”) |
Keep will try to find the Series type first then automatically send the package type. Some series 3 have an issue where it will not send its type, in this case it will be required to tell the system that you are using a series three.
Update Downstream Firmware
Example in C#
await client.PublishEventAsync(currentInstance,
"MercuryCommands",
new MonikerItem
{
Namespace = "MercuryServiceCommands",
Nickname = "mercury:command-updateDownstream"
},
DateTime.UtcNow,
new {},
downstream.AsObjectLink("Downstream"),
controller.AsObjectLink("Controller")
);
/*
The below is only required when the series type is not found.
*/
await client.PublishEventAsync(currentInstance,
"MercuryCommands",
new MonikerItem
{
Namespace = "MercuryServiceCommands",
Nickname = "mercury:command-updateDownstream"
},
DateTime.UtcNow,
new { Series3 = true},
downstream.AsObjectLink("Downstream"),
controller.AsObjectLink("Controller")
);
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-updateDownstream"
},
"RelatedObjects":
[
{
"$type":"Feenics.Keep.WebApi.Model.ObjectLinkItem, Feenics.Keep.WebApi.Model",
"Href":"/api/f/INSTANCE.KEY/controllers/CONTROLLER.KEY/downstream/DOWNSTREAM.KEY",
"LinkedObjectKey":"DOWNSTREAM.KEY",
"CommonName":"DownstreamExampleForCurl",
"Relation":"Downstream",
"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":"BQAAAAA="
}'
#If the downstream is a series 3
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-updateDownstream"
},
"RelatedObjects":
[
{
"$type":"Feenics.Keep.WebApi.Model.ObjectLinkItem, Feenics.Keep.WebApi.Model",
"Href":"/api/f/INSTANCE.KEY/controllers/CONTROLLER.KEY/downstream/DOWNSTREAM.KEY",
"LinkedObjectKey":"DOWNSTREAM.KEY",
"CommonName":"DownstreamExampleForCurl",
"Relation":"Downstream",
"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":"DwAAAAhTZXJpZXMzAAEA="
}'
Command | Nickname | Object Links | Parameters |
---|---|---|---|
Activate Procedure | mercury:command-activateProcedure | Controller,Hg Procedure | NONE |
Activate Procedure
Example in C#
await client.PublishEventAsync(currentInstance,
"MercuryCommands",
new MonikerItem
{
Namespace = "MercuryServiceCommands",
Nickname = "mercury:command-activateProcedure"
},
DateTime.UtcNow, new { },
procedure.AsObjectLink("Procedure"),
controller.AsObjectLink("Controller")
);
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-activateProcedure"
},
"RelatedObjects":
[
{
"$type":"Feenics.Keep.WebApi.Model.ObjectLinkItem, Feenics.Keep.WebApi.Model",
"Href":"/api/f/INSTANCE.KEY/controllers/CONTROLLER.KEY/procedures/PROCEDURE.KEY",
"LinkedObjectKey":"PROCEDURE.KEY",
"CommonName":"ProcedureExampleForCurl",
"Relation":"Procedure",
"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":"BQAAAAA="
}'
Command | Nickname | Object Links | Parameters |
---|---|---|---|
Stop a Paused Procedure | mercury:command-deactivateProcedure | Controller,Hg Procedure | NONE |
Stop a Paused Procedure
await client.PublishEventAsync(currentInstance,
"MercuryCommands",
new MonikerItem
{
Namespace = "MercuryServiceCommands",
Nickname = "mercury:command-deactivateProcedure"
},
DateTime.UtcNow, new { },
procedure.AsObjectLink("Procedure"),
controller.AsObjectLink("Controller")
);
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-deactivateProcedure"
},
"RelatedObjects":
[
{
"$type":"Feenics.Keep.WebApi.Model.ObjectLinkItem, Feenics.Keep.WebApi.Model",
"Href":"/api/f/INSTANCE.KEY/controllers/CONTROLLER.KEY/procedures/PROCEDURE.KEY",
"LinkedObjectKey":"PROCEDURE.KEY",
"CommonName":"ProcedureExampleForCurl",
"Relation":"Procedure",
"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":"BQAAAAA="
}'
Command | Nickname | Object Links | Parameters |
---|---|---|---|
Start Linking Mode | mercury:command-startLinkingMode | Controller,Mercury Reader | NONE |
Start Linking Mode
Example in C#
await client.PublishEventAsync(currentInstance,
"MercuryCommands",
new MonikerItem
{
Namespace = "MercuryServiceCommands",
Nickname = "mercury:command-startLinkingMode"
},
DateTime.UtcNow, new { },
reader.AsObjectLink("Reader"),
controller.AsObjectLink("Controller")
);
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-startLinkingMode"
},
"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":"BQAAAAA="
}'
Command | Nickname | Object Links | Parameters |
---|---|---|---|
Abort Linking Mode | mercury:command-abortLinkingMode | Controller,Mercury Reader | NONE |
Abort Linking Mode
Example in C#
await client.PublishEventAsync(currentInstance,
"MercuryCommands",
new MonikerItem
{
Namespace = "MercuryServiceCommands",
Nickname = "mercury:command-abortLinkingMode"
},
DateTime.UtcNow, new { },
reader.AsObjectLink("Reader"),
controller.AsObjectLink("Controller")
);
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-abortLinkingMode"
},
"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":"BQAAAAA="
}'
Command | Nickname | Object Links | Parameters |
---|---|---|---|
Update Reader Firmware | mercury:command-updateReaderFirmware | Controller,Mercury Reader | NONE |
Update Reader Firmware
Example in C#
await client.PublishEventAsync(currentInstance,
"MercuryCommands",
new MonikerItem
{
Namespace = "MercuryServiceCommands",
Nickname = "mercury:command-updateReaderFirmware"
},
DateTime.UtcNow, new { },
reader.AsObjectLink("Reader"),
controller.AsObjectLink("Controller")
);
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-updateReaderFirmware"
},
"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":"BQAAAAA="
}'
Command | Nickname | Object Links | Parameters |
---|---|---|---|
Get Hardware Status | mercury:command-getStatus | Controller | NONE |
Get Hardware Status
Example in C#
await client.PublishEventAsync(currentInstance,
"MercuryCommands",
new MonikerItem
{
Namespace = "MercuryServiceCommands",
Nickname = "mercury:command-getStatus"
},
DateTime.UtcNow, new { },
controller.AsObjectLink("Controller")
);
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-getStatus"
},
"RelatedObjects":
[
{
"$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":"BQAAAAA="
}'
Command | Nickname | Object Links | Parameters |
---|---|---|---|
Send Host Response | mercury:command-sendHostResponse | Controller,Mercury Reader | Grant: boolean |
Send Host Response
Example in C#
await client.PublishEventAsync(currentInstance,
"MercuryCommands",
new MonikerItem
{
Namespace = "MercuryServiceCommands",
Nickname = "mercury:command-sendHostResponse"
},
DateTime.UtcNow,
new { EncodedCardNumber = 10000,
Grant = true},
reader.AsObjectLink("Reader"),
controller.AsObjectLink("Controller")
);
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-sendHostResponse"
},
"RelatedObjects":
[
{
"$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":"JAAAABBFbmNvZGVkQ2FyZE51bWJlcgAQJwAACEdyYW50AAEA="
}'
Command | Nickname | Object Links | Parameters |
---|---|---|---|
Global One Free APB | mercury:command-globalFreeAPB | Controller,LocalArea | NONE |
Global One Free APB
Example in C#
await client.PublishEventAsync(currentInstance,
"MercuryCommands",
new MonikerItem
{
Namespace = "MercuryServiceCommands",
Nickname = "mercury:command-globalFreeAPB"
},
DateTime.UtcNow, new { },
localArea.AsObjectLink("LocalArea"),
controller.AsObjectLink("Controller")
);
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-globalFreeAPB"
},
"RelatedObjects":
[
{
"$type":"Feenics.Keep.WebApi.Model.ObjectLinkItem, Feenics.Keep.WebApi.Model",
"Href":"/api/f/INSTANCE.KEY/controllers/CONTROLLER.KEY/localareas/LOCALAREA.KEY",
"LinkedObjectKey":"LOCALAREA.KEY",
"CommonName":"LocalAreaExampleForCurl",
"Relation":"LocalArea",
"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":"BQAAAAA="
}'
Command | Nickname | Object Links | Parameters |
---|---|---|---|
One Free APB for a person | mercury:command-oneFreeApb | Controller,Person | NONE |
One Free APB for a person
Example in C#
await client.PublishEventAsync(currentInstance,
"MercuryCommands",
new MonikerItem
{
Namespace = "MercuryServiceCommands",
Nickname = "mercury:command-oneFreeApb"
},
DateTime.UtcNow, new { },
person.AsObjectLink("Person"),
controller.AsObjectLink("Controller")
);
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-oneFreeApb"
},
"RelatedObjects":
[
{
"$type":"Feenics.Keep.WebApi.Model.ObjectLinkItem, Feenics.Keep.WebApi.Model",
"Href":"/api/f/INSTANCE.KEY/people/PERSON.KEY",
"LinkedObjectKey":"PERSON.KEY",
"CommonName":"PersonExampleForCurl",
"Relation":"Person",
"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":"BQAAAAA="
}'
Command | Nickname | Object Links | Parameters |
---|---|---|---|
One Free APB for a person at a designated area | mercury:command-oneFreeApbPerson | Controller,Person, LocalArea | NONE |
One Free APB for a person at a designated area
Example in C#
await client.PublishEventAsync(currentInstance,
"MercuryCommands",
new MonikerItem
{
Namespace = "MercuryServiceCommands",
Nickname = "mercury:command-oneFreeApbPerson"
},
DateTime.UtcNow, new { },
person.AsObjectLink("Person"),
localArea.AsObjectLink("LocalArea"),
controller.AsObjectLink("Controller")
);
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-oneFreeApbPerson"
},
"RelatedObjects":
[
{
"$type":"Feenics.Keep.WebApi.Model.ObjectLinkItem, Feenics.Keep.WebApi.Model",
"Href":"/api/f/INSTANCE.KEY/people/PERSON.KEY",
"LinkedObjectKey":"PERSON.KEY",
"CommonName":"PersonExampleForCurl",
"Relation":"Person",
"MetaDataBson":null
},
{
"$type":"Feenics.Keep.WebApi.Model.ObjectLinkItem, Feenics.Keep.WebApi.Model",
"Href":"/api/f/INSTANCE.KEY/controllers/CONTROLLER.KEY/localareas/LOCALAREA.KEY",
"LinkedObjectKey":"LOCALAREA.KEY",
"CommonName":"LocalAreaExampleForCurl",
"Relation":"LocalArea",
"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":"BQAAAAA="
}'
Command | Nickname | Object Links | Parameters |
---|---|---|---|
Move Person to Area (Not Implemented yet) | mercury:command-movePerson | Controller,Person, LocalArea | NONE |
Move Person to Area (Not Implemented yet)
Example in C#
await client.PublishEventAsync(currentInstance,
"MercuryCommands",
new MonikerItem
{
Namespace = "MercuryServiceCommands",
Nickname = "mercury:command-movePerson"
},
DateTime.UtcNow, new { },
person.AsObjectLink("Person"),
localArea.AsObjectLink("LocalArea"),
controller.AsObjectLink("Controller")
);
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-movePerson"
},
"RelatedObjects":
[
{
"$type":"Feenics.Keep.WebApi.Model.ObjectLinkItem, Feenics.Keep.WebApi.Model",
"Href":"/api/f/INSTANCE.KEY/people/PERSON.KEY",
"LinkedObjectKey":"PERSON.KEY",
"CommonName":"PersonExampleForCurl",
"Relation":"Person",
"MetaDataBson":null
},
{
"$type":"Feenics.Keep.WebApi.Model.ObjectLinkItem, Feenics.Keep.WebApi.Model",
"Href":"/api/f/INSTANCE.KEY/controllers/CONTROLLER.KEY/localareas/LOCALAREA.KEY",
"LinkedObjectKey":"LOCALAREA.KEY",
"CommonName":"LocalAreaExampleForCurl",
"Relation":"LocalArea",
"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":"BQAAAAA="
}'
Command | Nickname | Object Links | Parameters |
---|---|---|---|
One Free APB at Area | mercury:command-freeApbAtArea | Controller, LocalArea | NONE |
One Free APB at Area
Example in C#
await client.PublishEventAsync(currentInstance,
"MercuryCommands",
new MonikerItem
{
Namespace = "MercuryServiceCommands",
Nickname = "mercury:command-freeApbAtArea"
},
DateTime.UtcNow, new { },
localArea.AsObjectLink("LocalArea"),
controller.AsObjectLink("Controller")
);
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-freeApbAtArea"
},
"RelatedObjects":
[
{
"$type":"Feenics.Keep.WebApi.Model.ObjectLinkItem, Feenics.Keep.WebApi.Model",
"Href":"/api/f/INSTANCE.KEY/controllers/CONTROLLER.KEY/localareas/LOCALAREA.KEY",
"LinkedObjectKey":"LOCALAREA.KEY",
"CommonName":"LocalAreaExampleForCurl",
"Relation":"LocalArea",
"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":"BQAAAAA="
}'
Command | Nickname | Object Links | Parameters |
---|---|---|---|
Set Occupancy for an area | mercury:command-setAreaOccupancy | Controller, LocalArea | Count: int |
Set Occupancy for an area
Example in C#
await client.PublishEventAsync(currentInstance,
"MercuryCommands",
new MonikerItem
{
Namespace = "MercuryServiceCommands",
Nickname = "mercury:command-setAreaOccupancy"
},
DateTime.UtcNow,
new { Count = 99},
localArea.AsObjectLink("LocalArea"),
controller.AsObjectLink("Controller")
);
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-setAreaOccupancy"
},
"RelatedObjects":
[
{
"$type":"Feenics.Keep.WebApi.Model.ObjectLinkItem, Feenics.Keep.WebApi.Model",
"Href":"/api/f/INSTANCE.KEY/controllers/CONTROLLER.KEY/localareas/LOCALAREA.KEY",
"LinkedObjectKey":"LOCALAREA.KEY",
"CommonName":"LocalAreaExampleForCurl",
"Relation":"LocalArea",
"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":"EAAAABBDb3VudABjAAAAAA=="
}'
Command | Nickname | Object Links | Parameters |
---|---|---|---|
Install or Update Add-on Package | mercury:installPackage | Controller | PackageName:string (For now, the supported package is :“pivCLASS-Embedded-Auth”) |
Install or Update Add-on Package
Example in C#
await client.PublishEventAsync(currentInstance,
"MercuryCommands",
new MonikerItem
{
Namespace = "MercuryServiceCommands",
Nickname = "mercury:installPackage"
},
DateTime.UtcNow,
new { PackageName = pivCLASS-Embedded-Auth},
controller.AsObjectLink("Controller")
);
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-installPackage"
},
"RelatedObjects":
[
{
"$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":"LQAAAAJQYWNrYWdlTmFtZQAXAAAAcGl2Q0xBU1MtRW1iZWRkZWQtQXV0aAAA"
}'
Command | Nickname | Object Links | Parameters |
---|---|---|---|
Remove Add-on Package | mercury:removePackage | Controller | PackageName:string (For now, the supported package is :“pivCLASS-Embedded-Auth”) |
Remove Add-on Package
Example in C#
await client.PublishEventAsync(currentInstance,
"MercuryCommands",
new MonikerItem
{
Namespace = "MercuryServiceCommands",
Nickname = "mercury:removePackage"
},
DateTime.UtcNow,
new { PackageName = pivCLASS-Embedded-Auth},
controller.AsObjectLink("Controller")
);
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-removePackage"
},
"RelatedObjects":
[
{
"$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":"LQAAAAJQYWNrYWdlTmFtZQAXAAAAcGl2Q0xBU1MtRW1iZWRkZWQtQXV0aAAA"
}'
Command | Nickname | Object Links | Parameters |
---|---|---|---|
Set username and password | mercury:setpassword | Controller | LoginNumber: short (number 0 to 9)Username: string (username to login)Password: string (password to login)Note:string (32 character note field)AccountType: short (number 1-3, where 1 has all permissions) |
Set Username and Password
Example in C#
await client.PublishEventAsync(currentInstance,
"MercuryCommands",
new MonikerItem
{
Namespace = "MercuryServiceCommands",
Nickname = "mercury:setpassword"
},
DateTime.UtcNow,
new { LoginNumber=2, Username="sample", Password="abc123", Note="test user", AccountType=1},
controller.AsObjectLink("Controller")
);
Command | Nickname | Object Links | Parameters |
---|---|---|---|
Change host name or IP on the controller | mercury:command-changehost | Controller | DataSecurity: short (2 = AES w/password, 3 = TLS required,4 = TLS if available)HostIpAddress: string (eg. 192.168.100.123)HostName: string (eg. connect.feenics.com NB do not supply an IP address in this property)Port:short (e.g 3001 the standard mercury port number)RetryInterval: short (valid values are 5, 10, 20)NicSelector: short (1 or 2 to select the Network Interface Card) |
Change Host Communications Primary Settings
Example in C#
await client.PublishEventAsync(currentInstance,
"MercuryCommands",
new MonikerItem
{
Namespace = "MercuryServiceCommands",
Nickname = "mercury:command-changehost"
},
DateTime.UtcNow,
new {
DataSecurity= 4,
HostIpAddress="",
HostName="connect.feenics.com",
Port=3001,
RetryInterval=5,
NicSelector=1
},
controller.AsObjectLink("Controller")
);
Command | Nickname | Object Links | Parameters |
---|---|---|---|
Reboot Controller | mercury:reboot | Controller |
Reboot a connected controller
Example in C#
await client.PublishEventAsync(currentInstance,
"MercuryCommands",
new MonikerItem
{
Namespace = "MercuryServiceCommands",
Nickname = "mercury:reboot"
},
DateTime.UtcNow,
new { },
controller.AsObjectLink("Controller")
);