Skip to content

Rudder API API

by rudder.example.local

API keyHTTPSDevelopment
Open documentation ↗

Overview

Download OpenAPI specification: [openapi.yml](openapi.yml) # Introduction Rudder exposes a REST API, enabling the user to interact with Rudder without using the webapp, for example in scripts or cronjobs. ## Versioning 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: * the URL: each URL is prefixed by its version id, like `/api/version/function`. ```bash # 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 ``` * the HTTP headers. You can add the **X-API-Version** header to your request. The value needs to be an integer or `latest`. ```bash # 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. <h4>Existing versions</h4> <table> <thead> <tr> <th style="width: 20%">Version</th> <th style="width: 20%">Rudder versions it appeared in</th> <th style="width: 70%">Description</th> </tr> </thead> <tbody> <tr> <td class="code">1</td> <td class="code">Never released (for internal use only)</td> <td>Experimental version</td> </tr> <tr> <td class="code">2 to 10 (deprecated)</td> <td class="code">4.3 and before</td> <td>These versions provided the core set of API features for rules, directives, nodes global parameters, change requests and compliance, rudder settings and system API</td> </tr> <tr> <td class="code">11</td> <td class="code">5.0</td> <td>New system API (replacing old localhost v1 api): status, maintenance operations and server behavior</td> </tr> <tr> <td class="code">12</td> <td class="code">6.0 and 6.1</td> <td>Node key management</td> </tr> <tr> <td class="code">13</td> <td class="code">6.2</td> <td><ul> <li>Node status endpoint</li> <li>System health check</li> <li>System maintenance job to purge software [that endpoint was back-ported in 6.1]</li> </ul></td> </tr> <tr> <td class="code">14</td> <td class="code">7.0</td> <td><ul> <li>Secret management</li> <li>Directive tree</li> <li>Improve techniques management</li> <li>Demote a relay</li> </ul></td> </tr> <tr> <td class="code">15</td> <td class="code">7.1</td> <td><ul> <li>Package updates in nodes</li> </ul></td> </tr> <tr> <td class="code">16</td> <td class="code">7.2</td> <td><ul> <li>Create node API included from plugin</li> <li>Configuration archive import/export</li> </ul></td> </tr> </tbody> </table> ## Response format All responses from the API are in the JSON format. ```json { "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...) ## HTTP method Rudder's REST API is based on the usage of [HTTP methods](http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.ht

Rudder API is a development API from rudder.example.local. Requests are authenticated with an API key. It is served over HTTPS. Its OpenAPI description documents 134 endpoints.

At a glance

Authentication
API key
HTTPS
Yes
CORS
Unknown
Category
Development
Base URL
https://rudder.example.local/rudder/api/latest/
Version
16
Endpoints
134
Spec updated
2023-03-06

Make a first request

Replace the placeholders; the documentation says exactly where credentials go.

cURL
curl -X GET "https://rudder.example.local/rudder/api/latest/api/changeRequests" \
  -H "Accept: application/json" \
  -H "X-API-Key: YOUR_API_KEY"
JavaScript
const response = await fetch("https://rudder.example.local/rudder/api/latest/api/changeRequests", {
  method: "GET",
  headers: {
    "Accept": "application/json",
    "X-API-Key": "YOUR_API_KEY",
  },
});
const data = await response.json();
console.log(data);
Python
import requests

response = requests.request(
    "GET",
    "https://rudder.example.local/rudder/api/latest/api/changeRequests",
    headers={
    "Accept": "application/json",
    "X-API-Key": "YOUR_API_KEY",
    },
    timeout=30,
)
print(response.json())

Endpoints

