Techniques

Update technique

Update technique created with technique editor

post/techniques/{techniqueId}/{techniqueVersion}

Path parameters

techniqueIdstring required

Technique ID

Example:userManagement

Technique ID

techniqueVersionstring required

Technique version

Example:6.0

Technique version

Request body

idstring

Technique id

namestring

Technique name

versionstring

version of this technique

categorystring

category of this technique

descriptionstring

description of this technique

documentationstring

documentation in markdown of the technique, exposed on directive side

tagsobject
sourcestring

Source of the technique, always editor here

Example request

[
  {
    "id": "security_policy",
    "name": "Security Policy",
    "version": "1.0",
    "category": "ncf_techniques",
    "description": "This techniques apply generic security policies",
    "documentation": "This technique install package based on the *name* through a *technique parameter*",
    "source": "editor",
    "parameters": [
      {
        "id": "6a8de98f-7829-4c1b-b4e7-b9387f27f279",
        "name": "package_name",
        "description": "Name of a package to install",
        "mayBeEmpty": true
      }
    ],
    "resources": [
      {
        "name": "conf/my/app/new",
        "state": "modified"
      }
    ],
    "calls": [
      {
        "type": "call",
        "id": "6a8de98f-7829-4c1b-b4e7-b9387f27f279",
        "component": "Install apache2",
        "method": "package_present",
        "condition": "linux.package_present_vim_repaired",
        "disabledReporting": true,
        "parameters": [
          {
            "name": "${package_name}"
          }
        ]
      }
    ]
  }
]

Response

Versions information

result'success' | 'error' required

Result of the request

action'listTechniques' required

The id of the action

Example response

{
  "data": {
    "techniques": {
      "technique": {
        "id": "security_policy",
        "name": "Security Policy",
        "version": "1.0",
        "category": "ncf_techniques",
        "description": "This techniques apply generic security policies",
        "documentation": "This technique install package based on the *name* through a *technique parameter*",
        "source": "editor",
        "parameters": [
          {
            "id": "6a8de98f-7829-4c1b-b4e7-b9387f27f279",
            "name": "package_name",
            "description": "Name of a package to install",
            "mayBeEmpty": true
          }
        ],
        "resources": [
          {
            "name": "conf/my/app/new",
            "state": "modified"
          }
        ],
        "calls": [
          {
            "type": "call",
            "id": "6a8de98f-7829-4c1b-b4e7-b9387f27f279",
            "component": "Install apache2",
            "method": "package_present",
            "condition": "linux.package_present_vim_repaired",
            "disabledReporting": true,
            "parameters": [
              {
                "name": "${package_name}"
              }
            ]
          }
        ]
      }
    }
  }
}

Changes