All pages
Powered by GitBook
1 of 1

Loading...

List saved queries

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 for more information about the saved query object.

Parameters
get
Authorizations
Query parameters
include_inactive_queriesbooleanOptional
violations_onlybooleanOptionalDeprecated
risks_onlybooleanOptional
include_resultsbooleanOptional
include_natural_languagebooleanOptional
filterstringOptional
order_bystringOptional
page_sizeinteger ยท int32Optional

The maximum number of results to be returned. Fewer results may be returned even when more pages exist.

page_tokenstringOptional

The token specifying the specific page of results to retrieve.

Responses
200
OK
application/json
default
Default error response
application/json
get
GET /api/v1/assessments/queries HTTP/1.1
Host: 
Authorization: Bearer Bearer <API key>
Accept: */*
{
  "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": {
        "nodes": [
          {
            "node_type": "text",
            "condition_expression": "[Circular Reference]",
            "node_id": "text",
            "count_condition_expression": "[Circular Reference]",
            "direct_relationship_only": true,
            "node_type_grouping_constraint": {
              "node_types": [
                "text"
              ],
              "constraint_type": 1
            },
            "properties_to_get": [
              "text"
            ],
            "tags_to_get": [
              {
                "type": 1,
                "key": "text"
              }
            ],
            "integration_types": [
              "text"
            ]
          }
        ],
        "nodes_operator": 1
      },
      "required_intermediate_node_types": {
        "nodes": [
          {
            "node_type": "text",
            "condition_expression": "[Circular Reference]",
            "node_id": "text",
            "count_condition_expression": "[Circular Reference]",
            "direct_relationship_only": true,
            "node_type_grouping_constraint": {
              "node_types": [
                "text"
              ],
              "constraint_type": 1
            },
            "properties_to_get": [
              "text"
            ],
            "tags_to_get": [
              {
                "type": 1,
                "key": "text"
              }
            ],
            "integration_types": [
              "text"
            ]
          }
        ],
        "nodes_operator": 1
      },
      "avoided_intermediate_node_types": {
        "nodes": [
          {
            "node_type": "text",
            "condition_expression": "[Circular Reference]",
            "node_id": "text",
            "count_condition_expression": "[Circular Reference]",
            "direct_relationship_only": true,
            "node_type_grouping_constraint": {
              "node_types": [
                "text"
              ],
              "constraint_type": 1
            },
            "properties_to_get": [
              "text"
            ],
            "tags_to_get": [
              {
                "type": 1,
                "key": "text"
              }
            ],
            "integration_types": [
              "text"
            ]
          }
        ],
        "nodes_operator": 1
      },
      "destination_node_types": {
        "nodes": [
          {
            "node_type": "text",
            "condition_expression": "[Circular Reference]",
            "node_id": "text",
            "count_condition_expression": "[Circular Reference]",
            "direct_relationship_only": true,
            "node_type_grouping_constraint": {
              "node_types": [
                "text"
              ],
              "constraint_type": 1
            },
            "properties_to_get": [
              "text"
            ],
            "tags_to_get": [
              {
                "type": 1,
                "key": "text"
              }
            ],
            "integration_types": [
              "text"
            ]
          }
        ],
        "nodes_operator": 1
      },
      "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",
        "last_used": {
          "op": 1,
          "value": "2025-05-09T12:44:19.423Z",
          "target": 1
        }
      },
      "created_by": "text",
      "visibility": 1,
      "owners": [
        "text"
      ],
      "node_relationship_type": 1,
      "integration_types": [
        "text"
      ],
      "labels": [
        "text"
      ],
      "created_at": "2025-05-09T12:44:19.423Z",
      "updated_at": "2025-05-09T12:44:19.423Z",
      "source_type": "text",
      "destination_types": [
        "text"
      ],
      "relates_to_exp": {
        "specs": [
          "[Circular Reference]"
        ],
        "child_expressions": [
          "[Circular Reference]"
        ],
        "operator": 1,
        "not": true,
        "and_op_type": 1
      },
      "all_entity_condition": {
        "specs": [
          {
            "fn": 1,
            "property": "text",
            "value": null,
            "not": true,
            "value_property_name": "text",
            "value_property_from_other_node": true
          }
        ],
        "tag_specs": [
          {
            "tag": {
              "type": "text",
              "key": "text",
              "value": "text",
              "properties": {
                "ANY_ADDITIONAL_PROPERTY": null
              }
            },
            "exclude": true
          }
        ],
        "child_expressions": [
          {
            "specs": [
              {
                "fn": 1,
                "property": "text",
                "value": null,
                "not": true,
                "value_property_name": "text",
                "value_property_from_other_node": true
              }
            ],
            "tag_specs": [
              {
                "tag": {
                  "type": "text",
                  "key": "text",
                  "value": "text",
                  "properties": {
                    "ANY_ADDITIONAL_PROPERTY": null
                  }
                },
                "exclude": true
              }
            ],
            "child_expressions": "[Circular Reference]",
            "operator": 1,
            "not": true
          }
        ],
        "operator": 1,
        "not": true
      },
      "path_summary_node_types": {
        "nodes": [
          {
            "node_type": "text",
            "condition_expression": "[Circular Reference]",
            "node_id": "text",
            "count_condition_expression": "[Circular Reference]",
            "direct_relationship_only": true,
            "node_type_grouping_constraint": {
              "node_types": [
                "text"
              ],
              "constraint_type": 1
            },
            "properties_to_get": [
              "text"
            ],
            "tags_to_get": [
              {
                "type": 1,
                "key": "text"
              }
            ],
            "integration_types": [
              "text"
            ]
          }
        ],
        "nodes_operator": 1
      },
      "path_summary_count_conditions": {
        "conditions": [
          {
            "fn": 1,
            "value": "text",
            "value_as": 1
          }
        ]
      },
      "risk_level": 1,
      "risk_suppressed_constraints": {
        "nodes": [
          "[Circular Reference]"
        ]
      },
      "analysis_type": 1,
      "result": 1,
      "result_evaluated_at": "2025-05-09T12:44:19.423Z",
      "result_evaluated": true,
      "risk_explanation": "text",
      "risk_remediation": "text",
      "updated_by": "text",
      "natural_language": "text",
      "result_enrichment": {
        "join_node_specs": [
          {
            "with": "text",
            "node_spec": "[Circular Reference]",
            "as": "text"
          }
        ],
        "outlier_detection": {
          "type": 1
        }
      },
      "change_source": 1,
      "uneditable": true,
      "approx_total_source_nodes_count": "text",
      "include_sub_permissions": true,
      "save_mode": 1,
      "vql_query": "text",
      "source_type_integration": "text"
    }
  ],
  "next_page_token": "text",
  "has_more": true
}