Rudder exposes a REST API, enabling the user to interact with Rudder without using the webapp, for example, in scripts or cron jobs.
The Rudder REST API uses simple API keys for authentication.
All requests must be authenticated (except from a generic status API).
The tokens are 32-character strings, passed in a X-API-Token
header, like in:
curl --header "X-API-Token: yourToken" https://rudder.example.com/rudder/api/latest/rules
The tokens are the API equivalent of a password, and must be secured just like a password would be.
The accounts are managed in the Web interface. There are three types of accounts:
api-authorizatons
plugin.-system
and is regenerated at each application restart. It is designed to allow running local calls to the API
without having to configure an account. The token is written
into /var/rudder/run/api-token
and only readable by the root
user. When using the token with curl
, you should use the
alternative form to prevent leaking the token in the process list:curl --header @/var/rudder/run/api-token-header
When an action produces a change of configuration on the server, the API account that made it will be recorded in the event log, like for a Web interaction.
When using Rudder without the api-authorizatons
plugin, only global accounts are available, with
two possible privilege levels, read-only or write.
With the api-authorizatons
plugin, you also get access to:
As a general principle, you should create dedicated tokens with the least privilege level for each different interaction you have with the API. This limits the risks of exploitation if a token is stolen, and allows tracking the activity of each token separately. Token renewal is also easier when they are only used for a limited purpose.
Each time the API is extended with new features (new functions, new parameters, new responses, ...), it will be assigned a new version number. This will allow you
to keep your existing scripts (based on previous behavior). Versions will always be integers (no 2.1 or 3.3, just 2, 3, 4, ...) or latest
.
You can change the version of the API used by setting it either within the url or in a header:
/api/version/function
.# Version 10
curl -X GET -H "X-API-Token: yourToken" https://rudder.example.com/rudder/api/10/rules
# Latest
curl -X GET -H "X-API-Token: yourToken" https://rudder.example.com/rudder/api/latest/rules
# Wrong (not an integer) => 404 not found
curl -X GET -H "X-API-Token: yourToken" https://rudder.example.com/rudder/api/3.14/rules
latest
.# Version 10
curl -X GET -H "X-API-Token: yourToken" -H "X-API-Version: 10" https://rudder.example.com/rudder/api/rules
# Wrong => Error response indicating which versions are available
curl -X GET -H "X-API-Token: yourToken" -H "X-API-Version: 3.14" https://rudder.example.com/rudder/api/rules
In the future, we may declare some versions as deprecated, in order to remove them in a later version of Rudder, but we will never remove any versions without warning, or without a safe period of time to allow migration from previous versions.
Version | Rudder versions it appeared in | Description |
---|---|---|
1 | Never released (for internal use only) | Experimental version |
2 to 10 (deprecated) | 4.3 and before | These versions provided the core set of API features for rules, directives, nodes global parameters, change requests and compliance, rudder settings, and system API |
11 | 5.0 | New system API (replacing old localhost v1 api): status, maintenance operations and server behavior |
12 | 6.0 and 6.1 | Node key management |
13 | 6.2 |
|
14 | 7.0 |
|
15 | 7.1 |
|
16 | 7.2 |
|
17 | 7.3 |
|
18 | 8.0 |
|
19 | 8.1 |
|
20 | 8.2 |
|
All responses from the API are in the JSON format.
{
"action": "The name of the called function",
"id": "The ID of the element you want, if relevant",
"result": "The result of your action: success or error",
"data": "Only present if this is a success and depends on the function, it's usually a JSON object",
"errorDetails": "Only present if this is an error, it contains the error message"
}
Success responses are sent with the 200 HTTP (Success) code
Error responses are sent with a HTTP error code (mostly 5xx...)
Rudder's REST API is based on the usage of HTTP methods. We use them to indicate what action will be done by the request. Currently, we use four of them:
GET: search or retrieve information (get rule details, get a group, ...)
PUT: add new objects (create a directive, clone a Rule, ...)
DELETE: remove objects (delete a node, delete a parameter, ...)
POST: update existing objects (update a directive, reload a group, ...)
Some parameters are available for almost all API functions. They will be described in this section. They must be part of the query and can't be submitted in a JSON form.
Field | Type | Description |
---|---|---|
prettify | boolean optional |
Determine if the answer should be prettified (human friendly) or not. We recommend using this for debugging purposes, but not for general script usage as this does add some unnecessary load on the server side.
Default value: |
Field | Type | Description |
---|---|---|
reason | string optional or required |
Set a message to explain the change. If you set the reason messages to be mandatory in the web interface, failing to supply this value will lead to an error.
Default value: |
changeRequestName | string optional |
Set the change request name, is used only if workflows are enabled. The default value depends on the function called
Default value: |
changeRequestDescription | string optional |
Set the change request description, is used only if workflows are enabled.
Default value: |
Parameters to the API can be sent:
As part of the URL for resource identification
As data for POST/PUT requests
Directly in JSON format
As request arguments
Parameters in URLs are used to indicate which resource you want to interact with. The function will not work if this resource is missing.
# Get the Rule of ID "id"
curl -H "X-API-Token: yourToken" https://rudder.example.com/rudder/api/latest/rules/id
CAUTION: To avoid surprising behavior, do not put a '/' at the end of a URL: it would be interpreted as '/[empty string parameter]' and redirected to '/index', likely not what you wanted to do.
JSON format is the preferred way to interact with Rudder API for creating or updating resources.
You'll also have to set the Content-Type header to application/json (without it the JSON content would be ignored).
In a curl
POST
request, that header can be provided with the -H
parameter:
curl -X POST -H "Content-Type: application/json" ...
The supplied file must contain a valid JSON: strings need quotes, booleans and integers don't, etc.
The (human-readable) format is:
{
"key1": "value1",
"key2": false,
"key3": 42
}
Here is an example with inlined data:
# Update the Rule 'id' with a new name, disabled, and setting it one directive
curl -X POST -H "X-API-Token: yourToken" -H "Content-Type: application/json"
https://rudder.example.com/rudder/api/rules/latest/{id}
-d '{ "displayName": "new name", "enabled": false, "directives": "directiveId"}'
You can also pass a supply the JSON in a file:
# Update the Rule 'id' with a new name, disabled, and setting it one directive
curl -X POST -H "X-API-Token: yourToken" -H "Content-Type: application/json" https://rudder.example.com/rudder/api/rules/latest/{id} -d @jsonParam
Note that the general parameters view in the previous chapter cannot be passed in a JSON, and you will need to pass them a URL parameters if you want them to be taken into account (you can't mix JSON and request parameters):
# Update the Rule 'id' with a new name, disabled, and setting it one directive with reason message "Reason used"
curl -X POST -H "X-API-Token: yourToken" -H "Content-Type: application/json" "https://rudder.example.com/rudder/api/rules/latest/{id}?reason=Reason used" -d @jsonParam -d "reason=Reason ignored"
In some cases, when you have little, simple data to update, JSON can feel bloated. In such cases, you can use request parameters. You will need to pass one parameter for each data you want to change.
Parameters follow the following schema:
key=value
You can pass parameters by two means:
# Update the Rule 'id' with a new name, disabled, and setting it one directive
curl -X POST -H "X-API-Token: yourToken" https://rudder.example.com/rudder/api/rules/latest/{id}?"displayName=my new name"&"enabled=false"&"directives=aDirectiveId"
# Update the Rule 'id' with a new name, disabled, and setting it one directive (in file directive-info.json)
curl -X POST -H "X-API-Token: yourToken"
https://rudder.example.com/rudder/api/rules/latest/{id} -d "displayName=my new name" -d "enabled=false" -d @directive-info.json
List all endpoints and their version
result required | string Enum: "success" "error" Result of the request |
action required | string Value: "apiGeneralInformations" The id of the action |
required | object |
curl --header "X-API-Token: yourToken" --request GET https://rudder.example.com/rudder/api/latest/info
{- "result": "success",
- "action": "apiGeneralInformations",
- "data": {
- "documentation": "string",
- "availableVersions": [
- {
- "latest": 12,
- "all": [
- {
- "latest": 12,
- "all": [
- {
- "version": 12,
- "status": "maintained"
}
]
}
]
}
], - "endpoints": [
- [
- "{ 'listAcceptedNodes': 'List all accepted nodes with configurable details level', 'GET': '[8,9,10,11,12,13] /nodes' }"
]
]
}
}
Get the description and the list of supported version for one API endpoint
endpointName required | string Example: listAcceptedNodes Name of the endpoint for which one wants information |
result required | string Enum: "success" "error" Result of the request |
action required | string Value: "apiInformations" The id of the action |
required | object |
curl --header "X-API-Token: yourToken" --request GET https://rudder.example.com/rudder/api/latest/info/details/listAcceptedNodes
{- "result": "success",
- "action": "apiInformations",
- "data": {
- "documentation": "string",
- "endpointName": "string",
- "endpoints": [
- "{\n \"listAcceptedNodes\": \"List all accepted nodes with configurable details level\",\n \"GET\": \"[8,9,10,11,12,13] /nodes\"\n}"
]
}
}
Get all endpoints in the given section with their supported version.
sectionId required | string Example: nodes Id of the API section |
result required | string Enum: "success" "error" Result of the request |
action required | string Value: "apiSubInformations" The id of the action |
required | object |
curl --header "X-API-Token: yourToken" --request GET https://rudder.example.com/rudder/api/latest/info/nodes
{- "result": "success",
- "action": "apiSubInformations",
- "data": {
- "documentation": "string",
- "availableVersions": [
- {
- "latest": 12,
- "all": [
- {
- "latest": 12,
- "all": [
- {
- "version": 12,
- "status": "maintained"
}
]
}
]
}
], - "endpoints": [
- [
- "{ 'listAcceptedNodes': 'List all accepted nodes with configurable details level', 'GET': '[8,9,10,11,12,13] /nodes' }"
]
]
}
}
An unauthenticated API to check if Rudder web application is up and running. Be careful: this API does not follow other Rudder's API convention:
/api/status
;curl --request GET https://rudder.example.com/rudder/api/status
Get current global compliance of a Rudder server
precision | integer Default: 2 Example: precision=0 Number of digits after comma in compliance percent figures |
result required | string Enum: "success" "error" Result of the request |
action required | string Value: "getGlobalCompliance" The id of the action |
required | object |
curl --header "X-API-Token: yourToken" --request GET 'https://rudder.example.com/rudder/api/latest/compliance?prettify=true'
{- "result": "success",
- "action": "getGlobalCompliance",
- "data": {
- "globalCompliance": {
- "compliance": 57,
- "complianceDetails": {
- "successAlreadyOK": 48.68,
- "noReport": 36.18,
- "successNotApplicable": 5.92,
- "unexpectedMissingComponent": 2.63,
- "error": 1.32,
- "unexpectedUnknownComponent": 2.63,
- "successRepaired": 2.63
}
}
}
}
Get current compliance of all the nodes of a Rudder server
result required | string Enum: "success" "error" Result of the request |
action required | string Value: "getDirectiveComplianceId" The id of the action |
required | object |
curl --header "X-API-Token: yourToken" --request GET 'https://rudder.example.com/rudder/api/latest/compliance/directives'
{- "result": "success",
- "action": "getDirectiveComplianceId",
- "data": {
- "directivesCompliance": {
- "id": "9a1773c9-0889-40b6-be89-f6504443ac1b",
- "name": "test directive",
- "mode": "full-compliance",
- "compliance": 83.34,
- "complianceDetails": {
- "successAlreadyOK": 66.68,
- "noReport": 7.45,
- "successNotApplicable": 16.66,
- "unexpectedMissingComponent": 2.63,
- "error": 1.32,
- "unexpectedUnknownComponent": 2.63,
- "successRepaired": 2.63
}, - "rules": {
- "id": "32377fd7-02fd-43d0-aab7-28460a91347b",
- "name": "Global configuration for all nodes",
- "mode": "full-compliance",
- "compliance": 83.34,
- "complianceDetails": {
- "successAlreadyOK": 100,
- "noReport": 0,
- "successNotApplicable": 0,
- "unexpectedMissingComponent": 0,
- "error": 0,
- "unexpectedUnknownComponent": 0,
- "successRepaired": 0
}, - "components": [
- {
- "name": "MOTD Configuration",
- "compliance": 83.34,
- "complianceDetails": {
- "successAlreadyOK": 100,
- "noReport": 0,
- "successNotApplicable": 0,
- "unexpectedMissingComponent": 0,
- "error": 0,
- "unexpectedUnknownComponent": 0,
- "successRepaired": 0
}, - "nodes": {
- "id": "root",
- "name": "server.rudder.local",
- "mode": "full-compliance",
- "compliance": 83.34,
- "complianceDetails": {
- "successAlreadyOK": 100,
- "noReport": 0,
- "successNotApplicable": 0,
- "unexpectedMissingComponent": 0,
- "error": 0,
- "unexpectedUnknownComponent": 0,
- "successRepaired": 0
}, - "values": [
- {
- "value": "None",
- "reports": [
- {
- "status": "successAlreadyOK",
- "message": "The MOTD file was correct"
}
]
}
]
}
}
]
}, - "nodes": {
- "id": "b6ded8e2-2709-4986-973d-8e5522d20718",
- "name": "agent1.rudder.local",
- "compliance": 83.34,
- "complianceDetails": {
- "successAlreadyOK": 100,
- "noReport": 0,
- "successNotApplicable": 0,
- "unexpectedMissingComponent": 0,
- "error": 0,
- "unexpectedUnknownComponent": 0,
- "successRepaired": 0
}, - "rules": {
- "id": "835c068d-f01e-44c0-a0f4-7a436d46ad35",
- "name": "Test users",
- "compliance": 100,
- "complianceDetails": {
- "successAlreadyOK": 66.67,
- "noReport": 0,
- "successNotApplicable": 33.33,
- "unexpectedMissingComponent": 0,
- "error": 0,
- "unexpectedUnknownComponent": 0,
- "successRepaired": 0
}, - "components": [
- {
- "name": "test directive",
- "compliance": 100,
- "complianceDetails": {
- "successAlreadyOK": 66.67,
- "noReport": 0,
- "successNotApplicable": 33.33,
- "unexpectedMissingComponent": 0,
- "error": 0,
- "unexpectedUnknownComponent": 0,
- "successRepaired": 0
}, - "values": [
- {
- "value": "tutu",
- "reports": [
- {
- "status": "successAlreadyOK",
- "message": "The user tutu ( Without any defined full name ) is already present on the system"
}
]
}
]
}
]
}
}
}
}
}
Get current compliance of a directive of a Rudder server
directiveId required | string <uuid> Example: 9a1773c9-0889-40b6-be89-f6504443ac1b Id of the directive |
format | string Examples:
format of export |
result required | string Enum: "success" "error" Result of the request |
action required | string Value: "getDirectiveComplianceId" The id of the action |
required | object |
curl --header "X-API-Token: yourToken" --request GET 'https://rudder.example.com/rudder/api/latest/compliance/directives/704afe7b-1a65-4d2e-b4c9-54f4f548c316'
{- "result": "success",
- "action": "getDirectiveComplianceId",
- "data": {
- "directiveCompliance": {
- "id": "9a1773c9-0889-40b6-be89-f6504443ac1b",
- "name": "test directive",
- "mode": "full-compliance",
- "compliance": 83.34,
- "complianceDetails": {
- "successAlreadyOK": 66.68,
- "noReport": 7.45,
- "successNotApplicable": 16.66,
- "unexpectedMissingComponent": 2.63,
- "error": 1.32,
- "unexpectedUnknownComponent": 2.63,
- "successRepaired": 2.63
}, - "rules": {
- "id": "32377fd7-02fd-43d0-aab7-28460a91347b",
- "name": "Global configuration for all nodes",
- "mode": "full-compliance",
- "compliance": 83.34,
- "complianceDetails": {
- "successAlreadyOK": 100,
- "noReport": 0,
- "successNotApplicable": 0,
- "unexpectedMissingComponent": 0,
- "error": 0,
- "unexpectedUnknownComponent": 0,
- "successRepaired": 0
}, - "components": [
- {
- "name": "MOTD Configuration",
- "compliance": 83.34,
- "complianceDetails": {
- "successAlreadyOK": 100,
- "noReport": 0,
- "successNotApplicable": 0,
- "unexpectedMissingComponent": 0,
- "error": 0,
- "unexpectedUnknownComponent": 0,
- "successRepaired": 0
}, - "nodes": {
- "id": "root",
- "name": "server.rudder.local",
- "mode": "full-compliance",
- "compliance": 83.34,
- "complianceDetails": {
- "successAlreadyOK": 100,
- "noReport": 0,
- "successNotApplicable": 0,
- "unexpectedMissingComponent": 0,
- "error": 0,
- "unexpectedUnknownComponent": 0,
- "successRepaired": 0
}, - "values": [
- {
- "value": "None",
- "reports": [
- {
- "status": "successAlreadyOK",
- "message": "The MOTD file was correct"
}
]
}
]
}
}
]
}, - "nodes": {
- "id": "b6ded8e2-2709-4986-973d-8e5522d20718",
- "name": "agent1.rudder.local",
- "compliance": 83.34,
- "complianceDetails": {
- "successAlreadyOK": 100,
- "noReport": 0,
- "successNotApplicable": 0,
- "unexpectedMissingComponent": 0,
- "error": 0,
- "unexpectedUnknownComponent": 0,
- "successRepaired": 0
}, - "rules": {
- "id": "835c068d-f01e-44c0-a0f4-7a436d46ad35",
- "name": "Test users",
- "compliance": 100,
- "complianceDetails": {
- "successAlreadyOK": 66.67,
- "noReport": 0,
- "successNotApplicable": 33.33,
- "unexpectedMissingComponent": 0,
- "error": 0,
- "unexpectedUnknownComponent": 0,
- "successRepaired": 0
}, - "components": [
- {
- "name": "test directive",
- "compliance": 100,
- "complianceDetails": {
- "successAlreadyOK": 66.67,
- "noReport": 0,
- "successNotApplicable": 33.33,
- "unexpectedMissingComponent": 0,
- "error": 0,
- "unexpectedUnknownComponent": 0,
- "successRepaired": 0
}, - "values": [
- {
- "value": "tutu",
- "reports": [
- {
- "status": "successAlreadyOK",
- "message": "The user tutu ( Without any defined full name ) is already present on the system"
}
]
}
]
}
]
}
}
}
}
}
Get compliance of a group with all rules that apply to a node within the group.
required | string or rule-target (string) Id of the node group or rule target |
level | integer Default: 10 Example: level=4 Number of depth level of compliance objects to display (1:rules, 2:directives, 3:components, 4:nodes, 5:values, 6:reports) |
precision | integer Default: 2 Example: precision=0 Number of digits after comma in compliance percent figures |
result required | string Enum: "success" "error" Result of the request |
action required | string Value: "getNodeGroupComplianceId" The id of the action |
required | object |
curl --header "X-API-Token: yourToken" --request GET 'https://rudder.example.com/rudder/api/latest/compliance/groups/704afe7b-1a65-4d2e-b4c9-54f4f548c316'
{- "result": "success",
- "action": "getNodeGroupComplianceId",
- "data": {
- "nodeGroups": [
- {
- "id": "47e3f2c0-0b1a-4b1a-9b0a-9e9e9e9e9e9e",
- "mode": "full-compliance",
- "compliance": 57.43,
- "complianceDetails": {
- "successAlreadyOK": 48.68,
- "noReport": 36.18,
- "successNotApplicable": 5.92,
- "unexpectedMissingComponent": 2.63,
- "error": 1.32,
- "unexpectedUnknownComponent": 2.63,
- "successRepaired": 2.63
}, - "rules": [
- {
- "id": "32377fd7-02fd-43d0-aab7-28460a91347b",
- "name": "Global configuration for all nodes",
- "mode": "full-compliance",
- "policyMode": "audit",
- "compliance": 83.34,
- "complianceDetails": {
- "successAlreadyOK": 100,
- "noReport": 0,
- "successNotApplicable": 0,
- "unexpectedMissingComponent": 0,
- "error": 0,
- "unexpectedUnknownComponent": 0,
- "successRepaired": 0
}, - "directives": [
- {
- "id": "9a1773c9-0889-40b6-be89-f6504443ac1b",
- "name": "test directive",
- "policyMode": "audit",
- "compliance": 83.34,
- "complianceDetails": {
- "successAlreadyOK": 66.68,
- "noReport": 7.45,
- "successNotApplicable": 16.66,
- "unexpectedMissingComponent": 2.63,
- "error": 1.32,
- "unexpectedUnknownComponent": 2.63,
- "successRepaired": 2.63
}, - "components": [
- {
- "name": "Test users",
- "compliance": 100,
- "complianceDetails": {
- "successAlreadyOK": 66.67,
- "noReport": 0,
- "successNotApplicable": 33.33,
- "unexpectedMissingComponent": 0,
- "error": 0,
- "unexpectedUnknownComponent": 0,
- "successRepaired": 0
}, - "nodes": [
- {
- "id": "root",
- "name": "server.rudder.local",
- "mode": "full-compliance",
- "compliance": 83.34,
- "complianceDetails": {
- "successAlreadyOK": 100,
- "noReport": 0,
- "successNotApplicable": 0,
- "unexpectedMissingComponent": 0,
- "error": 0,
- "unexpectedUnknownComponent": 0,
- "successRepaired": 0
}, - "values": [
- {
- "value": "None",
- "reports": [
- {
- "status": "successAlreadyOK",
- "message": "The MOTD file was correct"
}
]
}
]
}
]
}
]
}
]
}
], - "nodes": [
- {
- "id": "b6ded8e2-2709-4986-973d-8e5522d20718",
- "name": "agent1.rudder.local",
- "policyMode": "audit",
- "compliance": 100,
- "complianceDetails": {
- "successAlreadyOK": 100,
- "noReport": 0,
- "successNotApplicable": 0,
- "unexpectedMissingComponent": 0,
- "error": 0,
- "unexpectedUnknownComponent": 0,
- "successRepaired": 0
}, - "rules": [
- {
- "id": "835c068d-f01e-44c0-a0f4-7a436d46ad35",
- "name": "Test users",
- "policyMode": "audit",
- "compliance": 100,
- "complianceDetails": {
- "successAlreadyOK": 66.67,
- "noReport": 0,
- "successNotApplicable": 33.33,
- "unexpectedMissingComponent": 0,
- "error": 0,
- "unexpectedUnknownComponent": 0,
- "successRepaired": 0
}, - "directives": [
- {
- "id": "835c068d-f01e-44c0-a0f4-7a436d46ad35",
- "name": "Test users",
- "policyMode": "audit",
- "compliance": 100,
- "complianceDetails": {
- "successAlreadyOK": 66.67,
- "noReport": 0,
- "successNotApplicable": 33.33,
- "unexpectedMissingComponent": 0,
- "error": 0,
- "unexpectedUnknownComponent": 0,
- "successRepaired": 0
}, - "components": [
- {
- "name": "MOTD Configuration",
- "compliance": 100,
- "complianceDetails": {
- "successAlreadyOK": 100,
- "noReport": 0,
- "successNotApplicable": 0,
- "unexpectedMissingComponent": 0,
- "error": 0,
- "unexpectedUnknownComponent": 0,
- "successRepaired": 0
}, - "values": [
- {
- "value": "Hello John Doe",
- "reports": [
- {
- "status": "successAlreadyOK",
- "message": "The MOTD is correctly configured with \"Hello John Doe\""
}
]
}
]
}
]
}
]
}
]
}
]
}
]
}
}
Get compliance of a group with only rules that explicitly include the group.
required | string or rule-target (string) Id of the node group or rule target |
level | integer Default: 10 Example: level=4 Number of depth level of compliance objects to display (1:rules, 2:directives, 3:components, 4:nodes, 5:values, 6:reports) |
precision | integer Default: 2 Example: precision=0 Number of digits after comma in compliance percent figures |
result required | string Enum: "success" "error" Result of the request |
action required | string Value: "getNodeGroupComplianceTargetId" The id of the action |
required | object |
curl --header "X-API-Token: yourToken" --request GET 'https://rudder.example.com/rudder/api/latest/compliance/groups/704afe7b-1a65-4d2e-b4c9-54f4f548c316/target'
{- "result": "success",
- "action": "getNodeGroupComplianceTargetId",
- "data": {
- "nodeGroups": [
- {
- "id": "47e3f2c0-0b1a-4b1a-9b0a-9e9e9e9e9e9e",
- "mode": "full-compliance",
- "compliance": 57.43,
- "complianceDetails": {
- "successAlreadyOK": 48.68,
- "noReport": 36.18,
- "successNotApplicable": 5.92,
- "unexpectedMissingComponent": 2.63,
- "error": 1.32,
- "unexpectedUnknownComponent": 2.63,
- "successRepaired": 2.63
}, - "rules": [
- {
- "id": "32377fd7-02fd-43d0-aab7-28460a91347b",
- "name": "Global configuration for all nodes",
- "mode": "full-compliance",
- "policyMode": "audit",
- "compliance": 83.34,
- "complianceDetails": {
- "successAlreadyOK": 100,
- "noReport": 0,
- "successNotApplicable": 0,
- "unexpectedMissingComponent": 0,
- "error": 0,
- "unexpectedUnknownComponent": 0,
- "successRepaired": 0
}, - "directives": [
- {
- "id": "9a1773c9-0889-40b6-be89-f6504443ac1b",
- "name": "test directive",
- "policyMode": "audit",
- "compliance": 83.34,
- "complianceDetails": {
- "successAlreadyOK": 66.68,
- "noReport": 7.45,
- "successNotApplicable": 16.66,
- "unexpectedMissingComponent": 2.63,
- "error": 1.32,
- "unexpectedUnknownComponent": 2.63,
- "successRepaired": 2.63
}, - "components": [
- {
- "name": "Test users",
- "compliance": 100,
- "complianceDetails": {
- "successAlreadyOK": 66.67,
- "noReport": 0,
- "successNotApplicable": 33.33,
- "unexpectedMissingComponent": 0,
- "error": 0,
- "unexpectedUnknownComponent": 0,
- "successRepaired": 0
}, - "nodes": [
- {
- "id": "root",
- "name": "server.rudder.local",
- "mode": "full-compliance",
- "compliance": 83.34,
- "complianceDetails": {
- "successAlreadyOK": 100,
- "noReport": 0,
- "successNotApplicable": 0,
- "unexpectedMissingComponent": 0,
- "error": 0,
- "unexpectedUnknownComponent": 0,
- "successRepaired": 0
}, - "values": [
- {
- "value": "None",
- "reports": [
- {
- "status": "successAlreadyOK",
- "message": "The MOTD file was correct"
}
]
}
]
}
]
}
]
}
]
}
], - "nodes": [
- {
- "id": "b6ded8e2-2709-4986-973d-8e5522d20718",
- "name": "agent1.rudder.local",
- "policyMode": "audit",
- "compliance": 100,
- "complianceDetails": {
- "successAlreadyOK": 100,
- "noReport": 0,
- "successNotApplicable": 0,
- "unexpectedMissingComponent": 0,
- "error": 0,
- "unexpectedUnknownComponent": 0,
- "successRepaired": 0
}, - "rules": [
- {
- "id": "835c068d-f01e-44c0-a0f4-7a436d46ad35",
- "name": "Test users",
- "policyMode": "audit",
- "compliance": 100,
- "complianceDetails": {
- "successAlreadyOK": 66.67,
- "noReport": 0,
- "successNotApplicable": 33.33,
- "unexpectedMissingComponent": 0,
- "error": 0,
- "unexpectedUnknownComponent": 0,
- "successRepaired": 0
}, - "directives": [
- {
- "id": "835c068d-f01e-44c0-a0f4-7a436d46ad35",
- "name": "Test users",
- "policyMode": "audit",
- "compliance": 100,
- "complianceDetails": {
- "successAlreadyOK": 66.67,
- "noReport": 0,
- "successNotApplicable": 33.33,
- "unexpectedMissingComponent": 0,
- "error": 0,
- "unexpectedUnknownComponent": 0,
- "successRepaired": 0
}, - "components": [
- {
- "name": "MOTD Configuration",
- "compliance": 100,
- "complianceDetails": {
- "successAlreadyOK": 100,
- "noReport": 0,
- "successNotApplicable": 0,
- "unexpectedMissingComponent": 0,
- "error": 0,
- "unexpectedUnknownComponent": 0,
- "successRepaired": 0
}, - "values": [
- {
- "value": "Hello John Doe",
- "reports": [
- {
- "status": "successAlreadyOK",
- "message": "The MOTD is correctly configured with \"Hello John Doe\""
}
]
}
]
}
]
}
]
}
]
}
]
}
]
}
}
Get current compliance of all the nodes of a Rudder server
level | integer Default: 10 Example: level=4 Number of depth level of compliance objects to display (1:rules, 2:directives, 3:components, 4:nodes, 5:values, 6:reports) |
precision | integer Default: 2 Example: precision=0 Number of digits after comma in compliance percent figures |
result required | string Enum: "success" "error" Result of the request |
action required | string Value: "getNodesCompliance" The id of the action |
required | object |
# To get the compliance information of a specific node curl --header "X-API-Token: yourToken" --request GET 'https://rudder.example.com/rudder/api/compliance/nodes?level=2' # To get the list of nodes which have a compliance <100 for a given directive (c5881268-5612-48f2-8ef4-0ab8387fccd6) curl -k -H "X-API-Token: yourToken" -X GET "https://rudder.example.com/rudder/api/latest/compliance/nodes?level=3" \ | jq '[.data.nodes[] | { "nodeid":.id, "dirs": [.rules[].directives[]] | map(select(.id == "c5881268-5612-48f2-8ef4-0ab8387fccd6" and .compliance < 100)) } ] | map(select(.dirs | length != 0)) | [.[] | {"nodeid":.nodeid, "comp":.dirs[0].complianceDetails} ]'
{- "result": "success",
- "action": "getNodesCompliance",
- "data": {
- "nodes": [
- {
- "id": "f37f4928-fcb5-4acf-a422-d40f123a9670",
- "mode": "full-compliance",
- "compliance": 57.43,
- "complianceDetails": {
- "successAlreadyOK": 48.68,
- "noReport": 36.18,
- "successNotApplicable": 5.92,
- "unexpectedMissingComponent": 2.63,
- "error": 1.32,
- "unexpectedUnknownComponent": 2.63,
- "successRepaired": 2.63
}
}
]
}
}
Get current compliance of a node of a Rudder server
nodeId required | string <uuid (or "root")> Example: 9a1773c9-0889-40b6-be89-f6504443ac1b Id of the target node |
level | integer Default: 10 Example: level=4 Number of depth level of compliance objects to display (1:rules, 2:directives, 3:components, 4:nodes, 5:values, 6:reports) |
precision | integer Default: 2 Example: precision=0 Number of digits after comma in compliance percent figures |
result required | string Enum: "success" "error" Result of the request |
action required | string Value: "getNodeCompliance" The id of the action |
required | object |
curl --header "X-API-Token: yourToken" --request GET 'https://rudder.example.com/rudder/api/compliance/nodes/root?level=1'
{- "result": "success",
- "action": "getNodeCompliance",
- "data": {
- "nodes": [
- {
- "id": "f37f4928-fcb5-4acf-a422-d40f123a9670",
- "mode": "full-compliance",
- "compliance": 57.43,
- "complianceDetails": {
- "successAlreadyOK": 48.68,
- "noReport": 36.18,
- "successNotApplicable": 5.92,
- "unexpectedMissingComponent": 2.63,
- "error": 1.32,
- "unexpectedUnknownComponent": 2.63,
- "successRepaired": 2.63
}
}
]
}
}
Get current compliance of all the rules of a Rudder server
level | integer Default: 10 Example: level=4 Number of depth level of compliance objects to display (1:rules, 2:directives, 3:components, 4:nodes, 5:values, 6:reports) |
precision | integer Default: 2 Example: precision=0 Number of digits after comma in compliance percent figures |
result required | string Enum: "success" "error" Result of the request |
action required | string Value: "getRulesCompliance" The id of the action |
required | object |
curl --header "X-API-Token: yourToken" --request GET 'https://rudder.example.com/rudder/api/latest/compliance/rules?level=2'
{- "result": "success",
- "action": "getRulesCompliance",
- "data": {
- "rules": [
- {
- "id": "f37f4928-fcb5-4acf-a422-d40f123a9670",
- "mode": "full-compliance",
- "compliance": 57.43,
- "complianceDetails": {
- "successAlreadyOK": 48.68,
- "noReport": 36.18,
- "successNotApplicable": 5.92,
- "unexpectedMissingComponent": 2.63,
- "error": 1.32,
- "unexpectedUnknownComponent": 2.63,
- "successRepaired": 2.63
}
}
]
}
}
Get current compliance of a rule of a Rudder server
ruleId required | string <uuid> Example: 9a1773c9-0889-40b6-be89-f6504443ac1b Id of the target rule |
level | integer Default: 10 Example: level=4 Number of depth level of compliance objects to display (1:rules, 2:directives, 3:components, 4:nodes, 5:values, 6:reports) |
precision | integer Default: 2 Example: precision=0 Number of digits after comma in compliance percent figures |
result required | string Enum: "success" "error" Result of the request |
action required | string Value: "getRuleCompliance" The id of the action |
required | object |
curl --header "X-API-Token: yourToken" --request GET 'https://rudder.example.com/rudder/api/latest/compliance/rules?level=2'
{- "result": "success",
- "action": "getRuleCompliance",
- "data": {
- "rules": [
- {
- "id": "f37f4928-fcb5-4acf-a422-d40f123a9670",
- "mode": "full-compliance",
- "compliance": 57.43,
- "complianceDetails": {
- "successAlreadyOK": 48.68,
- "noReport": 36.18,
- "successNotApplicable": 5.92,
- "unexpectedMissingComponent": 2.63,
- "error": 1.32,
- "unexpectedUnknownComponent": 2.63,
- "successRepaired": 2.63
}
}
]
}
}
List all rules
result required | string Enum: "success" "error" Result of the request |
action required | string Value: "listRules" The id of the action |
required | object |
curl --header "X-API-Token: yourToken" --request GET 'https://rudder.example.com/rudder/api/latest/rules' # To get information about the target (included/excluded) groups of the rules curl -H "X-API-Token: yourToken" -X GET 'https://rudder.example.com/rudder/api/latest/rules' | jq '.data.rules[] | {"d": .displayName, "id":.id, "inc": .targets[].include?.or, "exc":.targets[].exclude?.or}'
{- "result": "success",
- "action": "listRules",
- "data": {
- "rules": [
- {
- "id": "0c1713ae-cb9d-4f7b-abda-ca38c5d643ea",
- "displayName": "Security policy",
- "shortDescription": "Baseline applying CIS guidelines",
- "longDescription": "This rules should be applied to all Linux nodes required basic hardening",
- "directives": [
- "ff3bf651-3fce-49bc-8bf3-85132fa9b875"
], - "targets": [
- {
- "include": {
- "or": [
- "special:all"
]
}, - "exclude": {
- "or": [
- "policyServer:root",
- "group:cd377524-808b-4b42-8724-6ef308efeac7"
]
}
}
], - "enabled": true,
- "system": false,
- "tags": [
- {
- "customer": "MyCompany"
}
], - "policyMode": "mixed",
- "status": {
- "value": "Partially applied",
- "details": "Directive 'test parameter name' disabled"
}
}
]
}
}
Create a new rule. You can specify a source rule to clone it.
source | string <uuid> The id of the rule the clone will be based onto. If this parameter if provided, the new rule will be a clone of this source. Other value will override values from the source. |
id | string <uuid> Rule id |
displayName | string Rule name |
shortDescription | string One line rule description |
longDescription | string Rule documentation |
category | string <uuid> The parent category id. If provided, the new rule will be in this parent category |
directives | Array of strings Directives linked to the rule |
Array of objects (rule-targets) Node and special groups targeted by that rule | |
enabled | boolean Is the rule enabled |
system | boolean If true it is an internal Rudder rule |
Array of objects |
result required | string Enum: "success" "error" Result of the request |
action required | string Value: "createRule" The id of the action |
required | object |
{- "source": "b9f6d98a-28bc-4d80-90f7-d2f14269e215",
- "id": "0c1713ae-cb9d-4f7b-abda-ca38c5d643ea",
- "displayName": "Security policy",
- "shortDescription": "Baseline applying CIS guidelines",
- "longDescription": "This rules should be applied to all Linux nodes required basic hardening",
- "category": "38e0c6ea-917f-47b8-82e0-e6a1d3dd62ca",
- "directives": [
- "string"
], - "targets": [
- {
- "include": {
- "or": [
- "special:all"
]
}, - "exclude": {
- "or": [
- "policyServer:root",
- "group:cd377524-808b-4b42-8724-6ef308efeac7"
]
}
}
], - "enabled": true,
- "system": false,
- "tags": [
- {
- "customer": "MyCompany"
}
]
}
{- "result": "success",
- "action": "createRule",
- "data": {
- "rules": [
- {
- "id": "0c1713ae-cb9d-4f7b-abda-ca38c5d643ea",
- "displayName": "Security policy",
- "shortDescription": "Baseline applying CIS guidelines",
- "longDescription": "This rules should be applied to all Linux nodes required basic hardening",
- "directives": [
- "ff3bf651-3fce-49bc-8bf3-85132fa9b875"
], - "targets": [
- {
- "include": {
- "or": [
- "special:all"
]
}, - "exclude": {
- "or": [
- "policyServer:root",
- "group:cd377524-808b-4b42-8724-6ef308efeac7"
]
}
}
], - "enabled": true,
- "system": false,
- "tags": [
- {
- "customer": "MyCompany"
}
], - "policyMode": "mixed",
- "status": {
- "value": "Partially applied",
- "details": "Directive 'test parameter name' disabled"
}
}
]
}
}
Create a new rule category
parent required | string <uuid> The parent category of the rules |
id | string <uuid> Default: "{autogenerated}" Rule category id, only provide it when needed. |
name required | string Name of the rule category |
description | string Rules category description |
result required | string Enum: "success" "error" Result of the request |
action required | string Value: "CreateRuleCategory" The id of the action |
required | object |
{- "parent": "b9f6d98a-28bc-4d80-90f7-d2f14269e215",
- "id": "32d013f7-b6d8-46c8-99d3-016307fa66c0",
- "name": "Security policies",
- "description": "Baseline applying CIS guidelines"
}
{- "result": "success",
- "action": "CreateRuleCategory",
- "data": {
- "ruleCategories": [
- {
- "parent": "b9f6d98a-28bc-4d80-90f7-d2f14269e215",
- "id": "32d013f7-b6d8-46c8-99d3-016307fa66c0",
- "name": "Security policies",
- "description": "Baseline applying CIS guidelines"
}
]
}
}
Get detailed information about a rule category
ruleCategoryId required | string <uuid> Example: e0a311fa-f7b2-4f9e-89a9-db517b9c6b90 Rule category id |
result required | string Enum: "success" "error" Result of the request |
action required | string Value: "GetRuleCategoryDetails" The id of the action |
required | object |
curl --header "X-API-Token: yourToken" --request GET 'https://rudder.example.com/rudder/api/latest/rules/categories/4306143d-eabf-4478-b7b1-1616f4aa02b5?prettify=true'
{- "result": "success",
- "action": "GetRuleCategoryDetails",
- "data": {
- "rulesCategories": [
- {
- "parent": "b9f6d98a-28bc-4d80-90f7-d2f14269e215",
- "id": "32d013f7-b6d8-46c8-99d3-016307fa66c0",
- "name": "Security policies",
- "description": "Baseline applying CIS guidelines"
}
]
}
}
Delete a group category. It must have no child groups and no children categories.
ruleCategoryId required | string <uuid> Example: e0a311fa-f7b2-4f9e-89a9-db517b9c6b90 Rule category id |
result required | string Enum: "success" "error" Result of the request |
action required | string Value: "DeleteRuleCategory" The id of the action |
required | object |
curl --header "X-API-Token: yourToken" --request DELETE 'https://rudder.example.com/rudder/api/latest/rules/categories/4306143d-eabf-4478-b7b1-1616f4aa02b5?prettify=true'
{- "result": "success",
- "action": "DeleteRuleCategory",
- "data": {
- "groupCategories": [
- {
- "parent": "b9f6d98a-28bc-4d80-90f7-d2f14269e215",
- "id": "32d013f7-b6d8-46c8-99d3-016307fa66c0",
- "name": "Security policies",
- "description": "Baseline applying CIS guidelines"
}
]
}
}
Update detailed information about a rule category
ruleCategoryId required | string <uuid> Example: e0a311fa-f7b2-4f9e-89a9-db517b9c6b90 Rule category id |
parent required | string <uuid> The parent category of the rules |
name required | string Name of the rule category |
description | string Rules category description |
result required | string Enum: "success" "error" Result of the request |
action required | string Value: "UpdateRuleCategory" The id of the action |
required | object |
{- "parent": "b9f6d98a-28bc-4d80-90f7-d2f14269e215",
- "name": "Security policies",
- "description": "Baseline applying CIS guidelines"
}
{- "result": "success",
- "action": "UpdateRuleCategory",
- "data": {
- "ruleCategories": [
- {
- "parent": "b9f6d98a-28bc-4d80-90f7-d2f14269e215",
- "id": "32d013f7-b6d8-46c8-99d3-016307fa66c0",
- "name": "Security policies",
- "description": "Baseline applying CIS guidelines"
}
]
}
}
Get all available rules and their categories in a tree
result required | string Enum: "success" "error" Result of the request |
action required | string Value: "GetRuleTree" The id of the action |
required | object |
curl --header "X-API-Token: yourToken" --request GET 'https://rudder.example.com/rudder/api/latest/rules/tree?prettify=true'
{- "result": "success",
- "action": "GetRuleTree",
- "data": {
- "id": "rootRuleCategory",
- "name": "Rules",
- "description": "This is the main category of Rules",
- "parent": "rootRuleCategory",
- "categories": [
- {
- "id": "4306143d-eabf-4478-b7b1-1616f4aa02b5",
- "name": "Dev category",
- "description": "",
- "parent": "rootRuleCategory",
- "categories": [
- {
- "id": "f45ec2fd-69f4-4669-9c22-1af3abe2a107",
- "name": "Specific dev category",
- "description": "",
- "parent": "4306143d-eabf-4478-b7b1-1616f4aa02b5",
- "categories": [ ],
- "rules": [
- {
- "id": "b7fda4e7-3616-4e99-89b0-8ffadaf6b0f0",
- "displayName": "my specific Rule",
- "shortDescription": "",
- "longDescription": "",
- "directives": [ ],
- "targets": [ ],
- "enabled": true,
- "system": false
}
]
}
], - "rules": [
- {
- "id": "f2aa50a9-961c-4cce-a266-380cffcdce32",
- "displayName": "dev Rule",
- "shortDescription": "",
- "longDescription": "",
- "directives": [ ],
- "targets": [ ],
- "enabled": true,
- "system": false
}
]
}
], - "rules": [
- {
- "id": "43cde273-5bb0-466f-8850-7d3fdde03253",
- "displayName": "Global security policy",
- "shortDescription": "",
- "longDescription": "",
- "directives": [ ],
- "targets": [ ],
- "enabled": true,
- "system": false
}, - {
- "id": "32377fd7-02fd-43d0-aab7-28460a91347b",
- "displayName": "Global configuration for all nodes",
- "shortDescription": "",
- "longDescription": "This Rule was created automatically when Rudder was installed. It can be used to target Directives to all nodes (including the Rudder root server itself), or deleted if you would rather create your own set of Rules (it will never be created again).",
- "directives": [
- "bff45fe2-8233-4d28-96aa-78b0390b548b"
], - "targets": [
- {
- "include": {
- "or": [
- "special:all",
- "special:all_exceptPolicyServers",
- "special:all_policyServers"
]
}, - "exclude": {
- "or": [ ]
}
}
], - "enabled": false,
- "system": false
}
]
}
}
Get the details of a rule
ruleId required | string <uuid> Example: 9a1773c9-0889-40b6-be89-f6504443ac1b Id of the target rule |
result required | string Enum: "success" "error" Result of the request |
action required | string Value: "ruleDetails" The id of the action |
required | object |
curl --header "X-API-Token: yourToken" --request GET 'https://rudder.example.com/rudder/api/latest/rules/06ba8940-ed6c-4102-ba46-93d640a64c36'
{- "result": "success",
- "action": "ruleDetails",
- "data": {
- "rules": [
- {
- "id": "0c1713ae-cb9d-4f7b-abda-ca38c5d643ea",
- "displayName": "Security policy",
- "shortDescription": "Baseline applying CIS guidelines",
- "longDescription": "This rules should be applied to all Linux nodes required basic hardening",
- "directives": [
- "ff3bf651-3fce-49bc-8bf3-85132fa9b875"
], - "targets": [
- {
- "include": {
- "or": [
- "special:all"
]
}, - "exclude": {
- "or": [
- "policyServer:root",
- "group:cd377524-808b-4b42-8724-6ef308efeac7"
]
}
}
], - "enabled": true,
- "system": false,
- "tags": [
- {
- "customer": "MyCompany"
}
], - "policyMode": "mixed",
- "status": {
- "value": "Partially applied",
- "details": "Directive 'test parameter name' disabled"
}
}
]
}
}
Update the details of a rule
ruleId required | string <uuid> Example: 9a1773c9-0889-40b6-be89-f6504443ac1b Id of the target rule |
id | string <uuid> Rule id |
displayName | string Rule name |
shortDescription | string One line rule description |
longDescription | string Rule documentation |
category | string <uuid> The parent category id. |
directives | Array of strings Directives linked to the rule |
Array of objects (rule-targets) Node and special groups targeted by that rule | |
enabled | boolean Is the rule enabled |
system | boolean If true it is an internal Rudder rule |
Array of objects |
result required | string Enum: "success" "error" Result of the request |
action required | string Value: "updateRule" The id of the action |
required | object |
{- "id": "0c1713ae-cb9d-4f7b-abda-ca38c5d643ea",
- "displayName": "Security policy",
- "shortDescription": "Baseline applying CIS guidelines",
- "longDescription": "This rules should be applied to all Linux nodes required basic hardening",
- "category": "38e0c6ea-917f-47b8-82e0-e6a1d3dd62ca",
- "directives": [
- "string"
], - "targets": [
- {
- "include": {
- "or": [
- "special:all"
]
}, - "exclude": {
- "or": [
- "policyServer:root",
- "group:cd377524-808b-4b42-8724-6ef308efeac7"
]
}
}
], - "enabled": true,
- "system": false,
- "tags": [
- {
- "customer": "MyCompany"
}
]
}
{- "result": "success",
- "action": "updateRule",
- "data": {
- "rules": [
- {
- "id": "0c1713ae-cb9d-4f7b-abda-ca38c5d643ea",
- "displayName": "Security policy",
- "shortDescription": "Baseline applying CIS guidelines",
- "longDescription": "This rules should be applied to all Linux nodes required basic hardening",
- "category": "38e0c6ea-917f-47b8-82e0-e6a1d3dd62ca",
- "directives": [
- "string"
], - "targets": [
- {
- "include": {
- "or": [
- "special:all"
]
}, - "exclude": {
- "or": [
- "policyServer:root",
- "group:cd377524-808b-4b42-8724-6ef308efeac7"
]
}
}
], - "enabled": true,
- "system": false,
- "tags": [
- {
- "customer": "MyCompany"
}
]
}
]
}
}
Delete a rule.
ruleId required | string <uuid> Example: 9a1773c9-0889-40b6-be89-f6504443ac1b Id of the target rule |
result required | string Enum: "success" "error" Result of the request |
action required | string Value: "deleteRule" The id of the action |
required | object |
curl --header "X-API-Token: yourToken" --request DELETE 'https://rudder.example.com/rudder/api/latest/rules/176ad06b-ed02-4da3-8053-16225d217741'
{- "result": "success",
- "action": "deleteRule",
- "data": {
- "rules": [
- {
- "id": "0c1713ae-cb9d-4f7b-abda-ca38c5d643ea",
- "displayName": "Security policy",
- "shortDescription": "Baseline applying CIS guidelines",
- "longDescription": "This rules should be applied to all Linux nodes required basic hardening",
- "directives": [
- "ff3bf651-3fce-49bc-8bf3-85132fa9b875"
], - "targets": [
- {
- "include": {
- "or": [
- "special:all"
]
}, - "exclude": {
- "or": [
- "policyServer:root",
- "group:cd377524-808b-4b42-8724-6ef308efeac7"
]
}
}
], - "enabled": true,
- "system": false,
- "tags": [
- {
- "customer": "MyCompany"
}
], - "policyMode": "mixed",
- "status": {
- "value": "Partially applied",
- "details": "Directive 'test parameter name' disabled"
}
}
]
}
}
List all directives
result required | string Enum: "success" "error" Result of the request |
action required | string Value: "listDirectives" The id of the action |
required | object |
curl --header "X-API-Token: yourToken" --request GET https://rudder.example.com/rudder/api/latest/directives
{- "result": "success",
- "action": "listDirectives",
- "data": {
- "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,
- "system": false,
- "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"
}
}
]
}
}
]
}
}
]
}
}
]
}
}
Create a new directive from provided parameters. You can specify a source directive to clone it.
source | string <uuid> The id of the directive the clone will be based onto. If this parameter if provided, the new directive will be a clone of this source. Other value will override values from the source. |
id | string <uuid> Directive id |
displayName | string Human readable name of the directive |
shortDescription | string One line directive description |
longDescription | string <markdown> Description of the technique (rendered as markdown) |
techniqueName | string Directive id |
techniqueVersion | string Directive id |
priority | integer [ 0 .. 10 ] Directive priority. |
enabled | boolean Is the directive enabled |
system | boolean If true it is an internal Rudder directive |
Array of objects | |
parameters | object Directive parameters (depends on the source technique) |
result required | string Enum: "success" "error" Result of the request |
action required | string Value: "createDirective" The id of the action |
required | object |
{- "source": "b9f6d98a-28bc-4d80-90f7-d2f14269e215",
- "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,
- "system": false,
- "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"
}
}
]
}
}
]
}
}
]
}
}
{- "result": "success",
- "action": "createDirective",
- "data": {
- "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,
- "system": false,
- "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"
}
}
]
}
}
]
}
}
]
}
}
]
}
}
Get all information about a given directive
directiveId required | string <uuid> Example: 9a1773c9-0889-40b6-be89-f6504443ac1b Id of the directive |
result required | string Enum: "success" "error" Result of the request |
action required | string Value: "directiveDetails" The id of the action |
required | object |
curl --header "X-API-Token: yourToken" --request GET https://rudder.example.com/rudder/api/latest/directives/17dadf50-6056-4c8b-a935-6b97d14b89a7
{- "result": "success",
- "action": "directiveDetails",
- "data": {
- "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,
- "system": false,
- "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"
}
}
]
}
}
]
}
}
]
}
}
]
}
}
Delete a directive
directiveId required | string <uuid> Example: 9a1773c9-0889-40b6-be89-f6504443ac1b Id of the directive |
result required | string Enum: "success" "error" Result of the request |
action required | string Value: "deleteDirective" The id of the action |
required | object |
curl --header "X-API-Token: yourToken" --request DELETE https://rudder.example.com/rudder/api/latest/directives/17dadf50-6056-4c8b-a935-6b97d14b89a7
{- "result": "success",
- "action": "deleteDirective",
- "data": {
- "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,
- "system": false,
- "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"
}
}
]
}
}
]
}
}
]
}
}
]
}
}
Update directive information
directiveId required | string <uuid> Example: 9a1773c9-0889-40b6-be89-f6504443ac1b Id of the directive |
id | string <uuid> Directive id |
displayName | string Human readable name of the directive |
shortDescription | string One line directive description |
longDescription | string <markdown> Description of the technique (rendered as markdown) |
techniqueName | string Directive id |
techniqueVersion | string Directive id |
priority | integer [ 0 .. 10 ] Directive priority. |
enabled | boolean Is the directive enabled |
system | boolean If true it is an internal Rudder directive |
policyMode | string Enum: "enforce" "audit" Policy mode of the directive |
Array of objects | |
parameters | object Directive parameters (depends on the source technique) |
result required | string Enum: "success" "error" Result of the request |
action required | string Value: "updateDirective" The id of the action |
required | object |
{- "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,
- "system": false,
- "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"
}
}
]
}
}
]
}
}
]
}
}
{- "result": "success",
- "action": "updateDirective",
- "data": {
- "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,
- "system": false,
- "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"
}
}
]
}
}
]
}
}
]
}
}
]
}
}
Check that update on a directive is valid
directiveId required | string <uuid> Example: 9a1773c9-0889-40b6-be89-f6504443ac1b Id of the directive |
id | string <uuid> Directive id |
displayName | string Human readable name of the directive |
shortDescription | string One line directive description |
longDescription | string <markdown> Description of the technique (rendered as markdown) |
techniqueName | string Directive id |
techniqueVersion | string Directive id |
priority | integer [ 0 .. 10 ] Directive priority. |
enabled | boolean Is the directive enabled |
system | boolean If true it is an internal Rudder directive |
policyMode | string Enum: "enforce" "audit" Policy mode of the directive |
Array of objects | |
parameters | object Directive parameters (depends on the source technique) |
result required | string Enum: "success" "error" Result of the request |
action required | string Value: "checkDirective" The id of the action |
required | object |
{- "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,
- "system": false,
- "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"
}
}
]
}
}
]
}
}
]
}
}
{- "result": "success",
- "action": "checkDirective",
- "data": {
- "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,
- "system": false,
- "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"
}
}
]
}
}
]
}
}
]
}
}
]
}
}
Get all generic methods metadata
result required | string Enum: "success" "error" Result of the request |
action required | string Value: "listTechniques" The id of the action |
required | object |
curl --header "X-API-Token: yourToken" --request GET https://rudder.example.com/rudder/api/latest/methods
{- "result": "success",
- "action": "listTechniques",
- "data": {
- "methods": {
- "id": "package_present",
- "name": "Package present",
- "version": "1.0",
- "category": "user_techniques",
- "desc": "Enforce the presence of a package",
- "documentation": "This methods allows...",
- "parameters": [
- {
- "name": "package",
- "description": "Name of a package to install",
- "constraints": {
- "allow_empty_string": false,
- "allow_whitespace_string": true,
- "max_length": 250,
- "min_length": 5,
- "regex": ".*",
- "not_regex": "^c.*",
- "select": [
- "!="
]
}, - "_type": "String"
}
], - "agents": [
- "dsc"
], - "condition": {
- "prefix": "package_present",
- "parameter": "package"
}, - "deprecated": {
- "info": "The method has been deprecated because of X",
- "replacedBy": "package_present"
}
}
}
}
Reload methods metadata from file system
result required | string Enum: "success" "error" Result of the request |
action required | string Value: "listTechniques" The id of the action |
required | object |
curl --header "X-API-Token: yourToken" --request POST https://rudder.example.com/rudder/api/latest/methods/reload
{- "result": "success",
- "action": "listTechniques",
- "data": {
- "methods": {
- "id": "package_present",
- "name": "Package present",
- "version": "1.0",
- "category": "user_techniques",
- "desc": "Enforce the presence of a package",
- "documentation": "This methods allows...",
- "parameters": [
- {
- "name": "package",
- "description": "Name of a package to install",
- "constraints": {
- "allow_empty_string": false,
- "allow_whitespace_string": true,
- "max_length": 250,
- "min_length": 5,
- "regex": ".*",
- "not_regex": "^c.*",
- "select": [
- "!="
]
}, - "_type": "String"
}
], - "agents": [
- "dsc"
], - "condition": {
- "prefix": "package_present",
- "parameter": "package"
}, - "deprecated": {
- "info": "The method has been deprecated because of X",
- "replacedBy": "package_present"
}
}
}
}
List all technique with their versions
result required | string Enum: "success" "error" Result of the request |
action required | string Value: "listTechniques" The id of the action |
required | object |
curl --header "X-API-Token: yourToken" --request GET https://rudder.example.com/rudder/api/latest/techniques
{- "result": "success",
- "action": "listTechniques",
- "data": {
- "techniques": [
- {
- "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"
}
]
}
]
}
]
}
}
Create a new technique in Rudder from a technique in the technique editor
id | string Technique id |
name | string Technique name |
version | string version of this technique |
category | string category of this technique |
description | string description of this technique |
source | string Source of the technique, always editor here |
Array of objects (technique-parameter) Parameters for this technique | |
Array of objects (technique-resource) Resources for this technique | |
Array of technique-method-call (object) or technique-block (object) Method and blocks contained by this technique |
result required | string Enum: "success" "error" Result of the request |
action required | string Value: "listTechniques" The id of the action |
required | object |
[- {
- "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"
}
]
}
]
}
]
{- "result": "success",
- "action": "listTechniques",
- "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"
}
]
}
]
}
}
}
}
Get all technique categories
result required | string Enum: "success" "error" Result of the request |
action required | string Value: "listTechniques" The id of the action |
required | object |
curl --header "X-API-Token: yourToken" --request GET https://rudder.example.com/rudder/api/latest/techniques/categories
{- "result": "success",
- "action": "listTechniques",
- "data": {
- "techniqueCategories": {
- "name": "/",
- "path": "",
- "id": "/",
- "subcategories": [
- {
- "name": "User Techniques",
- "path": "systemSettings/systemManagement",
- "id": "systemManagement",
- "subcategories": [ ]
}
]
}
}
}
Reload all techniques metadata from file system
result required | string Enum: "success" "error" Result of the request |
action required | string Value: "listTechniques" The id of the action |
required | object |
curl --header "X-API-Token: yourToken" --request POST https://rudder.example.com/rudder/api/latest/techniques/reload
{- "result": "success",
- "action": "listTechniques",
- "data": {
- "techniques": [
- {
- "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"
}
]
}
]
}
]
}
}
List all techniques version
result required | string Enum: "success" "error" Result of the request |
action required | string Value: "listTechniques" The id of the action |
required | object |
curl --header "X-API-Token: yourToken" --request GET https://rudder.example.com/rudder/api/latest/techniques/versions
{- "result": "success",
- "action": "listTechniques",
- "data": {
- "techniques": [
- {
- "name": "userManagement",
- "version": [
- "1.0",
- "1.2",
- "3.0"
]
}
]
}
}
Get each Technique's versions with their metadata by ID
techniqueId required | string Example: userManagement Technique ID |
result required | string Enum: "success" "error" Result of the request |
action required | string Value: "listTechniques" The id of the action |
required | object |
curl --header "X-API-Token: yourToken" --request GET https://rudder.example.com/rudder/api/latest/techniques/foo
{- "result": "success",
- "action": "listTechniques",
- "data": {
- "techniques": [
- {
- "JREditorTechnique": {
- "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"
}
]
}
]
}
}
]
}
}
List all directives based on all version of a technique
techniqueId required | string Example: userManagement Technique ID |
result required | string Enum: "success" "error" Result of the request |
action required | string Value: "listTechniquesDirectives" The id of the action |
required | object |
curl --header "X-API-Token: yourToken" --request GET https://rudder.example.com/rudder/api/latest/techniques/checkGenericFileContent/directives
{- "result": "success",
- "action": "listTechniquesDirectives",
- "data": {
- "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,
- "system": false,
- "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"
}
}
]
}
}
]
}
}
]
}
}
]
}
}
Update technique created with technique editor
techniqueId required | string Example: userManagement Technique ID |
techniqueVersion required | string Example: 6.0 Technique version |
id | string Technique id |
name | string Technique name |
version | string version of this technique |
category | string category of this technique |
description | string description of this technique |
source | string Source of the technique, always editor here |
Array of objects (technique-parameter) Parameters for this technique | |
Array of objects (technique-resource) Resources for this technique | |
Array of technique-method-call (object) or technique-block (object) Method and blocks contained by this technique |
result required | string Enum: "success" "error" Result of the request |
action required | string Value: "listTechniques" The id of the action |
required | object |
[- {
- "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"
}
]
}
]
}
]
{- "result": "success",
- "action": "listTechniques",
- "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"
}
]
}
]
}
}
}
}
Delete a technique from technique editor
techniqueId required | string Example: userManagement Technique ID |
techniqueVersion required | string Example: 6.0 Technique version |
result required | string Enum: "success" "error" Result of the request |
action required | string Value: "listTechniques" The id of the action |
required |