Does $validate actually create the resource?

Hi! Here’s a newbie quesiton for you:

I am learning how to use REST and how to validate resources using the $validate tool. So I am POST-ing resources to $validate and it is giving me very useful results.

But when I do this, and it is successful, it actually looks like the resources are being created and saved to the FHIR Server. For some reason, I didn’t think this would happen. I just want my FHIR Server to check my resource structure and validate it for now … not actually save it! Am I doing something wrong?

according to the documentation $validate does not mention anything about creating the resource, this looks like an additional feature of the server. with which server does this happen?

Servers are allowed to have side effects on operations, though this is certainly an unusual (and likely undesirable) side effect. I would certainly take it up with the server author.

Thanks! I will double-check to confirm this what is hapenning. Will update this discussion with my results.

Whoops! Turns out this issue was PEBCAK… ie my own fault. Thank you for clarifying how $validate should not actually create the resource you are validating.

Wait … to add to this issue. Do you know how to use $validate on a bundle? This is where I seem to be running into problems.

You’re trying to validate a Bundle, or you’re posting a Bundle of validate operation invocations? Validating a Bundle should be the same as any other resource…

I am trying to validate a bundle. If I POST a bundle to$validate

it works fine. But if I do the same to:$validate

then it fails with this error: Invalid request: The FHIR endpoint on this server does not know how to handle POST operation[$validate] with parameters [[]]

Not sure how to interpret that second error message.

The $validate operation is defined on the Resource or Resource Type ( [base]/[Resource]/$validate | [base]/[Resource]/[id]/$validate) link, try$validate