Skip to content

Cannot create an AuditEvent resource via a PUT request #1306

Open
@tswelsh

Description

@tswelsh

Describe the bug
To preface: this might be intended behaviour but I wanted to check.
I am working on an application where we write AuditEvents to more than one place. We would like to choose the Id of the AuditEvent in the FhirServer in order to keep it consistent across the different places (i.e. use a client defined id). Although the server is configured with updateCreate = true, it rejects the PUT request for a new AuditEvent. I think this is due to the AuditEvent special case in the CapabilityStatementBuilder, combined with the upsert code path always checking for update permissions on the resource.

To Reproduce
Steps to reproduce the behavior:

  1. Send a PUT request with the appropriate body to /AuditEvent/{some new id}

Expected behavior
An AuditEvent with the specified id is created and 201 Created is returned.

Actual behavior
The AuditEvent isn't created and a response of 405 Method Not Allowed is returned.

Metadata

Metadata

Assignees

Labels

EnhancementEnhancement on existing functionality.SpecificationAn issue referring or related to the FHIR SpecificationUp for grabsThe issue require minimal context and is well-suited for new contributors.

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions