Intercom service

Description

The Intercom service API showcases the different ways to configure and manage the core functionality of the intercom devices.

Model

The intercom service provides the API endpoint /vapix/intercom as well as the websockets endpoints ws:// and wss:// at /vapix/intercomws. The websocket endpoint can be used to both issue API commands and to initiate event notifications in the JSON format.

The intercom service includes the following methods:

  • Configure the access control integration protocol to request access to any compatible device. This can be done by using either OSDP, Wiegand or VAPIX reader connection.

  • Enabling card types.

  • Allowing third-party integrators to configure and control card data processing using the access control integration protocol.

  • Configuring the user interface behavior and API to control the feedback.

The intercom service also defines a number of events for real-time monitoring:

  • Card swipe events using tns1:Device/tnsaxis:Intercom/RFID

  • PIN entry events using tns1:Device/tnsaxis:Intercom/KeyPin

  • Aggregated call state events.

Non normative enums are used to describe possible values and their meaning, together with capabilities listing the supported values on a particular product or firmware.

Identification

Property

Properties.API.Intercom.Intercom="yes"

Property

Properties.API.Intercom.Version="1.1"

API Discovery

id=intercom-api

API Discovery

id=intercom-reader (for products with a reader)

Terminology

TermDescription
AccessPointRepresents a reader or reader-door mapping.
ACUAccess Control Unit, i.e. external access control device or door controller, such as AXIS A1001 and AXIS A1601.
RFIDRadio Frequency IDentification. The radio technology used in cards, tags and fobs for identification.
MaskUsed together with readers to disable/filter data from being used with the configured access control integration protocol.
MIFARE®A brand named RFID-based solution for storing credential information on smart cards and keyfobs (RFC tags).
MIFARE® DESFire®A brand named RFID-based solution for storing credential information on smart cards and keyfobs (RFC tags).
Non-normative EnumAn Enum whose values are used as strings to enable future extensions. The type documents the possible values and their meaning, but a capability indicates the supported values, and an ID string type is used instead of the actual enum type when appropriate.
OSDPOpen Supervised Device Protocol. A protocol on top of a 2–wire RS-485 used between the access control system (ACU) and a reader.
PINPersonal Identification Number. The number used to authenticate a user, commonly used with an RFID card.
TagAnother term for a smartcard or keyfob used to store credential information. 
WiegandA protocol widely used in access control systems between a reader and controller (ACU).

Common examples

Syntax

API calls can be encoded in either JSON or as a key-value format referred to as “simple”. Multiple JSON formats are supported, such as JSONRPC 2.0 and Google JSON API.

JSON

The original JSON format has the following form:

Request ver. 1
{
  "<function>": {
    <arguments>
  }
}

This JSON request can also be made by putting the function-method in the URL: /vapix/intercom/<function>:

Request ver. 2
{
  <arguments>
}
Response
{
  <result>
}

JSONRPC 2.0

The JSONRPC 2.0 format has the following form:

Request
{
  "jsonrpc": "2.0",
  "method": <function>,
  "params": {
    <arguments>
  },
  "id": <id>
}
Response
{
  "jsonrpc": "2.0",
  "result": {
    <result>
  },
  "id": <id>
}

Google JSON API

The Google JSON API has a similar structure to JSONRPC 2.0, but uses different parameters.

Request
{
  "apiVersion": "1.0",
  "method": "<function>",
  "params": {
    <arguments>
  },
  "context": <id>
}
Response
{
  "apiVersion": "1.0",
  "data": {
    <result>
  },
  "context": <id>
}

Simple

The so called “simple” format flattens the structure to key=value strings, where each level in a structure is separated by an underscore _ when encoding the key.

  • Boolean values are encoded as either true or false, while the NULL value is encoded as null.

  • String values are URL-encoded and may start and end with quotation marks.

  • Array keys are encoded as _index_ starting from 0.

Character sets are neither converted nor validated by the intercom service, but UTF-8 should be used to ensure compatibility with most system.

Simple cURL example

This example shows a couple of configurations requested via cURL.

cURL JSON

Request
$ curl --digest "//root:pass@192.168.0.90/vapix/intercom" -s
  -d'{"GetConfiguration":{}}'
{
  "Configuration": {
    "Version": "1.0",
    "CallTriggersEnabled": true,
    "CallByNumbersEnabled": true,
    "DefaultCallByNumberSIPAccountId": "",
    "CardReaderConfiguration": {
      "Protocol": "None",
      "CardTypes": [ "MIFARE_Classic",.. ],
      "WiegandConfiguration": {
        "nbrOfLEDPins": 0,
        "beeper": false,
        "beeperPin": "I3",
        "LED1Pin": "I1",
        "LED2Pin": "I2",
        "LEDColor0": "red",
        "LEDColor1": "green",
        "LEDColor00": "off",
        "LEDColor01": "green",
        "LEDColor10": "red",
        "LEDColor11": "amber",
        "keypressFormat": "FourBit"
      },
      "OSDPConfiguration": {
        "OSDPAddress": 0
      }
    }
  }
}

cURL Simple

Request
$ curl --digest "//root:pass@192.168.0.90/vapix/intercom?format=simple&action=GetConfiguration"
or
$ curl --digest "//root:pass@192.168.0.90/vapix/intercom/GetConfiguration?format=simple"

Configuration_Version="1.0"
Configuration_CallTriggersEnabled=true
Configuration_CallByNumbersEnabled=true
Configuration_CardReaderConfiguration_Protocol="None"
Configuration_CardReaderConfiguration_CardTypes_0="EM4X02"
Configuration_CardReaderConfiguration_CardTypes_1="HITAG_1_S"
Configuration_CardReaderConfiguration_CardTypes_2="HITAG_2"
Configuration_CardReaderConfiguration_CardTypes_3="EM4X50"
Configuration_CardReaderConfiguration_CardTypes_4="ISOFDX_B"
Configuration_CardReaderConfiguration_CardTypes_5="HID_PROX"
Configuration_CardReaderConfiguration_CardTypes_6="AWID"
Configuration_CardReaderConfiguration_CardTypes_7="MIFARE_Classic"
Configuration_CardReaderConfiguration_CardTypes_8="ISO15693"
Configuration_CardReaderConfiguration_CardTypes_9="HID_ICLASS"
Configuration_CardReaderConfiguration_WiegandConfiguration_nbrOfLEDPins=0
Configuration_CardReaderConfiguration_WiegandConfiguration_beeper=false
Configuration_CardReaderConfiguration_WiegandConfiguration_beeperPin="I3"
Configuration_CardReaderConfiguration_WiegandConfiguration_LED1Pin="I1"
Configuration_CardReaderConfiguration_WiegandConfiguration_LED2Pin="I2"
Configuration_CardReaderConfiguration_WiegandConfiguration_LEDColor0="red"
Configuration_CardReaderConfiguration_WiegandConfiguration_LEDColor1="green"
Configuration_CardReaderConfiguration_WiegandConfiguration_LEDColor00="off"
Configuration_CardReaderConfiguration_WiegandConfiguration_LEDColor01="green"
Configuration_CardReaderConfiguration_WiegandConfiguration_LEDColor10="red"
Configuration_CardReaderConfiguration_WiegandConfiguration_LEDColor11="amber"
Configuration_CardReaderConfiguration_WiegandConfiguration_keypressFormat="FourBit"
Configuration_CardReaderConfiguration_OSDPConfiguration_OSDPAddress=0
...

Errors

A faulty request, such as missing required information or containing parameters the service doesn’t recognize will always return an error response, typically done with an HTTP 400 Bad request code unless the fault was over a websocket connection.

The error response also contains additional information. Typical FaultCodes for this API might be ter:TagMismatch, ter:InvalidArgval or ter:InvalidArgs.

TagMismatch error
{
  "Fault": env:Sender",
  "FaultCode": "ter:TagMismatch",
  FaultSubCode": null,
  "FaultReason": "Tag mismatch",
  "FaultMsg": "JSON parse error: axdsapi:CardReaderConfiguration - Unhandled field: 'WrongField' at pos 66 {WrongField..}"
}
Simple format error
Fault="env:Sender"
FaultCode="ter:TagMismatch"
FaultSubCode=null
FaultReason="Tag mismatch"
FaultMsg="JSON parse error: axdsapi:CardReaderConfiguration - Unhandled field: 'WrongField' at pos 66 {WrongField..}"
JSON formatted InvalidArgVal error
{
  "Fault": "env:Sender",
  "FaultCode": "ter:InvalidArgVal",
  "FaultSubCode": null,
  "FaultReason": "Invalid argument",
  "FaultMsg": "BeeperVolume should be <=100"
}
Google JSON formatted InvalidArgVal error
{
  "apiVersion": "1.0",
  "context": "context1602748757.259225",
  "error": {
    "code": -32700,
    "message": "BeeperVolume should be <=100",
    "errors": [
      {
        "domain": "env:Sender",
        "reason": "Invalid argument",
        "message": "BeeperVolume should be <=100",
        "location": "ter:InvalidArgVal"
      }
    ]
  }
}
JSONRPC2.0 formatted InvalidArgVal error
{
  "jsonrpc": "2.0",
  "error": {
    "code": -32700,
    "message": "BeeperVolume should be <=100,
    "data": {
      "Fault": "env:Sender",
      FaultCode": "ter:InvalidArgVal",
      "FaultSubCode": null,
      "FaultReason": "Invalid argument",
      "FaultMsg": "BeeperVolume should be <=100"
    }
  }
  "id": "id1602750260"
}

