mirror of
https://github.com/j3ssie/osmedeus.git
synced 2026-08-20 14:42:31 +02:00
1.7 KiB
1.7 KiB
Settings
Manage server configuration settings.
Get YAML Configuration
Get the entire YAML configuration file with sensitive fields redacted. Fields containing _key, secret, password, username, or _token are replaced with [REDACTED].
curl http://localhost:8002/osm/api/settings/yaml \
-H "Authorization: Bearer $TOKEN"
Response: (text/yaml)
# =============================================================================
# Osmedeus Configuration File
# =============================================================================
base_folder: ~/osmedeus-base
environments:
binaries_path: "{{base_folder}}/binaries"
# ... more config
server:
host: "0.0.0.0"
port: 8002
workspace_prefix_key: "[REDACTED]"
simple_user_map_key: "[REDACTED]"
jwt:
secret_signing_key: "[REDACTED]"
expiration_minutes: 180
database:
host: ""
port: 5432
username: "[REDACTED]"
password: "[REDACTED]"
# ... more config
Update YAML Configuration
Replace the entire YAML configuration file with new content. A backup of the existing configuration is created before overwriting.
curl -X PUT http://localhost:8002/osm/api/settings/yaml \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: text/yaml" \
--data-binary @new-config.yaml
Request Body: Raw YAML configuration content
Response:
{
"message": "Configuration updated successfully",
"path": "/home/user/osmedeus-base/osm-settings.yaml",
"backup": "/home/user/osmedeus-base/osm-settings.yaml.backup"
}
Error Response (Invalid YAML):
{
"error": true,
"message": "Invalid YAML configuration: yaml: unmarshal errors: ..."
}