C#
This is just a starting point to build upon.
Download the last 25 messages in ERROR
using System;
using System.Text;
using System.Net;
using System.IO;
namespace RESTClient
{
class Program
{
static void Main(string[] args)
{
string baseURL = "https://www.babelway.net/SelfService3/rest/v2/";
long myHub = 0; // You can find this on the My Account page
String user = "";// the username you use to connect to Babelway
String pwd = ""; // the password you use to connect to Babelway
// Download the last 25 messages in ERROR
String request = baseURL + "hub-" + myHub + "/messages.xml?status=ERROR";
HttpWebRequest webRequest = WebRequest.Create(request) as HttpWebRequest;
// Add authentication to request
webRequest.Credentials = new NetworkCredential(user, pwd);
// Get Response
HttpWebResponse response = webRequest.GetResponse() as HttpWebResponse;
// Read the result
if (webRequest.HaveResponse == true && response != null)
{
// Get the response stream
StreamReader reader = new StreamReader(response.GetResponseStream());
// Console application output
Console.WriteLine(reader.ReadToEnd());
}
}
}
}