Config API
Manage agent configuration with automatic versioned backups. The system keeps the last 10 configuration backups and allows restoring to any previous version.Get current configuration
Response
| Field | Type | Description |
|---|---|---|
config | object | The current agent configuration |
backups | array | List of available backups (id and timestamp only) |
backups[].id | string | Unique backup identifier |
backups[].timestamp | string | ISO 8601 timestamp when the backup was created |
Save configuration
Request body
| Field | Type | Required | Description |
|---|---|---|---|
config | object | Yes | The new configuration object to save. Must be a valid JSON object. |
Response
| Field | Type | Description |
|---|---|---|
success | boolean | true when the configuration was saved |
config | object | The newly saved configuration |
backupId | string | Identifier of the backup created from the previous configuration |
backups | array | Updated list of available backups (id and timestamp only) |
Errors
| Code | Description |
|---|---|
| 400 | Invalid config object — the config field is missing or is not an object |
| 400 | Config is not valid JSON — the config object cannot be serialized as valid JSON |
| 400 | Invalid request body — the request body is not valid JSON |
Restore a backup
Request body
| Field | Type | Required | Description |
|---|---|---|---|
backupId | string | Yes | The identifier of the backup to restore |
Response
| Field | Type | Description |
|---|---|---|
success | boolean | true when the configuration was restored |
config | object | The restored configuration |
restoredFrom | string | Identifier of the backup that was restored |
backups | array | Updated list of available backups (id and timestamp only) |
Errors
| Code | Description |
|---|---|
| 400 | Missing backupId — the backupId field is missing from the request body |
| 400 | Invalid request body — the request body is not valid JSON |
| 404 | Backup not found — no backup exists with the given identifier |