Problem:
Received HTTP 500 Internal Server Error when using PATCH or
PUT in query without specifying alarm definition id.
Solution:
Modified on_patch() and on_put() so that if alarm definition id
is not specified, query response will be HTTP 422 Unprocessible Entity.
Change-Id: I0a212f09cb76d1b4db6f129fe9ca94ec1fc274df