diff --git a/swh/web/ui/templates/api-endpoints.html b/swh/web/ui/templates/api-endpoints.html index f3c98952..f6f3815f 100644 --- a/swh/web/ui/templates/api-endpoints.html +++ b/swh/web/ui/templates/api-endpoints.html @@ -1,60 +1,60 @@ {% extends "layout.html" %} -{% block title %}API Overview{% endblock %} +{% block title %}API endpoints overview{% endblock %} {% block content %}
This lists the current API endpoints for version 1. For a more general description, please refer to the main documentation.
{% for route, doc in doc_routes %} {% if 'tags' in doc and doc['tags'] is not none %} {% else %} {% endif %} {% endfor %}
Route Status Description
{{ route }}{{ ', '.join(doc['tags']) }}opened{{ doc['docstring'] | safe_docstring_display | safe }}
{% endblock %} diff --git a/swh/web/ui/templates/apidoc.html b/swh/web/ui/templates/apidoc.html index 9db969ef..4168bc97 100644 --- a/swh/web/ui/templates/apidoc.html +++ b/swh/web/ui/templates/apidoc.html @@ -1,123 +1,123 @@ {% extends "layout.html" %} -{% block title %}Software Heritage API{% endblock %} +{% block title %} API overview {% endblock %} {% block content %} {% if docstring %}
-

Overview

+

Description

{{ docstring | safe_docstring_display | safe }}
{% endif %} {% if response_data and response_data is not none %}

Request

{{ request.method }} {{ request.url }}
{% if headers_data and headers_data is not none %}

Headers

{% for header_name, header_value in headers_data.items() %}
{{ header_name }} {{ header_value | urlize_header_links | safe }}
{% endfor %} {% endif %}

Result

{{ response_data | escape_author_fields | urlize_api_links | safe }}
{% endif %}
{% for url in urls %} {% endfor %}
URL Allowed Methods
{{ url['rule'] }} {{ url['methods'] | sort | join(', ') }}

{% if args and args|length > 0 %}

Args

{% for arg in args %}
{{ arg['name'] }}: {{ arg['type'] }}
{{ arg['doc'] | safe_docstring_display | safe }}
{% endfor %}
{% endif %} {% if params and params|length > 0 %}

Params

{% for param in params %}
{{ param['name'] }}: string
{{ param['doc'] | safe_docstring_display | safe }}
{% endfor %}
{% endif %} {% if excs and excs|length > 0 %}

Raises

{% for exc in excs %}
{{ exc['exc'] }}
{{ exc['doc'] | safe_docstring_display | safe }}
{% endfor %}
{% endif %} {% if headers %}

Headers

{% for header in headers %}
{{ header['name'] }}: string
{{ header['doc'] | safe_docstring_display | safe }}
{% endfor %}
{% endif %} {% if return %}

Returns

{{ return['type'] }}
{{ return['doc'] | safe_docstring_display | safe }}
{% endif %} {% if examples %}

Examples

{% for example in examples %}
{{ example }}
{% endfor %}
{% endif %} {% endblock %}