<commit_before># This file contains the Swagger UI configuration and API definitions
# for the Zulip REST API.
#
# For details on the Swagger/OpenAPI specification, see http://swagger.io/specification
#
# Our own documentation lives at
#
#   https://zulip.readthedocs.io/en/latest/swagger-api-docs.html
#
# Basic Swagger UI info
swagger: '2.0'
info:
  version: '1.0.0'
  title: Zulip REST API
  description: Powerful open source group chat
  contact:
    url: https://zulip.org/
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html

# Backend host to use for API examples.
# This defaults to the Swagger UI host,
# which in this case is also the Zulip host.
#host: 10.2.3.4:9991

# The base configuration for this API
basePath: /api/v1
schemes:
- http
- https
consumes:
- application/x-www-form-urlencoded
produces:
- application/json

######################
# Endpoint definitions

paths:

  /events:
    get:
      description: Get new events from an events queue
      operationId: getEvents
      parameters:
      - name: queue_id
        in: query
        description: The ID of a queue that you registered via `POST /api/v1/register`.
        required: true
        type: string
      - name: last_event_id
        in: query
        description: |
                     The highest event ID in this queue that you've received and
                     wish to acknowledge. See the code for `call_on_each_event` in
                     the zulip Python module for an example implementation of
                     correctly processing each event exactly once.
        required: true
        type: string
      - name: dont_block
        in: query
        description: |<commit_msg>docs: Document /dev_fetch_api_key API endpoint.<commit_after># This file contains the Swagger UI configuration and API definitions
# for the Zulip REST API.
#
# For details on the Swagger/OpenAPI specification, see http://swagger.io/specification
#
# Our own documentation lives at
#
#   https://zulip.readthedocs.io/en/latest/swagger-api-docs.html
#
# Basic Swagger UI info
swagger: '2.0'
info:
  version: '1.0.0'
  title: Zulip REST API
  description: Powerful open source group chat
  contact:
    url: https://zulip.org/
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html

# Backend host to use for API examples.
# This defaults to the Swagger UI host,
# which in this case is also the Zulip host.
#host: 10.2.3.4:9991

# The base configuration for this API
basePath: /api/v1
schemes:
- http
- https
consumes:
- application/x-www-form-urlencoded
produces:
- application/json

######################
# Endpoint definitions

paths:

  /dev_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.

                   ---

                   **This endpoint is only for development environments!**
                   It will not work if `settings.PRODUCTION` is set to `False`.
      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
      responses:
        '200':
          description: Success.
          schema:
            allOf:
            - $ref: '#/definitions/JsonSuccess'
            - required:
              - api_key
              - email
            - properties:
                api_key:
                  type: string
                  example: <KEY>
                email:
                  description: |
                               The email address for the user that owns the API
                               key.
                  type: string
                  example: <EMAIL>
                msg:
                  enum:
                    - ''

  /events:
    get:
      description: Get new events from an events queue
      operationId: getEvents
      parameters:
      - name: queue_id
        in: query
        description: The ID of a queue that you registered via `POST /api/v1/register`.
        required: true
        type: string
      - name: last_event_id
        in: query
        description: |
                     The highest event ID in this queue that you've received and
                     wish to acknowledge. See the code for `call_on_each_event` in
                     the zulip Python module for an example implementation of
                     correctly processing each event exactly once.
        required: true
        type: string
      - name: dont_block
        in: query
        description: |
{'fraction_non_alphanumeric': 0.07807377049180328, 'fraction_numerical': 0.008811475409836065, 'mean_word_length': 1.8644366197183098, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 6, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1043496', 'n_tokens_mistral': 1349, 'n_tokens_neox': 1295, 'n_words': 486}