Add Item(s)
Create one or more items in ITSM-NG.Endpoint
Headers
Session token obtained from initSession
Optional authorization string from API configuration
Must be
application/json for regular requests or multipart/form-data for file uploadsRequest Body
For single item: an object with fields of the itemtype to be insertedFor multiple items: an array of objects, each containing fields for one item
Response
The ID of the created item (for single item creation)
Status message about the operation
id and message for each item.
Response Headers
- Location: URL of the created item (single item creation)
- Link: URLs of created items (bulk creation)
Response Codes
201 Created- Item(s) created successfully207 Multi-Status- Bulk operation with some failures400 Bad Request- Invalid input parameters401 Unauthorized- Invalid or missing session token
Create Single Item
Add a single item to the system.Example Request
Example Response
Create Multiple Items (Bulk)
Add multiple items in a single request.Example Request
Example Response
When creating multiple items, the API returns a 207 Multi-Status response. Each item in the response array corresponds to the item at the same index in your request. Items with
"id": false indicate creation failures.Upload a Document File
Upload files by creating Document items with file attachments.Special Requirements
Endpoint
Headers
Session token obtained from initSession
Optional authorization string from API configuration
Must be
multipart/form-dataForm Data Parameters
JSON string containing the input data with:
name- Document name_filename- Array of filenames being uploaded
The file to upload. Use array notation for multiple files:
filename[0], filename[1], etc.Example Request
Example Response
Upload Multiple Files
To upload multiple files in one document:Common Item Fields
Most itemtypes support these common fields:Standard Fields
The name or title of the item
Additional comments or description
The entity ID this item belongs to
Whether the item applies to sub-entities
Soft delete flag
Asset-Specific Fields
For asset types (Computer, Monitor, Printer, etc.):Serial number
Inventory number or alternative serial
Contact person
Contact number
Technical manager user ID
Technical manager group ID
Location ID
Manufacturer ID
State ID (e.g., Production, Stock)
ITIL Item Fields
For Ticket, Problem, and Change itemtypes:Description or content of the ITIL item
Priority level (1-5)
Urgency level (1-5)
Impact level (1-5)
Status ID
Request type ID (source of the request)
Requester user ID (use underscore prefix for actors)
Assigned technician user ID
Assigned group ID
Error Handling
Common Errors
Unable to add the item. Check GLPI logs for details.
Some items in bulk operation failed. Check the response array for details on each item.
User lacks permission to create items of this type.
The input must be an object (single item) or array of objects (multiple items).
Validation Errors
When creating items, validation may fail for:- Missing required fields: Each itemtype has mandatory fields
- Invalid foreign keys: Referenced IDs must exist (e.g., entities_id, users_id)
- Duplicate values: Unique constraints on certain fields
- Permission issues: User profile must have create rights
Best Practices
File Size Limits: File uploads are subject to PHP and web server limits. Check your
upload_max_filesize and post_max_size settings.