============================
Publish Review Request Draft
============================

:Path: ``api/json/reviewrequests/{review_request_id}/draft/publish/``


URL Parameters
==============

+-------------------+---------+-------------------------------------+
| Parameter         | Type    | Description                         |
+===================+=========+=====================================+
| review_request_id | Integer | The ID of the review request.       |
+-------------------+---------+-------------------------------------+


HTTP POST
=========

Publishes the draft of the specified review request.

Depending on server settings, this may trigger external notifications, such
as an e-mail to all reviewers.

Generally, it's better to use :ref:`publish-review-request`. It will perform
the same operation, but will take care to make sure the review request
itself is public.


Example Request
---------------

.. code-block:: none

    POST /api/json/reviewrequests/12321/draft/publish/


Responses
---------

HTTP 200: Success
~~~~~~~~~~~~~~~~~

On success, no payload data beyond the ``stat`` field will be sent.


Example Response
^^^^^^^^^^^^^^^^

.. code-block:: javascript

    {
      stat: "ok",
    }


HTTP 401: Unauthorized
~~~~~~~~~~~~~~~~~~~~~~

Error 103: Not Logged In
^^^^^^^^^^^^^^^^^^^^^^^^

The client making the request is not logged in.

See :ref:`authenticating` for more information.


HTTP 403: Forbidden
~~~~~~~~~~~~~~~~~~~

Error 101: Permission Denied
^^^^^^^^^^^^^^^^^^^^^^^^^^^^

The user the client is logged in as doesn't have permission to publish the
draft.


HTTP 404: Not Found
~~~~~~~~~~~~~~~~~~~

Error 100: Does Not Exist
^^^^^^^^^^^^^^^^^^^^^^^^^

The review request doesn't have an associated draft.


.. comment: vim: ft=rst et ts=3
