Law Enforcement - Capture API
#
Authentication#
Simple LoginThe application supports basic HTTP authentication, as specified by RFC 7617, whereby an authorization token is received in response to a successful login request. This request contains a header field in the form of Authorization: Basic <credentials>
, where credentials
is the Base64 encoding of ID and password joined by a single colon (:).
POST {base_url}/v1/login
Use this method to log into the application and receive an Authorization Token. To use the token in subsequent requests, simply set the header's Authorization value to Bearer [access_token]
, where access_token
is the access token received upon a successful login request.
Return Type
String
Example Request
Example Response
Responses
200 OK - Returned access token
401 Unauthorized
#
Creating a New BookingThe process of enrolling a new identity is broken up into multiple parts:
- First obtain a new, unique Booking Number. This will be used for all subsequent calls. Note that at this point, the enrollment does not exist yet, only a Booking Number has been reserved. If the enrollment is aborted the database will remain unchanged.
- Booking data can be upserted in two ways: either by calling the GraphQL mutation
enrollBookingBiographics
orenrollBookingImageMetadata
. On the first successful call to one of these, the Booking is considered to be created. enrollBookingImageMetadata
serves to add to update the Booking with one or more images that have previously been uploaded to the image bank usingPOST /v1/images
. Note that if images uploaded here fail to be mapped to Bookings, they will eventually be considered orphaned and purged from the database.enrollBookingBiographics
serves to add or update biographic information to the Booking.- For efficiency, both mutations
enrollBookingImageMetadata
andenrollBookingBiographics
can be called simultaneously.
Entire Bookings can also be imported directly by providing EBTS files to the /v1/booking/import
endpoint.
#
Getting a new Booking NumberGET {base_url}/v1/booking/number/:machineCode
Creates a new, unique Booking Number for subsequent use as the primary enrollment identifier throughout the capture process. The machineCode
is a string prefix to be used when generating the Booking Number.
Return Type
String
Example Request
Example Response
Responses
200 OK - Success
400 Bad Request - Invalid Machine Code
401 Unauthorized - Invalid access token provided in request's header
#
Inserting or Updating Biographic DataPOST {base_url}/graphql
Inserts or updates biographic data in the database using the GraphQL mutation enrollBookingBiographics. Note that the biographic fields that can be provided depend on the Agency Config of the deployment.
Return Type
String
Example Request
Example Response
Responses
200 OK - Success
400 Bad Request - Unsupported content type
401 Unauthorized - Invalid access token provided in request's header
#
Uploading Image DataPOST {base_url}/v1/images/:imageId
POST {base_url}/v1/images
Uploads an image to the database. If the client provides a UUID then it will either create a new record or update the existing one if UUID exists. If the client does not provide a UUID, the server will create a new UUID. Up to two images can be uploaded at the same time (in multipart/form-data) whereby the second image is assumed to be the compressed version (WSQ) of the first image. Note that this should only be used for fingerprint and palm images.
The server returns either a new UUID or the client-provided UUID back to the caller.
Return Type
String
Example Request
Example Response
Example Request
Example Response
Responses
200 OK - Success
400 Bad Request - Unsupported content type
401 Unauthorized - Invalid access token provided in request's header
#
Getting an ImageGET {base_url}/v1/images/:imageId
Gets an image from the database.
Return Type
Binary data
Example Request
Responses
200 OK - Success
400 Bad Request - Unsupported content type
401 Unauthorized - Invalid access token provided in request's header
404 Not found - The provided UUID does not represent an existing image
#
Inserting or Updating Image MetadataPOST {base_url}/graphql
Inserts or updates image metadata in the database using the mutation enrollBookingImageMetadata
Return Type
String
Example Request
Responses
200 OK - Success
400 Bad Request - Unsupported content type
401 Unauthorized - Invalid access token provided in request's header
404 Not found
#
Simultaneous Biographic/Image Insert or UpdatePOST {base_url}/graphql
Inserts or updates both biographic and image metadata in the database using both mutations enrollBookingBiographics and enrollBookingImageMetadata.
Return Type
String
Example Request
Responses
200 OK - Success
400 Bad Request - Unsupported content type
401 Unauthorized - Invalid access token provided in request's header
404 Not found
#
Importing a New BookingPOST {base_url}/v1/booking/import
Uploads an EBTS file and enrolls its contents into the database, as a new Booking. Note that {agencyConfig.jfd.bookingNumberFieldName}
specifies the name of the JDF field that identifies the Booking Number.
Example Request
Example Response
Responses
201 Created - Successfully enrolled
202 Accepted - Booking Number already enrolled. In this case the database remains unchanged apart from the generated auditing event.
400 Bad Request - Defects observed in the EBTS file
401 Unauthorized - Invalid access token provided in request's header