# Storing a query with no version - correct behavior when the query already exists? **Category:** [ITS](https://discourse.openehr.org/c/its/41) **Created:** 2023-03-01 14:45 UTC **Views:** 378 **Replies:** 1 **URL:** https://discourse.openehr.org/t/storing-a-query-with-no-version-correct-behavior-when-the-query-already-exists/3634 --- ## Post #1 by @joseph.kane The API [spec](https://specifications.openehr.org/releases/ITS-REST/latest/definition.html#tag/Query/operation/definition_query_store.yaml) does not define a 409 response for this operation. If a query already exists with the specified name, what is the correct behavior of the endpoint? My guess is to increment the patch number in the semver, but I'd like confirmation. --- ## Post #2 by @sebastian.iancu Hi, Your remark and question are rightful. The assumption of incrementing the internal version sounds also reasonable, but might be tricky to define semantic of a major vs minor vs patch content on a query to fully rely on semver automation. But unfortunately I cannot answer with certainty to your assumption yet: I will first need to clarify it in the SEC (Specifications Editorial Committee). I am analyzing the necessary changes to be done on an upcoming release on REST API specs, so I will add your remark and suggestion to the list of issues. Hopefully you will see a change soon on the specifications on this subject. --- **Canonical:** https://discourse.openehr.org/t/storing-a-query-with-no-version-correct-behavior-when-the-query-already-exists/3634 **Original content:** https://discourse.openehr.org/t/storing-a-query-with-no-version-correct-behavior-when-the-query-already-exists/3634