Skip to content

Implement HEAD endpoint for retrieving LogisticsObject headers

As a backend developer, I want to retrieve the metadata of a LogisticsObject, mainly LatestRevision, without getting the full LogisticsObject body to improve the efficiency of ONE Record client applications that only need metadata.

Acceptance Criteria:

  • Create a new HEAD endpoint at the same path as the existing GET endpoint ({id}). e.g. http://localhost:8080/logistics-objects/{id}
  • Ensure the HEAD endpoint requires the same authentication and access control as the GET endpoint.
  • The HEAD endpoint should return the same headers as the GET request
  • Include appropriate unit tests to verify that the endpoint returns correct headers and adheres to security requirements.
  • Ensure that logging is in place to debug the HEAD request similar to the GET request.
  • Documentation should be updated to include the new HEAD endpoint and its purpose.

Notes:

  • Reuse existing services and logic as much as possible to ensure consistency between the GET and HEAD responses.
  • Consider impact on existing system performance and ensure that the new endpoint does not introduce significant overhead.
Edited by Daniel A. Doeppner