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
idstringOptionalDeprecated
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?