OmnichannelAlertsResource
Omni-channel alerts under /v1/omnichannel-alerts: Ovok runs the project's rule on each Signals alert event and tells the people it names by push and email.
- Stable unknown
- Release candidate not available
- Development since 0.2.0-dev.32+058a03c
public final class OmnichannelAlertsResourceOmni-channel alerts under /v1/omnichannel-alerts: Ovok runs the project's rule on each Signals alert event and tells the people it names by push and email. For project admins. Get it from Ovok.omnichannelAlerts().
Methods
rules
public OmnichannelAlertsResource.Rules rules()Returns the project's alert notifications rule.
Returns: the rules resource
preview
public JsonNode preview(
Object preview,
RequestOptions options) throws IOException, InterruptedExceptionPreviews who the rule tells of a sample alert event; nothing is sent (POST /v1/omnichannel-alerts/preview).
Parameters:
preview: thepatientId, an optionalevent(alert.triggeredwhen omitted), an optional samplealertand an optionalnotificationsrule to try instead of the project's ownoptions: per-request options, such as the timeout
Returns: the notify entries the rule answers, each with the people it reaches
Throws:
IOException: if the request cannot be sent or the response cannot be readInterruptedException: if the thread is interrupted while waiting for the response
OmnichannelAlertsResource.Rules
public static final class RulesThe project's alert notifications rule (/v1/omnichannel-alerts/rules), JSON Logic passed through.
Rules.retrieve
public JsonNode retrieve(RequestOptions options) throws IOException, InterruptedExceptionReads the rule (GET /v1/omnichannel-alerts/rules).
Parameters:
options: per-request options, such as the timeout
Returns: the rule under notifications, null when the project has none
Throws:
IOException: if the request cannot be sent or the response cannot be readInterruptedException: if the thread is interrupted while waiting for the response
Rules.update
public JsonNode update(Object rule, RequestOptions options) throws IOException, InterruptedExceptionSets the rule; Ovok checks the channels and recipients it names (PUT /v1/omnichannel-alerts/rules).
Parameters:
rule: the rule, with its JSON Logic underlogicoptions: per-request options, such as the timeout
Returns: the rule as Ovok now runs it
Throws:
IOException: if the request cannot be sent or the response cannot be readInterruptedException: if the thread is interrupted while waiting for the response
Rules.remove
public void remove(RequestOptions options) throws IOException, InterruptedExceptionRemoves the rule, so nobody is told of a new alert (DELETE /v1/omnichannel-alerts/rules).
Parameters:
options: per-request options, such as the timeout
Throws:
IOException: if the request cannot be sent or the response cannot be readInterruptedException: if the thread is interrupted while waiting for the response
Last updated on