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
AuthorizationstringRequired

Bearer token authentication using a Veza Personal API key.

Header Format: Authorization: Bearer <your-api-key>

Creating an API Key:

  1. Log into your Veza tenant
  2. Navigate to Administration โ†’ API Keys
  3. Generate a new API key and save the value securely
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
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?