List saved queries
Last updated
Was this helpful?
Last updated
Was this helpful?
ListAssessmentQueries retrieves a list of all built-in and user-created queries.
By default, this endpoint returns only the queries that are currently enabled. When the risks_only
parameter is set to true, it will only return queries with a risk level.
Sample request
curl -X 'GET' \
"$BASE_URL/api/v1/assessments/queries?page_size=1&risks_only=true&filter=name+co+%22User%22" \
-H "authorization: Bearer $VEZA_TOKEN"
Sample response:
{
"values": [
{
"id": "95ccaca3-c9f6-4711-9219-887e5c102701",
"name": "AWS IAM Groups with iam:CreateAccessKey permission",
"description": "AWS IAM Groups with iam:CreateAccessKey permission",
"result_type": "NUMBER",
"query_type": "SYSTEM_CREATED",
"raw_permissions": {
"values": [],
"operator": "AND"
},
"effective_permissions": {
"values": [],
"operator": "AND"
},
"variables": [
"AWS_ACCOUNT_LIST"
],
"source_node_types": {
"nodes": [
{
"node_type": "AwsIamGroup",
"tags": [],
"conditions": [],
"condition_expression": {
"specs": [
{
"fn": "IN",
"property": "aws_account_id",
"value": [
"527398259632",
"877042069677",
"340069577982",
"241721837758",
"998048473876",
"973979857296"
],
"not": false,
"value_property_name": "",
"value_property_from_other_node": false
}
],
"child_expressions": [],
"operator": "AND",
"not": false
},
"node_id": "",
"excluded_tags": [],
"count_conditions": [],
"direct_relationship_only": false,
"node_type_grouping_constraint": null
}
],
"nodes_operator": "AND"
},
"required_intermediate_node_types": {
"nodes": [],
"nodes_operator": "AND"
},
"avoided_intermediate_node_types": {
"nodes": [],
"nodes_operator": "AND"
},
"destination_node_types": {
"nodes": [],
"nodes_operator": "AND"
},
"no_relation": false,
"access_filter": null,
"created_by": "",
"visibility": "PUBLIC",
"owners": [],
"node_relationship_type": "CONFIGURED",
"integration_types": [
"aws"
],
"labels": [],
"created_at": "2023-02-01T04:32:18.126875729Z",
"updated_at": "2023-04-07T16:00:52.761867936Z",
"source_type": "AwsIamGroup",
"destination_types": [],
"relates_to_exp": {
"specs": [
{
"node_types": {
"nodes": [
{
"node_type": "AwsIamGroupedPermission",
"tags": [],
"conditions": [],
"condition_expression": {
"specs": [
{
"fn": "LIST_CONTAINS",
"property": "permissions",
"value": "iam:CreateAccessKey",
"not": false,
"value_property_name": "",
"value_property_from_other_node": false
},
{
"fn": "EXISTS",
"property": "deny",
"value": null,
"not": true,
"value_property_name": "",
"value_property_from_other_node": false
}
],
"child_expressions": [],
"operator": "AND",
"not": false
},
"node_id": "",
"excluded_tags": [],
"count_conditions": [],
"direct_relationship_only": false,
"node_type_grouping_constraint": null
}
],
"nodes_operator": "AND"
},
"required_intermediate_node_types": null,
"avoided_intermediate_node_types": null,
"raw_permissions": null,
"effective_permissions": null,
"no_relation": false,
"direction": "ANY_DIRECTION"
}
],
"child_expressions": [],
"operator": "AND",
"not": false,
"and_op_type": "INFERRED"
},
"all_entity_condition": {
"specs": [],
"child_expressions": [],
"operator": "AND",
"not": false
},
"risk_level": "WARNING",
"risk_suppressed_constraints": null,
"analysis_type": "UNSET",
"result": 0,
"result_evaluated_at": null,
"result_evaluated": false
}
],
"next_page_token": "eyJOZXh0Q3Vy==",
"has_more": true
}
See Parameters for more information about the saved query object.
The maximum number of results to be returned. Fewer results may be returned even when more pages exist.
The token specifying the specific page of results to retrieve.
curl -L \
--url '/api/v1/assessments/queries' \
--header 'Authorization: Bearer Bearer <API key>'
{
"values": [
{
"id": "text",
"name": "text",
"description": "text",
"result_type": 1,
"query_type": 1,
"raw_permissions": {
"values": [
"text"
],
"operator": 1
},
"effective_permissions": {
"values": [
1
],
"operator": 1
},
"variables": [
"text"
],
"source_node_types": "[Circular Reference]",
"required_intermediate_node_types": "[Circular Reference]",
"avoided_intermediate_node_types": "[Circular Reference]",
"destination_node_types": "[Circular Reference]",
"no_relation": true,
"access_filter": {
"engagement_score": {
"op": 1,
"value": 1
},
"over_provisioned_score": {
"op": 1,
"value": 1
},
"include_secondary_grantee": true,
"include_indirect_resource": true,
"exclude_indirect_grantee": true,
"anomaly_detection_history_days": "text"
},
"created_by": "text",
"visibility": 1,
"owners": [
"text"
],
"node_relationship_type": 1,
"integration_types": [
"text"
],
"labels": [
"text"
],
"created_at": "2025-03-28T21:42:31.551Z",
"updated_at": "2025-03-28T21:42:31.551Z",
"source_type": "text",
"destination_types": [
"text"
],
"relates_to_exp": "[Circular Reference]",
"all_entity_condition": "[Circular Reference]",
"path_summary_node_types": "[Circular Reference]",
"path_summary_count_conditions": {
"conditions": [
{
"fn": 1,
"value": "text",
"value_as": 1
}
]
},
"risk_level": 1,
"risk_suppressed_constraints": "[Circular Reference]",
"analysis_type": 1,
"result": 1,
"result_evaluated_at": "2025-03-28T21:42:31.551Z",
"result_evaluated": true,
"risk_explanation": "text",
"risk_remediation": "text",
"updated_by": "text",
"natural_language": "text",
"result_enrichment": "[Circular Reference]",
"change_source": 1,
"uneditable": true,
"approx_total_source_nodes_count": "text"
}
],
"next_page_token": "text",
"has_more": true
}
OK