API Settings Documentation
/net/api/settings
This endpoint allows you to retrieve and update various application settings. It provides a centralized way to manage configurations that affect the behavior of the system.
GET /net/api/settings
Retrieves the current application settings.
Request
No request body or parameters are required for this operation.
Response
A JSON object containing the current settings. The structure of the response may vary, but it typically includes:
theme(string): The current UI theme (e.g., "light", "dark").notifications_enabled(boolean): Whether notifications are globally enabled.language(string): The default language for the application.timezone(string): The configured timezone.maintenance_mode(boolean): Indicates if maintenance mode is active.max_upload_size_mb(integer): The maximum allowed file upload size in megabytes.
Example Response
{
"theme": "dark",
"notifications_enabled": true,
"language": "en-US",
"timezone": "America/New_York",
"maintenance_mode": false,
"max_upload_size_mb": 50
}
PUT /net/api/settings
Updates one or more application settings.
Request Body
A JSON object where keys are the settings to update and values are their new values. Only include the settings you wish to modify.
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
theme |
string | The desired UI theme (e.g., "light", "dark", "system"). | No |
notifications_enabled |
boolean | Set to true to enable notifications, false to disable. |
No |
language |
string | The language code for the application (e.g., "en-US", "es-ES"). | No |
timezone |
string | The IANA timezone identifier (e.g., "Europe/London"). | No |
maintenance_mode |
boolean | Set to true to enable maintenance mode, false to disable. |
No |
max_upload_size_mb |
integer | The maximum allowed file upload size in megabytes. Must be a positive integer. | No |
Example Request Body
{
"theme": "light",
"notifications_enabled": false,
"max_upload_size_mb": 100
}
Response
Returns the updated settings object upon successful update. If only a partial update was requested, the response will reflect the fully updated state.
Example Response
{
"theme": "light",
"notifications_enabled": false,
"language": "en-US",
"timezone": "America/New_York",
"maintenance_mode": false,
"max_upload_size_mb": 100
}
Error Responses
400 Bad Request: If the request body is malformed or contains invalid data types.401 Unauthorized: If the user is not authenticated.403 Forbidden: If the authenticated user does not have permission to modify settings.500 Internal Server Error: If an unexpected server error occurs.
Authentication
All requests to modify settings (PUT) require authentication. Typically, this is done via API keys or OAuth tokens passed in the Authorization header.
Retrieving settings (GET) may or may not require authentication depending on the application's configuration. Refer to the specific API documentation for details.
Rate Limiting
To ensure fair usage and system stability, this endpoint is subject to rate limiting. Exceeding the limits may result in 429 Too Many Requests responses.
Consult the general API documentation for current rate limit policies.