GET
/orgs/{org}/rulesetsGet all organization repository rulesets
Get all the repository rulesets for an organization.
- RetriesRetries up to 2×, 500ms backoff, 30s timeout.
orgstringrequired
The organization name. The name is not case sensitive.
per_pageintegeroptional
The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)."
pageintegeroptional
The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)."
targetsstringoptional
A comma-separated list of rule targets to filter by.
If provided, only rulesets that apply to the specified targets will be returned.
For example, `branch,tag,push`.
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.