POST api/v1/Occupancies/{id}/RegisterDataHook
Registers a WebHook for Entity changes
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
RegisterDataHookModel| 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. |
| 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": "483c4378-4cd6-4584-abaa-0f7f537c0fe8",
"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>483c4378-4cd6-4584-abaa-0f7f537c0fe8</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| 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>