Diffy icon

Diffy

Interact with Diffy AI Code Review API

Rule → Create Global Rule

AI-generated

Summary

Create a new global rule in Diffy by specifying its content and optional name, optionally including additional custom parameters in the API request.

Inputs

  • Rule Content (required) — The rule definition in string format, required to specify the rule logic or criteria.
  • Rule Name — The name or title to identify the rule.
  • Additional Parameters — Optional key-value pairs for additional API request parameters, allowing customization beyond the main fields.

Output shape

a single record representing the created global rule's details as returned by the Diffy API.

The operation sends a POST request to the /api/v1/rules/global endpoint with the provided data. The response contains the created rule object in JSON format. Errors are returned as item errors unless 'Continue On Fail' is enabled.

Discussion