docs: Document /fetch_api_key API endpoint.

This commit is contained in:
Yago González 2017-06-25 18:17:15 +02:00 committed by showell
parent 30e8a04596
commit 1c3b0a8b03
1 changed files with 43 additions and 0 deletions

View File

@ -81,6 +81,49 @@ paths:
schema: schema:
$ref: '#/definitions/EventsResponse' $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: /messages:
get: get:
description: | description: |