Configuration¶
- GET /api/config¶
Get Application configuration.
Example request:
GET /api/config HTTP/1.1 Content-Type: application/json
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "data": { "about": null, "admin_contact": "admin@example.com", "gpx_limit_import": 10, "is_email_sending_enabled": true, "is_registration_enabled": false, "max_single_file_size": 1048576, "max_users": 0, "max_zip_file_size": 10485760, "map_attribution": "© <a href=http://www.openstreetmap.org/copyright>OpenStreetMap</a> contributors", "privacy_policy": null, "privacy_policy_date": null, "stats_workouts_limit": 10000, "version": "0.9.1", "weather_provider": null }, "status": "success" }
- Status Codes:
200 OK –
success
500 Internal Server Error –
error on getting configuration
- PATCH /api/config¶
Update Application configuration.
Scope:
application:write
Minimum role: Administrator
Example request:
GET /api/config HTTP/1.1 Content-Type: application/json
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "data": { "about": null, "admin_contact": "admin@example.com", "gpx_limit_import": 10, "is_email_sending_enabled": true, "is_registration_enabled": false, "max_single_file_size": 1048576, "max_users": 10, "max_zip_file_size": 10485760, "map_attribution": "© <a href=http://www.openstreetmap.org/copyright>OpenStreetMap</a> contributors", "privacy_policy": null, "privacy_policy_date": null, "stats_workouts_limit": 10000, "version": "0.9.1", "weather_provider": null }, "status": "success" }
- Request JSON Object:
about (string) – instance information
admin_contact (string) – email to contact the administrator
gpx_limit_import (integer) – max number of files in zip archive
is_registration_enabled (boolean) – is registration enabled?
max_single_file_size (integer) – max size of a single file
max_users (integer) – max users allowed to register on instance
max_zip_file_size (integer) – max size of a zip archive
privacy_policy (string) – instance privacy policy
stats_workouts_limit (integer) – max number of workouts for sport statistics
- Request Headers:
Authorization – OAuth 2.0 Bearer Token
- Status Codes:
200 OK –
success
invalid payload
max size of zip archive must be greater than 0
max size of zip archive must be equal or greater than max size of uploaded files
max size of uploaded files must be greater than 0
max files in a zip archive must be greater than 0
max users must be greater than or equal to 0
max number of workouts for statistics must be greater than or equal to 0
valid email must be provided for admin contact
provide a valid auth token
signature expired, please log in again
invalid token, please log in again
valid email must be provided for admin contact
you do not have permissions
you do not have permissions, your account is suspended
500 Internal Server Error –
error when updating configuration