unsubscribe_event_class_m Sample Call and Response
This example shows a client unsubscribing from an entire event class, based on the unsubscribe_event_class_m method defined in plsql_m_r73.yml.
This example covers unsubscribing from one whole event class using its numeric class identifier. It does not cover unsubscribe_events_m, which unsubscribes from individual events within a class rather than the entire class.
Sample call
{
"rest_call": "unsubscribe_event_class_m",
"output_format": "json",
"client_no": 4471,
"auth_key": "b92f6e1c8a3d4f0e9b7c2a1d5e6f8091",
"class_no": 5,
"do_write": true
}
The rest_call and output_format fields form the envelope added by the REST layer; they are not part of the method's own argument list in the yml. The class_no field is required and identifies the event class to unsubscribe from; this example uses value five, Usage Monitoring, which covers monitoring of account usage values, balances, and thresholds. Other allowable values are one (Accounts), two (Orders), three (Financial Transactions), and four (Account Notifications). The do_write field is optional and defaults to true; this example sets it explicitly to true to confirm that Aria should actually perform the unsubscription rather than only reporting its effects.
Sample response
{
"error_code": 0,
"error_msg": "OK",
"error_details": [],
"events": [
{
"event_id": 501,
"event_name": "usage_threshold_reached",
"event_description": "Fired when an account's monitored usage value crosses a configured threshold.",
"event_state": "unsubscribed"
}
]
}
An error_code of zero with an error_msg of "OK" indicates the unsubscription succeeded. The events array lists every individual event within the requested class that the client is no longer subscribed to; a class typically contains several events, so a real response could return many entries, each with its own event_id, event_name, event_description, and event_state. This example shows only one representative entry. The error_details array is left empty because no errors occurred.