BWS 3 Face Recognition is in preview now!
Fetch the number of enrolled classes. The counted classes can be restricted to classes, that have specific tags assigned.
The GetClassCount
API is defined as a unary RPC:
rpc GetClassCount (GetClassCountRequest) returns (GetClassCountResponse);
message GetClassCountRequest {
repeated string tags = 1;
}
message GetClassCountResponse {
int64 number_of_classes = 1;
}
The GetClassCountRequest
message has the field as follows:
tags
This API requires a valid JWT in the Authorization request header and accepts an optional reference number.
Authorization | Required Bearer authentication. Please refer to BWS API Authentication for a description of how to provide a valid JWT here. |
Reference-Number | Optional, client specific reference number, which will be added to the BWS bookkeeping as well as to the response header. You typically use this reference to link the resulting BWS bookkeeping entries with your logs. |
The GetClassCountResponse
message has a single field:
number_of_classes
Beside of the success return status code OK (0), this call might also return one of the following gRPC error status codes to indicate an error:
All successful BWS gRPC calls return a response header and a response trailer containing additional information about the request:
Response Header | |
jobid | The Job-ID (a GUID) that has been assigned to this BWS call. |
bws-version | The version of the BWS gRPC service. |
reference-number | An optional reference number as provided in the request header. |
date | The timestamp when the request has been received at the server. |
... | Other headers that might have been added by the server (NGINX, Kestrel, ...) that was handling the request. |
Response Trailer | |
response-time-ms | The timespan in milliseconds the request spent at the BWS service. |
... | Other trailers, like exception trailers, which are added by the gRPC framework in case an RPC exception occurred. |