================
Get Repositories
================

:Path: ``api/json/repositories/``


HTTP GET
========

Returns a list of visible repositories on the server.


Responses
---------

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

+--------------+----------------------+-------------------------------------+
| Field        | Type                 | Description                         |
+==============+======================+=====================================+
| repositories | Array of Repository_ | The list of visible repositories.   |
+--------------+----------------------+-------------------------------------+

.. _Repository: ../../datatypes/repository


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

.. code-block:: javascript

    {
      stat: "ok",
      repositories: [
        {
          id: 1,
          name: "Review Board",
          path: "git://github.com/reviewboard/reviewboard.git",
          tool: "Git"
        },
      ]
    }


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

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

The client making the request is not logged in and the server disallows
anonymous access.

See :ref:`authenticating` for more information.


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