Per type counts of open and closed security findings, for the repository type tabs
GET
/repos/{owner}/{repo}/security/summary
const url = 'https://gitea.example.com/api/v1/repos/example/example/security/summary';const options = {method: 'GET', headers: {Authorization: 'Basic <credentials>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://gitea.example.com/api/v1/repos/example/example/security/summary \ --header 'Authorization: Basic <credentials>'Gitea Enterprise only. This endpoint is not part of the community edition.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”owner
required
string
Name of the owner
repo
required
string
Name of the repository
Responses
Section titled “Responses”FindingSummary
Media typeapplication/json
FindingSummary is the per type, per state counts the repository type tabs render.
object
closed
FindingTypeCounts is the number of findings of each type in one state.
object
all
integer format: int64
code_scanning
integer format: int64
dependencies
integer format: int64
secrets
integer format: int64
open
FindingTypeCounts is the number of findings of each type in one state.
object
all
integer format: int64
code_scanning
integer format: int64
dependencies
integer format: int64
secrets
integer format: int64
Examplegenerated
{ "closed": { "all": 1, "code_scanning": 1, "dependencies": 1, "secrets": 1 }, "open": { "all": 1, "code_scanning": 1, "dependencies": 1, "secrets": 1 }}