Status Web API

GET /status


Requests status information from a BWS installation.

Request Information

Parameters

The API has no parameters. It is a simple HTTP GET request without additional arguments.

Authentication

This API call requires Basic Authentication, i.e. you have to provide an HTTP authorization header using the authorization method Basic and the base64 encoded string App-ID:App-Secret (therefore the transport is secured using TLS/SSL). To receive the necessary BWS Web API access data (App-ID and App-Secret) you have to register your application on the BWS Portal first. This requires a valid BWS subscription.

Response Information

The Status Web API returns a StatusResult object, containing information about the running BWS installation, like the BWS product Version or the BWS deployment Label. Finally it contains a list of Features your client application can use.

Exemplary status response
{
    "Version": "2.3",
    "Label": "BWS 2.3.18128.4",
    "Features": [
        { "Name": "QualityCheck", "Traits": "Face,Periocular,Voice", "Storage": null, "Partitions": null },
        { "Name": "LiveDetection", "Traits": "Face,Periocular", "Storage": null, "Partitions": null },
        { "Name": "Enrollment", "Traits": "Face,Periocular,Voice", "Storage": "bws", "Partitions": "112" },
        { "Name": "Verification", "Traits": "Face,Periocular,Voice", "Storage": "bws", "Partitions": "112" },
        { "Name": "Identification", "Traits": "Face,Periocular,Voice", "Storage": "bws", "Partitions": "112" },
        { "Name": "PhotoVerify", "Traits": null, "Storage": null, "Partitions": null }
    ]
}

Response HTTP Status Codes

The call returns one of the standard HTTP status codes. With the success code (200) you receive the SatusResult object in the body text. With erroneous codes you typically get a Message field within the body text describing the error. The most commonly returned codes are:

200 OKThe response body contains the StatusResult object.
401 UnauthorizedNo or an invalid authentication header has been specified. This call requires Basic Authentication.
403 ForbiddenAccess has been denied (typically due to a wrong or invalid app-id).
500 Internal Server ErrorA server side exception occurred.

Sample Code

private static async Task<string> BWSStatusAsync()
{
	using (var client = new HttpClient())
	{
		client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Basic", Convert.ToBase64String(Encoding.ASCII.GetBytes($"{APP_IDENTIFIER}:{APP_SECRET}")));
		using (var response = await client.GetAsync(ENDPOINT + $"status"))
		{
			Console.Write("BWSStatus response... ");
			if (response.StatusCode == HttpStatusCode.OK)
			{
				string result = await response.Content.ReadAsStringAsync();
				var json = JObject.Parse(result);

				// read out status information
				string version = (string)json["Version"];
				string label = (string)json["Label"];
				var features = json["Features"];

				Console.WriteLine(json.ToString());
				return json.ToString();
			}

			Console.WriteLine(response.StatusCode.ToString());
			return string.Empty;
		}
	}
}
// using OkHttpClient from the OkHttp library
Request request = new Request.Builder()
        .url("https://bws.bioid.com/extension/status")
        .addHeader("Authorization", Credentials.basic(APP_IDENTIFIER, APP_SECRET))
        .build();
OkHttpClient client = new OkHttpClient();
Response response = client.newCall(request).execute();
if (response.code() == 200) {
    // using org.json.JSONObject from JSON-java library
    JSONObject json = new JSONObject(response.body().string());
    System.out.println("Status: " + json);
}