GET/repos/{owner}/{repo}/rulesets/{ruleset_id}/history/{version_id}

Get a repository ruleset version

Retrieves a specific historical version of a repository ruleset. Identify the repository and ruleset with owner, repo, and ruleset_id, then specify the version with version_id. The response includes the version details and the ruleset state for that version.

4 parameters
ownerstringrequired
The account owner of the repository. The name is not case sensitive.
repostringrequired
The repository name without the `.git` extension. The name is not case sensitive.
ruleset_idintegerrequired
The ID of the ruleset whose history contains the version.
version_idintegerrequired
The ID of the historical ruleset version to retrieve.

3 status codes
200Returns the historical ruleset version, including its version ID, actor, update time, and ruleset state.
version_idintegerrequired
The ID of the previous version of the ruleset
actorobjectrequired
The actor who updated the ruleset
updated_atstringrequired
stateobjectrequired
The state of the ruleset version
404Returned when the repository, ruleset, or historical version cannot be found.
messagestringoptional
documentation_urlstringoptional
urlstringoptional
statusstringoptional
500Returned when an internal error occurs.
messagestringoptional
documentation_urlstringoptional
urlstringoptional
statusstringoptional

Error handling

A 404 is returned when the owner path parameter and repo path parameter do not identify a repository, or the ruleset_id path parameter or version_id path parameter does not identify a version for that ruleset. A 500 indicates an internal error.