Policies and findings · GraphQL mutation

policyRulesEdit mutation

Updates between 1 and 500 existing policy rules, identified by id, and returns their ids. A rule's type cannot be changed. Unknown or deleted rule ids return a not-found error, checked before any rule is written. Editing a rule Wartiva provides makes it the organization's own version, which later Wartiva updates no longer overwrite; changing only whether it is enabled does not.

Response

Returns a RulesEditPayload!

Arguments

Name Description
orgId - OrganizationId! The Organization identifier.
input - RulesEditInput! Rules to update.

Example

Query

mutation policyRulesEdit(
  $orgId: OrganizationId!,
  $input: RulesEditInput!
) {
  policyRulesEdit(
    orgId: $orgId,
    input: $input
  ) {
    ruleIds
  }
}

Variables

{
  "orgId": "615f3b3b28284380e28a7342",
  "input": RulesEditInput
}

Response

{"data": {"policyRulesEdit": {"ruleIds": [4]}}}