Playground biometrics demo BioID home page

DeleteClass Web API

DELETE /deleteclass?bcid={BCID}

Deletes all biometric data associated with a Biometric Class ID from the system.

Request Information

  • Parameters

  • bcid
    Required. The Biometric Class ID (BCID) of the class that shall get deleted.

Response Information

The call returns one of the standard HTTP status codes:

RESPONSE HTTP STATUS CODES
  • 200 OK
    The class has been deleted.
  • 400 Bad Request
    An invalid BCID has been specified.
  • 401 Unauthorized
    No or an invalid authentication header has been specified, Basic Authentication is required.
  • 403 Forbidden
    Access has been denied (typically due to a wrong or invalid app-id or BCID).
  • 500 Internal Server Error
    A server side exception occurred.

Sample Code

private static async Task<bool> DeleteClassAsync(string bcid)
{
    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.DeleteAsync(ENDPOINT + $"deleteclass?bcid={bcid}"))
        {
            Console.WriteLine("DeleteClass response... " + response.IsSuccessStatusCode);
            return response.IsSuccessStatusCode;
        }
    }
}
// using OkHttpClient from the OkHttp library
HttpUrl url = HttpUrl.parse("https://bws.bioid.com/extension/deleteclass").newBuilder()
        .addQueryParameter("bcid", STORAGE + "." + PARTITION + "." + CLASS_ID)
        .build();
Request request = new Request.Builder()
        .url(url)
        .addHeader("Authorization", Credentials.basic(APP_IDENTIFIER, APP_SECRET))
        .delete()
        .build();
OkHttpClient client = new OkHttpClient();
Response response = client.newCall(request).execute();
if (response.code() == 200) {
    System.out.println("class has been deleted");
}