Configuration¶
- GET /api/config¶
Obtenir la configuration de l’application.
Exemple de requête :
GET /api/config HTTP/1.1 Content-Type: application/json
Exemple de réponse :
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.4", "weather_provider": null }, "status": "success" }
- Codes d’état:
200 OK –
success
500 Internal Server Error –
error on getting configuration
- PATCH /api/config¶
Mettre à jour de la configuration de l’application.
Scope :
application:write
Rôle minimum: Administrateur
Exemple de requête :
GET /api/config HTTP/1.1 Content-Type: application/json
Exemple de réponse :
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.4", "weather_provider": null }, "status": "success" }
- Objet JSON de requête:
about (string) – informations de l’instance
admin_contact (string) – adresse électronique pour contacter l’administrateur
gpx_limit_import (integer) – nombre maximum de fichiers dans l’archive zip
is_registration_enabled (boolean) – l’inscription est-elle activée ?
max_single_file_size (integer) – taille maximale d’un fichier
max_users (integer) – nombre maximum d’utilisateurs autorisés à s’inscrire sur l’instance
max_zip_file_size (integer) – taille maximale d’une archive zip
privacy_policy (string) – politique de confidentialité de l’instance
stats_workouts_limit (integer) – nombre maximum de séances pour les statistiques d’un sport
- En-têtes de requête:
Authorization – Jeton “OAuth 2.0 Bearer”
- Codes d’état:
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
'gpx_limit_import' must be less than 2147483647
'max_single_file_size' must be less than 2147483647
'max_zip_file_size' must be less than 2147483647
'max_users' must be less than 2147483647
'stats_workouts_limit' must be less than 2147483647
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