Directives

Get directive tree

Changed on

Get all information about all directives in a tree like structure (with categories and techniques)

get/directives/tree

Request

Query parameters

includeSystemboolean

Should we include system techniques and categories in the tree or not.

Request body

includeSystemboolean

Should we include system techniques and categories in the tree or not.

Response

Directives tree

result'success' | 'error' required

Result of the request

action'directivesTree' required

The id of the action

Example response

{
  "data": {
    "directives": [
      {
        "name": "Application management",
        "description": "This category contains Techniques designed to install, configure and manage applications",
        "techniques": [
          {
            "name": "checkGenericFileContent",
            "directives": [
              {
                "id": "91252ea2-feb2-412d-8599-c6945fee02c4",
                "displayName": "91252ea2-feb2-412d-8599-c6945fee02c4",
                "shortDescription": "91252ea2-feb2-412d-8599-c6945fee02c4",
                "longDescription": "# Documentation\n* [Ticket link](https://tickets.example.com/issues/3456)",
                "techniqueName": "userManagement",
                "techniqueVersion": "8.0",
                "priority": 5,
                "enabled": true,
                "policyMode": "audit",
                "tags": [
                  {
                    "customer": "MyCompany"
                  }
                ],
                "parameters": {
                  "name": "sections",
                  "sections": [
                    {
                      "section": {
                        "name": "File to manage",
                        "vars": [
                          {
                            "var": {
                              "name": "FILE_AND_FOLDER_MANAGEMENT_ACTION",
                              "value": "copy"
                            }
                          },
                          {
                            "var": {
                              "name": "FILE_AND_FOLDER_MANAGEMENT_SOURCE",
                              "value": "/vagrant/node.sh"
                            }
                          },
                          {
                            "var": {
                              "name": "FILE_AND_FOLDER_MANAGEMENT_SYMLINK_ENFORCE",
                              "value": "false"
                            }
                          }
                        ],
                        "sections": [
                          {
                            "section": {
                              "name": "File",
                              "vars": [
                                {
                                  "var": {
                                    "name": "FILE_AND_FOLDER_MANAGEMENT_PATH",
                                    "value": "/root/test"
                                  }
                                }
                              ]
                            }
                          },
                          {
                            "section": {
                              "name": "File cleaning options",
                              "vars": [
                                {
                                  "var": {
                                    "name": "FILE_AND_FOLDER_DELETION_DAYS",
                                    "value": "0"
                                  }
                                },
                                {
                                  "var": {
                                    "name": "FILE_AND_FOLDER_DELETION_OPTION",
                                    "value": "none"
                                  }
                                },
                                {
                                  "var": {
                                    "name": "FILE_AND_FOLDER_DELETION_PATTERN",
                                    "value": ".*"
                                  }
                                }
                              ]
                            }
                          },
                          {
                            "section": {
                              "name": "Permissions",
                              "vars": [
                                {
                                  "var": {
                                    "name": "FILE_AND_FOLDER_MANAGEMENT_CHECK_PERMISSIONS",
                                    "value": "false"
                                  }
                                },
                                {
                                  "var": {
                                    "name": "FILE_AND_FOLDER_MANAGEMENT_GROUP",
                                    "value": ""
                                  }
                                },
                                {
                                  "var": {
                                    "name": "FILE_AND_FOLDER_MANAGEMENT_OWNER",
                                    "value": ""
                                  }
                                },
                                {
                                  "var": {
                                    "name": "FILE_AND_FOLDER_MANAGEMENT_PERM",
                                    "value": "000"
                                  }
                                },
                                {
                                  "var": {
                                    "name": "FILE_AND_FOLDER_MANAGEMENT_RECURSIVE",
                                    "value": "1"
                                  }
                                }
                              ]
                            }
                          },
                          {
                            "section": {
                              "name": "Post-modification hook",
                              "vars": [
                                {
                                  "var": {
                                    "name": "FILE_AND_FOLDER_MANAGEMENT_POST_HOOK_COMMAND",
                                    "value": ""
                                  }
                                },
                                {
                                  "var": {
                                    "name": "FILE_AND_FOLDER_MANAGEMENT_POST_HOOK_RUN",
                                    "value": "false"
                                  }
                                }
                              ]
                            }
                          }
                        ]
                      }
                    }
                  ]
                }
              }
            ]
          }
        ]
      }
    ]
  }
}

Changes

    • warning

      removed the optional property ///////// from the response with the status