POST api/v2/ACSystems/{id}/RegisterDataHook

Registers a WebHook for Entity changes

Request Information

URI Parameters

NameDescriptionTypeAdditional information
id

Unique identifier of the Access Control System for which this webhook is being registered.

globally unique identifier

Required

Body Parameters

The hook registration data

RegisterDataHookModel
NameDescriptionTypeAdditional information
EntityId

The ID of the entity for which the web hook is to be registered.

globally unique identifier

None.

URL

URL of the webhook that BluB0X will be calling on the service provider’s side.

string

None.

EntityMask

A bitmask of which entities you want the hook called for when it is added, updated or deleted.

ApiWebHookEntityMask

None.

InitialToken

The authorization token to be used on the first call of the webhook

string

None.

Request Formats

application/json, text/json

Sample:
{
  "EntityId": "65b22a9b-e808-473e-9d46-e06d84663985",
  "URL": "sample string 2",
  "EntityMask": 1,
  "InitialToken": "sample string 3"
}

application/xml, text/xml

Sample:
<RegisterDataHookModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/APIWebRole.Models">
  <EntityId>65b22a9b-e808-473e-9d46-e06d84663985</EntityId>
  <EntityMask>Occupancy</EntityMask>
  <InitialToken>sample string 3</InitialToken>
  <URL>sample string 2</URL>
</RegisterDataHookModel>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

Result
NameDescriptionTypeAdditional information
ResultCode

Represents the result code

integer

None.

Description

Represents a description of the result code

string

None.

Response Formats

application/json, text/json

Sample:
{
  "ResultCode": 1,
  "Description": "sample string 2"
}

application/xml, text/xml

Sample:
<Result xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/APIWebRole.Controllers">
  <Description>sample string 2</Description>
  <HttpStatusCode>Continue</HttpStatusCode>
  <ResultCode>1</ResultCode>
</Result>