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 3 of the 30 revisions of this API.15

    • ○

      added the optional property // to the response with the status

      response-optional-property-added

    • ○

      added the optional property // to the response with the status

      response-optional-property-added

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

  • bc8a81bf391411See the full diff
    • ●

      removed the request property

      request-property-removed

    • ○

      added the new optional request property

      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

      new-optional-request-property

    • ○

      added the new pipeline enum value to the request property

      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