mirror of
https://github.com/inventree/InvenTree.git
synced 2025-10-10 03:02:19 +00:00
Documentation integration (#4653)
* Add documentation under docs/ directory * Add CI workflow for mkdocs configuration checking * Add documentation issue template * update pip-tools? * Update .gitignore files * Fix .gitignore rules * Improve release notes page * remove references to old repo
This commit is contained in:
.github
.gitignore.pre-commit-config.yamlCONTRIBUTING.mdRELEASE.mddocs
.gitignoreLICENSEREADME.mdmain.pymkdocs.ymlrequirements.txt
readthedocs.yml_includes
app_img.htmlcarousel.htmlgunicorn.conf.pyimg.html
overrides
release_table.htmlrelease_table_head.htmlrelease_table_tail.htmlsplide_image.htmlci
docs
api
app
app.mdbarcode.mdconnect.mdissues.mdnavigation.mdpart.mdpo.mdprivacy.mdsearch.mdsettings.mdstock.mdtranslation.md
assets
favicon.icologo.pngopen-in-new-custom.svgpaypal-logo-small-min-300x136.png
images
admin
admin.pngadmin_errors.pngadmin_errors_link.pngedit_part.pngexport.pngfilter.pngformats.pngimport.pngimport_error.pngimport_preview.pngimport_upload.pngpart_cats.pngroles.pngshell.pngtest_report_add.pngusers_groups.png
api
api_browse.pngapi_category_options.pngapi_detail.pngapi_doc.pngapi_english.pngapi_filters.pngapi_german.pngapi_metadata_fields.pngapi_roles.pngapi_roles_2.png
app
add_server_profile.pngapp_global_navigation.pngapp_settings.pngapp_tabs.pngcategory_actions_tab.pngcategory_parts_filter.pngcategory_parts_tab.pngconnected.pngcontext_actions.pngdetails.jpgdrawer.pngedit_server.pnghome.pnghome_settings.pnginitial.pnglocation_actions.pnglocation_detail.pnglocation_stock.pnglocation_stock_filter.jpgnew_category.jpgnew_location.jpgnew_part.jpgnew_stock_item.jpgnew_stock_item_from_location.jpgno_profiles.pngpart_attachments.jpgpart_category_detail.pngpart_category_edit.jpgpart_details.pngpart_edit.jpgpart_image.jpgpart_notes.jpgpart_stock.pngpo_detail.pngpo_edit.pngpo_lines.pngpo_list.pngpo_stock.pngsearch_1.pngsearch_2.pngselect_server.jpgsettings.pngstock_actions.pngstock_add.pngstock_count.pngstock_detail.pngstock_edit.jpgstock_print_label_1.pngstock_print_label_2.pngstock_remove.pngstock_transfer.pngunauthorized.png
appgallery
Screenshot_1681915372.pngScreenshot_1681915404.pngScreenshot_1681915412.pngScreenshot_1681915508.pngScreenshot_1681915510.pngScreenshot_1681915518.pngScreenshot_1681915536.pngScreenshot_1681915545.pngScreenshot_1681915557.png
barcode
barcode_link_1.pngbarcode_link_2.pngbarcode_no_match.pngbarcode_scan.pngbarcode_settings.pngbarcode_unlink.png
build
auto_allocate_dialog.pngbom_add_item.pngbom_consumable_item.pngbom_expanded.pngbom_export.pngbom_flat.pngbom_invalid.pngbom_select_fields.pngbom_select_parts.pngbom_substitute_item.pngbom_upload_file.pngbom_valid.pngbuild_allocate.pngbuild_allocate_detail.pngbuild_allocate_tracked_parts.pngbuild_allocation_expand.pngbuild_attachments.pngbuild_auto_allocate.pngbuild_childs.pngbuild_complete.pngbuild_consumable_item.pngbuild_create_from_part.pngbuild_details.pngbuild_display.pngbuild_list.pngbuild_notes.pngbuild_output_complete.pngbuild_outputs.pngbuild_tree.pngcomplete_build.pnginherited_bom.drawioinherited_bom.pngreport-61.png
buy
manufacturer_list.pngpo_duplicate.pngpo_duplicate_2.pngpo_duplicate_3.pngpo_list.pngsupplier_list.pngsupplier_part_availability.pngupdate_availability.png
indexgallery
bom_add_item.pngbuild_details.pngbuild_outputs.pngcategory_params.pngcategory_subcats.pngmanufacturers.pngpart_admin.pngpart_category.pngpart_stock.pngpart_suppliers.pngstock_item.pngstock_item_2.pngstock_location.pngstock_location_2.pngsuppliers.png
paper_splash.jpgpart
cat_subs.pngcategory_notification.pngcreate_initial_stock_option.pngcreate_part_parameter.pngcreate_part_variant.pngenable_template_part.pngnew_part.pngnotification_flyout.pngnotification_header.pngnotification_history.pngnotification_inbox.pngparametric_table_example.pngparametric_table_tab.pngpart_category.pngpart_create_form.pngpart_create_supplier.pngpart_image_example.pngpart_image_upload.pngpart_initial_stock.pngpart_ipn_editing.pngpart_list_hover.pngpart_manufacturers_suppliers.pngpart_new_suppliers.pngpart_overview.pngpart_parameters_example.pngpart_related.pngpart_related_setting.pngpart_stock.pngpart_stocktake_enable_tab.pngpart_stocktake_from_category.pngpart_stocktake_from_location.pngpart_stocktake_from_part.pngpart_stocktake_generate.pngpart_stocktake_report_table.pngpart_stocktake_settings.pngpart_stocktake_tab.pngpart_subscribe_off.pngpart_subscribe_on.pngpart_tabs.pngpart_test_templates.pngpart_view_intro.pngpricing_bom.pngpricing_internal.pngpricing_overview.pngpricing_purchase_history.pngpricing_sale_history.pngpricing_sale_price_breaks.pngpricing_supplier.pngpricing_variants.pngscheduling.png
plugin
app_locate.pngbuttons.pngcheck_on_startup.pngmouser.pngpanels.pngplugin_install_web.pngprint_label_select_plugin.pngweb_locate.png
report
add_report_template.pngbom_example.pngfilters_invalid.pngfilters_valid.pnglabel_example.pnglabel_stock_print_multiple.pnglabel_stock_print_single.pngpicklist.pngpicklist_with_path.pngreport.pngtest_report_example.pngtest_report_filters.png
sell
complete_shipment.pngcomplete_shipment_action.pngcompleted_shipments.pngedit_shipment.pngpending_shipments.pngreturn_order_create.pngreturn_order_detail.pngreturn_order_enable.pngreturn_order_index.pngreturn_order_navbar.pngso_list.png
settings
social_account_add.pngsocial_application_configure.pngsso_config.pngsso_settings.pngtheme_dark.pngtheme_default.pnguser_account.pnguser_display.pnguser_home.pnguser_notifications.pnguser_reporting.pnguser_search.png
start
stock
batch_and_serial.pngbatch_code_template.pngenable_stock_expiry.pngenable_stock_owner.pngexpiry_date_create.pngexpiry_date_edit.pngitem_expired.pngpart_expiry.pngpart_expiry_display.pngsell_build_expired_stock.pngserial_error_quantity.pngserial_error_unique.pngserial_next.pngserial_numbers_unique.pngstock_add.pngstock_count.pngstock_item_merge.pngstock_item_owner.pngstock_location_owner.pngstock_move.pngstock_options.pngstock_owner_type.pngstock_remove.pngstock_status_change_multiple.pngstock_status_change_multiple_done.pngstock_status_label.pngstock_status_label_updated.pngstock_table_expiry.pngtest_results.png
barcodes
build
buy
credits.mddemo.mdextend
how_to_plugin.mdintegrate.mdplugins.md
faq.mdfeatures.mdhooks.pyindex.mdplugins
action.mdapi.mdapp.mdbarcode.mdevent.mdinstall.mdlabel.mdlocate.mdnavigation.mdpanel.mdreport.mdschedule.mdsettings.mdurls.mdvalidation.md
themes.mdjavascripts
brands.jsextra.jsfontawesome.jsregular.jssolid.jssplide.esm.jssplide.jssplide.min.jssplide.min.js.gz
part
create.mdnotification.mdparameter.mdpart.mdpricing.mdscheduling.mdstocktake.mdtemplate.mdtest.mdtrackable.mdviews.md
privacy.mdreleases
0.1.4.md0.1.5.md0.1.6.md0.1.7.md0.1.8.md0.2.0.md0.2.1.md0.2.2.md0.2.3.md0.2.4.md0.3.0.md0.4.0.md0.4.1.md0.4.2.md0.4.3.md0.4.4.md0.4.5.md0.4.6.md0.5.0.md0.5.1.md0.5.2.md0.5.3.md0.5.4.md0.6.0.md0.6.1.md0.6.2.md0.6.3.md0.6.4.md0.7.0.md0.7.1.md0.8.0.mdrelease_notes.md
report
barcodes.mdbom.mdbuild.mdcontext_variables.mdhelpers.mdlabels.mdpurchase_order.mdreport.mdreturn_order.mdsales_order.mdtest.md
sell
settings
MFA.mdSSO.mdadmin.mdemail.mdexport.mdglobal.mdimport.mdlogs.mdpermissions.mdreference.mdtasks.mduser.md
start
backup.mdconfig.mddevelopment.mddocker.mddocker_dev.mddocker_prod.mdinstall.mdinstaller.mdintro.mdmigrate.mdproduction.mdserving_files.md
stock
stylesheets
bootstrap.cssbootstrap.css.mapbrands.cssextra.cssregular.csssolid.csssplide-core.min.csssplide.min.css
terminology.mdthemes
webfonts
44
docs/docs/api/bulk_delete.md
Normal file
44
docs/docs/api/bulk_delete.md
Normal file
@@ -0,0 +1,44 @@
|
||||
---
|
||||
title: Bulk Deletion
|
||||
---
|
||||
|
||||
## Bulk Deletion
|
||||
|
||||
While deleting items individually via the API is supported, it can prove inefficient (time consuming) when multiple items are to be deleted sequentially.
|
||||
|
||||
For example, if the user wishes to delete a large number items (such as lines from a [Bill of Materials](../build/bom.md)), these items are deleted sequentially, with each `DELETE` separate request requiring network transfer, database access, cleanup, etc.
|
||||
|
||||
A much more efficient approach is to allow for "bulk deletion" of multiple database items in a single transaction. This means that only one network request is required, and only a single database access request.
|
||||
|
||||
So, InvenTree supports a custom "bulk deletion" endpoint which is available for some database models.
|
||||
|
||||
## Item Filtering
|
||||
|
||||
In a "regular" `DELETE` action, the pk (primary key) of the target object is provided, to designate which object is going to be removed from the database:
|
||||
|
||||
`DELETE /api/part/10/`
|
||||
|
||||
However this approach does not work if we wish to delete multiple items. To determine which items are to be deleted, additional data can be added to the query (as you would do with a normal `POST` request, for example).
|
||||
|
||||
### Primary Key Values
|
||||
|
||||
The request can specify a list of individual pk (primary key) values to delete, using the `items` variable:
|
||||
|
||||
```json
|
||||
{
|
||||
"items": [1, 10, 50, 99]
|
||||
}
|
||||
```
|
||||
|
||||
### Filters
|
||||
|
||||
The request can also specify a list of filters to be applied to the database query. Any items which match the filters will be deleted. Here, use the `filters` variable:
|
||||
|
||||
```
|
||||
{
|
||||
"filters": {
|
||||
"active": False,
|
||||
"category": 7.
|
||||
}
|
||||
}
|
||||
```
|
Reference in New Issue
Block a user