JSON API » alerts » alerts/update

Updates an existing alert.

Input parameters

Requires authentication and the administrator role privilege.

NameTypeDescriptionRequiredDefault value
auth_usernameStringAuthentication username.Yes
auth_passwordStringAuthentication password.Yes
idIntegerID of alert to update.Yes
callsIntegerThe minimum number of calls to send an alert for "peer" type.NoCurrent value.
costIntegerThe minimum cost to match, in the customer's currency.NoCurrent value.
days_weekStringWhich days the alert is active. Monday is 1, and Sunday is 7. "1,2,3,4,5" is Monday to Friday.NoCurrent value.
descriptionStringDescription.NoCurrent value.
destinationStringThe prefix of the destination to match.NoCurrent value.
dnd_secondsIntegerMinimum length of time telephone line has been in do not disturb for in seconds. -1 for no limit.NoCurrent value.
emailsStringEmail addresses to send alerts to.NoCurrent value.
endhourIntegerThe end hour, from 0 to 23.NoCurrent value.
endminuteIntegerThe end minute, from 0 to 59.NoCurrent value.
endsecondIntegerThe end second, from 0 to 59.NoCurrent value.
eventsInteger1 to record events for this alert, 0 not to.NoCurrent value.
idle_secondsIntegerMinimum length of time telephone line has been idle for in seconds. -1 for no limit.NoCurrent value.
messageStringDestination to send text message to.NoCurrent value.
minimum_affectedIntegerThe minimum number affected to send an alert.NoCurrent value.
minimum_callsIntegerThe minimum number of calls to send an alert for "outgroups" type.NoCurrent value.
minimum_durationIntegerThe minimum call duration affected to send an alert.NoCurrent value.
nameStringName.NoCurrent value.
peerIntegerThe ID of the peer to check.NoCurrent value.
percent_failIntegerThe minimum percent of calls failing to send an alert.NoCurrent value.
periodIntegerThe minimum interval to send alerts in seconds.NoCurrent value.
searchInteger1 to use data from all customers on system, 0 not to. May only be used by system owners.NoCurrent value.
starthourIntegerThe start hour, from 0 to 23.NoCurrent value.
startminuteIntegerThe start minute, from 0 to 59.NoCurrent value.
startsecondIntegerThe start second, from 0 to 59.NoCurrent value.
talktimeIntegerThe minimum talk time to match in seconds.NoCurrent value.
timesIntegerThe minimum number of times to match.NoCurrent value.
times_periodStringHow long the times field applies to. "day", "week", or "month".NoCurrent value.
typeStringWhat to alert on. "calls", "calls_start", "concurrent", "deregister", "destinations", "huntgroup_exit", "maximum", "registration_fail", "numbers", "outgroups", "peer", "person_locked", "phone_address", "phone_locked", "phones", "queue_auto_unavailable", or "queue_exit".NoCurrent value.
validationInteger1 to validate input then return, 0 for full action.No0

For each type, only some of the matching fields are used. See the web interface to determine which.

Responses

CodeDescription
201Input passed validation. Only returned if validation=1.
204Success.
400Invalid input parameters specified. Check the key and message fields for more details.
401The authentication details provided are invalid.
402Your role does not allow this.
403Your rate plan does not allow this.
404The alert does not exist, or you do not have permission to update it.

Data returned

No data is returned.

Example: Changing the name

http://enswitch.example.com/api/json/alerts/update/?auth_username=user;auth_password=password;id=123;name=example

{ "responses":[ { "code":"204", "key":"", "message":"OK" } ] }

Change history

VersionChanges
4.2calls_start type added.
3.15type input parameter changed to allow a value of "huntgroup_exit" and "registration_fail".
3.14type input parameter changed to allow a value of "phone_address".
3.13Function added.