Configure reader integration protocols

Use this example to build the RFID reader together with an external Access control system. Please note that you need to configure which protocol to use if the controller doesn’t connect to the device and subscribes to integration events on its own.

The following code showcase two different ways to configure the OSDP reader integration protocol:

{
  get_response = intercom.GetConfiguration()
  config = get_response['CardReaderConfiguration']
  config['Protocol'] = 'OSDP'
  intercom.UpdateConfiguration(CardReaderConfiguration=config)
}
{
  "UpdateConfiguration": {
    "Configuration": {
      "CardReaderConfiguration": {
        "Protocol": "OSDP"
      }
    }
  }
}

Configure card types

Use this example to configure the card types by setting the CardTypes list in the CardReaderConfiguration. This should contain the desired card formats. Card formats not used by a site should be disabled, both from a security and performance perspective.

To find out what Card types that are supported on your device, you need to check GetSupportedTagTypes or GetServiceCapabilities.

The following code is used to check for supported cards and configure the Card types:

{
  supported_cards = intercom.GetSupportedTagTypes()
  config = intercom.GetConfiguration()
  enablecards = config.CardReaderConfiguration.CardTypes

  // Remove all LowFrequency cards from enabledcards list:
  for cardtype in supported_cards {
    if (cardtype.Category == 'LowFrequency') {
      enabledcards.remove(cardtype.Name)
    }
  }
  // Set the modified list of enabled CardTypes
  config.CardReaderConfiguration.CardTypes = enabledcards
  intercom.UpdateConfiguration(config)
}

The following codes showcases how you can change the card types. Both uses the UpdateConfiguration method, while the second one also includes the use of an URL:

POST to/vapix/intercom
{
  "UpdateConfiguration": {
    "Configuration": {
      "CardReaderConfiguration": {
        "CardTypes": ["MIFARE_Classic"]
      }
    }
  }
}
POST to /vapix/intercom/UpdateConfiguration
{
  "Configuration": {
    "CardReaderConfiguration": {
      "CardTypes": ["MIFARE_Classic"]
    }
  }
}

Configure PIN setting

Use this example to change the Pin settings and timeout. To do this, you need to call the UpdateConfiguration method and include the fields you wish to modify.

Configure the PIN settings
{
// Start with an empty config object:
  config = {}
  config.CardReaderConfiguration = {}
  config.CardReaderConfiguration.PinConfiguration = {}
// Only update these fields:
  config.CardReaderConfiguration.PinConfiguration.pinLength = 6
  config.CardReaderConfiguration.PinConfiguration.pinTimeout = 20
  intercom.UpdateConfiguration(config)
}
Change the timeout
{
  "UpdateConfiguration": {
    "Configuration": {
      "CardReaderConfiguration": {
        "PinConfiguration": {
          "pinLength": 6,
          "pinTimeout": 20
        }
      }
    }
  }
}

Third party integration

Use this example to configure your device so that a third party application can validate a card swipe before the card data gets sent over a configured reader protocol.

This involves:

  • Configuring the device to mask the internal reader. This is done by issuing a UpdateConfiguration or RegisterReader call.

  • Subscribing to the RFID events.

  • Calling the InjectTag, InjectKeySequence and SetUiFeedback methods.

The following code showcases how to validate the RFID data before sending it to a controller:

setup()
  {
    if (fixed) {
      config = {}
      config.CardReaderConfiguration.RegisteredReaderConfiguration.ReaderIds = ["ADP"]
      config.CardReaderConfiguration.RegisteredReaderConfiguration.Policy = "Fixed"
      intercom.UpdateConfiguration(config)
    }
    else
    {
      Timeout = intercom.RegisterReader(Readerid="ADP", DisableInternalReader = true, UnmaskIfLost = false)
    }
    // Subscribe to events, using RTSP metadata streaming, ONVIF PullPoint subscription or events in JSON over websocket: Using websocket endpoint /vapix/intercomws:

    device.websocket.connect("/vapix/intercomws")
    // Subscribe to event topics and functions: Send axev:subscribe with style = "ttMessage", topics=["Device/Intercom/RFID", "Device/Intercom/KeyPin"], functions = ["axev:notify", "axdsapi:SetUiFeedback"]
    device.websocket.send('{
      "apiVersion": "1.0",
      "method": "axev:subscribe",
      "params": {
        "style": "ttMessage",
        "functions": [
          "axev:notify",
          "axdsapi:SetUiFeedback"
        ],
        "topics": ["Device\/Intercom\/RFID", "Device\/Intercom\/KeyPin"]
      },
      "id": "firstsubscribe"
    }')
    device.websocket.on_message_handler = handle_websocket_message
  }

  handle_websocket_message(json_msg)
  {
    msg = json2object(json_msg)
    if (msg.method == 'axev:notify')
    {
      for notification in msg.params.notifications {
        if (notification.topic == "tns1:Device/tnsaxis:Intercom/RFID") {
        // Only process if Source with name Source is Internal
        source = SimpleItem_lookup(notification.data.Data.SimpleItem, "Source")
        if (source == "Internal") {
          UID = SimpleItem_lookup(notification.data.Data.SimpleItem, "UID") 
          // Take snapshot, lookup UID on own database or whatever is needed
          result = partner_validation(UID)
          // result is expected to contain a combination of InjectTag, InjectKey and feedback
          if (result.injecttag) {
            // Card is valid, call InjectTag, based on the notification, possibly with a prefix

            BitCount = SimpleItem_lookup (notification.data.Data.SimpleItem, "BitCount")
            // Possibly prefix the UID with additional hex data, e.g. 0xFACE
            if (result.prefix !="") {
              UID = result.prefix + UID
              BitCount = BitCount + strlen(result.prefix)*4
            }
            send_InjectTag("ADP", UID, BitCount)
          }
          if (result.injectkey !='') {
            // Injectkey should end with # to make it a PIN code, or C to issue a call
            send _InjectKeySequence ("ADP", result.injectkey)
          }
          if (result.feedback) {
            //Send some feedback, e.g. 'AccessDenied'
            send_feedback(result.feedback)
          }
        }
      }
    }
  }
}

send_InjectTag(external_readerid, UID, BitCount)
{
  device.websocket.send('{
    "apiVersion": "1.0",
    "method": "InjectTag",
    "params": {
      "Tag": {
        "TagUid": "' + UID + '",
        "BitCount": ' + BitCount + ",
        "ReaderId": "' + external_readerid + '"
      }
    },
    "id": "clientInjectTag"
  }')
}

send_InjectKeySequence(source, keys)
{
  device.websocket.send('{
    "apiVersion": "1.0",
    "method": "InjectKeySequence",
    "params": {
      "KeySequence": "' + keys + '",
      "Source": "' + source + '"
    },
    "id": "clientInjectKeySequence"
  }')
}

send_feedback(feedback)
{
  device.websocket.send('{
    "apiVersion": "1.0",
    "method": "SetUiFeedback",
    "params": {
      "highlevelFeedbacks": ['+feedback+']
    },
    "id": "clientSetUiFeedback"
  }')
}

By using UpdateConfiguration, you will be able to change RegisteredReaderConfiguration with Google JSON:

