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
- OpenAPI
- Specification ↗
- Spec updated
- 2023-03-06
Make a first request
Replace the placeholders; the documentation says exactly where credentials go.
curl -X GET "https://rudder.example.local/rudder/api/latest/api/changeRequests" \
-H "Accept: application/json" \
-H "X-API-Key: YOUR_API_KEY"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);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
| Method | Path | What it does |
|---|---|---|
| GET | /api/changeRequests | List all change requests |
| GET | /archives/export | Get a ZIP archive of the requested items and their dependencies |
| POST | /archives/import | Import a ZIP archive of policies into Rudder |
| GET | /branding | Get branding configuration |
| POST | /branding | Update web interface customization |
| POST | /branding/reload | Reload 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}/accept | Accept a request details |
| GET | /compliance | Global compliance |
| GET | /compliance/nodes | Compliance details for all nodes |
| GET | /compliance/nodes/{nodeId} | Compliance details by node |
| GET | /compliance/rules | Compliance details for all rules |
| GET | /compliance/rules/{ruleId} | Compliance details by rule |
| GET | /cve | Get all CVE details |
| POST | /cve/check | Trigger a CVE check |
| GET | /cve/check/config | Get CVE check config |
| POST | /cve/check/config | Update cve check config |
| GET | /cve/check/last | Get last CVE check result |
| POST | /cve/list | Get a list of CVE details |
| POST | /cve/update/ | Update CVE database from remote source |
| POST | /cve/update/fs | Update CVE database from file system |
| GET | /datasources | List all data sources |
| PUT | /datasources | Create a data source |
| POST | /datasources/reload | Update 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 | /directives | List all directives |
| PUT | /directives | Create a directive |
| GET | /directives/{directiveId} | Get directive details |
| POST | /directives/{directiveId} | Update a directive details |
| DELETE | /directives/{directiveId} | Delete a directive |
| POST | /directives/{directiveId}/check | Check that update on a directive is valid |
| GET | /groups | List all groups |
| PUT | /groups | Create a group |
| PUT | /groups/categories | Create 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/tree | Get groups tree |
| GET | /groups/{groupId} | Get group details |
| POST | /groups/{groupId} | Update group details |
| DELETE | /groups/{groupId} | Delete a group |
| POST | /groups/{groupId}/reload | Reload a group |
| GET | /info | List all endoints |
| GET | /info/details/{endpointName} | Get information about one API endpoint |
| GET | /info/{sectionId} | Get information on endpoint in a section |
| GET | /inventories/info | Get information about inventory processing queue |
| POST | /inventories/upload | Upload an inventory for processing |
| POST | /inventories/watcher/restart | Restart inventory watcher |
| POST | /inventories/watcher/start | Start inventory watcher |
| POST | /inventories/watcher/stop | Stop inventory watcher |
| GET | /methods | List methods |
| POST | /methods/reload | Reload methods |
| GET | /nodes | List managed nodes |
| PUT | /nodes | Create one or several new nodes |
| POST | /nodes/applyPolicy | Trigger an agent run on all nodes |
| GET | /nodes/pending | List pending nodes |
| POST | /nodes/pending/{nodeId} | Update pending Node status |
| GET | /nodes/status | Get 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}/applyPolicy | Trigger an agent run |
| POST | /nodes/{nodeId}/fetchData | Update 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}/inheritedProperties | Get inherited node properties for a node |
| GET | /parameters | List all global parameters |
| PUT | /parameters | Create 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 | /rules | List all rules |
| PUT | /rules | Create a rule |
| PUT | /rules/categories | Create 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/tree | Get 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 | /settings | List 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}/diff | Modify 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 | /status | Check 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.
Similar development APIs
Compare alternatives →Cloudflare
DevelopmentManage DNS, CDN, Workers and other services; documented with an official OpenAPI 3.0 spec
Azure DevOps
DevelopmentThe Azure DevOps basic components of a REST API request/response pair
IPify
DevelopmentA simple IP Address API
App Store Connect API
DevelopmentThe data structure that represents an app store connect api resource.
StackExchange
DevelopmentQ&A forum for developers
IPinfo
DevelopmentAnother simple IP Address API
Listed from APIs.guru (CC0).