Configuration Changes APIΒΆ
Note
This feature is available with the Robusta SaaS platform and self-hosted commercial plans. It is not available in the open-source version.
Use this endpoint to send configuration changes to Robusta. You can send up to 1000 configuration changes in a single request.
POST https://api.robusta.dev/api/config-changesΒΆ
Request Body SchemaΒΆ
The request body must include the following fields:
Field |
Type |
Description |
Required |
---|---|---|---|
|
string |
The unique account identifier. |
Yes |
|
list |
A list of configuration changes. |
Yes |
Configuration Change SchemaΒΆ
Each configuration change in the config_changes
list must follow the specific schema, which includes the following fields:
Field |
Type |
Description |
Required |
---|---|---|---|
|
string |
A short description of the configuration change. |
Yes |
|
string |
The previous configuration value. |
Yes |
|
string |
The new configuration value. |
Yes |
|
string |
The name of the resource affected by the configuration change. |
Yes |
|
string |
A detailed description of the configuration change (optional). |
No |
|
string |
The source of the configuration change (default: |
No |
|
string |
The cluster where the configuration change occurred (default: |
No |
|
dict |
Extra labels for the alert (optional). |
No |
|
dict |
Extra annotations for the configuration change (optional). |
No |
|
string |
The name of the subject related to the configuration change (optional). |
No |
|
string |
The namespace of the subject related to the configuration change (optional). |
No |
|
string |
The node where the subject related to the configuration change is located (optional). |
No |
|
string |
The type of subject related to the configuration change (optional). |
No |
|
string |
A key identifying the service related to the configuration change (optional). |
No |
|
string |
A unique identifier for the configuration change (optional). |
No |
Example RequestΒΆ
Here is an example of a POST
request to send a list of configuration changes:
curl --location --request POST 'https://api.robusta.dev/api/config-changes' \
--header 'Authorization: Bearer API-KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
"account_id": "ACCOUNT_ID",
"config_changes": [
{
"title": "Updated test-service deployment",
"old_config": "apiVersion: apps/v1\nkind: Deployment\n....",
"new_config": "apiVersion: apps/v1...",
"resource_name": "test sercvice",
"description": "Changed deployemnt",
"source": "test-service",
"cluster": "prod-cluster-1",
"labels": {
"environment": "production"
},
"annotations": {
"env1": "true"
},
"subject_namespace": "prod",
"subject_node": "gke-prod-cluster-1-node-1"
}
]
}'
In this request, replace the following placeholders:
ACCOUNT_ID
: Your account ID, which can be found in yourgenerated_values.yaml
file.API-KEY
: Your API Key for authentication. You can generate this token by navigating to Settings -> API Keys -> New API Key.
Request HeadersΒΆ
Header |
Description |
---|---|
|
Bearer token for authentication (e.g., |
|
Must be set to |
Response FormatΒΆ
Success ResponseΒΆ
If the request is successful, the API will return the following response:
{
"success": true
}
Status Code: 200 OK
Error ResponseΒΆ
If there is an error in processing the request, the API will return the following format:
{
"msg": "Error message here",
"error_code": 123
}
Status Code: Varies based on the error (e.g., 400 Bad Request, 500 Internal Server Error).