Delete Item(s)
Delete one or more items from ITSM-NG.Endpoint
Headers
Session token obtained from initSession
Optional authorization string from API configuration
Must be
application/jsonURL Parameters
The unique identifier of the item to delete. Optional if provided in the request body.
Query Parameters
If the itemtype has a trashbin, set to
true to permanently delete (purge) instead of soft deleteSet to
false to disable saving deletion in global historyRequest Body (Alternative)
For single item: an object with
id fieldFor multiple items: an array of objects, each containing an id fieldForce permanent deletion (can also be set via query parameter)
Enable/disable history logging (can also be set via query parameter)
The
id parameter in the URL takes precedence over the id in the request body.Response
true if deletion succeeded, false if failedStatus message or error description
Response Codes
200 OK- Multiple items deleted204 No Content- Single item deleted successfully207 Multi-Status- Bulk operation with some failures400 Bad Request- Invalid input parameters401 Unauthorized- Invalid or missing session token404 Not Found- Item not found
Delete Single Item (URL ID)
Delete a single item by specifying the ID in the URL.Example Request
Example Response
Delete Single Item (Body ID)
Delete a single item by specifying the ID in the request body.Example Request
Example Response
Delete Multiple Items (Bulk)
Delete multiple items in a single request.Example Request
Example Response
Soft Delete vs. Permanent Delete
Soft Delete (Trashbin)
Many itemtypes support soft deletion (moving to trash).Default Behavior
is_deleted = 1) but keeps it in the database. The item can be restored from the trashbin.
Permanent Delete (Purge)
Force permanent deletion usingforce_purge=true.
Example Request
Two-Step Deletion
Some items must be soft-deleted before they can be purged.Step 1: Soft Delete
Step 2: Purge
If you try to purge an item that hasn’t been soft-deleted first, you may receive an
ERROR_NOT_DELETED error.Disabling History
By default, all deletions are recorded in GLPI’s history. You can disable this for performance reasons.Example Request
Disabling history can improve performance for bulk deletions but removes audit trail capabilities.
Itemtype-Specific Behavior
Items with Trashbin
These itemtypes support soft deletion:- Computer
- Monitor
- Printer
- NetworkEquipment
- Peripheral
- Phone
- Ticket
- Problem
- Change
- User
- Group
- And most other asset/ITIL types
Items without Trashbin
Some itemtypes are always permanently deleted:- Log entries
- Links (relations between items)
- Configuration items
- Some system tables
force_purge is ignored as deletion is always permanent.
Cascading Deletions
Deleting certain items triggers cascading effects:Computer Deletion
Deleting a computer also removes:- Associated devices (processors, memory, etc.)
- Network ports
- Software installations
- Connections to peripherals
User Deletion
Deleting a user affects:- Assigned tickets (reassigned or unassigned)
- Group memberships
- Authorizations
Entity Deletion
Deleting an entity cascades to:- All items within the entity
- Sub-entities (if recursive)
Error Handling
Common Errors
Unable to delete the item. Check GLPI logs for details.
Some items in bulk operation failed. Check the response array for individual results.
The specified item ID does not exist or has already been deleted.
User lacks permission to delete items of this type.
You must soft-delete the item before permanently purging it.
Handling Partial Failures
When deleting multiple items, some may succeed while others fail:Best Practices
Restore Capability: Items that are soft-deleted can be restored from the GLPI interface or via API by updating the
is_deleted field to 0.History Management: Keep history enabled (
history=true) in production environments for compliance and audit purposes.Restoring Deleted Items
To restore a soft-deleted item, use the UPDATE endpoint to setis_deleted to false: