Playground biometrics demo BioID home page

Face Recognition Method SetTemplateTags

You can use tags to group various classes together. Therefore, biometric templates can be associated with tags, which can be used with one-to-many comparisons (see Search) to restrict the search to classes that have matching tags assigned.

Service method definition

The SetTemplateTags API is defined as a unary RPC:

rpc SetTemplateTags (SetTemplateTagsRequest) returns (SetTemplateTagsResponse);

message SetTemplateTagsRequest {
    int64 classId = 1;
    repeated string tags = 2;
}
message SetTemplateTagsResponse { }

Request

The SetTemplateTagsRequest message has the fields as follows:

classId
The unique class ID of the biometric face template to associate with the given tags.
tags
List of tags to assign to the template. Any existing tags will be overwritten.

Request Headers

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.

Response

The SetTemplateTags method has no specific response data.

gRPC Errors

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:

Cancelled (1)
Client application cancelled the request.
Unknown (2)
Server experienced some unexpected behavior.
InvalidArgument (3)
Client specified an invalid argument:
  • A positive number is required for the class ID.
DeadlineExceeded (4)
Deadline expired before operation could complete.
NotFound (5)
A biometric face template for specified class ID does not exist.
Internal (13)
Internal errors indicate that critical system invariants have been violated. If you encounter one of these errors, it means something is severely wrong. These errors can occur due to an invalid service configuration, a misconfigured client, or an unexpected exception.
Unavailable (14)
The service is currently unavailable. This is most likely a transient condition and may be corrected by retrying with a backoff.
Unauthenticated (16)
The request does not have valid authentication credentials for the operation.

Response Headers/Trailers

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.