204 is listed as a potential return code, for example, on Update EHR_STATUS (if Prefer: return=minimal specified in headers or not set but sent as default value), according to the most recent specifications from the EHR API: https://specifications.openehr.org/releases/ITS-REST/Release-1.0.3/ehr.html
The following REST API endpoints do not yet support the 204 status code, despite the fact that Prefer: return=minimal header can be sent and defined there:
If there is a need to return entire created entity, then Prefer: return=representation is used, this is normal, but, as Prefer: return=minimal is a default value (if not specified), this 204 will be frequently returned.
What is not clear there, why on some entities, this status code is mentioned but on the others not (the ones provided above).
To align the specs, I propose to update all entities and to make sure that 204 is specified there as well (specifically for the case with Prefer: return=minimal provided or not).
204
is listed as a potential return code, for example, on Update EHR_STATUS (ifPrefer: return=minimal
specified in headers or not set but sent as default value), according to the most recent specifications from the EHR API: https://specifications.openehr.org/releases/ITS-REST/Release-1.0.3/ehr.htmlThe following REST API endpoints do not yet support the 204 status code, despite the fact that
Prefer: return=minimal
header can be sent and defined there:1. Create EHR: POST https://{baseUrl}/v1/ehr
2. Create Composition: POST https://{baseUrl}/v1/ehr/{ehr_id}/composition
3. Update Composition: PUT https://{baseUrl}/v1/ehr/{ehr_id}/composition/{uid_based_id}
4. Create Directory: POST https://{baseUrl}/v1/ehr/{ehr_id}/directory
5. Create Contribution: POST https://{baseUrl}/v1/ehr/{ehr_id}/contribution
If there is a need to return entire created entity, then
Prefer: return=representation
is used, this is normal, but, asPrefer: return=minimal
is a default value (if not specified), this 204 will be frequently returned.What is not clear there, why on some entities, this status code is mentioned but on the others not (the ones provided above).
To align the specs, I propose to update all entities and to make sure that 204 is specified there as well (specifically for the case with
Prefer: return=minimal
provided or not).