Stream: implementers
Topic: Conditional PUT not working
Dexter (Jul 01 2021 at 09:42):
How do I specify resource ID in PUT request of a bundle?
{
"resourceType": "Bundle",
"type": "transaction",
"entry": [
{
"resource": {
"resourceType": "Group",
"id": "4812",
// other fields
},
"request": {
"method": "PUT",
"url": "Group?identifier=3.5"
}
}
]
}
But this updates the resource which has the identifier 3.5
(4809
). My intention is up update 4812
when there's no other resource that has the identifier 3.5
Dexter (Jul 01 2021 at 09:43):
I expected this to have happened
One Match, resource id provided but does not match resource found:
The server returns a 400 Bad Request error indicating the client id specification was a problem preferably with an OperationOutcome
Dexter (Jul 01 2021 at 09:56):
I just noticed that normal PUT request doesn't work too
Dexter (Jul 01 2021 at 10:05):
GET to /Group?identifier=3.5
returns 1 resource with ID 4809
.
I'm trying to update resource 4812
only if there's no other resource with identifier 3.5
.
PUT to /Group?identifier=3.5
updates 4809
, even though a group with that identifier exists (4809
)
Body is
{
"resourceType": "Group",
"id": "4812",
// other fields
}
Lloyd McKenzie (Jul 01 2021 at 14:57):
What server are you hitting this issue on?
Dexter (Jul 02 2021 at 04:16):
Lloyd McKenzie said:
What server are you hitting this issue on?
If I'm not mistaken, both on the public hapi.fhir.org
and the latest jpa hapi container
Lloyd McKenzie (Jul 02 2021 at 15:44):
Suggest raising it on #hapi
Dexter (Jul 05 2021 at 04:51):
Thanks, just posted that here
Dexter (Jul 05 2021 at 13:24):
(deleted)
Last updated: Apr 12 2022 at 19:14 UTC