Pointr Cloud API Webhook Guide¶
All configurations and endpoints related to Pointr Cloud API Webhook are explained one by one below. There must be at least one active webhook configuration for the webhook to run smoothly. When more than one configuration is added, notifications are sent to all added configurations.
Appsettings Configuration¶
We use some parameters in the application while making webhook notifications. Although these have default parameters, if client-based changes are desired, the following parameters must be corrected according to the client. If you want to change these values, you need to change them from the appsettings.json file in the application.
"WebhookSettings": {
"MailSendingThreshold": 25
},
"ScheduledJobSettings": {
"WebhookSchedulerMinutes": 1,
"WebhookAlertMailSchedulerMinutes": 30
}
- MailSendingThreshold : The threshold point that specifies how many error webhook notifications must be received before mail can be sent. Defaut is 25.
- WebhookSchedulerMinutes : Specifies how often webhook notifications should be made. When the timer is triggered, all expected webhook notifications are sent in order. Default is 1 minute.
- WebhookAlertMailSchedulerMinutes : Timer that determines how long to send a mail for webhook notifications that have received errors. Default is triggered every 30 minutes, if there are webhook notifications that cannot be sent in the system, mail is sent to the mail addresses in the retryFailureNotifyAddress specified in the webhook configuration.
Endpoints¶
Create Webhook Configuration¶
This endpoint allows you to create a new webhook configuration. No notify is sent to any address without webhook configuration. First of all, you need to add a webhook configuration.
Requirements:
- Url must be unique.
- Header key and value is optional. If you have webhook security header information, you can write in this section.
- RetryCountMax optional, default is 20 and must be in the range 0-20.
- retryIntervalInSecond optional, default is 60 and must be in the range 60-900.
-
retryFailureNotifyAddress is an optional field. It is used for notification when the threshold point is reached in webhook submissions.
-
Method: POST
- Endpoint: clients/{clientInternalIdentifier}/configurations/webhooks
- Description: Creates webhook configurations under a specific client identifier.
- Request Payload:
{
"url": "https://xyz.com/webhook",
"headerKey": "Authorization",
"headerValue": "Bearer xxxxx",
"retryCountMax": 20,
"retryIntervalInSecond": 60,
"retryFailureNotifyAddress": [
"xxx@pointr.tech",
"yyy@pointr.tech",
"zzz@pointr.tech"
]
}
- Response Data:
{
"createdTimestampUtcEpochSeconds": 1714368232,
"endpoint": "/api/v8/clients/{clientInternalIdentifier}/configurations/webhooks",
"result": {
"webhookIdentifier": 1
}
}
Update Webhook Configuration¶
This endpoint allows you to update an existing webhook configuration. When updated, all notifications that could not be sent, received an error or are waiting to be sent are tried to be sent again to the newly updated webhook address.
Note
Not all sent notifications are sent again.
Requirements:
- Url must be unique.
- Header key and value is optional. If you have webhook security header information, you can write in this section.
- RetryCountMax optional, default is 20 and must be in the range 0-20.
- retryIntervalInSecond optional, default is 60 and must be in the range 60-900.
-
retryFailureNotifyAddress is an optional field. It is used for notification when the threshold point is reached in webhook submissions.
-
Method: PUT
- Endpoint: clients/{clientInternalIdentifier}/configurations/webhooks/{identifier}
- Description: Updates a specific webhook configuration under a specific client identifier and unique webhook configuration identifier.
- Request Payload:
{
"url": "https://xyz.com/webhook",
"headerKey": "Authorization",
"headerValue": "Bearer xxxxx",
"retryCountMax": 20,
"retryIntervalInSecond": 60,
"retryFailureNotifyAddress": [
"xxx@pointr.tech",
"yyy@pointr.tech",
"zzz@pointr.tech"
],
}
- Response Data:
{
"createdTimestampUtcEpochSeconds": 1714368232,
"endpoint": "/api/v8/clients/{clientInternalIdentifier}/configurations/webhooks/1",
"result": {
"webhookIdentifier": 1
}
}
Delete Webhook Configuration¶
This endpoint allows you to delete a specific webhook configuration. When a configuration is deleted, it is deleted as hard delete. It cannot be undone.
- Method: DELETE
- Endpoint: clients/{clientInternalIdentifier}/configurations/webhooks/{identifier}
- Description: Deletes a specific webhook configuration under a specific client identifier and unique webhook configuration identifier.
- Request Payload: Empty Payload
- Response Data:
{
"createdTimestampUtcEpochSeconds": 1714368232,
"endpoint": "/api/v8/clients/{clientInternalIdentifier}/configurations/webhooks/1"
}
Get Webhook Configurations¶
This endpoint allows you to retrieve webhook configurations.
- Method: GET
- Endpoint: clients/{clientInternalIdentifier}/configurations/webhooks
- Description: Retrieves webhook configurations under a specific client identifier.
- Request Payload: Empty Payload
- Response Data:
{
"createdTimestampUtcEpochSeconds": 1714368232,
"endpoint": "/api/v8/clients/{clientInternalIdentifier}/configurations/webhooks",
"results": [
{
"id": 1,
"url": "https://xyz.com/webhook",
"headerKey": "Authorization",
"headerValue": "Bearer xxxxx",
"retryCountMax": 20,
"retryIntervalInSecond": 60,
"retryFailureNotifyAddress": [
"xxx@pointr.tech",
"yyy@pointr.tech",
"zzz@pointr.tech"
]
}
]
}
Get Single Webhook Configuration¶
This endpoint allows you to retrieve a specific webhook configuration.
- Method: GET
- Path: clients/{clientInternalIdentifier}/configurations/webhooks/{identifier}
- Description: Retrieves a specific webhook configuration under a specific client identifier.
- Request Payload: Empty Payload
- Response Data:
{
"createdTimestampUtcEpochSeconds": 1714368232,
"endpoint": "/api/v8/clients/{clientInternalIdentifier}/configurations/webhooks/1",
"result": {
"id": 1,
"url": "https://xyz.com/webhook",
"headerKey": "Authorization",
"headerValue": "Bearer xxxxx",
"retryCountMax": 20,
"retryIntervalInSecond": 60,
"retryFailureNotifyAddress": [
"xxx@pointr.tech",
"yyy@pointr.tech",
"zzz@pointr.tech"
]
}
}
Webhook Operations¶
This group of endpoints performs webhook operations.
Get Webhooks¶
This endpoint allows you to retrieve webhooks.
- Method: GET
- Path: api/v8/clients/{clientInternalIdentifier}/webhooks
- Description: Retrieves webhooks under a specific client identifier.
- Request Payload: Empty Payload
- Response Data:
{
"endpoint": "/api/v8/clients/{clientInternalIdentifier}/webhooks",
"createdTimestampUtcEpochSeconds": 1714142871,
"result": {
"webhooks": [
{
"id": "29b638c5-059b-4f0c-9fd7-09bd998e877c",
"message": "{\"sid\":1,\"bid\":1,\"level\":1,\"fid\":null,\"typeCode\":null,\"userName\":\"devuser@pointr.tech\",\"operationType\":\"UPDATE\",\"contentType\":\"LEVELCONTENT\",\"dateTimeEpoch\":1714131698}",
"responseMessage": "Connection refused (host.docker.internal:7022)",
"responseStatusCode": 500,
"tryCount": 2,
"firstRequestDateTime": "2024-04-26T11:42:48.0739373+00:00",
"lastRequestDateTime": "2024-04-26T11:44:06.5171424+00:00",
"webhookConfigurationUrl": "https://xyz.com/webhook",
"webhookConfigurationHeaderKey": "Authorization",
"webhookConfigurationHeaderValue": "Bearer xxxxx"
}
],
"totalCount": 1,
"pageNumber": 1
}
}
Resend Webhook¶
With this endpoint, you can resend any webhook request in the webhook list. The purpose of this was developed so that if you get an error from any webhook request, you can manually try to send a request again instantly.
- Method: POST
- Path: api/v8/clients/{clientInternalIdentifier}/webhooks/resend/{webhookIdentifier}
- Description: Resends a specific webhook notification under a specific client identifier.
- Request Payload: Empty Payload
- Response Data:
{
"createdTimestampUtcEpochSeconds": 1714368232,
"endpoint": "/api/v8/clients/{clientInternalIdentifier}/webhooks/resend/{webhookIdentifier}",
"result": "Resending webhook is successfull"
}
Endpoint List with Request Body¶
In the table below, there are examples and directions of webhook notifications that may occur in all endpoints. You can make your developments through reference notifications.
Controller | Method | Endpoint | Behaviour | Webhook Request Body | Callback Endpoint |
---|---|---|---|---|---|
Beacon | POST | /api/v8/buildings/{buildingInternalIdentifier}/levels/{levelIndex}/beacons | This endpoint does not update or delete existing data, it adds new beacons | “{ | GET /api/v8/buildings/{buildingInternalIdentifier}/levels/{levelIndex}/beacons |
Beacon | DELETE | /api/v8/buildings/{buildingInternalIdentifier}/levels/{levelIndex}/beacons | Delete level’s beacons | “{ | Delete your beacons |
Beacon | DELETE | /api/v8/buildings/{buildingInternalIdentifier}/beacons | Delete building’s beacons | “{ | GET /api/v8/buildings/{buildingInternalIdentifier}/beacons |
Building | POST | /api/v8/sites/{siteInternalIdentifier}/buildings | Create a building | “{ | - |
Building | PATCH | /api/v8/buildings/{buildingInternalIdentifier} | Update Building | “{ | “/api/v8/sites/{siteInternalIdentifier}/buildings/draft |
Building | DELETE | /api/v8/buildings/{buildingInternalIdentifier} | Delete building | “{ | /api/v8/sites/{siteInternalIdentifier}/buildings/draft |
Feature | POST | /api/v8/buildings/{buildingInternalIdentifier}/levels/{levelIndex}/bulk | Bulk Insert except graphs and beacons | “{ | /api/v8/buildings/{buildingInternalIdentifier}/levels/{levelIndex}/features/draft |
Feature | PUT | /api/v8/features/{featureInternalIdentifier} | This endpoint overwrites/updates the given feature with | “{ | /api/v8/features/{featureInternalIdentifier} |
Feature | DELETE | /api/v8/features/{featureInternalIdentifier} | Delete feature with given featureIdentifier | “{ | /api/v8/buildings/{buildingInternalIdentifier}/levels/{levelIndex}/features/draft |
Feature | PUT | /api/v8/sites/{siteIdentifier}/buildings/{buildingIdentifier}/features | Update Building features | “{ | /api/v8/buildings/{buildingInternalIdentifier}/features/draft |
Feature | DELETE | /api/v8/sites/{siteIdentifier}/features/type-codes/{typeCode} | Delete site’s feature with given type-code value | “{ | You can pull the entire building list. |
Feature | DELETE | /api/v8/buildings/{buildingIdentifier}/features/type-codes/{typeCode} | Delete building’s feature with given type-code value | “{ | /api/v8/buildings/{buildingInternalIdentifier}/features/draft |
Feature | DELETE | /api/v8/buildings/{buildingIdentifier}/levels({levelIndex}/features/type-codes/{typeCode} | Delete level’s feature with given type-code value | “{ | /api/v8/buildings/{buildingInternalIdentifier}/levels/{levelIndex}/features/draft |
Feature | DELETE | /api/v8/sites/{siteIdentifier}/features | Delete features with given site identifier | “{ | /api/v8/sites/{siteInternalIdentifier}/features/draft |
Feature | DELETE | /api/v8/buildings/{buildingIdentifier}/features | Delete features with given building identifier | “{ | /api/v8/buildings/{buildingInternalIdentifier}/features/draft |
Feature | DELETE | /api/v8/buildings/{buildingIdentifier}/levels/{levelIndex}/features | Delete features with given level | “{ | /api/v8/buildings/{buildingInternalIdentifier}/levels/{levelIndex}/features/draft |
Geofence | POST | /api/v8/buildings/{buildingInternalIdentifier}/levels/{levelIndex}/geofences | “Add level geofence To add global geofence use the PUT /features endpoint To delete level/global geofence use the DELETE /features endpoint” | “{ | - |
Geofence | DELETE | /api/v8/buildings/{buildingInternalIdentifier}/levels/{levelIndex}/geofences | Which building and level information is known. The levelgeofence connected to the building is being polluted. (levelGeofence) | “{ | - |
Graph | POST | /api/v8/buildings/{buildingInternalIdentifier}/graphs | Add graphs to building, This endpoint removes all old graphs/portals for the site | “{ | - |
Graph | POST | /api/v8/sites/{siteInternalIdentifier}/graphs | Add graphs to site, This endpoint removes all old graphs/portals for the site | “{ | - |
Level | POST | /api/v8/buildings/{buildingInternalIdentifier}/levels/{levelIndex} | Create a new level | “{ | - |
Level | PATCH | /api/v8/buildings/{buildingInternalIdentifier}/levels/{levelIndex} | Update Level | “{ | - |
Level | DELETE | /api/v8/buildings/{buildingInternalIdentifier}/levels/{levelIndex} | Delete Level | “{ | - |
MapObject | DELETE | /api/v8/buildings/{buildingInternalIdentifier}/levels/{levelIndex}/mapobjects | Delete level’s mapobjects | “{ | Get Level Mapobject |
Obstacle | DELETE | /api/v8/buildings/{buildingInternalIdentifier}/levels/{levelIndex}/obstacles | Delete level’s obstacles | “{ | Gel level obstacle |
Poi | DELETE | /api/v8/buildings/{buildingInternalIdentifier}/levels/{levelIndex}/pois | Delete level’s pois | “{ | Get Level Poi |
Poi | DELETE | /api/v8/sites/{siteInternalIdentifier}/pois | Delete site’s pois | “{ | Get Site Poi |
Poi | DELETE | /api/v8/buildings/{buildingInternalIdentifier}/pois | Delete building’s pois | “{ | Get Building Poi |
Site | POST | /api/v8/clients/{clientInternalIdentifier}/sites | Create a new site | “{ | Single site can pull. It can pull the entire site list. |
Site | PATCH | /api/v8/sites/{siteInternalIdentifier} | Update Site | “{ | Eather you can get single site or all site. |
Site | DELETE | /api/v8/sites/{siteInternalIdentifier} | Delete site | “{ | You can pull the entire site list. |
SdkConfiguration | POST | /api/v8/clients/{clientInternalIdentifier}/configurations/sdk-configurations | The POST request deletes all related old configurations and adds new ones | “{ | - |
SdkConfiguration | POST | /api/v8/sites/{siteInternalIdentifier}/configurations/sdk-configurations | The POST request deletes all related old configurations and adds new ones | “{ | - |
SdkConfiguration | POST | /api/v8/buildings/{buildingInternalIdentifier}/configurations/sdk-configurations | The POST request deletes all related old configurations and adds new ones | “{ | - |
If you need more information, you can visit our API Reference page. This enhancement will be available in v8.12 and above.