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.

circle-exclamation
post
Authorizations
AuthorizationstringRequired

Veza API key for authentication. Generate keys in Administration > API Keys.

Body
namestringOptional
descriptionstringOptional
query_typeinteger ยท enumOptional
no_relationbooleanOptionalDeprecated
violationbooleanOptionalDeprecated
visibilityinteger ยท enumOptional
node_relationship_typeinteger ยท enumOptional
labelsstring[]Optional
risk_levelinteger ยท enumOptional

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

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
risk_profilesinteger ยท enum[]Optional
optionalbooleanOptional
Responses
chevron-right
200

OK

application/json
post
/api/v1/assessments/queries

Sample Request:

Sample response:

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

Last updated

Was this helpful?