v2

latestOpenAPI 3.1.0CC-BY-SA 2.02026-07-2617789528.6 KB
Techniques

Create technique

Create a new technique in Rudder from a technique in the technique editor

put/techniques

Request body

idstring

Technique id

namestring

Technique name

versionstring

version of this technique

categorystring

category of this technique

descriptionstring

description of this technique

sourcestring

Source of the technique, always editor here

Example request

[
  {
    "id": "security-policy",
    "name": "Security Policy",
    "version": "1.0",
    "category": "user_techniques",
    "description": "This techniques apply generic security policies",
    "source": "editor",
    "parameters": [
      {
        "id": "6a8de98f-7829-4c1b-b4e7-b9387f27f279",
        "name": "Package to install",
        "description": "Name of a package to install",
        "mayBeEmpty": true
      }
    ],
    "resources": [
      {
        "name": "conf/my/app/new",
        "state": "modified"
      }
    ],
    "calls": [
      {
        "id": "6a8de98f-7829-4c1b-b4e7-b9387f27f279",
        "component": "Install apache2",
        "method": "package_present",
        "condition": "linux.package_present_vim_repaired",
        "disableReporting": true,
        "parameters": [
          {
            "name": "package",
            "value": "apache2"
          }
        ]
      }
    ]
  }
]

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": "user_techniques",
        "description": "This techniques apply generic security policies",
        "source": "editor",
        "parameters": [
          {
            "id": "6a8de98f-7829-4c1b-b4e7-b9387f27f279",
            "name": "Package to install",
            "description": "Name of a package to install",
            "mayBeEmpty": true
          }
        ],
        "resources": [
          {
            "name": "conf/my/app/new",
            "state": "modified"
          }
        ],
        "calls": [
          {
            "id": "6a8de98f-7829-4c1b-b4e7-b9387f27f279",
            "component": "Install apache2",
            "method": "package_present",
            "condition": "linux.package_present_vim_repaired",
            "disableReporting": true,
            "parameters": [
              {
                "name": "package",
                "value": "apache2"
              }
            ]
          }
        ]
      }
    }
  }
}