From d4893dfcbc78999c8c987a9ec1d55aa0c3d96e9c Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Tue, 23 Apr 2019 11:30:38 -0700 Subject: [PATCH] docs: Make API endpoint docs link to materials on REQ. This should help avoid bugs like the one in the previous commit. --- docs/tutorials/documenting-api-endpoints.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/docs/tutorials/documenting-api-endpoints.md b/docs/tutorials/documenting-api-endpoints.md index cdfae7f6a8..9f9fcd5bcb 100644 --- a/docs/tutorials/documenting-api-endpoints.md +++ b/docs/tutorials/documenting-api-endpoints.md @@ -118,8 +118,15 @@ The best way to find out what arguments an API endpoint takes is to find the corresponding URL pattern in `zprojects/urls.py` and examining the backend function that the URL pattern points to. +To understand how arguments are specified in Zulip backend endpoints, +read our [REST API tutorial][rest-api-tutorial], paying special +attention to the details of how `REQ` works. + +[rest-api-tutorial]: ../tutorials/writing-views.html#writing-api-rest-endpoints + Be careful here! There's no currently automated testing verifying -that the arguments match the code. +that the arguments match the code, so you need to be sure that you +understand precisely how each argument is formatted. ## Displaying example payloads/responses