Skip to content

Development environment on Linux

EdwardO edited this page Nov 13, 2026 · 7 revisions

API Application for camptocamp.org

The development environment is documented with the code, and kept up to date there:

Requests examples

Get the list of waypoints:

GET http://localhost:6543/waypoints

Get waypoint with id=1:

GET http://localhost:6543/waypoints/1

Insert a waypoint:

curl -X POST -v \
-H "Content-Type: application/json" \
-d '{"waypoint_type": "summit", "elevation": 3779, "geometry": {"geom": "{\"type\": \"Point\", \"coordinates\": [635956, 5723604]}"},"locales": [{"lang": "fr", "title": "Mont Pourri"}]}' \
http://localhost:6543/waypoints

Updating a waypoint:

curl -X PUT -v \
-H "Content-Type: application/json" \
-d '{"message": "Comment about change", "document": {"elevation": 4633, "maps_info": null, "version": 1, "document_id": 1, "waypoint_type": "summit", "locales": [{"lang": "fr", "version": 1, "title": "Mont Rose", "access": null, "description": null}]}}' \
http://localhost:6543/waypoints/1

(Writes need a logged-in user: add -H "Authorization: JWT token=\"<token>\"" with the token answered by POST /users/login.)

Production checks

Check the Discourse forum is up and available to the client API:

scripts/check_discourse_connection.sh [id]

"id" is a v6 user id. The script should return a 200OK.

Clone this wiki locally