MethodPathWhat it does
GET/api/changeRequestsList all change requests
GET/archives/exportGet a ZIP archive of the requested items and their dependencies
POST/archives/importImport a ZIP archive of policies into Rudder
GET/brandingGet branding configuration
POST/brandingUpdate web interface customization
POST/branding/reloadReload branding file
GET/changeRequests/{changeRequestId}Get a change request details
POST/changeRequests/{changeRequestId}Update a request details
DELETE/changeRequests/{changeRequestId}Decline a request details
POST/changeRequests/{changeRequestId}/acceptAccept a request details
GET/complianceGlobal compliance
GET/compliance/nodesCompliance details for all nodes
GET/compliance/nodes/{nodeId}Compliance details by node
GET/compliance/rulesCompliance details for all rules
GET/compliance/rules/{ruleId}Compliance details by rule
GET/cveGet all CVE details
POST/cve/checkTrigger a CVE check
GET/cve/check/configGet CVE check config
POST/cve/check/configUpdate cve check config
GET/cve/check/lastGet last CVE check result
POST/cve/listGet a list of CVE details
POST/cve/update/Update CVE database from remote source
POST/cve/update/fsUpdate CVE database from file system
GET/datasourcesList all data sources
PUT/datasourcesCreate a data source
POST/datasources/reloadUpdate properties from data sources
POST/datasources/reload/{datasourceId}Update properties from data sources
GET/datasources/{datasourceId}Get data source configuration
POST/datasources/{datasourceId}Update a data source configuration
DELETE/datasources/{datasourceId}Delete a data source
GET/directivesList all directives
PUT/directivesCreate a directive
GET/directives/{directiveId}Get directive details
POST/directives/{directiveId}Update a directive details
DELETE/directives/{directiveId}Delete a directive
POST/directives/{directiveId}/checkCheck that update on a directive is valid
GET/groupsList all groups
PUT/groupsCreate a group
PUT/groups/categoriesCreate a group category
GET/groups/categories/{groupCategoryId}Get group category details
POST/groups/categories/{groupCategoryId}Update group category details
DELETE/groups/categories/{groupCategoryId}Delete group category
GET/groups/treeGet groups tree
GET/groups/{groupId}Get group details
POST/groups/{groupId}Update group details
DELETE/groups/{groupId}Delete a group
POST/groups/{groupId}/reloadReload a group
GET/infoList all endoints
GET/info/details/{endpointName}Get information about one API endpoint
GET/info/{sectionId}Get information on endpoint in a section
GET/inventories/infoGet information about inventory processing queue
POST/inventories/uploadUpload an inventory for processing
POST/inventories/watcher/restartRestart inventory watcher
POST/inventories/watcher/startStart inventory watcher
POST/inventories/watcher/stopStop inventory watcher
GET/methodsList methods
POST/methods/reloadReload methods
GET/nodesList managed nodes
PUT/nodesCreate one or several new nodes
POST/nodes/applyPolicyTrigger an agent run on all nodes
GET/nodes/pendingList pending nodes
POST/nodes/pending/{nodeId}Update pending Node status
GET/nodes/statusGet nodes acceptation status
GET/nodes/{nodeId}Get information about a node
POST/nodes/{nodeId}Update node settings and properties
DELETE/nodes/{nodeId}Delete a node
POST/nodes/{nodeId}/applyPolicyTrigger an agent run
POST/nodes/{nodeId}/fetchDataUpdate properties for one node from all data sources
POST/nodes/{nodeId}/fetchData/{datasourceId}Update properties for one node from a data source
GET/nodes/{nodeId}/inheritedPropertiesGet inherited node properties for a node
GET/parametersList all global parameters
PUT/parametersCreate a new parameter
GET/parameters/{parameterId}Get the value of a parameter
POST/parameters/{parameterId}Update a parameter's value
DELETE/parameters/{parameterId}Delete a parameter
GET/rulesList all rules
PUT/rulesCreate a rule
PUT/rules/categoriesCreate a rule category
GET/rules/categories/{ruleCategoryId}Get rule category details
POST/rules/categories/{ruleCategoryId}Update rule category details
DELETE/rules/categories/{ruleCategoryId}Delete group category
GET/rules/treeGet rules tree
GET/rules/{ruleId}Get a rule details
POST/rules/{ruleId}Update a rule details
DELETE/rules/{ruleId}Delete a rule
POST/scaleoutrelay/demote/{nodeId}Demote a relay to simple node
POST/scaleoutrelay/promote/{nodeId}Promote a node to relay
GET/secret/List all secrets
POST/secret/Update a secret
PUT/secret/Create a secret
GET/secret/{name}Get one secret
DELETE/secret/{name}Delete a secret
GET/settingsList all settings
GET/settings/allowed_networks/{nodeId}Get allowed networks for a policy server
POST/settings/allowed_networks/{nodeId}Set allowed networks for a policy server
POST/settings/allowed_networks/{nodeId}/diffModify allowed networks for a policy server
GET/settings/{settingId}Get the value of a setting
POST/settings/{settingId}Set the value of a setting
GET/statusCheck if Rudder is alive
GET/system/archives/{archiveKind}List archives

Showing the first 100 of 134 endpoints; the full list is in the documentation.

Questions

Does the Rudder API API need an API key?

Yes. The Rudder API API uses API key authentication; the documentation explains how to get credentials.

Does the Rudder API API support HTTPS?

Yes, the Rudder API API is served over HTTPS.

How many endpoints does the Rudder API API have?

Its OpenAPI description lists 134 endpoints in version 16. The first 100 are shown on this page.

What are alternatives to the Rudder API API?

Other Development APIs include Cloudflare, Azure DevOps, IPify, App Store Connect API, StackExchange.

Compare alternatives →

Listed from APIs.guru (CC0).