{% extends "api_docs/base.html" %} {% block extra_head %} {% endblock %} {% block extra_section %} class="single_page"{% endblock %} {% block main_content %}

Django Interactive API Documentation

Overview

Default Template. Can be over-written by making a api_docs/apis.html.

Formats

APIs should return JSON by default with XML as an option, but should be discouraged from use as much as possible. JSON is faster, and more lightweight than XML, and considering that many developers use javascript to consume APIs, what could be better than receiving an object back?

Interface

Long gone are the days of SOAP and other crappy implmenations of http based APIs. Why all the fuss over schemas, methods, and properties, when you can just send an HTTP string with a given header and receive the data you exepect? Seriously, REST is the only method you'll see me using.

{% for api in apis %}

{{ api.name }}

{% for api_thing in api.apiobject_set.all %}

{{ api_thing.name }}

{% for method in api_thing.apimethod_set.published %}
{{ method.get_type_display }}

{{ method.short_description }}

{{ method.display_url }}

{{ method.description }}

{% if method.parameter.all %}
Parameters
{% for param in method.parameter.all %} {% endfor %}
Parameter Value Required Type Description Default
{{ param.name }} {% if param.type == 'text' %} {% endif %} {% if param.type == 'no_input' %} {{ param.default_value }} {% endif %} {{ param.required|yesno:"Yes,No" }} {{ param.var_type }} {{ param.description }} {{ param.default_value }}
{% endif %} Call this methodClear
Call
{{ method.get_type_display }}: {{ method.api_url }}
{% endfor %}
{% endfor %} {% endfor %} {% endblock %}