Allows to subscribe to document change events.
API Settings | Help |
Note: This API only supports the Client Credentials flow.
This means that you will log in only using your application's client ID and client secret, without actually authenticating a
user. In effect, any /token
end point of the below Authentication Method(s) can be used for that.
Log in using a local username and password.
Token Endpoint
This API supports the following OAuth2 authorization flows:
The notification service allows to register a search query and get notified whenever documents matching the search query are being inserted, updated or deleted. As currently implemented the notification service is intended to support the synchronization of content between our backend server systems. The notification service is not capable of sending emails.
Get in contact with the ContentHub team (_HL_Panama@haufe-lexware.com). They will help you with the search query and make sure that the proper application scopes do exist.
The first you need to set up is an HTTP-Server which can handle POST-requests. The URL to your HTTP-Server and your request handler must be static. Your server and the request-URL is called endpoint.
Authentication can be done with shared secrets that are send in the HTTP-Headers.
When your endpoint is running, you can start to create a notification subscription. Creating a notification-subscription is done with a notification-creation-request:
{
"query": "application:portals documentType:News Arbeitsschutz",
"email": "peter.sullivan@haufe-lexware.com",
"allowedDelay": "PT10M",
"messageType": "POST",
"messageFormat": "JSONv1",
"endpoint": "https://my.endpoint.haufe.io/news-on-arbeitsschutz",
"connectionTimeout": "PT10S",
"headers": [ {
"name": "my-secret",
"value": "123"
} ]
}
PT10M
means a period with time 10 minutes
.POST
is the only supported messageType currently.JSONv1
is the only implemented format currently.For every notification-subscription we register the given notification-query in our database. Whenever documents are being inserted, updated or deleted our database will trigger an alert, if a notification query matches this document. We use the alerts to write a change-event onto a message queue. A scheduler will poll from the message queue and create a POST-message in the wanted messageFormat. The polling rate is determined by the allowedDelay.
Each notification-subscription can be suspended. A suspension is always defined by setting a timestamp for the end of the suspension-period. As long as a notifiaction-subscription is suspended:
Suspensions are designed to releave your endpoint from back-pressure. If you know in advance that you will have a service-outage you can suspend your notifiaction-subscription on your own. Also if ContentHub recognizes your endpoint as unresponsive it will start to suspend your notification-subscription for successively longer and longer periods. At the end of suspension-period ContentHub will try to send a message to your endpoint. If your endpoint is responsive again the suspension is ended and ContentHub will try to send messages at the regular pace.
The queries can be used in the same way as is in the search-service. But as we do not need highlighting, sorting or scoring of the search results, there is no support for weighting terms or boost expressions.
View Swagger definition »You are currently not logged in, so we can't display your registered applications. Please log in first.