Style guide API
Was this helpful?
Manage custom style guide rules over the HTTP API.
This command is action-based (not REST).
Command name: style_guide
See HTTP API Overview for endpoint, methods, and formats.
An access key is required for this command. See Access key.
A style guide rule is scoped by language and collection.
To uniquely target a rule, you need all:
lang (language scope)
rule (rule ID)
collection
lang defaults to common.
collection defaults to style guide for add/delete/edit rule(s) action and empty for getrules action. Required for add/delete/edit collection actions and empty for getcollections action
It can also be:
a language code like en_US
a language group like en
Every action uses parameters listed below. For common parameters for all commands, see HTTP API Overview.
cmd
string
Yes
style_guide
Command name.
action
string
Yes
One of the actions below.
lang
string
No
common
Language scope for the rule set. Use en_US or en to target a specific language.
new_lang
string
No
common
Same as lang. Used with the editcollection action to update the language of a collection.
rule
string
Yes
Comma-separated list of rules
collection
string
No for add/delete/edit rule actions.
Yes for add/delete/edit collection actions.
style guide
Name of the collection in which rules are stored.
new_collection
string
Yes
Modified name of the collection in which rules will be stored
If you only know the text pattern but don’t have a rule ID yet, start with getrules.
lang is part of the rule identity. Same rule ID in a different lang scope is treated as a different target.
Success responses share the same envelope and rule object schema.
See Response schema.
Was this helpful?
Was this helpful?

