runtime_mutations
rules

Create Rule Handler

post/api/rules

Request body

namestring required
descriptionstring
contentstring
rule_type'always' | 'manual' | 'pipeline'
globsstring[]
workspace_idstring nullable
kind'rule' | 'file-path'

Discriminator for which UI/dialog should render a rule.

rule (default) is a free-form natural-language rule. file_path is a structured rule whose body is generated from its path. The injected prompt content is the same for both — kind only affects the editor that opens for the rule.

file_pathstring nullable
pipelineobject nullable

Response

Successful Response

{"stackTrail":"paths:/api/rules:post:responses:200:content:application/json:schema","oasType":"schema","type":"unknown"}

Changes

Changed in 2 of the 16 revisions of this API.13

  • bc8a81bf391411See the full diff
    • removed the request property project_id

      request-property-removed

    • added the new optional request property workspace_id

      new-optional-request-property

    This revision also has 8 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

    • added the new optional request property pipeline

      new-optional-request-property

    • added the new pipeline enum value to the request property rule_type

      request-property-enum-value-added

    This revision also has 5 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog