Github API - Test Config

GET /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}
repos
code-scanning

Gets a specified code scanning analysis for a repository.
You must use an access token with the security_events scope to use this endpoint with private repos,
the public_repo scope also grants permission to read security events on public repos only.
GitHub Apps must have the security_events read permission to use this endpoint.

The default JSON response contains fields that describe the analysis.
This includes the Git reference and commit SHA to which the analysis relates,
the datetime of the analysis, the name of the code scanning tool,
and the number of alerts.

The rules_count field in the default response give the number of rules
that were run in the analysis.
For very old analyses this data is not available,
and 0 is returned in this field.

If you use the Accept header application/sarif+json,
the response contains the analysis data that was uploaded.
This is formatted as
SARIF version 2.1.0.
Get a code scanning analysis for a repository

Arguments
key owner

owner [scalar]

The account owner of the repository. The name is not case sensitive.

API:
Github Open API
(version: 1.1.4)

key repo

repo [scalar]

The name of the repository. The name is not case sensitive.

API:
Github Open API
(version: 1.1.4)

analysis_id integer

integer [scalar]

The OpenAPI integer type

API:
Github Open API
(version: 1.1.4)

Returns
200 application/json code-scanning-analysis

code-scanning-analysis [object]

Attributes
deletable boolean

error string

id integer

Unique identifier for this analysis.

results_count integer

The total number of results in the analysis.

rules_count integer

The total number of rules used in the analysis.

warning string

Warning generated when processing the analysis

API:
Github Open API
(version: 1.1.4)
200 application/json+sarif 3872

3872 [object]

API:
Github Open API
(version: 1.1.4)
403 code_scanning_forbidden_read

code_scanning_forbidden_read [scalar]

Response if GitHub Advanced Security is not enabled for this repository

API:
Github Open API
(version: 1.1.4)
404 not_found

not_found [scalar]

Resource not found

API:
Github Open API
(version: 1.1.4)
503 service_unavailable

service_unavailable [scalar]

Service unavailable

API:
Github Open API
(version: 1.1.4)
API:
Github Open API
(version: 1.1.4)