Save a query

CreateAssessmentQuery saves a new query with the specified conditions. See Query Parameters for all available constraints and options. To run a query without saving it, see the query spec operations.

post
Authorizations
Body
namestringOptional
descriptionstringOptional
query_typeinteger · enumOptional
no_relationbooleanOptionalDeprecated
violationbooleanOptionalDeprecated
visibilityinteger · enumOptional
node_relationship_typeinteger · enumOptional
labelsstring[]Optional
relates_to_expall ofOptional

A boolean expression describing the "relates to" types.

path_summary_count_conditionsall ofOptional

Can be used when path_summary_node_types are set to specify the path length

risk_levelinteger · enumOptional

Setting risk_level to WARNING is deprecated and will result in a query with risk level LOW.

risk_suppressed_constraintsall ofOptional

List of constraints that if true will automatically mark nodes with this constraints as a suppressed risks The node_type in each NodeSpec must match either source_node_type, destination_node_type, or a required_intermediate_node_types This can only be set if the risk_level is not RiskLevel.NONE

analysis_typeinteger · enumOptional

This is what view was used to create the assessment query

risk_explanationstringOptional

provide a user friendly risk explanation message.

risk_remediationstringOptional
include_sub_permissionsbooleanOptional

Include subpermissions which are permissions on subresources, rather than the resource itself. It only has an effect when feature flag LOAD_GRAPH_SUB_PERMISSIONS is enabled.

save_modeinteger · enumOptional
vql_querystringOptional
include_permissions_summarybooleanOptional

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

Responses
200
OK
application/json
post
POST /api/v1/assessments/queries HTTP/1.1
Host: 
Authorization: Bearer Bearer <API key>
Content-Type: application/json
Accept: */*
Content-Length: 8684

{
  "name": "text",
  "description": "text",
  "query_type": 1,
  "raw_permissions": {
    "values": [
      "text"
    ],
    "operator": 1
  },
  "effective_permissions": {
    "values": [
      1
    ],
    "operator": 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
  },
  "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
  },
  "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
  },
  "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:32:44.196Z",
      "target": 1,
      "relative_timevar_value": "text"
    }
  },
  "visibility": 1,
  "node_relationship_type": 1,
  "labels": [
    "text"
  ],
  "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
  },
  "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_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
  },
  "path_summary_count_conditions": {
    "conditions": [
      {
        "fn": 1,
        "value": "text",
        "value_as": 1
      }
    ]
  },
  "risk_level": 1,
  "risk_suppressed_constraints": {
    "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"
        ]
      }
    ]
  },
  "analysis_type": 1,
  "risk_explanation": "text",
  "risk_remediation": "text",
  "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,
  "save_mode": 1,
  "vql_query": "text",
  "include_permissions_summary": true
}
{
  "value": {
    "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": {
            "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": "[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": {
            "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": "[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": {
            "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": "[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": {
            "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": "[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-08-05T00:32:44.196Z",
        "target": 1,
        "relative_timevar_value": "text"
      }
    },
    "created_by": "text",
    "visibility": 1,
    "owners": [
      "text"
    ],
    "node_relationship_type": 1,
    "integration_types": [
      "text"
    ],
    "labels": [
      "text"
    ],
    "created_at": "2025-08-05T00:32:44.196Z",
    "updated_at": "2025-08-05T00:32:44.196Z",
    "source_type": "text",
    "destination_types": [
      "text"
    ],
    "relates_to_exp": {
      "specs": [
        {
          "node_types": "[Circular Reference]",
          "required_intermediate_node_types": "[Circular Reference]",
          "avoided_intermediate_node_types": "[Circular Reference]",
          "raw_permissions": {
            "values": [
              "text"
            ],
            "operator": 1
          },
          "effective_permissions": {
            "values": [
              1
            ],
            "operator": 1
          },
          "unsupported_condition_mode": 1,
          "no_relation": true,
          "direction": 1
        }
      ],
      "child_expressions": [
        {
          "specs": "[Circular Reference]",
          "child_expressions": "[Circular Reference]",
          "operator": 1,
          "not": true,
          "and_op_type": 1
        }
      ],
      "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": {
            "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": "[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": [
        {
          "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": "[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"
          ]
        }
      ]
    },
    "analysis_type": 1,
    "result": 1,
    "result_evaluated_at": "2025-08-05T00:32:44.196Z",
    "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
      },
      "include_associated_risks": true,
      "risks_filter": "text"
    },
    "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",
    "shared": true,
    "team_id": "text",
    "include_permissions_summary": true,
    "risk_statistics": {
      "affected_node_count": "text",
      "suppressed_node_count": "text",
      "last_occurred_at": "2025-08-05T00:32:44.196Z"
    }
  }
}

Sample Request:

curl -X 'POST' \
"$BASE_URL/api/v1/assessments/queries" \
-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": "",
  "variables": [],
  "name": "Okta Users to Snowflake Roles",
  "description": "SoD",
  "risk_level": "CRITICAL",
  "labels": [
    "another_new_label"
  ],
  "visibility": "PRIVATE"
}'

Sample response:

A successful response returns the saved query id, and full query specification in a value object:

{"id":"c169c41c-2650-4f39-8930-f198f70f892b","value":{"id":"c169c41c-2650-4f39-8930-f198f70f892b","name":"Okta Users to Snowflake Roles","description":"SoD","result_type":"NUMBER","query_type":"SOURCE_TO_DESTINATION","raw_permissions":{"values":[],"operator":"AND"},"effective_permissions":{"values":[],"operator":"AND"},"variables":[],"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"},"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":"e3ac5e6a-1946-4688-82a7-8a607133a1c8","visibility":"PRIVATE","owners":["e3ac5e6a-1946-4688-82a7-8a607133a1c8"],"node_relationship_type":"EFFECTIVE_ACCESS","integration_types":["okta","snowflake"],"labels":["another_new_label"],"created_at":"2023-07-29T19:28:30.908762576Z","updated_at":"2023-07-29T19:28:30.908762576Z","source_type":"OktaUser","destination_types":["SnowflakeRole"],"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"},"all_entity_condition":{"specs":[],"child_expressions":[],"operator":"AND","not":false},"risk_level":"CRITICAL","risk_suppressed_constraints":null,"analysis_type":"UNSET","result":0,"result_evaluated_at":null,"result_evaluated":false}}

Last updated

Was this helpful?