=====================
Delete Review Request
=====================

:Path: ``api/json/reviewrequests/{review_request_id}/delete/``


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

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


HTTP POST
=========

Deletes a review request.

This will delete a review request and all associated reviews from the
database. This is a permanent operation. There is no way to undo the deletion
of a review request. In most cases, it's best to just close the review
request.

In order to delete a review request, the logged in user must have the
``reviews.delete_reviewrequest`` permission set.


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

.. code-block:: none

    POST /api/json/reviewrequests/12321/close/delete/


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 to the server.

See :ref:`authenticating` for more information.


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

The user the client is logged in as doesn't have permission to delete
the review request.


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

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

The review request with the given ``review_request_id`` does not exist on the
server.


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