Skip to content

Commit 1441159

Browse files
committed
CDPS-1054: Added ADR for the decision to use one field per request for v1 patch endpoints.
1 parent f6a4709 commit 1441159

3 files changed

+32
-3
lines changed

architecture-decision-record/0001-structure-packages-by-api-version.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[< Previous](0001-structure-packages-by-api-version.md),
1+
[< Previous](0000-separate-domain-specific-code-by-package.md),
22
[Contents](README.md),
33
[Next >](0002-include-username-in-client-credential-token.md)
44

architecture-decision-record/0002-include-username-in-client-credential-token.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
[< Previous](0002-include-username-in-client-credential-token.md),
1+
[< Previous](0001-structure-packages-by-api-version.md),
22
[Contents](README.md),
3-
[Next >](9999-end.md)
3+
[Next >](0003-limit-v1-patch-endpoints-to-one-field-per-request.md)
44

55

66

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
[< Previous](0002-include-username-in-client-credential-token.md),
2+
[Contents](README.md),
3+
[Next >](9999-end.md)
4+
5+
6+
7+
# 3. Limit V1 patch endpoints to updating one field per request
8+
9+
Date: 2024-11-28
10+
11+
## Status
12+
13+
✅ Accepted
14+
15+
## Context
16+
17+
For version 1 endpoints the HMPPS Person Integration API will make calls to the Prison API to update the source data in NOMIS. For simplicity the
18+
endpoints on the Prison API update a single field per request. Therefore, if the Person Integration API were to allow multiple fields to be updated in
19+
a single request this would require multiple calls to the Prison API. If one of these calls were to fail then we would need to roll back the changes
20+
from any successful calls in order to leave the data in a consistent state. This could be handled with retries and a fallback to reverse the updates
21+
however this will add complexity without a valuable user case for doing so.
22+
23+
## Decision
24+
25+
For simplicity the version 1 patch endpoints will allow a single field per-request while the Prison API is being used as the underlying datasource.
26+
27+
## Consequences
28+
N/A
29+

0 commit comments

Comments
 (0)