Skip to content
Design preview: examples use a local mock server.
EndpointsRules

Get a rule

GET
/v1/rules/{rule_id}

Responds with one rule in full: its tier, its check type, the guidance in Markdown, and its examples. Every finding from POST /v1/checks carries rule ids you can pass here.

Authorization

apiKey
headerAuthorizationBearer <API key>

Send your API key as a bearer token: Authorization: Bearer <key>. Test keys start with wsk_test_. The mock server accepts any key, but it rejects a request with no Authorization header.

Path parameters

rule_id*string

A rule id, such as one from a finding’s rule_ids.

Match^[a-z0-9-]+$
Lengthlength <= 200

Response body

The rule.

application/json
  1. response
id*RuleId

A stable rule id. The prefix names the section, such as punct- for punctuation or floor- for the slop guard.

Match^[a-z0-9-]+$
Lengthlength <= 200
name*string

The rule’s name in the guide.

guide*Guide

The guide a rule belongs to.

Value in"style-guide""ux-writing""slop-guard"
section*string

The id of the guide section the rule is in.

tier*Tier

How strongly a rule applies. never blocks publication. avoid means edit on one sighting, or keep it with a stated reason. prefer is a suggestion.

Value in"never""avoid""prefer"
check*CheckType

mechanical if a pattern can catch it, judgment if a reader has to decide.

Value in"mechanical""judgment"
automated*boolean

true if POST /v1/checks can report this rule.

link*string

The rule’s page in the published guide.

Formaturi
body*string

The rule’s guidance, in Markdown.

examples*array<>

Pairs of text to avoid and text to write instead.

Example request
curl -X GET 'http://127.0.0.1:4010/v1/rules/term-please'
Example response
{  "id": "term-please",  "name": "Please in instructions",  "guide": "style-guide",  "section": "terminology",  "tier": "avoid",  "check": "mechanical",  "automated": true,  "link": "https://watership.ca/style-guide/terminology/#term-please",  "body": "**Don’t write “please” in documentation or interface text.** An instruction is not a favor, and the word slows every step. The one exception is a request the reader makes for the company’s benefit rather than their own, such as reporting a bug or filling in a survey.",  "examples": [    {      "instead": "Please select Save to keep your changes.",      "write": "Select Save to keep your changes."    }  ]}