Sample - GitHub REST API
GET/orgs/{org}/rulesets/rule-suites

List organization rule suites

Lists suites of rule evaluations at the organization level. For more information, see "Managing rulesets for repositories in your organization."

  • RetriesRetries up to 2×, 500ms backoff, 30s timeout.

9 parameters
orgstringrequired
The organization name. The name is not case sensitive.
refstringoptional
The name of the ref. Cannot contain wildcard characters. Optionally prefix with `refs/heads/` to limit to branches or `refs/tags/` to limit to tags. Omit the prefix to search across all refs. When specified, only rule evaluations triggered for this ref will be returned.
repository_namestringoptional
The name of the repository to filter on.
time_periodstringoptional
The time period to filter by. For example, `day` will filter for rule suites that occurred in the past 24 hours, and `week` will filter for rule suites that occurred in the past 7 days (168 hours).
Allowed:hourdayweekmonthDefault:day
actor_namestringoptional
The handle for the GitHub user account to filter on. When specified, only rule evaluations triggered by this actor will be returned.
rule_suite_resultstringoptional
The rule suite results to filter on. When specified, only suites with this result will be returned.
Allowed:passfailbypassallDefault:all
evaluate_statusstringoptional
The evaluate status to filter on. When specified, only rule suites resulting from rulesets with the specified evaluate status will be returned. - `all` - all rule suites will be returned. - `active` - only rule suites resulting from rulesets in active (non-evaluate) mode will be returned. - `evaluate` - only rule suites resulting from rulesets in evaluate mode will be returned.
Allowed:allactiveevaluateDefault:all
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)."
Default:30
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)."
Default:1

3 status codes
200Response
idintegeroptional
The unique identifier of the rule insight.
actor_idintegeroptional
The number that identifies the user.
actor_namestringoptional
The handle for the GitHub user account.
before_shastringoptional
The first commit sha before the push evaluation.
after_shastringoptional
The last commit sha in the push evaluation.
refstringoptional
The ref name that the evaluation ran on.
repository_idintegeroptional
The ID of the repository associated with the rule evaluation.
repository_namestringoptional
The name of the repository without the `.git` extension.
pushed_atstringoptional
resultstringoptional
The result of the rule evaluations for rules with the `active` enforcement status.
Allowed:passfailbypass
evaluation_resultstringoptional
The result of the rule evaluations for rules with the `active` and `evaluate` enforcement statuses, demonstrating whether rules would pass or fail if all rules in the rule suite were `active`.
Allowed:passfailbypass
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.