2
0
mirror of https://github.com/inventree/inventree-docs.git synced 2025-04-27 05:06:43 +00:00
Oliver Walters 3483c85380 Initial commit
- Copied from inventree.github.io
2020-09-21 22:19:42 +10:00

1.2 KiB

title, layout
title layout
InvenTree API page

InvenTree API

InvenTree provides a powerful REST API for interacting with inventory data on the server. Low-level data access and manipulation is available, with integrated user authentication and data validation

Documentation

The API is self-documenting, and the documentation is provided alongside any InvenTree installation instance. If (for example) you have an InvenTree instance running at http://127.0.0.1:8000 then the API documentation is available at http://127.0.0.1:8000/api-doc/

{% with id="api_doc", url="api/api_doc.png", description="API documentation" %} {% include 'img.html' %} {% endwith %}

Authentication

The API uses token-based authentication for fast data access. To obtain a valid token, perform a GET request to /api/user/token/ (no data are required).

!!! info "Credentials" Ensure that a valid username:password combination are supplied as basic authorization headers.

If the supplied user credentials are validated, the server will respond with:

HTTP_200_OK
{
    token: "usertokendatastring",
}

After reception of a valid authentication token, it can be subsequently used to perform token-based authentication.