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. |
---|
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 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"); }