Get information
https://api.alert.alertinghub.co.uk/api/json/getinfo
The return of this API tells you information such as the notification mode, capacities (e.g. how many calls could be made at the present time), stored items and so forth.
JSON sample
{ "version": "latest", "apiKey": "abcdefghijklmnopqrstuvwxyz", "options": { "getStoredContentInfo": true, "getCapacityInfo": true, "getScheduledAlertInfo": true, "getKeywordInfo": true, "getMessages" : true } }
Getting information
Parameter | Requirement | Default | Description | ||
---|---|---|---|---|---|
version | Mandatory | None | See send alert API | ||
apiKey | Mandatory | None | See send alert API | ||
options | |||||
getCapacityInfo | Optional | false | If true then capacity info is also returned | ||
getStoredContentInfo | Optional | false | If true then the set of stored content is also returned | ||
getScheduledAlertInfo | Optional | false | If true then pending schedule info is also returned | ||
getKeywordInfo | Optional | false | If true then any keywords associated with the API key are returned. | ||
getMessages | Optional | false | If true then any historic diagnostic or error messages relating to the use of the api key are returned. The messageOptions optional object can be used to control which messages are returned. | ||
messageOptions | Optional | Fine tuning of which messages to return if getMessages is true. | |||
earliestFirst | Optional | false | Returns messages starting at the earliest. | ||
unreportedOnly | Optional | false | Return only messages not previously marked as reported. | ||
markReported | Optional | false | Mark any returned messages as reported. | ||
maximumMessages | Optional | 10 | Maximum number of messages to return (this is internally capped at 100). | ||
severity | Optional | none | Severity marker of messages to be returned (one from error, warning, notice or info). If not specified / set all messages will be returned. | ||
category | Optional | none | Category of message, one from: api, general or callback. If not specified / set then all messages will be returned. |
Response
Parameter | Description | ||
---|---|---|---|
success | One of “true”, “false”. If false then failureReason should also be returned | ||
info | |||
apiKeyFriendlyName | Api key's friendly name if it has been set (usually via the /setinfo API call); if not this will be omitted. | ||
defaultNotification | Notification mode (polled or callback) | ||
defaultNotificationFormat | Notification format json or form | ||
defaultCallbackUrl | Only returned if defaultNotification = callback | ||
stats | General statistics on api use and other items. | ||
sandboxed | true|false - denotes whether the API key is sandboxed or not. See send alert API | ||
capacities | Only returned if getCapacityInfo = true on request. Values indicate the maximum number of items that could be sent at this time. | ||
call | |||
sms | |||
stored | Array, only returned if getStoredContentInfo = true on request | ||
storeId | Store unique id | ||
type | One of "call","sms", "email","inboundCall","recipientList" or "alert" | ||
expiresUnlessUsed | Expiry | ||
scheduled | Array, only returned if getScheduledAlertInfo = true on request | ||
scheduledAlertId | The unique reference for the scheduled alert. | ||
storedAlertId | The content store unique reference for the scheduled alert | ||
paused | Whether the schedule is currently paused or not | ||
nextRunAt | When the schedule is next due to run (if it is paused this will not occur) | ||
expires | When the schedule is due to run out | ||
repeats | How often the schedule will repeat | ||
keywords | Array, only returned if getKeywordInfo = true on request | ||
keyword | The actual keyword itself | ||
type | One of sms, email, shortlink | ||
expires | Date of expiration or 'never' | ||
sender | Permitted sender or 'any' | ||
recipient | Permitted recipient or 'any' | ||
action | One of "raise" where a callback or collection event is raised or "launch" where an alert will be triggered. | ||
storedAlertDetails | If action is "launch" this specifies the stored alert as held within the AlertingHub system | ||
messages | Array, only returned if getMessages = true on request | ||
severity | Severity level of the message (see above for allowed values). | ||
category | Category of the message (see above for allowed values). | ||
reported | Whether this message has been previously tagged as reported or not. | ||
sandboxed | Whether this message was generated within the sandbox or not. | ||
whence | When the message was generated. | ||
message | The actual message itself. |