GET
/orgs/{org}/rulesets/{ruleset_id}Get an organization repository ruleset
Get a repository ruleset for an organization.
Note: To prevent leaking sensitive information, the bypass_actors property is only returned if the user
making the API request has write access to the ruleset.
- RetriesRetries up to 2×, 500ms backoff, 30s timeout.
orgstringrequired
The organization name. The name is not case sensitive.
ruleset_idintegerrequired
The ID of the ruleset.
200Response
idintegerrequired
The ID of the ruleset
namestringrequired
The name of the ruleset
targetstringoptional
The target of the ruleset
source_typestringoptional
The type of the source of the ruleset
sourcestringrequired
The name of the source
enforcementstringrequired
The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page (`evaluate` is only available with GitHub Enterprise).
bypass_actorsarray<RepositoryRulesetBypassActor>optional
The actors that can bypass the rules in this ruleset
current_user_can_bypassstringoptional
The bypass type of the user making the API request for this ruleset. This field is only returned when
querying the repository-level endpoint.
node_idstringoptional
_linksobjectoptional
conditionsobjectoptional
Parameters for a repository ruleset ref name condition
rulesarray<RepositoryRule>optional
created_atstringoptional
updated_atstringoptional
404Resource not found
messagestringoptional
documentation_urlstringoptional
urlstringoptional
statusstringoptional
500Internal Error
messagestringoptional
documentation_urlstringoptional
urlstringoptional
statusstringoptional
Error handling
A 404 is returned: Resource not found. A 500 is returned: Internal Error.