{% extends "admin/base_site_nav.html" %} {% load rest_framework %} {% load i18n %} {% block content %}
{% blocktrans %} This page helps developers to learn and experiment with the REST API of frePPLe.
This API allows your application to exchange information with frePPLe is efficient and direct way.

The "list API" link takes you to the object list page.
And the "detail API" link takes you to a specific object when you enter the object's primary key.
In these pages you will be able to perform HTTP requests with methods GET, POST, OPTIONS, PUT, PATCH and DELETE.
The results can shown in JSON format or as HTML in your browser.

Using a tool like 'wget' or 'curl' you can access the API from the command line.
For instance, to return the list of all sales orders in JSON format:

wget --http-user=admin --http-password=admin http://127.0.0.1:8000/api/input/demand/?format=json

curl -H 'Accept: application/json; indent=4' -u admin:admin http://127.0.0.1:8000/api/input/demand/?format=json
{% endblocktrans %}
{% getMenu as menu %} {% for group in menu %} {% for item in group.1 %} {% if item.1.model and not item.1.excludeFromBulkOperations %} {% endif %} {% endfor %} {% endfor %}
{% trans 'List API' %}{% trans 'Detail API' %}
{{ group.0 }} - {{ item.0 }} {{request.prefix}}/api/{{ item.1.model|app_label }}/{{ item.1.model|short_model_name }}/ {{request.prefix}}/api/{{ item.1.model|app_label }}/{{ item.1.model|short_model_name }}/ /
{% endblock %}