guibranco / guibranco/gstraccini-bot-api

The API should have an endpoint to list actual settings.

Open
#4 3 comments 1 reaction 0 assignees View on GitHub
👷🏼 infrastructure 🕓 medium effort enhancement gitauto good first issue hacktoberfest help wanted 🧪 tests
Dominant language
Shell
Stars
1
Forks
0
Avg merge
1m
Merged PRs (30d)
1

Description

### Description
The API should provide an endpoint that allows users to retrieve a list of the current or "actual" settings that are actively being applied. This endpoint will offer an overview of the system’s current configuration, providing key settings and their respective values.

### Rationale
1. **Configuration Visibility**: Access to actual settings allows users and administrators to see the currently applied configurations in real-time, helping with diagnostics and system monitoring.
2. **Consistency**: Ensures users and applications can programmatically fetch the exact settings being used, eliminating confusion about potential differences between stored and applied settings.
3. **Auditing and Monitoring**: This feature enables automation in auditing settings, ensuring compliance with organizational policies.
4. **Troubleshooting**: Having an endpoint that exposes active settings helps identify misconfigurations or unintended changes.

### Expected Behavior
1. A new endpoint, such as `/actual-settings`, returns a JSON object of all currently applied settings.
2. The response should include:
- Setting name
- Value
- Category or section (if applicable)
- Timestamp of the last update (optional)

### API Example
```http
GET /actual-settings
```

### Sample Response

```json
{
"settings": [
{
"name": "owner",
"value": "guibranco",
"category": "github",
"last_updated": "2024-09-12T14:25:00Z"
},
{
"name": "botname",
"value": "gstraccini",
"category": "system",
"last_updated": "2024-09-10T09:15:00Z"
}
]
}
```

### Additional Notes
- Consider adding filters to the endpoint to narrow down settings by category or specific criteria (e.g., only show network-related settings).
- Implement pagination support for large configurations.
- Ensure the endpoint can handle dynamic configurations, reflecting any changes made without requiring a system restart.
- It would be useful to include metadata such as when the setting was last updated or changed.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.