From 1c3b0a8b03be3f1b08e6a3b87e4276bff0d3a788 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yago=20Gonz=C3=A1lez?= Date: Sun, 25 Jun 2017 18:17:15 +0200 Subject: [PATCH] docs: Document /fetch_api_key API endpoint. --- static/swagger/zulip.yaml | 43 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/static/swagger/zulip.yaml b/static/swagger/zulip.yaml index f5965adae7..60a93f8fff 100644 --- a/static/swagger/zulip.yaml +++ b/static/swagger/zulip.yaml @@ -81,6 +81,49 @@ paths: schema: $ref: '#/definitions/EventsResponse' + /fetch_api_key: + post: + description: | + Gather a token bound to a user account, to identify and + authenticate them when making operations in the API. + + This token must be used as the password in the rest of the + endpoints that require Basic authentication. + operationId: zerver.views.auth.api_fetch_api_key + parameters: + - name: username + in: formData + description: The email address for the user that owns the API key. + required: true + type: string + - name: password + in: formData + description: The password for the account of the API key's owner. + required: true + type: string + responses: + '200': + description: Success. + schema: + allOf: + - $ref: '#/definitions/JsonSuccess' + - required: + - api_key + - email + - properties: + api_key: + type: string + example: c2hvdWxuJ3QgdSBiZSB3b3JraW5nPzsp + email: + description: | + The email address for the user that owns the API + key. + type: string + example: iago@zulip.com + msg: + enum: + - '' + /messages: get: description: |