GLPI Rest API V2 (Fork) icon

GLPI Rest API V2 (Fork)

GLPI Rest API Node compatible with GLPI 9.x and above.

Actions34

Rule → Create

AI-generated

Summary

Creates a new rule in GLPI using a specified collection, name, criteria, and actions.

Inputs

  • collection (required) — Collection where the rule will be created (e.g., 'global', 'user', or specific scope).
  • name (required) — Name of the rule to create.
  • criteria — Conditions that determine when the rule is evaluated. Includes 'Condition' (AND/OR), 'Field', 'Operator', and 'Value'.
  • actions — Actions to perform when the criteria match. Includes 'Action Field', 'Action Type' (set/clear/notify), and 'Action Value'.
  • input — Raw JSON payload to send when creating a Rule. When Send raw body is enabled this will be used as the request body exactly as-is.
  • sendRawBody — When enabled, the JSON provided in 'Input (raw)' will be sent as the request body exactly as-is (no wrapper { input }).

Output shape

The created rule object from GLPI.

Returns the full JSON response from the GLPI API, including the newly created rule's ID and attributes.

Examples

Example 1: Create a global rule that sets the status to 'Resolved' when the category is 'Hardware'

Collection: global, Name: Auto-Resolve Hardware, Criteria: Field=category, Operator=equals, Value=Hardware; Action: Action Field=status, Action Type=set, Action Value=Resolved

Example 2: Create a user-specific rule that notifies the assignee when a ticket is updated

Collection: user, Name: Notify on Update, Criteria: Field=type, Operator=equals, Value=update; Action: Action Type=notify, Action Value=Assignee

Links

Discussion