POST to /vapix/intercom (or send to ws://ip/vapix/intercomws
{
  "apiVersion": "1.0",
  "method": "UpdateConfiguration",
  "params": {
    "Configuration": {
      "CardReaderConfiguration": {
        "RegisteredReaderConfiguration": {
          "ReaderIds": ["ADP"],
          "Policy": "Fixed"
        }
      }
    }
  },
  "context": "updateRegisteredReaderConfig"
}

By using this code, you will be able to use the RFID event notification over a websocket:

{
  "apiVersion": "1.0",
  "method": "axev:notify",
  "params": {
    "notifications": [
      {
        "topic": "tns1:Device\/tnsaxis:Intercom\/RFID",
        "timestamp": "2020-10-04T11:30:08.885643Z",
        "data": {
          "Source": { 
            "SimpleItem": [
              {
                "Name": "Source", "Value": "Internal"
              }
            ]
          },
          "Data": {
            "SimpleItem": [
              {
                "Name": "UIDFormat", "Value": "Raw"
              },
              {
                "Name": "TagType", "Value": "MIFARE_Classic"
              },
              {
                "Name": "BitCount", "Value": "32"
              },
              {
                "Name": "UID", "Value": "C0DE1234"
              }
            ]
          }
        }
      }
    ]
  }
}

API specifications

Common data types

ID

Identifies a structure.

Base type: String (maxLength=64, minLength=0)

Name

The type used for names of logical and/or physical entities.

Base type: String (maxLength=64, minLength=0)

Attribute

An attribute containing a name and a value.

{
  "Name": "string",
  "Value": "string"
}
FieldTypeDescription
NameStringThe attribute name.
ValueStringThe value of the attribute.

AttributeInfo

Contains the attribute description.

{
  "Name": "string",
  "Value": "string",
  "Type": "string"
}
FieldTypeDescription
NameStringThe attribute name.
ValueStringThe attribute value.
TypeStringThe attribute type (boolean, integer, string)

Card reader specific types

CardType

This chapter describes the different card types. See Service capabilities for a complete list of cards supported by the products.

{
  "Name": "MIFARE_Classic",
  "DisplayName": "MIFARE Classic",
  "Category": "HighFrequency",
  "DataSources": ["CSN",...]
}
FieldTypeDescription
NameIdThe card type identifier. See CardTypeNames for possible values.
DisplayNameIdThe UI-friendly name.
CategoryIdThe category. See CardTypeCategory for possible values.
DataSourcesId arrayThe list of data sources that are supported. See CardDataSources for possible values.

CardTypeCategory

ValueDescription
HighFrequency13.56 MHz card type
LowFrequency125 kHz card type

CardTypeNames

ValueDescription
EM4X02EM4x02
HITAG_1_SHITAG 1/HITAG S
HITAG_2HITAG 2
EM4X50EM4x50
T55X7T55x7
ISOFDX_BISO FDX-B
EM4026EM4026
HITAG_UHITAG U
EM4305EM4305
HID_PROXHID Prox
ISOHDX_TIRISISO HDX TIRIS
COTAGCotag
IOPROXioProx
INDALAIndala
NEXWATCHNexWatch
AWIDAWID
GPROXG-Prox
PYRAMIDPyramid
KERIKeri
DEISTERDeister
CARDAXCardax
NEDAPNedap
PACPAC
IDTECKIDTECK
ULTRAPROXULTRAPROX
ICTICT
ISONASISONAS
MIFAREGeneric MIFARE®
MIFARE_ClassicMIFARE Classic®
MIFARE_DESFireMIFARE® DESFire®
MIFARE_PlusMIFARE Plus®
MIFARE_UltralightMIFARE Ultralight®
ISO14443BISO 14443–B
ISO15693ISO 15693
LEGICLEGIC
HID_ICLASSHID iClass
FELICAFeliCa
SRXSRX
NFC_P2PNFC P2P
BLEBluetooth Low Energy
TOPAZTOPAZ
CTSCTS

KeypressOutputFormat

This chapter showcases how the PIN is formatted when it is sent to the access control.

ValueDescription
FourBitPIN “1234” becomes 0x1 0x2 0x3 0x4 on the wire.
EightBitZeroPaddedPIN “1234” becomes 0x01 0x02 0x03 0x04 on the wire.
EightBitInvertPaddedPIN “1234” becomes 0xE1 0xD2 0xC3 0xB4 on the wire.
Wiegand26PIN is encoded in a Wiegand26 format with an 8 bit facility code and a 16 bit id.
Wiegand34PIN is encoded in a Wiegand34 format with a 16 bit facility code and a 16 bit id.
Wiegand37PIN is encoded in a Wiegand37 format (H10302) with a 35 bit data.
Wiegand37FacilityCodePIN is encoded in a Wiegand34 format (H10304) with a 16 bit facility code and a 19 bit id.

CardOutputFormat

This chapter showcases how card data is formatted when it is sent to the access control.

ValueDescription
RawThe card data is transmitted as it is.
Wiegand26The card data is encoded in a Wiegand26 format with an 8 bit facility code and a 16 bit id.
Wiegand34The card data is encoded in a Wiegand34 format with a 16 bit facility code and a 16 bit id.
Wiegand37The card data is encoded in a Wiegand37 format (H10302) with a 35 bit data.
Wiegand37FacilityCodeThe card data is encoded in a Wiegand37 format (H10304) with a 16 bit facility code and a 19 bit id.
CustomUse the OutputFormatConfiguration option as described in CustomOutputFormatConfiguration.

FacilityCodeOverrideMode

This chapter describes the different behaviors of overriding the facility code.

ValueDescription
AutoOverrides will not be performed and creates a facility code from the input data auto detection: Either use the card’s original facility code or forge it from excess bits of a card number. This is the default option.
OptionalUses the facility code from the input data, otherwise overrides with a configured value (optional).
OverrideAlways overrides with a specified FacilityCode.

ParityType

This chapter specifies the parity bit types.

ValueDescription
NoneParity bit does not exist.
EvenThe parity bit is even.
OddThe parity bit is odd.
Fix0The parity bit is always zero.
Fix1The parity bit is always one.

CustomOutputFormatConfiguration

This chapter showcases the custom parameters for when the cardFormat is “Custom”. This part defines the format if no other value in the CardOutputFormat can be used.

{
  "facilityCodeSize": 8,
  "cardNumberSize": 16,
  "startParity": "Even",
  "startParityBits": 12,
  "stopParity": "Odd",
  "stopParityBits": 12
}
FieldTypeDescription
facilityCodeSizeIntegerThe size of the facility code.
cardNumberSizeIntegerThe size of the card number.
startParityIdDefault value is None.
startParityBitsIntegerShows the number of data bits that are calculated in the start parity, counted from the first bit.
stopParityIdDefault value is None.
stopParityBitsIntegerShows the number of data bits calculated in the stop parity, counted backwards from the last bit.

OutputFormatConfiguration

This chapter specifies how the card data is configured and sent to the output.

{
  "cardFormat": "Raw",
  "cardFacilityCodeOverrideMode": "Auto",
  "cardFacilityCode": 0,
  "Custom": {
    CustomOutputFormatConfiguration
  }
}
FieldTypeDescripion
cardFormatIdHow the card data is formatted. See CardOutputFormat for potential values and for supported values. The default value is Raw, which means that all fields that follows after this one is disregarded.
cardFacilityCodeOverrideModeIdSee FacilityCodeOverrideMode for supported values (default value is Auto).
cardFacilityCodeIntegerThe facility code to override the card in cases where the override mode is set to either Optional or Override. The maximum value depends on the card format that was selected: 255 for Wiegand26 (8 bits), 65535 for Wiegand34 and Wiegand37FacilityCode (16 bits).
CustomSee CustomOutputFormatConfigurationThe custom parameters in cases were cardFormat is Custom.

IOPinName

This chapter shows the names for the general IO pins.

ValueDescription
I1I/O 1
I2I/O 2
I3I/O 3
I4I/O 4

AccesscontrolIntegrationProtocol

This chapter goes over the different ways that the device can communicate with an access control system.

ValueDescription
NoneNo protocol selected.
IPAccessVAPIX Reader over IP, see IPIntegrationProtocol for more information.
OSDPOSDP over RS485.
WiegandWiegand.

ColorName

This chapter presents the string of colors that may be supported on your device.

ValueDescription
offOff
redRed
greenGreen
blueBlue
amberAmber
cyanCyan
magentaMagenta
whiteWhite

WiegandConfiguration

This chapter goes over the configuration used for the Wiegand output to change the LED and beeper. All fields are optional and will keep their existing value if nothing is set.

{
  "nbrOfLEDPins": 3,
  "beeper": true,
  "beeperPin": "I1",
  "LED1Pin": "I2",
  "LED2Pin": "I3",
  "pulseWidth": 40,
  "pulseInterval": 2000,
  "frameInterval": 25000,
  "LEDColorDefault": "off",
  "LEDColor0": "red",
  "LEDColor1": "green",
  "LEDColor00": "off",
  "LEDColor01": "red",
  "LEDColor10": "green",
  "LEDColor11": "amber",
  "keypressFormat": "FourBit",
  "keypressFacilityCode": 0
}
FieldTypeDescription
nbrOfLEDPinsIntegerThe number of LED control pins that is connected to the access control system. 0, 1 or 2 are supported.
beeperBooleanTrue if a beeper control line is connected to the device.
beeperPinIdThe I/O input pin that the beeper is connected to. See IOPinName for additional information.
LED1PinIdThe I/O input pin that the LED1 is connected to (normally green or red/green). See IOPinName for additional information.
LED2PinIdThe I/O input pin that the LED2 is connected to (normally red). See IOPinName for additional information.
pulseWidthIntegerThe time of the data pulse, measured in μs. Min 20, Max: 100, Default: 40.
pulseIntervalIntegerThe time between data pulses, measured in μs. Min: 200, Max: 20000, Default: 2000.
frameIntervalIntegerThe minimum time between data transfers, measured in μs. Min: 20000, Max: 1000000, Default: 25000.
LEDColorDefaultIdThe color that is shown if no wires are connected (i.e. nbrOfLEDPins. See ColorName for accepted colors.
LEDColor0IdThe color when 1 LED control wire is connected and the state is 0. See ColorName for accepted colors.
LEDColor1IdThe color when 1 LED control wire is connected and the state is 1. See ColorName for accepted colors.
LEDColor00IdThe color when 2 LED control wires are connected and the state is 00. See ColorName for accepted colors.
LEDColor01IdThe color when 2 LED control wires are connected and the state is 01, (LED 1 is 1 and LED2 is 0). See ColorName for accepted colors.
LEDColor10IdThe color when 2 LED control wires are connected and the state is 10, (LED 1 is 0 and LED2 is 1). See ColorName for accepted colors.
LEDColor11IdThe color when 2 LED control wires are connected and the state is 11 (LED 1 is 1 and LED2 is 1). See ColorName for accepted colors.
keypressFormatIdThe PIN code format. See KeypressOutputFormat and ServiceCapabilities for additional information and supported values. Default value is FourBit.
keypressFacilityCodeIntegerThe facility code to override the PIN code (default is 0). Maximum value depends on the keypress format: 255 for Wiegand26 (8 bits), 65535 for Wiegand34 and Wiegand37FacilityCode (16 bits).

OSDPConfiguration

This chapter shows the configuration options for the OSDP.

{
  "OSDPAddress": 0
}
FieldTypeDescription
OSDPAddressIntegerThe OSDP PD address (i.e. client). Min=0, Max=126, Default=0.

PinConfiguration

This chapter goes through the configuration options for PIN length and timeout. The PIN should match the one set in the Access Control Unit.

{
  "pinLength": 4,
  "pinTimeout": 10
}
FieldTypeDescription
pinLengthIntegerThe number of digits in the PIN code. Min=0 (PIN is disabled), Max=32, Default=4. This parameter should match the Access control unit configuration.
pinTimeoutIntegerThe number of seconds that should pass before the device goes back to idle mode when no PIN is received. Min =1, Max=60, Default=10. This parameter should match the Access control unit configuration.

RequestAccessConfiguration

Configuration options for the Axis Request Access protocol. The name is derived from Target and Source unless present in the AccessPoint. See IPAccessConfiguration for additional information.

{
  "Name": "Door - Reader Entrance A8207",
  "Id": "e6608ad31a480904f9646e936cc8e86a",
  "Address": "a1601.example.com",
  "AccessControllerToken": "Axis-00408c184be0+AccessController",
  "SourceToken": "Axis-00408c184be0:1581679815.571711000",
  "TargetToken": "Axis-00408c184be0:1581679815.080670000",
  "AccessPointToken": "Axis-00408c184be0:1581679823.844035000"
}
FieldTypeDescription
NameStringThe Nicename of the Access point.
IdStringThe internal id of the RequestAccess (Access point) configuration.
AddressStringThe address used to access the correct controller.
AccessControlTokenStringThe access controller token that should be accessed.
SourceTokenStringThe source token that should be used (Reader / IdPoint.
TargetTokenStringThe target token that should be used (Door)
AccessPointTokenStringThe AccessPoint token that should be used.

IPIntegrationProtocol

The supported IP integration protocols. See IPAccessConfiguration for additional information.

ValueDescription
NoneNo protocol is selected.
RequestAccessAxis RequestAccess.
RemoteActivityAxis Indicated RemoteActivity.

ProbelIPAccessStatus

The status of a ProbelAccessConfiguration request.

ValueDescription
OKEverything is ok.
NoAccessPointsConnection is ok, but could not find any access points.
UnknownErrorUnknown error.
ConnectionErrorFailed to connect to the specified address or scheme.
AuthenticationErrorFailed to authenticate.
CertificateErrorFailed to validate the certificate.

IPAccessScheme

The supported IP integration transport protocols.

ValueDescription
httpsEncrypted HTTP
httpUnencrypted HTTP

IPAccessConfiguration

Configuration options for IP based access control integration. See IP Access configuration for additional information.

{
  "Scheme": "https",
  "Address": "a1601.example.com",
  "Username": "a8207userOnA1601",
  "Password": "a8207passwordOnA1601",
  "VerifyCertificate": true,
  "IPProtocol": "RemoteActivity",
  "RequestAccessConfiguration": {
    RequestAccessConfiguration
  }
}
FieldTypeDescription
SchemeStringThe scheme that should be used (optional). See IPAccessScheme for additional information.
AddressStringThe address that access the controller. A typical hostname is [:port].
UsernameStringThe username.
PasswordStringThe password.
VerifyCertificateStringAn option to disable the certificate verification. Default value is true.
IPProtocolStringThe protocol that should be used (optional). See IPIntegrationProtocol for additional information.
RequestAccessConfigurationThe protocol specific configuration.

CompatibilityConfiguration

Shows the card reader compatibility, which makes it possible to extend the configuration options without changing the configuration structures.

{
  "CompatibilityConfigs": [
    {
      Attribute
    },
    ...
  ]
}
FieldTypeDescription
CompatibilityConfigsAttribute arrayA list of compatibility configuration values. See ServiceCapabilities for additional information.

CardReaderConfiguration

Configurations for the card reader functionality, such as the integration protocol, what card types to enable, etc. All fields are optional, meaning that their current value will be kept unless specified in a Set or Update request.

{
  "Protocol": "Wiegand",
  "CardTypes": [ "EM4X02",..],
  "WiegandConfiguration": {
    WiegandConfiguration
  },
  "OSDPConfiguration": {
    OSDPConfiguration
  },
  "PinConfiguration": {
    PinConfiguration
  },
  "IPAccessConfiguration": {
    IPAccessConfiguration
  },
  "CompatibilityConfiguration": {
    CompatibilityConfiguration
  },
  "RegisteredReaderConfiguration": {
    RegisteredReaderConfiguration
  },
  "OutputFormat": {
    OutputFormatConfiguration
  }
  "SensitiveRFIDEventEnabled": false,
  "SensitivePINEventEnabled": false
}
FieldTypeDescription
ProtocolIdThe protocol that should be used. See AccesscontrolIntegrationProtocol for additional information.
CardTypesId arrayA list of card types that should be accepted. See CardTypeNames for capabilities and possible values.
WiegandConfigurationWiegandConfigurationThe Wiegand configuration.
OSDPConfigurationOSDPConfigurationThe OSDP configuration.
PinConfigurationPinConfigurationThe PIN configuration.
IPAccessConfigurationIPAccessConfigurationThe IPAccessConfiguration.
CompatibilityConfigurationCompatibilityConfigurationCompatibility flags.
RegisteredReaderConfigurationRegisteredReaderConfigurationSpecifies how the clients (typically an application) are allowed to use InjectTag.
OutputFormatOutputFormatConfigurationSpecifies how the card data should be formatted.
SensitiveRFIDEventEnabledBooleanTrue if the actual UID and card number is present in events.
SensitivePINEventEnabledBooleanTrue if the actual PIN is present in events.

TagUidType

The type used for the UID of a tag. Base type is string, maxLength = 64 and minLength = 0.

TagPresentedInfo

Describes the tag together with the metadata.

{
  "TagUid": "CA4DDA7A",
  "BitCount": 32,
  "TagType": "MIFARE_Classic",
  "ReaderId": "Internal",
  "Age": 1,
  "FacilityCode": "",
  "CardNumber": "",
  "Format": "Raw",
  "Masked": true
}
FieldTypeDescription
TagUidTagUidTypeThe UID of the tag.
BitCountIntegerThe number of bits in TagUid.
TagTypeIdIdentifies the tag type, e.g. MIFARE_CLASSIC. See CardTypeNames for additional information.
ReaderIdIdThe ID of the reader. “Internal” is the default name for the built-in reader, but this can be set with an InjectTag call.
AgeIntegerHow much time has passed since the tag was presented, measured in seconds.
FacilityCodeIdThe facility code in decimals. Please note that a number can be to big for the integer. Null or ”“ means that the facility code is not present on the detected or selected format.
CardNumberIdThe card number in decimals. Please note that a number can be to big for the integer. Null or ”“ means that the card number is not present on the detected or selected format.
FormatIdThe detected card data format. Default value is Raw. See ServiceCapabilities for supported values.
MaskedBooleanTrue if the reader is masked. Default value is false.

CardDataSources

Defines the possible data sources. All card types supports CSN (Card serial number), but other sources may be possible depending on the card type.

ValueDescription
CSNUses Card serial number (CSN) as the input.
SecureIdUses the secure id as the input, e.g. iClass PAC bits or MIFARE DesFire SecureId configured for Random Id.
DataUses data retrieved as the input.

RegisteredReaderPolicy

Lets you mask the newly registered readers.

ValueDescription
FixedIgnores masking so that only defined ReaderIds in the
RegisteredReaderConfiguration are allowed to send an InjectTag to the Access control.
AutoThe default value that accepts the masking request provided by the application readers.
Masking is provided in the RegisterReader call.

RegisteredReaderConfiguration

Specifies how the clients (usually an application) are allowed to use the InjectTag.

{
  "ReaderIds": [ "Internal",.. ],
  "Policy": "Auto"
}
FieldTypeDescription
ReaderIdsId arrayLists the readers that are allowed to send an InjectTag to access the control integration using Protocol. The default value is Internal. This can only be done when Policy is Fixed. See RegisteredReaderPolicy for additional information.
PolicyIdThe policy that should be used. See RegisteredReaderPolicy for additional information.

IntercomReaderIds

Defines the readers provided by the reader that can be masked.

ValueDescription
InternalThe built-in reader.

ReaderIdWithMask

Shows if the reader is masked or not.

{
  "readerId": "Internal",
  "isMasked": true
}
FieldType
readerIdId
isMaskedBoolean

Service capabilities

The GetServiceCapabilities call can be used to retrieve the capabilities of a service, such as extensions and product specific capabilities and implementation methods.

IntegerValidator

Assigns min/max values to an integer and performs the client side validation of the user input.

{
  "Name": "pinLength",
  "Min": 0,
  "Max": 32
}
FieldTypeDescription
NameIdIdentifies the integer in the configuration.
MinIntegerMinimum value of the integer.
MaxIntegerMaximum value of the integer.

CompatibilityFlag

The available CompatibilityConfig names used in Attribute and AttributeInfo.

ValueDescription
ByteReversalReverses the byte order for UUID (all card types and bit lengths).
Max32bitUses maximum 32 bits of the UUID (all card types and bit lengths).

ServiceCapabilities

Reflects the optional, static functionality of a service that won’t change when a device is active.

{
  "Version": "string",
  "Call": true,
  "DTMFEvent": true,
  "CallButton": true,
  "CallKeypad": true,
  "PinKeypad": true,
  "Reader": true,
  "uiLeds": [{UiLed},..],
  "AccesscontrolIntegrationProtocols": ["None",..],
  "SupportedCards": [{CardType},..],
  "SupportedIOPins": ["I1",..],
  "SupportedColorNames": ["off",..],
  "IntegerValidators": [{IntegerValidator},..],
  "CompatibilityConfigs": [{AttributeInfo},..],
  "SupportedKeypressOutputFormatWiegand": ["FourBit",..],
  "SupportedCardOutputFormat": ["Raw",..],
  "SupportedFacilityCodeOverrideMode": ["Auto",..],
  "SupportedParityType": ["None",..],
  "SupportedCallButtonIdleBehavior": ["Automatic",..],
  "SupportedDefaultContactSorting": ["SortByFirstName",..],
  "SupportedDefaultNameFormat": ["FirstNameFirst",..],
}
FieldTypeDescription
VersionStringThe service version.
CallBooleanTrue if Call is supported.
DTMFEventBooleanTrue if DTMFEvent operations are supported.
CallButtonBooleanTrue if Callbutton is available.
CallKeypadBooleanTrue if Keypad is available.
PinKeypadBooleanTrue if a Pinpad is available.
ReaderBooleanTrue if your device has a reader.
uiLedsUiLed arrayLists all LED-lights available on your system.
AccesscontrolIntegrationProtocolsID arrayLists the communication protocols with supported access controller. See AccesscontrolIntegrationProtocol for possible values.
SupportedCardsCardType arrayLists supported card types.
SupportedIOPinsID arrayLists supported I/O pins. See IOPinName for possible values.
SupportedColorNamesID arrayLists supported color names. See ColorName for possible values.
IntegerValidatorsIntegerValidator arrayLists limits for integer configuration fields.
CompatibilityConfigsAttributeInfo arrayLists supported compatibility configuration values. See CompatibilityFlag for possible values.
SupportedKeyPressOutputFormatWiegandID arrayLists the supported keypress formats for wiegand. See KeypressOutputFormat for possible values.
SupportedCardOutputFormatID arrayLists the supported card formats. See CardOutputFormat for possible values.
SupportedFacilityCodeOverrideModeID arrayLists the supported facility code override modes. See FacilityCodeOverrideMode for possible values.
SupportedParityTypeID arrayLists the supported parity types. See ParityType for possible values.
SupportedCallButtonIdleBehaviorID arrayLists the supported call button idle behavior. See CallButtonIdleBehavior for possible values.
SupportedDefaultContactSortingID arrayLists the possible values for default contact sorting. See DefaultContactSorting for possible values.
SupportedDefaultNameFormatID arrayLists the supported default name format values. See DefaultNameFormat for possible values.

GetServiceCapabilities commands

Returns the capabilities of the service.

Request

{}
  • Empty.

Response

{
  "Capabilities": {ServiceCapabilities}
}
  • The capability response message. Contains the requested Call service capabilities.

Configuration

The configuration options for the overall functionality are managed through the data structure and retrieved by using a GetConfiguration command or a REST:ful GET resource along with a GET command to /vapix/intercom/Configuration, while using either UpdateConfiguration or REST:ful with a POST to /vapix/intercom/Configurationcan be employed when you want to modify a configuration. It is possible to update selected parts of the configuration with the latter command by selecting the fields that should be changed.

Configuration types

Configuration

This command is used to configure an entity for the intercom functionality. An optional field not set by SetConfiguration will keep its current value.

{
  "Version": "string",
  "CallTriggersEnabled": true,
  "CallByNumbersEnabled": true,
  "DefaultContractSorting": "SortByFirstName",
  "DefaultNameFormat": "FirstNameFirst",
  "DefaultCallByNumberSIPAccountId": "Id",
  "AudioclipVolume": 100,
  "BeeperVolume": 80,
  "PresenceTimeout": 12,
  "CardReaderConfiguration": {CardReaderConfiguration},
  "CallButtonIdleBehavior": "Automatic"
}
FieldTypeDescription
VersionStringThe configuration version.
CallTriggersEnabledBooleanTrue if the processing triggers in the PhonebookEntries are enabled.
CallByNumbersEnabledBooleanTrue if calls to dialed numbers that does not match any CallRule is enabled.
DefaultContactSortingDefaultContactSortingThe default method when sorting contacts.
DefaultNameFormatDefaultNameFormatThe default format for the contact names.
DefaultCallByNumberSIPAccountIdIdThe default SIPAccount used by CallByNumber (optional).
AudioclipVolumeIntegerThe volume for the built-in audio files (button presses, calling, ringing, etc.) Min: 0, Max: 1000, Default: 100.
BeeperVolumeIntegerThe volume for the beeper (Wiegand and OSDP) feedback. Min: 0, Max: 100, Default: 80.
PresenceTimeoutIntegerThe time (in seconds) before user presence is timed out. Min: 2, Max: 86400, Default: 12.
CardReaderConfigurationCardReaderConfigurationThe card reader related configurations.
CallButtonIdleBehaviorCallButtonIdleBehaviorThe idle behavior for the call button.

DefaultContactSorting

The default method for sorting contacts.

ValueDescription
SortByFirstNameSorts the contacts alphabetically according to their first names.
SortByLastNameSorts the contacts alphabetically according to their last names.

DefaultNameFormat

The default format for the contact names.

ValueDescription
FirstNameFirstName entries will be formatted according to FirstName + " “ + LastName.
LastNameFirstName entries will be formatted according to LastName + " “ + FirstName.

SetConfiguration

This method is used to set the general configuration for the intercom.

Request

{
  "Configuration": { 
    Configuration
  }
}
ParameterDescription
ConfigurationThe configuration that should be set.

Response

{}
ParameterDescription
{}Empty.

Error codes

CodeDescription
env:Sender
ter:InvalidArgVal
The request contains an invalid argument.
env:Sender
ter:InvalidArgs
The request is missing something or has an invalid combination of input.

UpdateConfiguration

This method is used to update the general configuration. Optional fields not present in the request will keep their current values.

Request

{
  "Configuration": { Configuration }
}
ParameterDescription
ConfigurationThe configuration that should be set.

Response

{}
ParameterDescription
{}Empty.

Error codes

CodeDescription
env:Sender
ter:InvalidArgVal
The request contains an invalid argument.
env:Sender
ter:InvalidArgs
The request is missing something or has an invalid combination of inputs.

GetConfiguration

This method is used to request the full configuration for the intercom.

Request

{
  "includeImageFile": <boolean>
}
ParameterDescription
includeImageFileIf set to true, all imageFile fields will be included in the response (optional).

Response

{
"Configuration": { Configuration }
}
ParameterDescription
ConfigurationThe configuration structure.

Configuration

This method implements the REST API for the device configuration and handles both GET, SET and REMOVE.

  • Use GET /vapix/intercom/Configuration to fetch the configuration.

  • Use POST /vapix/intercom/Configuration to initiate the UpdateConfiguration .

  • Use PUT /vapix/intercom/Configuration to initiate the SetConfiguration.

Request

{
  "includeImageFile": <boolean>,
  "Configuration": {
    Configuration
  },
  "imageFile": {
    ImageFile
  }
}
ParameterDescription
includeImageFileIf set to true, all imageFile fields will be included in the response (optional).
ConfigurationThe configuration that should be set.
imageFileThe image file that should be used to update an image.

Response

{
  "Configuration": {
    Configuration
  }
}
ParameterDescription
ConfigurationThe configuration structure.

Error codes

CodeDescription
env:Sender
ter:InvalidArgVal
The request contains an invalid argument.
env:Sender
ter:InvalidArgs
The request is missing something or has an invalid combination of inputs.

Server report

CallButtonInformation

This method summaries the call button configuration.

{
  "VMSCallEnabled": true,
  "NumberOfRecipients": 0
}
ParameterTypeDescription
VMSCallEnabledBooleanThe current status of the CallButtonVMS.
NumberOfRecipientsIntegerThe number of contacts for the call button.

ContactsInformation

This method summarizes the contact configurations.

{
  "NumberOfContacts": 0,
  "NumberOfOrganizations": 0
}
ParameterTypeDescription
NumberOfContactsIntegerThe total number of contacts.
NumberOfOrganizationsIntegerThe total number of organizations.

GetServerReport

This method is used when you want to return the safe and desired parts of the server report.

Request

{}

Response

{
  "Configuration": {Configuration},
  "DiscardedFields": ["string", ...],
  "CallButtonInformation": {CallButtonInformation},
  "ContactsInformation": {ContactsInformation}
}
ParameterDescription
ConfigurationA structure containing the configuration fields.
DiscardedFieldsThe configuration fields discarded due to containing sensitive data.
CallButtonInformationThe call button information.
ContactsInformationThe contact information.

Card reader configuration and operation

Supported card reader operations:

ParameterDescription
GetCardReaderConfigurationAlternative operation to GetConfiguration when only the CardReaderConfiguration part is needed.
GetSupportedTagTypesRetrieve a list of tag types supported by the reader. This operation is also available with GetServiceCapabilities.
GetDefaultTagTypesRetrieve a list with the default enabled card types.
GetLastTagRetrieve the UID of the last presented tag.
InjectTagSimulates presenting an RFID tag, which is useful when you are integrating with a third party application and acts as a filter and/or transforms the tag information.
RegisterReaderRegisters either an external or application reader to be used when processing tags.
UnregisterReaderUnregisters either an external or application reader to be used when processing tags.
KeepAliveReaderExtends a registration.
GetCurrentReadersExposes the currently available readers.

GetCardReaderConfiguration

This method is used when you want to send out a request for the full configuration.

Request

{}
ParameterDescription
{}Empty.

Response

{
  "CardReaderConfiguration": {
    CardReaderConfiguration
  }
}
ParameterDescription
CardReaderConfigurationThe configuration structure.

GetSupportedTagTypes

This method is used when you want to retrieve a list of tag types supported by the reader.

Request

{}
ParameterDescription
{}Empty.

Response

{
  "CardTypes": [
    {
      CardType
    },
    ...
  ]
}
ParameterDescription
CardTypesThe supported tag types.

GetDefaultTagTypes

This method is used when you want to retrieve a list of tag types enabled by default.

Request

{}
ParameterDescription
{}Empty.

Response

{
  "CardTypes": [
    "<Id>",
    ...
  ]
}
ParameterDescription
CardTypesThe default card types.

GetLastTag

This method is used when you want to retrieve the UID of the last tag that was presented.

Request

{
  "ReaderId": "<Id>"
}
ParameterDescription
ReaderIdOptional reader ID that the last tag should be retrieved from. The last tag will be retrieved If this parameter is not specified.

Response

{
  "Tag": {
    TagPresentedInfo
  }
}
ParameterDescription
TagThe UID of the tag last seen.

Error codes

CodeDescription
ter:NotFoundNo tag with the specified reader id was found.
env:Receiver
ter:ActionNotSupported
ter:NotSupported
The method is not supported.

GetTag

This method is used when you want to retrieve the UID of either the last presented tag or one recently presented that optionally matches the specified timestamp taken from the Device/Intercom/RFID event notification. If neither ReaderId nor timestamp is specified, the last tag will be returned

Request

{
  "ReaderId": "<Id>",
  "timestamp": "<string>"
}
ParameterDescription
ReaderIdOptional reader ID that the last tag should be retrieved from. The last tag will be retrieved If this parameter is not specified.
timestampA timestamp of the tag taken from the Device/Intercom/RFID event notification. Providing the timestamp assures that the data corresponds to the event received.

Response

{
  "Tag": {
    "TagPresentedInfo"
  }
}
ParameterDescription
TagThe UID of the matching the input parameters.

Error codes

CodeDescription
ter:NotFoundNo tag with the specified reader ID and timestamp was found.
ter:NotSupportedThe method is not supported.

InjectTag

This method is used when you want to simulate presenting an RFID tag to the intercom reader. If the internal reader has been masked, it is recommended to make sure that the ReaderId is no longer Internal in the supplied tag.

Request

{
  "Tag": {
    TagPresentedInfo
  },
  "CardData": [
    {
      CardData
    },
    ...
  ]
}
ParameterDescription
TagThe tag that should be set up.
CardDataThe card data that is returned.

Response

{}
ParameterDescription
{}Empty.

Error codes

CodeDescription
env:Sender
ter:InvalidArgVal
The request contains an invalid argument.
env:Sender
ter:InvalidArgs
The request is missing something or has an invalid combination of input.
env:Receiver
ter:ActionNotSupported
ter:NotSupported
The method is not supported.

RegisterReader

This method is used when you want to register an external application reader that can be used to process tags. This makes it possible to mask the internal reader so a tag from a normal card swipe don’t use a configured integration protocol.

Request

{
  "ReaderId": "<Id>",
  "DisableInternalReader": <boolean>
  "MaskedReaderIds": [
    "<Id>",
    ...
  ],
  "UnmaskIfLost": <boolean>
}
ParameterDescription
ReaderIdThe ID of the external reader.
DisableInternalReaderIf this parameter exists and is true all internal readers will be added to MaskedReaderIds automatically (optional).
MaskedReaderIdsThe reader ID for internal and external application readers that can be masked. Masked readers are not allowed to send credentials to the Access control, but the data will still be available as an RFID event. Default value doesn’t mask anything and the values for the internal reader Ids can be found in IntercomReaderIds enum.
UnmaskIfLostIf true the masked readers will be released when the timeout expires (optional). The default value is false.

Response

{
  "Timeout": <int>
}
ParameterDescription
TimeoutThe timeout, measured in seconds, until the registration expires.

Error codes

CodeDescription
env:Sender
ter:InvalidArgVal
The request contains an invalid argument.
env:Sender
ter:InvalidArgs
The request is missing something or has an invalid combination of input.
env:Receiver
ter:Action
ter:Failure
The operation failed.

UnregisterReader

This method is used when you want to un-register either an external reader or an application reader from being used to process tags.

Request

{
  "ReaderId": "<Id>",
}
ParameterDescription
ReaderIdThe Id of the external reader.

Response

{}
ParameterDescription
{}Empty.

Error codes

CodeDescription
env:Sender
ter:InvalidArgVal
The request contains an invalid argument.
env:Sender
ter:InvalidArgs
The request is missing something or has an invalid combination of input.

KeepAliveReader

This method is used when you want to extend the timeout given in the RegisterReader call. An error will be returned if no call was made for the ReaderId or if it had already timed out.

Request

{
  "ReaderId": "<Id>",
}
ParameterDescription
ReaderIdThe Id of the external reader.

Response

{
  "Timeout": <int>
}
ParameterDescription
TimeoutTimeout in seconds until the registration expires.

Error codes

CodeDescription
env:Sender
ter:InvalidArgVal
The request contains an invalid argument.
env:Sender
ter:InvalidArgs
The request is missing something or has an invalid combination of input.

GetCurrentReaders

This method is used when you want to expose currently available readers.

Request

{}
ParameterDescription
{}Empty.

Response

{
  "Readers": [
    {
      ReaderIdWithMask
    },
    ...
  ]
}
ParameterDescription
ReadersThe array of strings with the available ReaderIds together with a masked flag.

IP Access configuration

The IPAccessConfiguration and RequestAccessConfiguration structures in the CardReaderConfiguration are used when IPAccess is selected as the AccesscontrolIntegrationProtocol.

Using IPIntegrationProtocol (IPProtocol) in the IPAccessConfiguration defines the protocol, while RequestAccess and RemoteActivity creates outbound connections to the access controller by using the configuration found in RequestAccessConfiguration. The RequestAccess uses a HTTP request with a command to the Access control service to send card and PIN information as well as the returned AccessGranted value and Reason to provide feedback to the user.

RemoteActivity creates and keeps a websocket connection to the IdPoint service of the controller by receiving notifications in order to maintain the proper feedback state. It also have the benefit of keeping track of the full access controller feedback whereas RequestAccess only provides feedback for operations initiated by your Intercom device.

The ProbeIPAccessConfiguration and UpdateIPAccessConfiguration functions can be used to set up integrations with door controllers, where IPIntegrationProtocol (IPProtocol) in IPAccessConfiguration will be determined based on the capabilities detected in the controller when these functions are used.

Enumeration: ProbeIPAccessStatus

The status of a ProbeIPAccessConfiguration request.

ValueDescription
OKEverything is OK.
NoAccessPointsConnection is OK, but could not find any access points.
UnknownErrorUnknown error.
ConnectionErrorFailed to connect to the specified address and scheme.
AuthenticationErrorFailed to authenticate.
CertificateErrorFailed to validate the certificate.

IPAccessOption

This structure is returned as a response to IP Access configuration.

{
  "Name": "Door - Reader Entrance A8207",
  "Id": "e6608ad31a480904f9646e936cc8e86a",
  "IPProtocol": "RemoteActivity"
}
FieldTypeDescription
NameStringThe door name visible to the user.
IdStringThe internal ID of the RequestAccess configuration.
IPProtocolStringThe detected protocol. See IPIntegrationProtocol for additional information.

ProbeIPAccessConfiguration

Probe an IP based access controller and return a list of selectable configurations. Please note that any current configuration will be overridden by the specified input parameters. Also, the ID of the desired IPAccessOption should be supplied to UpdateIPAccessConfiguration.

Request
{
  "IPAccessConfiguration": {
    IPAccessConfiguration
  }
}
ParameterDescription
IPAccessConfigurationThe IPAccessConfiguration
Response
{
  "Status": "<string>",
  "StatusText": "<string>"
  "IPAccessOptions": [
    {
      IPAccessOption
    },
  ],
  "SuggestedId": "<string>",
  "CurrentName": "<string>"
}
ParameterDescription
StatusThe status of the probe request. See IP Access configuration for additional information.
StatusTextTextual status related to Status.
IPAccessOptionsA list of options.
SuggestedIdA configuration ID that matches the current configuration. No match will be found if it gets omitted.
CurrentNameThe name of the current configuration that can be used as a hint if SuggestedId is not present.

UpdateIPAccessConfiguration

Update the IPAccessConfiguration based on the selected IPAccessOption in the response from a previous ProbeIPAccessConfiguration.

Request
{
  "Id": "<string>",
}
ParameterDescription
IdThe ID from an IPAccessOption previously returned from ProbeIPAccessConfiguration
Response
{
  "IPAccessConfiguration": {
    IPAccessConfiguration
  }
}
ParameterDescription
IPAccessConfigurationThe resulting configuration.

Keypress functions

Key presses can be monitored by using the Device/Intercom/KeyPin event in Third party integration, or pulled with GetLastKeySequence.

A KeySequence can be simulated by using InjectKeySequence. This can also be used with third-party integrations to provide a PIN number, such as validating a face instead of forcing the user to enter a PIN code.

The keypad on an intercom can be used both to place calls and to enter a PIN by operating in different modes. For example, if the intercom is not in PIN mode, the # key must be pressed to end the PIN entry.

Keypress types

The following identifiers should be used in the source field of a InjectKeySequence call and for the KeyPin event.

Enumeration: PinSourceType
ValueDescription
InternalUsed by internal intercom components.
UnknownUsed when no other source is provided.

GetLastKeySequence

This method is used when you want to retrieve a string containing the latest key sequence. The sequence is automatically reset when new keys are entered after a complete sequence. A sequence is completed by # or the call button ('C') or when the number of digits match the configured pin length when in PIN mode. The optional timestamp should be taken from the Device/Intercom/KeyPin event notification. In cases where no timestamp is specified the last key sequence from a specified source will be returned, while the last used key sequence will be returned if neither source nor reader is specified.

Request

{
  "Source": <string>,
  "timestamp": <string>
}
ParameterDescription
SourceAn optional source identifier to retrieve the key sequence from. If not specified, the last source of key sequence will be used. See Keypress functions for reserved identifiers.
timestampA timestamp of the key sequence taken from the Device/Intercom/KeyPin event notification. Providing the timestamp assures that the data corresponds to the event received, but is not mandatory.

Response

{
  "KeySequence": <string>,
  "Source": <string>,
  "timestamp": <string>
}
ParameterDescription
KeySequenceThe the key sequence.
SourceThe source of this key sequence.
timestampThe timestamp of this key sequence.

InjectKeySequence

This method is used when you want to simulate key presses.

Depending on the KeyPadState (see tns1:Device/tnsaxis:Intercom/KeypadState), the sequence must be ended with a C to make a call or # to process the key sequence as a PIN.

No ending # is required when the state is KSM_PIN_MODE. The same state is automatically entered after a card swipe if Wiegand or OSDP has been configured, or if the SetUiFeedback call is used together with RequirePIN or PINPadRequest as highlevelFeedbacks.

Request

{
  "KeySequence": <string>,
  "Source": <string>
}
ParameterDescription
KeySequenceThe key sequence.
SourceIdentifies the component that posted the InjectKeySequence call. See Keypress functions for potential identifiers.

Response

{}
ParameterDescription
{}Empty.

Feedback functions

Contains the different kinds of feedback commands that the UI components can present.

Feedback types

UIHighLevelFeedback

This table describes the feedback that can be received.

ValueDescription
LowlevelControlLED and/or audio feedback, typically over Wiegand or OSDP.
AccessGrantedThe access controller signals that access is granted.
AccessDeniedThe access controller signals that access is denied.
EarlyRFIDIndicates the act of a presenting a tag.
PINPadRequestIndicates that the user is requested to enter a PIN.
PINPadCancelIndicates that the user canceled entering a PIN.
OtherThe feedback mode is specified in some other defined way.
IdleThe normal state, typically DoorLocked or DoorUnlocked is used when the device controls a door.
DoorLockedIndicates that the door is locked.
DoorUnlockedIndicates that the door is unlocked.
DoorOpenTooLongIndicated that the door has been open for too long.
DoorPreAlarmWarningIndicates that the door is about to have been open too long.
RequirePINPIN (Personal Identification Number) code required.
RequireCardA card is required.
ProcessingProcessing in progress.
InvalidCredentialCredential is not valid.
AccessGrantedAndRequiredAccess granted with further identification possible.
OkGeneric Ok indication.
FaultGeneric Fault indication.
WarningGeneric Warning indication.
AlarmGeneric Alarm indication.
CustomThe custom mode.
ProgressIndicates whether progress has been made.
AuthenticationFailedThe authentication process failed.
RequireInteractionAdditional interaction required.

RunStyleType

Defines the supported types of run style.

ValueDescription
oneshotThe feedback is processed once and then removed.
permanentThe feedback is processed over and over again.

TargetLedType

The name of the LED types that the UiLedFeedback should be applied to.

ValueDescription
backlightThe backlight for the keypad.
callButtonThe call button.
stripeMainly used for access control feedback.
statusDoorThe door status indicator.
statusCallThe calling status indicator.
statusSpeakThe speak/active call status indicator. 

LedControlType

The control type for the different LEDs.

ValueDescription
noneNone.
onoffSimple on/off switch.
pwmPWM (Pulse Width Modulation) LED.
rgbRGB LED.
rgbpwmPWM RGB LED.

CallButtonIdleBehavior

Describes the possible idle behavior value for the call button.

ValueDescription
AutomaticThe visualization specified in the configuration file etc/sysconfig/dsui.conf.
OffVisualization switched off.
OnVisualization at full power.

UiLed

Lists information about the LEDs available on the device.

{
  "ledId": "stripe",
  "ledType": "rgbpwm"
}
FieldTypeDescription
ledIdTargetLedTypeThe name of the LED.
ledTypeLedControlTypeHow the LED is controlled.

FeedbackSourceType

The identifiers used in the source field of the SetUIFeedback call.

ValueDescription
InternalUsed by the internal components of the intercom.

UILedFeedback

Blinks a LED for a duration of time or during a loop.

See ColorName if the returning value is textual.

If the value is in hexadecimal (#RRGGBB) it will be interpreted as Monochrome vs RGB:

  • If monochrome, only the LSB is effective.

  • If RGB, 1st LSB corresponds to blue, 2nd LSB corresponds to green and 3rd LSB corresponds to red.

  • MSB is not used.

Another possible value can be retrieved from PWM vs regular:

  • If PWM, all values between 0–255 are valid.

  • For non-PWM, 0 = off, 1–255 = on.

{
  "led": "backlight",
  "runStyle": "oneshot",
  "durationOnMillisec": 0,
  "durationOffMillisec": 0,
  "valueOn": "off",
  "valueOff": "off",
  "loops": 0,
  "handled": true
}
FieldTypeDescription
ledStringThe LED name. See TargetLedType.
runStyleStringThe running style. See RunStyleType.
durationOnMillisecIntegerDuration for the ON state.
durationOffMillisecIntegerDuration for the OFF state.
valueOnStringValue for the ON state.
valueOffStringValue for the OFF state.
loopsIntegerThe number of loops that should be run.
handledBooleanInitially FALSE. Used to mark that his particular feedback has already been displayed.

UiAudioFeedback

Signals either a beeper sound or an audio file to play.

{
  "durationOnMillisec": 0,
  "durationOffMillisec": 0,
  "loops": 0,
  "handled": true,
  "file": "string"
}
FieldTypeDescription
durationOnMillisecIntegerThe duration for the ON state.
durationOffMillisecIntegerThe duration for the OFF state.
loopsIntegerThe number of loops that should be run.
handledBooleanInitially FALSE. Used to mark that his particular feedback has already been displayed.
fileStringThe audio file that should be played.

UiGraphicFeedback

Describes the graphic that can be retrieved.

{
  "image": "string",
  "durationMillisec": 0
}
FieldTypeDescription
imageStringThe path to image or base64 encoded data url format.
durationMillisecIntegerThe duration for the image.

SetUiFeedback

Sets the behavior for the user interface feedback.

Request

{
  "highlevelFeedbacks": [
    <string>,
    ...
  ],
  "ledFeedbacks": [
    {
      UiLedFeedback
    },
    ...
  ],
  "audioFeedback": {
    UiAudioFeedback
  },
  "source": <string>,
  "text": <string>,
  "attributes": [
    {
      Attribute
    },
    ...
  ],
  "graphicFeedback": {
    UiGraphicFeedback
  }
}
ParameterDescription
highlevelFeedbacksList the set high level feedbacks. See UIHighLevelFeedback for defined values.
ledFeedbacksLists of LED feedbacks to set.
audioFeedbackThe audio feedback.
sourceAn arbitrary identifier on the component that posts the feedback call. See FeedbackSourceType for reserved identifiers.
textText to display or speak.
attributesList of attributes for additional information and future extensions.
graphicFeedbackThe graphic feedback that should be set.

Response

{
  "Result": <boolean>
}
ParameterDescription
ResultThe result of the operation.

Websocket functions

The following types and functions are intended to be used over websockets to subscribe to notifications and do efficient API calls.

The service supports websocket on the /vapix/intercomws endpoint. All RPC functions in this API can be used over a websocket, preferably in the Google JSON or JSONRPC2.0 format.

The methods and types in the Intercom service include the namespace prefix axdsapi, which must be used when subscribing to function notifications. Subscribing to events over the websocket is done with the axev:subscribe call. This will generally supply a list of event topics as well as a list of functions, the latter of which also must include the axev:notify function.

To list all possible events, the function axev:getSupported should be used, while event notifications must be sent as an axev:notify method call.

axev:subscribe example

{
  "apiVersion": "1.0",
  "method": "axev:subscribe",
  "params": {
    "style": "ttMessage",
    "functions": [
      "axev:notify",
      "axdsapi:UpdateConfiguration",
      "axdsapi:SetUiFeedback"
    ],
    "topics": ["Device\/Intercom\/RFID", "Device\/Intercom\/KeyPin"]
  },
  "id": "firstsubscribe"
}

RFID event notification over websocket

{
  "apiVersion": "1.0",
  "method": "axev:notify",
  "params": {
    "notifications": [
      {
        "topic": "tns1:Device\/tnsaxis1:Intercom\/RFID",
        "timestamp": "2020-10-04T11:30:08.885643Z",
        "data": {
          "Source": {
            "SimpleItem": [
              {
                "Name": "Source",
                "Value": "Internal"
              }
            ]
          },
          "Data": {
            "SimpleItem": [
              {
                "Name": "UIDFormat",
                "Value": "Raw"
              },
              {
                "Name": "TagType",
                "Value": "MIFARE_Classic"
              },
              {
                "Name": "BitCount",
                "Value": "32"
              },
              {
                "Name": "UID",
                "Value": "CODE1234"
              }
            ]
          }
        }
      }
    ]
  }
}

Limitations

All types have an upper limit of 100 entities/type and while the Intercom service itself cannot enforce this limitation, exceeding it may cause unexpected behavior.

Notification topics

Reader notification topics

tns1:Device/tnsaxis:Intercom/RFID event

This event is used to provide information about a detected RFID card.

The UID and card numbers are sent in plaintext if CardReaderConfiguration.SensitiveRFIDEventEnabled is true, otherwise they are sent as empty strings. If CardReaderConfiguration.SensitiveRFIDEventEnabled is false, you should use the GetLastTag method to retrieve the card information.

The Masked field will be true whenever the event comes from a masked reader, and should therefore not be used for final access decisions by an access control system. The data from a masked reader is not sent over the configured access control integration protocol (VAPIX reader, OSDP or Wiegand) and only available as an event for 3rd party integrations.

Whenever a RFID tag is detected, the device will provide the following events:

Topic: tns1:Device/tnsaxis:Intercom/RFID

<tt:MessageDescription IsProperty="false">
  <tt:Source>
    <tt:SimpleItemDescription Name="Source" Type="xs:string"/>
  </tt:Source>
  <tt:Data>
    <tt:SimpleItemDescription Name="UIDFormat" Type="xs:string"/>
    <tt:SimpleItemDescription Name="TagType" Type="xs:string"/>
    <tt:SimpleItemDescription Name="TagSubType" Type="xs:string"/>
    <tt:SimpleItemDescription Name="UID" Type="xs:string"/>
    <tt:SimpleItemDescription Name="BitCount" Type="xs:int"/>
    <tt:SimpleItemDescription Name="CardNumber" Type="xs:int"/>
    <tt:SimpleItemDescription Name="CardNumberBitCount" Type="xs:int"/>
    <tt:SimpleItemDescription Name="FacilityCode" Type="xs:int"/>
    <tt:SimpleItemDescription Name="FacilityCodeBitCount" Type="xs:int"/>
    <tt:SimpleItemDescription Name="Masked" Type="xs:bool"/>
  </tt:Data>
</tt:MessageDescription>
Field nameTypeDescription
Source/Source
String

The source of events, such as the Reader Id. Generally Internal, unless InjectTag is used.

Data/UIDFormatString

The format of the UID. See CardOutputFormat for additional information.

Data/TagTypeString

The type of card/tag.

Data/TagSubTypeString

The card sub type, such as Classic1, Classic4k, DESFire or Ultralight.

Data/UIDString

ASCII hex representation of the tag UID if SensitiveRFIDEventEnabled is true. The value will be empty otherwise.

Data/BitCountInteger

The number of bits in the UID.

Data/CardNumberInteger

The decimal representation of the card number.

Data/CardNumberBitCountInteger

The number of bits in the CardNumber.

Data/FacilityCodeInteger

The decimal representation of the facility code.

Data/FacilityCodeBitCountInteger

The number of bits in the FacilityCode.

Data/MaskedBoolean

True if the reader is masked.

User interface notification topics

tns1:Device/tnsaxis:Intercom/MainState event

The values for the MainState.

ValueDescription
MSM_IDLEIdle, waiting for input.
MSM_KEYINGKey input in progress.
MSM_CONVERSATIONConversation in progress.

This event provides information about machine transitions.

Whenever there is a transition from one to another main state, the device provides the following events:

Topic: tns1:Device/tnsaxis:Intercom/MainState

<tt:MessageDescription IsProperty="true">
  <tt:Source>
    <tt:SimpleItemDescription Name="Source" Type="xs:string"/>
  </tt:Source>
  <tt:Data>
    <tt:SimpleItemDescription Name="State" Type="xs:string"/>
    <tt:SimpleItemDescription Name="Presence" Type="xs:int"/>
  </tt:Data>
</tt:MessageDescription>
Field nameTypeDescription
Source/SourceStringThe source of events, generally Internal.
Data/StateStringThe state, as shown in the table above.
Data/PresenceIntegerPresence flag. Value=1 when a presence is detected, value=0 otherwise.

tns1:Device/tnsaxis:Intercom/KeyPin event

This event informs the subscribing client about the input key PIN value.

Whenever the key PIN is entered it is published as an event. The key PIN is terminated with # in cases when it is not completed as per the configuration in the reader and will be sent in plaintext if CardReaderConfiguration.SensitiveKeyPinEventEnabled is true or otherwise as the value of an empty string "". If CardReaderConfiguration.SensitiveKeyPinEventEnabled is false you should use the GetLastKeySequence method to fetch the PIN.

Topic: tns1:Device/tnsaxis:Intercom/KeyPin

<tt:MessageDescription IsProperty="false">
  <tt:Source>
    <tt:SimpleItemDescription Name="Source" Type="xs:string"/>
  </tt:Source>
  <tt:Data>
    <tt:SimpleItemDescription Name="KeyPin" Type="xs:string"/>
  </tt:Data>
</tt:MessageDescription>
Field nameTypeDescription
Source/SourceStringA component identifier for the input that published KeyPin(optional). See Keypress functions for potential identifiers.
Data/KeyPinStringThe key PIN digits value, either with or without the # terminator. If CardReaderConfiguration.SensitiveKeyPinEventEnabled is false, value is empty.

tns:Device/tnsaxis:Intercom/KeypadState event

This event will provide you with the information about the different keypad state transitions. The keypad state can have the following values:

ValueDescription
KSM_IDLEThe idle state, no keypress was detected.
KSM_PIN_MODEPIN code expected and will be processed when the configured number of digits are pressed.
KSM_MIXED_MODEMixed mode, where a key sequence must be ended with # for a PIN code or the call button (C) to place a call.

When there is a transition from one state to another, the device will provide the following event:

Topic: tns1:Device/tnsaxis:Intercom/KeypadState

<tt:MessageDescription IsProperty="true">
  <tt:Source>
    <tt:SimpleItemDescription Name="Source" Type="xs:string"/>
  </tt:Source>
  <tt:Data>
    <tt:SimpleItemDescription Name="State" Type="xs:string"/>
  </tt:Data>
</tt:MessageDescription>
Field nameTypeDescription
Source/SourceStringThe event source, typicall Internal.
Data/StateStringThe keypad state.