Files
InvenTree/docs/docs/plugins/mixins/action.md
T
Oliver 6b08e45eac Docs refactor (#9545)
* Refactor / reognaize docs structure

* Refactor plugin docs structure

* More refactoring / cleanup

* Update build images

* Gallery updates

* Order images

* Update part docs

* Settings images

* Stock images

* Reitntroduce gallery

* Add custom icon macro

* Update icons

* Cleanup

* Fix link

* Fix internal links

* Revert some page moves

* Fix links

* Fix links
2025-04-22 08:18:32 +10:00

804 B

title
title
Action Plugins

ActionMixin

Arbitrary "actions" can be called by POSTing data to the /api/action/ endpoint. The POST request must include the name of the action to be performed, and a matching ActionPlugin plugin must be loaded by the server. Arbitrary data can also be provided to the action plugin via the POST data:

POST {
    action: "MyCustomAction",
    data: {
        foo: "bar",
    }
}

Sample Plugin

A sample action plugin is provided in the InvenTree source code, which can be used as a template for creating custom action plugins:

::: plugin.samples.integration.simpleactionplugin.SimpleActionPlugin options: show_bases: False show_root_heading: False show_root_toc_entry: False show_source: True members: []