diff --git a/pagure/doc/api.rst b/pagure/doc/api.rst index 265345d..12d4ac7 100644 --- a/pagure/doc/api.rst +++ b/pagure/doc/api.rst @@ -1,11 +1,3 @@ -Pagure API v0 Reference -======================= - -Overview --------- - -This documentation describes the Pagure API v0. - Authentication ~~~~~~~~~~~~~~ @@ -16,6 +8,12 @@ When sending HTTP request, include ``Authorization`` field in the header with value ``token $your-api-token``, where ``$your-api-token`` is the API token generated in the project setting page. +So the result should look like: + +:: + + Authorization: token $your-api-token + Anyone with the token can access the APIs on your behalf, so please be sure to keep it private and safe. @@ -23,8 +21,9 @@ Request Encoding ~~~~~~~~~~~~~~~~ The payload of POST and GET requests is encoded as -``application/x-www-form-urlencoded``. This is an example URL of a GET -request: +``application/x-www-form-urlencoded``. + +This is an example URL of a GET request: ``https://pagure.io/api/0/test/issues?status=Open&tags=Pagure&tags=Enhancement`` Return Encoding diff --git a/pagure/templates/api.html b/pagure/templates/api.html index a6be470..c7d7ed1 100644 --- a/pagure/templates/api.html +++ b/pagure/templates/api.html @@ -6,7 +6,10 @@ {% block content %} -{{ api_doc }} +

Pagure API Reference

+

This documentation describes the Pagure API v0.

+ +{{ api_doc |replace('h1', 'h2') }}

List of the API endpoints: