REST Email Marketing API Documentation

UTILITY - CheckSystem

Check the system for warning signs of problems. This function is designed to give a few key metrics on the system without causing much load on the database to perform these checks. In order to minimize the impact on the database for running this API call, the results are based off the last 1,000,000 mail queue sending records. In some unusual cases this might not represent the current activity of the system, but should be a good metric in most circumstances.

It is difficult to development methodologies that would always recognize system issues as they are very customer-specific. No clickthroughs for several hours could be an indication of problems for some high volume senders, where in other cases emails are sent less frequently so low customer involvement is expected. You will need to know something about the load on your system and what that means for these metrics. For example, if you monitor the delayedMailQueueRecords shortly after you post a large mailing, depending on your system speed, you may see some records listed as being delayed. However, that wouldn't be a concern since you know that a large posting was just submitted.

We recommend that you analyze your own system performance to build up a baseline, and then you can have this API warn you if anything falls outside of your baseline. For example, if you determine that your system regularly takes 100 ms to resolve these database queries, you might set an alarm if it takes 200 ms. But someone else's database might take 500 ms, so they would want a different alarm point.

Although these system metrics are designed to be retreived with a minimal load on the system, it is recommended that you run this routine with at least five minutes between calls.

HTTP VERB

Get

URL

/API/Rest/Utility/CheckSystem

ARGUMENTS

(none)

Required permission

(none)

ERRORS

Database error
Unknown error

RETURNS

A data structure with the following fields:

delayedMailQueueRecords A quick measure of the number of mail queue records that should have already been processed.
lastMailingOpen The timestamp of the most recent Mailing open.
lastDocumentOpen The timestamp of the most recent Document open.
lastMailingClick The timestamp of the most recent Mailing clickthrough.
lastDocumentClick The timestamp of the most recent Document clickthrough.
maxLicensedRecipients The maximum number of recipients allowed by your license
currentRecipientCount The number of recipients currently counting towards the license limit.
dbResponsiveness How long did these database queries take, in milliseconds.
isLicenseExpired Is the license expired?

{"delayedMailQueueRecords":0, "lastMailingOpen":null, "lastDocumentOpen":null, "lastMailingClick":"2019-01-06T06:54:00", "lastDocumentClick":null, "maxLicensedRecipients":150000, "currentRecipientCount":135452, "dbResponsiveness":143, "isLicenseExpired":false}

EXAMPLE

Run CheckSystem.

string url = "http://example.com/api/rest/Utility/CheckSystem?accountName=acme&login=ApiUser";
							
try
{
	System.Net.HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
	request.Headers.Add("Password", "34teh6i6j565ydw4h");
	using (System.Net.WebResponse response = request.GetResponse())
		using (Stream responseStream = response.GetResponseStream())
			using (StreamReader reader = new StreamReader(responseStream, Encoding.UTF8))
				System.Console.WriteLine(reader.ReadToEnd());
}
catch (System.Net.WebException ex)
{
	System.Diagnostics.Debug.Fail(ex.Message);
}
							
# encoding: utf-8
require 'rest-client'
require 'json'
							
url = 'http://www.example.com/api/rest/Utility/CheckSystem?accountName=acme&login=ApiUser'
response = RestClient.get(url, "", {:Password => "sfhdf6df5fdy"})
puts response
							
import requests
url = "http://www.example.com/api/rest/Utility/CheckSystem?accountName=acme&login=ApiUser";
headers = {'password':'sfhdf6df5fdy'}
resp = requests.get(url, headers=headers)
if resp.status_code == 200:
	print resp.text
							

http://www.example.com/API/Rest/Utility/CheckSystem/?AccountName=acme&login=ApiUser

Share this: