Configuration¶
-
GET
/api/config
¶ Get Application config
Example request:
GET /api/config HTTP/1.1 Content-Type: application/json
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "data": { "gpx_limit_import": 10, "is_registration_enabled": false, "max_single_file_size": 1048576, "max_zip_file_size": 10485760, "max_users": 0, "map_attribution": "© <a href=http://www.openstreetmap.org/copyright>OpenStreetMap</a> contributors" }, "status": "success" }
- Status Codes
200 OK – success
500 Internal Server Error – Error on getting configuration.
-
PATCH
/api/config
¶ Update Application config
Authenticated user must be an admin
Example request:
GET /api/config HTTP/1.1 Content-Type: application/json
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "data": { "gpx_limit_import": 10, "is_registration_enabled": true, "max_single_file_size": 1048576, "max_zip_file_size": 10485760, "max_users": 10 }, "status": "success" }
- Parameters
auth_user_id (integer) – authenticate user id (from JSON Web Token)
- Request JSON Object
gpx_limit_import (integrer) – max number of files in zip archive
is_registration_enabled (boolean) – is registration enabled ?
max_single_file_size (integrer) – max size of a single file
max_zip_file_size (integrer) – max size of a zip archive
max_users (integrer) – max users allowed to register on instance
- Request Headers
Authorization – OAuth 2.0 Bearer Token
- Status Codes
200 OK – success
400 Bad Request – invalid payload
Provide a valid auth token.
Signature expired. Please log in again.
Invalid token. Please log in again.
403 Forbidden – You do not have permissions.
500 Internal Server Error – Error on updating configuration.