Get a rule's documentation data

Get a rule's documentation data.

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 Rules Main Resource Group, GET /api/v1/rules method.

Resource Name: /api/v1/rule/ruleDocumentation

Request Method: GET

Request Parameters:

Element

Type

Description

columnId
Mandatory

string

Column name. For the documentation column, write Documentation ( in Title case). You can also get information from other columns in the policy tab by writing the column name (use ALLCAPS, except for custom columns that should be written as they appear on the policy tab).

deviceId
Mandatory

string

Tree name of the device.

rule-id
Mandatory

string

Internal rule ID. The parameter rule-id can be returned from the Rules Main Resource Group, GET /api/v1/rules method or indicate "ALL_RULES" to get the documentation data for all the device's rules.

pageSize

Optional

Integer

The number of rows to display per page in the output JSON file.

Tip: By default, rules with zero hits are not shown in the results, although the user is notified that these rules exist.

To include rules with zero hit counts in the response, increase the pageSize parameter in the API enough to fit all the rules onto a single page.

page

Optional

Integer

The page to display in the output JSON file.

Response:

Code

Description

200

Operation completed successfully

400

Validation error

401

Unauthorized

Request examples

curl -X GET "https://localhost/afa/api/v1/rule/ruleDocumentation?columnId=SERVICE&deviceId=deviceName&pageNumber=0&pageSize=50&ruleId=123" -H "accept: */*"

Response examples

{​​​​​
  "ruleDocumentationData": [
    {​​​​​
      "rule_id": "123",
      "value": "test, test2"
    }​​​​​
  ],
  "pageNumber": 0,
  "pageSize": 50,
  "totalPages": 1,
  "totalElementsInPage": 1,
  "totalElements": 1
}​​​​​