Skip to content
Connect an agent
Organisations

Read an organisation's style rules

The saved style rules, as written and parsed, whether CI applies them (rules are saved and the owner's plan includes them), whether the caller may change them, and the plan.

GET/orgs/{org}/style-rules

TL;DR

QuestionAnswer
What does it do?Read an organisation's style rules.
What does it take?org in the path.
What does it return?Status 200 with a body of type OrgStyleRules.
What can go wrong?401 not signed in, or the key is not valid; 404 no such organisation, the caller is not a member of it, or the key is another organisation's; 429 too many requests; 503 organisations are not set up on this server. Every failure uses the one error envelope.

What it does

The saved style rules, as written and parsed, whether CI applies them (rules are saved and the owner's plan includes them), whether the caller may change them, and the plan. Every member may read them, and so may a key of the organisation, which is how the CLI and the GitHub Action read them.

Path parameters

FieldTypeRequiredDescription
orgstringyesThe organisation's id or its slug.

Responses

StatusMeaningBody
200The rules.OrgStyleRules
401Not signed in, or the key is not valid.ErrorResponse
404No such organisation, the caller is not a member of it, or the key is another organisation's.ErrorResponse
429Too many requests.ErrorResponse
503Organisations are not set up on this server.ErrorResponse

Response body

A 200 answer has the type OrgStyleRules.

FieldTypeRequiredDescription
rulesStyleRules | nullyesThe saved rules as the engine read them (the format of docs/architecture/repository-settings.md), or null when none are saved.
textstring | nullyesThe saved rules as the person wrote them, or null.
activebooleanyesTrue when rules are saved and the owner's plan includes saved style rules, so CI that reads them applies them.
canEditbooleanyesTrue when the caller's role may save and remove the rules.
plan"free" | "pro" | "enterprise"yesThe organisation's plan, which is its owner's.
updatedAtinteger | nullyesWhen the rules were last saved, in milliseconds since the epoch, or null.

See also

DocWhy
API referenceEvery endpoint, and the error envelope
SchemasEvery request and response type
Tool referenceThe operations as callable tools