Create Audit Log Subscription
Create a subscription to receive an event every time a setting is changed (audit log).
/?object=event&action=create&model=auditlogRequest URL
https://uc.hopdial.com/ns-api/?object=event&action=create&model=auditlogSend your access token in the Authorization: Bearer header. Body parameters are sent as application/x-www-form-urlencoded. New to the API? Start with authentication and rate limits.
Event payload fields
| Parameters | Description |
|---|---|
| time_stamp | Time of change in GMT |
| by_domain | Domain of the user who made the change |
| by_client | The API client who made the change |
| by_ip | The IP address of the user who made the change |
| action | The action performed. Example: create, update, delete |
| target_host | NMS host where change took place |
| target_domain | Domain of the object that was changed |
| target_user | User of the object that was changed |
| target_object | The type of object that was affected. Examples: Subscriber, Hunt Group, ... |
| parameter | The parameters of the Object after the change |
| territory | The territory of the object changed |
Parameters
| Name | Type | Description |
|---|---|---|
modelrequiredbody | string | Must be "auditlog". This will stream any changes to the audit log, adds, updates and deletes for all objects. |
domainrequiredbody | string | Specify which domain you would like to receive events for. Use * to receive events for all domains. |
userrequiredbody | string | Specify which user to receive events for. Use * to receive for all users |
post_urlrequiredbody | string | HTTP or HTTPS endpoint. This is where HopDial will POST the events |
expiresrequiredbody | string (date) | Specifies when the subscription will expire. (Set date a couple days in the future as server time calculates the expiration incorrectly) |
Example request
curl https://uc.hopdial.com/ns-api/ \
-H 'Authorization: Bearer 7bet078rqljh451l31uh34lsd0f80dsf' \
-d object='event' \
-d action='create' \
-d model='auditlog' \
-d domain='abc-company.11111.service' \
-d user='*' \
-d post_url='https://events.example.com/auditlogs'
-d expires='2016-11-20 00:00:00'Responses
[
{
"time_stamp":"2016-06-02 13:59:47",
"by_domain":"0000.11111.service",
"by_user":"abc.company",
"by_client":"11111.client",
"by_ip":"1.2.3.4",
"action":"delete",
"target_host":"pbx.example.net",
"target_domain":"abc-company.11111.service",
"target_user":"9005",
"target_object":"Hunt Group",
"parameter":"aor=\"sip:[email protected]\", opt=\"manual\", ans=\"no\", ord=\"55\"pri=\"55\"",
"territory":"11111"
}
]More Subscriptions endpoints
Webhooks: get call, CDR, recording, presence, agent, and audit events POSTed to your own URL.
Need a Client ID and Client Secret or help with this endpoint? Contact HopDial support or call (866) 305-0407.