Update a Resource
Last updated
Was this helpful?
Last updated
Was this helpful?
To avoid overwriting data, an application must always indicate which version of a Resource
the update is based on. This is done using the If-Match
header. If this header is missing, the Koppeltaal server will reject the request. If the update is not based on the latest version, the server will respond with a 409 Conflict
or a 412 Precondition Failed
.
The If-Match
value must match the latest ETag
value. The ETag
value is provided via a response header sent by the Koppeltaal server after a , or .
PUT
https://fhir-server.koppeltaal.headease.nl/fhir/DEFAULT/<Resource>/<:id>
Note: the
id
property has to be set in the body as well
id*
string
The "logical id" of the
Resource
If-Match*
string
A
to the version the update is based on, e.g: W/"3"
Authorization*
string
Bearer token obtained from the Auth Server
*
string
The
Resource
Resource is modified. The resource with resource-origin extension and logical id is returned
To update a Resource
via a small payload, the Koppeltaal server may support PATCH
requests. The payload of the PATCH
must be one of the following:
This is what the payload looks like from a JSON Patch to update the status of a Task
PATCH
https://hapi-fhir-server.koppeltaal.headease.nl/fhir/<Resource>/<:id>
As an alternative to updating an entire resource, clients can perform a patch operation. This can be useful when a client is seeking to minimize its bandwidth utilization.
*
String
The "logical id" of the
Resource
If-Match*
string
A
to the version the update is based on, e.g: W/"3"
Authorization*
string
Bearer token obtained from the Auth Server
*
object
The Patch
Patch is applied. The complete Resource will be returned
(see )
PATCH requests are optional. See the to find out if the server supports this.
A (Content-Type application/json-patch+json).
An (Content-Type application/xml-patch+xml)
A parameters Resource (Content-Type ).
More examples of patches can be downloaded .
(see )