// This file is autogenerated, DO NOT EDIT
// rest-api/security/query-role.asciidoc:137

[source, python]
----
resp = client.security.query_role(
    query={
        "bool": {
            "must_not": {
                "term": {
                    "metadata._reserved": True
                }
            }
        }
    },
    sort=[
        "name"
    ],
)
print(resp)
----
