Add to or edit a rule's documentation

Add to or edit a rule's documentation.

For information about a rule's documentation, see Add/remove AFA rule comments

This method uses the parameter rule-id which can be returned from the rule-external-controller-compatible API, GET /api/v1/rules method.

Resource Name: /api/v1/rule/createDocumentation

Request Method: POST

Request Parameters:

Element

Type

Description

documentation_data
Mandatory

string

New text to add to or replace existing in documentation column.

documentation_column Mandatory string Column name.

For the documentation column, write Documentation ( in Title case). For custom columns, write the name as they appear on the policy tab.

rule-id
Mandatory

string

Internal rule ID. The parameter rule-id can be returned from the rule-external-controller-compatible API, GET /api/v1/rules method.

tree_name
Mandatory
string Name of the device in the Device Tree.
append
Mandatory
boolean
  • false: Replaces existing text with new text (default).

  • true:  Adds new text after existing (adds a comma (,) followed by new text).

Response:

Code

Description

200

Operation completed successfully

400

Validation error

401

Unauthorized

Request examples

curl -X POST "https://localhost/afa/api/v1/rule/createDocumentation" -H "accept: */*" -H "Content-Type: application/json" -d "{​​​​ \"documentation_column\": \"Documentation\", \"tree_name\": \"deviceName\", \"rule_id\": \"123\", \"documentation_data\": \"newData\", \"append\": false}​​​​"