[SAPI-13] Created the query method.