Get query spec results
GetAssessmentQuerySpecResult Returns the total count of results for a query specification.
The response will include a number_value
representing the total number of results.
when the specified filter would include all numeric values (ie >= 0 or <= 100), results will also include rows which have no OPS available (nulls)
A boolean expression describing the "relates to" types.
Can be used when path_summary_node_types are set to specify the path length
These fields control whether or not tags will be included in source and/or destination results
Allows FE to Alert BE if permissions are being displayed to the user
Include node with sub permissions which is a permission showing for a resource when in reality the permission applies to a subresource.
This field should be used with AssessmentQueryResultValueType SOURCE_NODES_WITH_COUNTS to include permissions summarized (aggregated) by source node, meaning it contains all permissions used by each source node
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.
POST /api/v1/assessments/query_spec:result HTTP/1.1
Host:
Authorization: Bearer Bearer <API key>
Content-Type: application/json
Accept: */*
Content-Length: 7942
{
"query_type": 1,
"source_node_types": {
"nodes": [
{
"node_type": "text",
"condition_expression": {
"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
},
"node_id": "text",
"count_condition_expression": {
"specs": [
{
"fn": 1,
"value": "text",
"value_as": 1
}
],
"child_expressions": "[Circular Reference]",
"operator": 1,
"not": true,
"include_zero_count_results": true
},
"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": {
"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
},
"node_id": "text",
"count_condition_expression": {
"specs": [
{
"fn": 1,
"value": "text",
"value_as": 1
}
],
"child_expressions": "[Circular Reference]",
"operator": 1,
"not": true,
"include_zero_count_results": true
},
"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": {
"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
},
"node_id": "text",
"count_condition_expression": {
"specs": [
{
"fn": 1,
"value": "text",
"value_as": 1
}
],
"child_expressions": "[Circular Reference]",
"operator": 1,
"not": true,
"include_zero_count_results": true
},
"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": {
"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
},
"node_id": "text",
"count_condition_expression": {
"specs": [
{
"fn": 1,
"value": "text",
"value_as": 1
}
],
"child_expressions": "[Circular Reference]",
"operator": 1,
"not": true,
"include_zero_count_results": true
},
"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
},
"raw_permissions": {
"values": [
"text"
],
"operator": 1
},
"effective_permissions": {
"values": [
1
],
"operator": 1
},
"customized_variables": [
{
"key": "text",
"value": "text"
}
],
"snapshot_id": "text",
"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-08-05T00:08:17.338Z",
"target": 1,
"relative_timevar_value": "text"
}
},
"node_relationship_type": 1,
"relates_to_exp": {
"specs": [
{
"node_types": {
"nodes": "[Circular Reference]",
"nodes_operator": 1
},
"required_intermediate_node_types": {
"nodes": "[Circular Reference]",
"nodes_operator": 1
},
"avoided_intermediate_node_types": {
"nodes": "[Circular Reference]",
"nodes_operator": 1
},
"raw_permissions": {
"values": [
"text"
],
"operator": 1
},
"effective_permissions": {
"values": [
1
],
"operator": 1
},
"unsupported_condition_mode": 1,
"no_relation": true,
"direction": 1
}
],
"child_expressions": [
{
"specs": [
{
"node_types": {
"nodes": "[Circular Reference]",
"nodes_operator": 1
},
"required_intermediate_node_types": {
"nodes": "[Circular Reference]",
"nodes_operator": 1
},
"avoided_intermediate_node_types": {
"nodes": "[Circular Reference]",
"nodes_operator": 1
},
"raw_permissions": {
"values": [
"text"
],
"operator": 1
},
"effective_permissions": {
"values": [
1
],
"operator": 1
},
"unsupported_condition_mode": 1,
"no_relation": true,
"direction": 1
}
],
"child_expressions": [
"[Circular Reference]"
],
"operator": 1,
"not": true,
"and_op_type": 1
}
],
"operator": 1,
"not": true,
"and_op_type": 1
},
"path_summary_node_types": {
"nodes": [
{
"node_type": "text",
"condition_expression": {
"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
},
"node_id": "text",
"count_condition_expression": {
"specs": [
{
"fn": 1,
"value": "text",
"value_as": 1
}
],
"child_expressions": "[Circular Reference]",
"operator": 1,
"not": true,
"include_zero_count_results": true
},
"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
},
"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": [
{
"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
}
],
"operator": 1,
"not": true
},
"path_summary_count_conditions": {
"conditions": [
{
"fn": 1,
"value": "text",
"value_as": 1
}
]
},
"result_value_type": 1,
"include_all_source_tags_in_results": true,
"include_all_destination_tags_in_results": true,
"additional_columns_to_get": [
1
],
"result_enrichment": {
"join_node_specs": [
{
"with": "text",
"node_spec": {
"node_type": "text",
"condition_expression": {
"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
},
"node_id": "text",
"count_condition_expression": {
"specs": [
{
"fn": 1,
"value": "text",
"value_as": 1
}
],
"child_expressions": "[Circular Reference]",
"operator": 1,
"not": true,
"include_zero_count_results": true
},
"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"
]
},
"as": "text"
}
],
"outlier_detection": {
"type": 1
},
"include_associated_risks": true,
"risks_filter": "text"
},
"include_sub_permissions": true,
"include_permissions_summary": true,
"page_size": "text",
"page_token": "text"
}
{
"result_type": "text",
"number_value": "text",
"timestamp_value": "text",
"nodes_value": {
"values": [
{
"id": "text",
"type": "text",
"properties": {},
"destination_node_count": 1,
"engagement_access_stats": {
"engagement_score": 1,
"over_provisioned_score": 1,
"total_count": "text",
"accessed_count": "text"
},
"access_stats": {
"last_used": "2025-08-05T00:08:17.338Z",
"count": 1,
"concrete_permissions": [
"text"
],
"canonical_permissions": [
"text"
]
},
"risk_level": 1,
"raw_permissions": [
"text"
],
"effective_permissions": [
"text"
],
"unsupported_conditions": {
"ANY_ADDITIONAL_PROPERTY": {
"conditions": [
"text"
]
}
},
"destination_node_percentage_of_total": 1,
"tags": [
{
"type": "text",
"key": "text",
"value": "text",
"properties": {
"ANY_ADDITIONAL_PROPERTY": null
}
}
],
"specified_tags": [
{
"type": "text",
"key": "text",
"value": "text",
"properties": {
"ANY_ADDITIONAL_PROPERTY": null
}
}
],
"filtered_raw_permissions": [
"text"
],
"corresponding_effective_permissions": [
"text"
],
"single_entity_access_stats": {
"last_used": "2025-08-05T00:08:17.338Z",
"last_used_with_events_for": [
{
"name": "text",
"last_used": "2025-08-05T00:08:17.338Z"
}
]
},
"additional_node_properties": {
"role_substitution_recommended_role": "text",
"role_substitution_reason_for_high_priv_role": "text",
"role_substitution_error": "text",
"default_cohort_role_users_in_cohort": [
"text"
],
"default_cohort_role": "text",
"default_cohort_role_all_common_roles": [
"text"
],
"default_cohort_role_error": "text",
"login_anomaly_detection_stats": [
{
"time": "2025-08-05T00:08:17.338Z",
"login_count": "text",
"median_login_count": 1,
"outlier_prediction": 1
}
],
"outlier_prediction": {
"prediction": 1,
"score": 1,
"contributing_features": [
{
"name": "text",
"value": 1,
"explanation": "text"
}
]
},
"associated_risks": [
{
"query_id": "text",
"suppressed": true,
"risk_level": 1
}
]
},
"integration_type": "text"
}
],
"next_page_token": "text",
"has_more": true
},
"result_statistics": {
"max_destination_node_count": "text",
"min_destination_node_count": "text",
"avg_destination_node_count": 1
},
"approx_total_source_nodes_count": "text"
}
Sample request:
curl -X 'POST' \
"$BASE_URL/api/v1/assessments/query_spec:result" \
-H "authorization: Bearer $VEZA_TOKEN" \
--data-raw '{
"query_type": "SOURCE_TO_DESTINATION",
"source_node_types": {
"nodes": [
{
"node_type": "OktaUser",
"tags": [],
"conditions": [],
"condition_expression": null,
"node_id": "",
"excluded_tags": [],
"count_conditions": [],
"direct_relationship_only": false,
"node_type_grouping_constraint": null
}
],
"nodes_operator": "AND"
},
"destination_node_types": null,
"required_intermediate_node_types": null,
"avoided_intermediate_node_types": null,
"raw_permissions": null,
"effective_permissions": null,
"customized_variables": [],
"no_relation": false,
"snapshot_id": "0",
"access_filter": null,
"node_relationship_type": "EFFECTIVE_ACCESS",
"relates_to_exp": {
"specs": [
{
"node_types": {
"nodes": [
{
"node_type": "SnowflakeRole",
"tags": [],
"conditions": [],
"condition_expression": {
"specs": [
{
"fn": "EQ",
"property": "id",
"value": "dn44266.us-east-2.aws.snowflakecomputing.com/role/BILLING",
"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": null,
"avoided_intermediate_node_types": null,
"raw_permissions": null,
"effective_permissions": {
"values": [],
"operator": "OR"
},
"no_relation": false,
"direction": "ANY_DIRECTION"
}
],
"child_expressions": [
{
"specs": [
{
"node_types": {
"nodes": [
{
"node_type": "SnowflakeRole",
"tags": [],
"conditions": [],
"condition_expression": {
"specs": [
{
"fn": "EQ",
"property": "id",
"value": "dn44266.us-east-2.aws.snowflakecomputing.com/role/AUDITOR",
"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": null,
"avoided_intermediate_node_types": null,
"raw_permissions": null,
"effective_permissions": {
"values": [],
"operator": "OR"
},
"no_relation": false,
"direction": "ANY_DIRECTION"
},
{
"node_types": {
"nodes": [
{
"node_type": "SnowflakeRole",
"tags": [],
"conditions": [],
"condition_expression": {
"specs": [
{
"fn": "EQ",
"property": "id",
"value": "dn44266.us-east-2.aws.snowflakecomputing.com/role/ROLE_A",
"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": null,
"avoided_intermediate_node_types": null,
"raw_permissions": null,
"effective_permissions": {
"values": [],
"operator": "OR"
},
"no_relation": false,
"direction": "ANY_DIRECTION"
}
],
"child_expressions": [],
"operator": "OR",
"not": false,
"and_op_type": "INFERRED"
}
],
"operator": "AND",
"not": false,
"and_op_type": "SOURCE_INTERSECT"
},
"path_summary_node_types": null,
"all_entity_condition": null,
"page_size": "0",
"page_token": ""
}'
Sample response:
The response will contain a number_value
of total results:
{
"number_value": 97
}
Last updated
Was this helpful?