Get a code quality finding
Gets a single code quality finding.
OAuth app tokens and personal access tokens (classic) need the repo scope to use this endpoint with private or public repositories, or the public_repo scope to use this endpoint with only public repositories.
Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ”The account owner of the repository. The name is not case sensitive.
The name of the repository without the .git extension. The name is not case sensitive.
The number that identifies a finding.
Responses
Section titled “ Responses ”Response
Code quality finding
object
The finding number.
State of the code quality finding.
The REST API URL of the code quality finding resource.
Code quality rule
object
A unique identifier for the rule used to detect the finding.
The name of the rule used to detect the finding.
A short description of the rule used to detect the finding.
A detailed description of the rule used to detect the finding.
The severity of the rule used to detect the finding.
The category of the rule used to detect the finding.
Code quality file location
object
The file path where the finding was detected.
The line number where the finding starts.
The column number where the finding starts.
The line number where the finding ends.
The column number where the finding ends.
Code quality finding message
object
The message text of the code quality finding.
The message text of the code quality finding in markdown format.
The time the code quality finding was created.
Examples
{ "number": 42, "state": "open", "url": "https://api.github.com/repos/octocat/hello-world/code-quality/findings/42", "rule": { "id": "java/useless-null-check", "title": "Useless null check", "description": "Checking whether an expression is null when that expression cannot possibly be null is useless.", "help": "# Useless null check\nSometimes you can guarantee that a particular variable will never be null. For example when that variable has just been assigned a newly created object or is the exception caught by a `catch` clause. A null check on such a variable is ...", "severity": "warning", "category": "maintainability" }, "location": { "path": "java/UselessNullCheck.java", "start_line": 9, "start_column": 4, "end_line": 9, "end_column": 18 }, "message": { "text": "This check is useless. o cannot be null at this check, since it is guarded by instanceof.", "markdown": "This check is useless. [o](java/UselessNullCheck.java#L9C4-L9C18) cannot be null at this check, since it is guarded by [...instanceof...](java/UselessNullCheck.java#L7C13-L7C25)." }, "created_at": "2026-01-23T12:34:56Z"}Response if the user is not authorized to access Code quality for this repository.
Basic Error
object
Example generated
{ "message": "example", "documentation_url": "example", "url": "example", "status": "example"}Resource not found
Basic Error
object
Example generated
{ "message": "example", "documentation_url": "example", "url": "example", "status": "example"}Service unavailable
object
Example generated
{ "code": "example", "message": "example", "documentation_url": "example"}