Add rule (addrule)
Create a new style guide rule.
Create a new style guide rule.
Request
Use the shared HTTP API endpoint and request formats.
See HTTP API Overview.
Parameters
cmd
string
Yes
style_guide
Command name.
action
string
Yes
addrule
Action name.
collection
string
Yes
A name of the collection in which rules are stored.
lang
string
No
common
Language scope to create the rule in (example: en_US or en).
patterns
string[]
Yes
Patterns to match.
suggestions
string[]
No
[]
Replacement suggestions.
state
boolean
No
true
Enables/disables the rule.
context_include
string[]
No
[]
Matches only when one of these contexts exists.
context_exclude
string[]
No
[]
Skips matches when one of these contexts exists.
description
string
No
Message shown to the user.
Behavior
Creates a new rule in the target style guide file.
Returns the created rule in
result.
Response
Single rule object containing its rule ID is returned.
See Response schema.
Errors
See
Examples
Was this helpful?

