Github API - Test Config

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

Lists the details of all code scanning analyses for a repository,
starting with the most recent.
The response is paginated and you can use the page and per_page parameters
to list the analyses you're interested in.
By default 30 analyses are listed per page.

The rules_count field in the 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.

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.

Deprecation notice:
The tool_name field is deprecated and will, in future, not be included in the response for this endpoint. The example response reflects this change. The tool name can now be found inside the tool field.
List code scanning analyses 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)

key tool-name

tool-name [scalar]

The name of a code scanning tool. Only results by this tool will be listed. You can specify the tool by using either tool_name or tool_guid, but not both.

API:
Github Open API
(version: 1.1.4)

key tool-guid

tool-guid [scalar]

The GUID of a code scanning tool. Only results by this tool will be listed. Note that some code scanning tools may not include a GUID in their analysis data. You can specify the tool by using either tool_guid or tool_name, but not both.

API:
Github Open API
(version: 1.1.4)

key page

page [scalar]

Page number of the results to fetch.

API:
Github Open API
(version: 1.1.4)

key per-page

per-page [scalar]

The number of results per page (max 100).

API:
Github Open API
(version: 1.1.4)

ref code-scanning-ref

code-scanning-ref [scalar]

The full Git reference, formatted as refs/heads/<branch name>,
refs/pull/<number>/merge, or refs/pull/<number>/head.

API:
Github Open API
(version: 1.1.4)

sarif_id code-scanning-analysis-sarif-id

code-scanning-analysis-sarif-id [scalar]

An identifier for the upload.

API:
Github Open API
(version: 1.1.4)

key direction

direction [scalar]

The direction to sort the results by.

API:
Github Open API
(version: 1.1.4)

sort string

string [scalar]

The OpenAPI string 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)
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)