# Test a query ruleset **POST /_query_rules/{ruleset_id}/_test** Evaluate match criteria against a query ruleset to identify the rules that would match that criteria. ## Required authorization * Cluster privileges: `manage_search_query_rules` ## Servers - http://api.example.com: http://api.example.com () ## Authentication methods - Api key auth ## Parameters ### Path parameters - **ruleset_id** (string) The unique identifier of the query ruleset to be created or updated ### Body: application/json (object) - **match_criteria** (object) The match criteria to apply to rules in the given query ruleset. Match criteria should match the keys defined in the `criteria.metadata` field of the rule. ## Responses ### 200 #### Body: application/json (object) - **total_matched_rules** (number) - **matched_rules** (array[object]) [Powered by Bump.sh](https://bump.sh)