POST api/v1/Occupancies/{id}/RegisterEventHook
Registers a WebHook for Events
Request Information
URI Parameters
| Name | Description | Type | Additional information |
|---|---|---|---|
| id |
Unique identifier of the Occupancy for which this webhook is being registered. |
globally unique identifier |
Required |
Body Parameters
The hook registration data
RegisterEventHookModel| Name | Description | Type | Additional 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. |
| EventMask |
A bitmask of which Access Control Events you want the hook to be called for |
ApiWebHookEventMask |
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": "bcb5391d-1890-4ff1-96fa-1565952e37a3",
"URL": "sample string 2",
"EventMask": 1,
"InitialToken": "sample string 3"
}
application/xml, text/xml
Sample:
<RegisterEventHookModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/APIWebRole.Models"> <EntityId>bcb5391d-1890-4ff1-96fa-1565952e37a3</EntityId> <EventMask>CredentialAttempt</EventMask> <InitialToken>sample string 3</InitialToken> <URL>sample string 2</URL> </RegisterEventHookModel>
application/x-www-form-urlencoded
Sample:
Sample not available.
Response Information
Resource Description
Result| Name | Description | Type | Additional 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>