diff --git a/templates/zerver/api_content.json b/templates/zerver/api_content.json index 087f584137..6003409ade 100644 --- a/templates/zerver/api_content.json +++ b/templates/zerver/api_content.json @@ -1,7 +1,7 @@ [ { "method": "POST", - "endpoint": "/api/v1/messages", + "endpoint": "messages", "example_response": "{'msg': '', 'result': 'success', 'id': 12345678}", "returns": [ [ @@ -35,7 +35,7 @@ }, { "method": "POST", - "endpoint": "/api/v1/register", + "endpoint": "register", "example_response": "{'msg': '', 'last_event_id': -1, 'result': 'success', 'queue_id': '1375801870:2942'}", "returns": [ [ @@ -65,7 +65,7 @@ }, { "method": "GET", - "endpoint": "/api/v1/events", + "endpoint": "events", "example_response": "{'result': 'success', 'msg': '', diff --git a/zerver/views/__init__.py b/zerver/views/__init__.py index 6dbd92bd10..cde9c4e764 100644 --- a/zerver/views/__init__.py +++ b/zerver/views/__init__.py @@ -485,6 +485,7 @@ def api_endpoint_docs(request): calls = ujson.loads(raw_calls) langs = set() for call in calls: + call["endpoint"] = "%s/v1/%s" % (settings.EXTERNAL_API_URI, call["endpoint"]) call["example_request"]["curl"] = call["example_request"]["curl"].replace("https://api.zulip.com", settings.EXTERNAL_API_URI) response = call['example_response'] if not '\n' in response: