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.
Bearer token authentication using a Veza Personal API key.
Header Format: Authorization: Bearer <your-api-key>
Creating an API Key:
- Log into your Veza tenant
- Navigate to Administration → API Keys
- Generate a new API key and save the value securely
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 properties that should be unpivoted in the results producing multiple rows per node/path To be able to unpivot a property, it must be a list/array type property. If multiple properties are used result will be Cartesian product(all unpivot combinations for node). If property does not exist on a node, and it is a valid property, we will just add that node as is. Syntax to specify properties is the full path to the property using dot notation and using properties json names. Both values and pathValues can be unpivoted:
-
Valid values for unpivoting: properties.<property_name>, unsupported_conditions.<condition_name>.conditions, joined_nodes..<valid_value_for_unpivoting>, raw_permissions, effective_permissions, access_stats.concrete_permissions, access_stats.canonical_permissions, filtered_raw_permissions, corresponding_effective_permissions, additional_node_properties.default_cohort_role_users_in_cohort, additional_node_properties.default_cohort_role_all_common_roles
-
Valid pathValues for unpivoting: unsupported_conditions.<condition_name>.conditions, joined_nodes..<valid_value_for_unpivoting>, source.<valid_value_for_unpivoting>, destination.<valid_value_for_unpivoting>, waypoint.<valid_value_for_unpivoting>, abstract_permissions,concrete_permissions, filtered_concrete_permissions, corresponding_abstract_permissions Examples for Unpivoting values:
-
Single field: unpivot_properties: ["properties.email_addresses"] result_values: {Values: [ {id:"1","properties"{"email_addresses":["[email protected]","[email protected]"]}} ]} After unpivot -> Multiple nodes with id 1: result_values: {Values: [ {id:"1","properties"{"email_addresses":"[email protected]"}}, {id:"1","properties"{"email_addresses":"[email protected]"}} ]}
-
Single field with missing unpivot property: unpivot_properties: ["properties.email_addresses"] result_values: {Values: [ {id:"1","properties"{"permissions": "abc"]}} ]} After unpivot -> Single node with id 1 (no email_addresses property to unpivot): result_values: {Values: [ {id:"1","properties"{"permissions":"abc"}}, ]}
-
Multiple fields - Cartesian Product: unpivot_properties: ["properties.email_addresses", "raw_permissions"] result_values: {Values: [ {id:"1","properties"{"email_addresses":["[email protected]","[email protected]"]}, "raw_permissions":["perm1","perm2"]} ]} After unpivot -> Multiple nodes with id 1: result_values: {Values: [ {id:"1","properties"{"email_addresses":"[email protected]"}, "raw_permissions":"perm1"}, {id:"1","properties"{"email_addresses":"[email protected]"}, "raw_permissions":"perm2"}, {id:"1","properties"{"email_addresses":"[email protected]"}, "raw_permissions":"perm1"}, {id:"1","properties"{"email_addresses":"[email protected]"}, "raw_permissions":"perm2"}, ]}
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.
OK
Default error response
POST /api/v1/assessments/query_spec:result HTTP/1.1
Host: your-tenant.cookiecloud.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 9217
{
"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,
"source_property": "text"
}
],
"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,
"source_property": "text"
}
],
"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,
"source_property": "text"
}
],
"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,
"source_property": "text"
}
],
"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-12-07T14:26:01.003Z",
"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,
"path_type": 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,
"path_type": 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,
"source_property": "text"
}
],
"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,
"source_property": "text"
}
],
"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,
"source_property": "text"
}
],
"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,
"source_property": "text"
}
],
"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,
"source_property": "text"
}
],
"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,
"manager_centric_config": {
"grouping_properties": [
{
"property_name": "text",
"node_type": "text",
"target": 1,
"joined_node_alias": "text"
}
],
"threshold": 1
}
},
"include_associated_risks": true,
"risks_filter": "text"
},
"include_sub_permissions": true,
"include_permissions_summary": true,
"waypoint_nodes": {
"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,
"source_property": "text"
}
],
"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
},
"unpivot_properties": [
"text"
],
"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-12-07T14:26:01.003Z",
"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-12-07T14:26:01.003Z",
"last_used_with_events_for": [
{
"name": "text",
"last_used": "2025-12-07T14:26:01.003Z"
}
]
},
"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-12-07T14:26:01.003Z",
"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",
"joined_nodes": {
"ANY_ADDITIONAL_PROPERTY": {
"id": "text",
"type": "text",
"properties": {},
"destination_node_count": 1,
"permissions": "[Circular Reference]",
"engagement_access_stats": {
"engagement_score": 1,
"over_provisioned_score": 1,
"total_count": "text",
"accessed_count": "text"
},
"access_stats": {
"last_used": "2025-12-07T14:26:01.003Z",
"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-12-07T14:26:01.003Z",
"last_used_with_events_for": [
{
"name": "text",
"last_used": "2025-12-07T14:26:01.003Z"
}
]
},
"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-12-07T14:26:01.003Z",
"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",
"joined_nodes": "[Circular Reference]"
}
}
}
],
"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?
