DELETE /deleteclass?bcid={BCID}
Deletes all biometric data associated with a Biometric Class ID from the system.
The call returns one of the standard HTTP status codes:
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");
}