==========================
Get Repository Information
==========================

:Path: ``api/json/repositories/{repository_id}/info/``


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

+----------------------------+---------+-------------------------------------+
| Parameter                  | Type    | Description                         |
+============================+=========+=====================================+
| repository_id              | Integer | The ID of the repository.           |
+----------------------------+---------+-------------------------------------+


HTTP GET
========

Returns server-generated information on a repository with the specified
``repository_id``.

Support for this is specific to certain types of repositories, and may
return an error.

Currently, only Subversion repositories support this.


Responses
---------

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

+-----------------+---------+-----------------------------------------------+
| Field           | Type    | Description                                   |
+=================+=========+===============================================+
| info.root_url   | String  | The base URL of the repository. Usually, this |
|                 |         | will be the same as ``info.url``.             |
+-----------------+---------+-----------------------------------------------+
| info.url        | String  | The URL to the repository as specified in     |
|                 |         | Review Board.                                 |
+-----------------+---------+-----------------------------------------------+
| info.uuid       | String  | The UUID of the repository, if available.     |
+-----------------+---------+-----------------------------------------------+


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

.. code-block:: javascript

    {
      stat: "ok",
      info: {
        url: "http://svn.example.com/",
        root_url: "http://svn.example.com/",
        uuid: "1234abcd-56ef-1010-abab-fedcba987654"
      }
    }


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.


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

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

The repository with the given ID does not exist on the server.


HTTP 500: Internal Server Error
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Error 210: Unknown Error
^^^^^^^^^^^^^^^^^^^^^^^^

There was an unknown error while attempting to fetch information on the
repository.


HTTP 501: Not Implemented
~~~~~~~~~~~~~~~~~~~~~~~~~

Error 209: Not Implemented
^^^^^^^^^^^^^^^^^^^^^^^^^^

The repository does not support this operation.


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